Rust 2024 edition native desktop app (wry+WebKit/WebView2). Single binary, no workspace.
# run native app
cargo run -- ui
# run in browser for debug
cargo run -- ui-browser
# format + check before commit (CI enforces these)
cargo fmt
cargo test --locked
node --check ui/app.js
node --test tests/routes.test.jscargo fmt --all -- --checkmust pass. Always runcargo fmtbefore committing.- CI uses
-D warnings(converted fromRUSTFLAGS). Fmt + no warnings required. - Every push to the
devbranch triggers the CI pipeline. However, full builds and prereleases are only run if the commit message contains the[build]tag (or viaworkflow_dispatchmanual trigger).
- Backend:
src/api/router.rsdispatches all HTTP API calls. No web framework -- manual match on(method, path). - Frontend: vanilla JS ES modules in
ui/. No bundler. Rawimportstatements. - Communication:
fetch()tolocalhost:{port}. API endpoints defined insrc/api/router.rs. - State:
src/api/state.rsholds mutable global state viaMutex<ApiState>. - Developer console: open by clicking logo 5 times. Uses
/api/open-dev-consolein native mode (window.open doesn't work in wry WebView). - Native WebView detection:
?native=1URL query param setswindow.isNativeWebView.
| Path | Purpose |
|---|---|
src/main.rs |
CLI entrypoint, subcommands |
src/lib.rs |
Module declarations |
src/api/ |
HTTP API handlers + router + state |
src/server.rs |
HTTP server bootstrap |
src/ram.rs |
RAM acquisition (AVML/WinPMEM/Volatility) |
src/disk.rs |
Disk imaging |
src/android/ |
Android ADB/acquisition modules |
src/volatility.rs |
Volatility3 integration |
ui/ |
Frontend: ES modules, no framework |
ui/developer.js |
Dev console (5x logo click) |
tests/routes.test.js |
Frontend module health tests |
scripts/ |
Linux/Windows build scripts |
packaging/ |
WiX MSI source |
.github/workflows/ci.yml |
CI pipeline definition |
upstream→noirlang/amele(main repo)wormnext→worm-next/worm-next(active repo)
window.fetchmay be undefined in test environment (Node.js test runner). Guard calls withtypeof window.fetch === "function".cargo run -- uistarts the real desktop window. Browser debug requirescargo run -- ui-browserthen openhttp://localhost:{port}/?route=home.- Developer console log sequences: backend (1..99999) and frontend (100000..) use separate ranges to avoid collision.
- API interceptor in dev console skips
/api/developer-logsand/api/developer-logto prevent loops. - UI tests mock
globalThis.window,document,localStorageintests/routes.test.js. - MSI builds use static CRT linking via
.cargo/config.toml(+crt-static).
- Linux:
libgtk-3-dev libwebkit2gtk-4.1-dev - Windows: WebView2 Runtime, WiX 3.14 for MSI
- Rust stable with
rustfmtcomponent