| Crates.io | herolib-mos |
| lib.rs | herolib-mos |
| version | 0.3.13 |
| created_at | 2025-12-27 20:03:51.3983+00 |
| updated_at | 2026-01-24 05:32:47.468124+00 |
| description | Mycelium Operating System (MOS) - Network and VM abstraction layer |
| homepage | |
| repository | https://github.com/herolib/herolib_rust |
| max_upload_size | |
| id | 2007732 |
| size | 478,245 |
Network and VM abstraction layer for the HeroLib library, combined with system information and OS detection capabilities.
Add to your Cargo.toml:
[dependencies]
herolib-mos = "0.3.5"
For Rhai scripting support:
[dependencies]
herolib-mos = { version = "0.3.5", features = ["rhai"] }
use herolib_mos::network::{bridge, interface, namespace};
use herolib_mos::myfs;
// Create a bridge
let bridge = bridge::create_bridge("br0")?;
// Create a veth pair
let veth = interface::create_veth_pair("veth0", "veth1", 1500, "")?;
// Create a network namespace
let ns = namespace::create_namespace("test-ns")?;
// Create a bridge
let bridge = create_bridge("br0");
print(`Bridge created: ${bridge.name}`);
// Show System Dashboard
print("Displaying system status dashboard...");
print_system_status();
// Create veth pair
let veth = create_veth_pair("veth0", "veth1", 1500);
// Set IP address
set_ip_address("veth0", "10.0.0.1/24");
// Bring interface up
interface_set_up("veth0");
See the rhaiexamples/mos/ directory for complete examples.