webui: replace nautctl web server with a loadable plugin
Drop the web UI that was compiled into nautctl and serve the torrent-ui front end (../torrent-ui/public) from a native plugin (plugins/webui) loaded via `nautd --plugin`. The plugin talks to the engine only through the host call_rpc ABI and adapts the daemon's RPC surface to the qBittorrent-style contract the UI expects (snapshot/SSE, torrent detail tabs, add/delete, cookie auth). Also folds in the daemon refactor that owns per-torrent worker threads and the swarm engine (naut_swarm) used by the plugin's data source. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
50a357968a
commit
8dde48c05a
27 changed files with 2706 additions and 403 deletions
|
|
@ -33,11 +33,12 @@ naut_err naut_storage_write(naut_storage *s, int64_t offset, const void *buf, si
|
|||
naut_err naut_storage_read(naut_storage *s, int64_t offset, void *buf, size_t len);
|
||||
naut_err naut_storage_sync(naut_storage *s);
|
||||
|
||||
/* Move one completed file out to `dest` (rename, or copy+unlink across file
|
||||
* systems). The caller must guarantee the file is complete — every piece
|
||||
* overlapping it verified — so no further writes target it. After this the slot
|
||||
* is "externalized": subsequent I/O to its region returns NAUT_ERR_RANGE. This
|
||||
* is the storage half of the "move files as they finish" feature. */
|
||||
/* Move one file to `dest` (rename, or copy+unlink across file systems) and keep
|
||||
* tracking it there: the slot's path is updated and its fd reopened, so the
|
||||
* engine can still read/write/seed the file at its new location. Typically
|
||||
* called the moment a file completes (the storage half of "move files as they
|
||||
* finish"), but safe at any time. The owning process therefore never loses
|
||||
* track of a moved file. Returns NAUT_ERR_IO if the move or reopen fails. */
|
||||
naut_err naut_storage_relocate(naut_storage *s, size_t file_index, const char *dest);
|
||||
|
||||
int64_t naut_storage_total(const naut_storage *s);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue