| Crates.io | s5_node |
| lib.rs | s5_node |
| version | 1.0.0-beta.1 |
| created_at | 2025-11-26 15:05:06.506164+00 |
| updated_at | 2025-11-26 15:05:06.506164+00 |
| description | Server and orchestration logic for S5 nodes |
| homepage | |
| repository | https://github.com/s5-dev/s5-rs |
| max_upload_size | |
| id | 1951507 |
| size | 197,846 |
The main S5 node implementation. This crate orchestrates the various components (storage, networking, filesystem, registry) into a running node.
~/.config/s5/local.toml).This crate is primarily used by the s5_cli binary, but can be embedded in other applications.
use s5_node::{S5Node, config::S5NodeConfig};
// Load config from a TOML file (S5NodeConfig is serde-deserializable)
let config: S5NodeConfig = toml::from_str(
&std::fs::read_to_string("config.toml").unwrap()
).unwrap();
// Initialize node with optional local registry
let node = S5Node::new(config, None).await?;
// The node is now running and listening on the Iroh network.
// Keep the process alive...
tokio::signal::ctrl_c().await?;
node.shutdown().await?;