github Power2All/nanotorrent v0.3.2
NanoTorrent 0.3.2

3 hours ago

Plugins — new capabilities

  • network permissionhttp_get(url) and add_torrent_url(url) (the latter needs add too); capped at 4 MB and 30 s, http/https only so it cannot become a filesystem read.
  • data permission — a 64 KB key/value store per plugin, namespaced, surviving restarts.
  • ui permission — a window (optional upper list, main list, text field, buttons), a menu-bar dropdown of the plugin's own, and a Configure cog on its Preferences row. Each opted into separately.
  • on_tick() — fires once a minute on a wall-clock deadline, so a busy session cannot starve it. No permission: a timer grants no reach.
  • parse_json / parse_xml — no permission either; they are arithmetic on a string the script already holds. Without them a feed reader would mean writing an XML parser in Rhai.
  • Permissions went from 7 to 10; new handlers on_tick, on_ui_open, on_ui_row, on_ui_group, on_ui_button, on_ui_menu, on_ui_configure.
  • One dropdown per plugin, structurally — a plugin holds a single menu, so declaring one twice replaces it; capped at 20 items so it cannot cover the client.
  • Settings apply on Ok, no restart — the host stops, drops what it drew, and reloads from the settings; a script edited on disk is picked up the same way.
  • Failed handlers report into the plugin's own window, not only the log — a window stuck on "Checking…" is otherwise indistinguishable from a hang.
  • Examples are seeded per name, so upgrading delivers a newly added one to a profile that already has a plugins folder, while one you delete stays deleted.
  • rss.rhai ships as a second example — feeds in an upper list, the selected feed's items below, its own RSS menu, and a Configure cog.

User interface

  • Two live speed charts in the toolbar — download (green) and upload (blue), one minute each, each with its own label and tooltip.
  • Each scales to its own peak, not a shared one — on a mostly-downloading client a shared scale flattens upload into a line along the bottom; each tooltip states its own peak so a full-height line means something.
  • Samples spread across the full width however few there are, so the charts are not mostly empty during the first minute.
  • Independently resizable and persisted, with a double-click resetting only the chart you clicked.
  • View ▸ Plugins removed — superseded by each plugin's own menu-bar dropdown.

Fixes

  • Rhai's limits are now pinned explicitly — it halves several of its own under debug_assertions, so a plugin could compile in a release build and fail to parse in a debug one.
  • Plugin string ceiling raised to twice the HTTP limit — it was 64 KB against a 4 MB fetch cap, so any feed over 64 KB was fetched successfully and then refused by the engine.
  • Array/map ceiling raised from 10,000 to 50,000, for feeds with thousands of items.
  • Plugin storage moved to persistent_objectConfiguration::set is an UPDATE against a row a migration created, and plugin names cannot be known at migration time.
  • A plugin with a menu but no window no longer opens a blank, untitled one.
  • Removed a literal 0x08 backspace committed in docs/MICROSOFT-STORE.md, which rendered installer\build-msix.ps1 as installeruild-msix.ps1.

Dependencies

  • argon2 0.5 → 0.6 — API rewrite (SaltString/rand_core moved, PasswordHash deprecated, hash_password now salts itself); covered by a test that verifies hashes generated by 0.5.3 still authenticate.
  • rcgen 0.13 → 0.14 (key_pairsigning_key), rfd 0.15 → 0.17 (tokio feature no longer exists; ashpd left the tree), base64 0.22 → 0.23, open 5.4.3, plus 16 transitive updates.
  • quick-xml held at 0.41 deliberatelylibrqbit-upnp pins "0.41", so 0.42 would compile a second copy rather than upgrade the shared one.
  • Net effect on the graph: no new duplicate versions, 5 resolved (digest, block-buffer, crypto-common, generic-array, cpufeatures).

Don't miss a new nanotorrent release

NewReleases is sending notifications on new releases.