omnimesh 1.0.1

Zero-allocation mesh networking middleware for autonomous robot fleets, edge-AI swarms, and multi-agent systems
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use omnimesh::config::OmnimeshMode;
use omnimesh::run as runtime_run;

pub fn run() -> Result<(), String> {
    let selected_mode = std::env::var("OMNIMESH_MODE").unwrap_or_else(|_| "development".to_string());

    let config = match selected_mode.to_lowercase().as_str() {
        "development" => OmnimeshMode::development(),
        "lightweight" => OmnimeshMode::lightweight(),
        "production" => OmnimeshMode::production(),
        _ => {
            eprintln!("Unknown OMNIMESH_MODE='{}'. Falling back to development.", selected_mode);
            OmnimeshMode::development()
        }
    };

    runtime_run(config)
}