build: vendor dependencies as submodules

This commit is contained in:
ookami125 2026-06-24 23:51:21 -04:00
parent 252bc8140b
commit bc1eb5a08e
8 changed files with 23 additions and 8 deletions

12
.gitmodules vendored Normal file
View file

@ -0,0 +1,12 @@
[submodule "external/torrent-peer"]
path = external/torrent-peer
url = ssh://git@git.cieric.com/cieric/Naut-Peer.git
branch = master
[submodule "external/torrent-tracker"]
path = external/torrent-tracker
url = ssh://git@git.cieric.com/cieric/Naut-Tracker.git
branch = main
[submodule "web/torrent-ui"]
path = web/torrent-ui
url = ssh://git@git.cieric.com/cieric/Naut-Plugin-WebUI.git
branch = webui-plugin

View file

@ -51,9 +51,9 @@ if(NAUT_SAN STREQUAL "address" OR NAUT_SAN STREQUAL "undefined")
set(PEER_ASAN ON CACHE BOOL "" FORCE)
set(TRACKER_ASAN ON CACHE BOOL "" FORCE)
endif()
add_subdirectory(${CMAKE_SOURCE_DIR}/../torrent-peer
add_subdirectory(${CMAKE_SOURCE_DIR}/external/torrent-peer
${CMAKE_BINARY_DIR}/torrent-peer)
add_subdirectory(${CMAKE_SOURCE_DIR}/../torrent-tracker
add_subdirectory(${CMAKE_SOURCE_DIR}/external/torrent-tracker
${CMAKE_BINARY_DIR}/torrent-tracker)
if(NAUT_STANDALONE)

View file

@ -26,7 +26,7 @@ apps/echo/ Phase 1 gate: io_uring echo server on the buffer pool
apps/leech/ Phase 3 gate: verified single-peer download
apps/swarm/ tracker/DHT discovery, magnets, and concurrent peers
apps/nautctl/ thin CLI frontend over daemon RPC
plugins/webui/ daemon plugin that serves ../torrent-ui as the web panel
plugins/webui/ daemon plugin that serves web/torrent-ui as the web panel
tests/unit/ unit + concurrency tests
```
@ -124,11 +124,11 @@ For tooling and plugin methods, the generic form remains
### Web panel
The web panel is a daemon plugin, not part of `nautctl`. It serves the static
frontend from `../torrent-ui/public` by default and adapts that UI's `/api/*`
frontend from `web/torrent-ui/public` by default and adapts that UI's `/api/*`
contract to Naut's daemon RPC surface:
```sh
NAUT_WEBUI_ROOT=../torrent-ui/public \
NAUT_WEBUI_ROOT=web/torrent-ui/public \
NAUT_AUTH_PASSWORD='change-me' \
./build/nautd --socket /tmp/nautd.sock --plugin ./build/naut_webui.so
# open http://127.0.0.1:8080
@ -139,7 +139,7 @@ Configuration:
```sh
NAUT_WEBUI_HOST=127.0.0.1 # default
NAUT_WEBUI_PORT=8080 # default
NAUT_WEBUI_ROOT=../torrent-ui/public
NAUT_WEBUI_ROOT=web/torrent-ui/public
NAUT_AUTH_USER=admin # default
NAUT_AUTH_PASSWORD=change-me # generated and logged if omitted
NAUT_WEBUI_SAVE_PATH=/downloads # default add-torrent destination

View file

@ -1,6 +1,6 @@
/* naut_swarm — multi-peer download driver built on the torrent-peer engine.
*
* The engine (../torrent-peer, engine.h) owns all peer sockets, the wire
* The engine (external/torrent-peer, engine.h) owns all peer sockets, the wire
* protocol, the request pipeline, transports (TCP/µTP/MSE), and piece selection.
* This driver:
* - parses the .torrent / magnet and (for magnet) fetches the info dict,

1
external/torrent-peer vendored Submodule

@ -0,0 +1 @@
Subproject commit f85278fcf2cedda7c1d0da6f227f13714810c550

1
external/torrent-tracker vendored Submodule

@ -0,0 +1 @@
Subproject commit dabc4875e5e3da928c2ceba948f796bd36004cc7

View file

@ -2994,7 +2994,7 @@ static const char *find_root(void) {
const char *env = getenv("NAUT_WEBUI_ROOT");
if (dir_exists(env)) return env;
static const char *candidates[] = {
"../torrent-ui/public",
"web/torrent-ui/public",
"torrent-ui/public",
"./public",
"/usr/share/naut/torrent-ui/public",

1
web/torrent-ui Submodule

@ -0,0 +1 @@
Subproject commit d1b90cfdcbb51de268b98edf2dc0843b9e891323