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
|
|
@ -25,6 +25,7 @@ typedef naut_err (*naut_plugin_rpc_fn)(void *context,
|
|||
char **response_json);
|
||||
typedef void (*naut_plugin_event_fn)(void *context,
|
||||
const naut_event *event);
|
||||
typedef naut_err (*naut_plugin_shutdown_fn)(void);
|
||||
|
||||
typedef struct naut_host_api {
|
||||
uint32_t abi_version;
|
||||
|
|
@ -41,6 +42,8 @@ typedef struct naut_host_api {
|
|||
void *context);
|
||||
void (*emit_event)(void *host_context, const naut_event *event);
|
||||
void (*log)(void *host_context, int level, const char *message);
|
||||
naut_err (*call_rpc)(void *host_context, const char *method,
|
||||
const char *request_json, char **response_json);
|
||||
} naut_host_api;
|
||||
|
||||
/* Every plugin exports this exact symbol. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue