docs.rs failed to build nomadnet-rs-0.2.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
nomadnet-rs
Rust library for NomadNet node hosting and browsing over the Reticulum Network Stack.
Zero-application-logic dependencies — works with any RNS-based project.
Features
- Node hosting — serve
.mu(Micron) pages and binary files over RNS Link request/response - Node discovery — track announced NomadNet nodes from RNS transport
- Node browsing — fetch pages and files from remote NomadNet nodes via [
NomadBrowser] - Micron markup — fluent builder for NomadNet page content, including tables and partials
nomadnet-serve Binary
The nomadnet-serve binary serves static .mu files from a folder as a NomadNet node. Enable the serve feature:
[]
= { = "0.1", = ["serve"] }
# Install from crates.io
# Run
Drop .mu files in the pages directory. If no index.mu exists, one is auto-generated listing all available pages. Use --files-dir to serve binary files alongside pages.
| Flag | Default | Description |
|---|---|---|
-p, --pages-dir |
. |
Directory containing .mu files |
-f, --files-dir |
off | Directory containing binary files to serve |
--rns-config |
~/.config/reticulum/config |
RNS config file |
--identity |
~/.nomadnet-serve/identity |
Identity file path |
--node-name |
nomadnet-serve |
Node display name (for announces) |
--announce-interval |
600 |
Announce interval in seconds |
--watch |
off | Watch pages/files directories for changes |
--verbose |
off | Enable debug logging |
Quick Start (Library)
[]
= "0.1"
= "0.1"
= "0.1"
= "0.5"
Serve pages and files
use Arc;
use ;
use RnsNode;
let pages = ;
let files = ;
let nomad = new?;
let page_cache = nomad.page_cache;
let file_cache = nomad.file_cache;
let mut page = new;
page.heading;
page.text;
page_cache.set;
Build a Micron page
use ;
let mut page = new;
page.cache_directive;
page.heading;
page.divider;
page.bold;
page.text;
page.blank_line;
// Table
page.table_start;
page.table_row;
page.table_row;
page.table_row;
page.table_end;
page.blank_line;
// Auto-updating partial
page.partial;
// Truecolor
page.truecolor_fg;
page.text;
page.reset_fg;
Discover nodes
use ;
let mut directory = new;
// In your RNS callback:
Browse remote nodes
use ;
let browser = new;
let mut events = browser.events;
browser.fetch?;
// Fetch with request data
browser.fetch_with_data?;
// Fetch a file
browser.fetch_file?;
// In your event loop:
match events.recv.await
Modules
| Module | Description |
|---|---|
[node] |
NomadNode + PageCache + FileCache — serve pages and files via RNS Link request/response |
[micron] |
MicronBuilder + TableAlign — fluent API for NomadNet page markup |
[directory] |
NomadDirectory — track discovered NomadNet nodes from announces |
[browser] |
NomadBrowser — fetch pages and files from remote nodes, with URL field parsing |
[types] |
Shared types: NodeConfig, BrowseEvent, DirectoryEntry, NomadError |
Architecture Notes
- NomadNet uses RNS Link request/response (not LXMF messaging) on aspect
nomadnetwork.node - Page handlers run synchronously on the RNS driver thread — use
PageCache/FileCacheto decouple async page generation from sync request handling - A built-in
/page/test.muhandler is always registered for connectivity debugging - Cache misses for pages return auto-generated 404 pages; file cache misses return no response
NomadBrowserdistinguishes page vs file responses via the path prefix (/page/vs/file/)- URL field parsing (
url\field=val) is supported viaparse_url_fields()andfetch_with_data()`
License
MIT