| Crates.io | righ-dm-rs |
| lib.rs | righ-dm-rs |
| version | 0.5.0 |
| created_at | 2025-10-24 11:22:18.423702+00 |
| updated_at | 2025-10-24 11:22:18.423702+00 |
| description | Righ Data Model Library |
| homepage | https://www.righ.com |
| repository | |
| max_upload_size | |
| id | 1898310 |
| size | 120,086 |
A comprehensive Rust data model library for distributed mesh networking systems, providing strongly-typed data structures for network management, device configuration, and Wi-Fi operations.
This library defines the core data models used in the Righ distributed mesh networking platform. It provides type-safe representations of network entities, configurations, and operational data with comprehensive validation and serialization support.
network.rs)id.rs)wifi.rs)common.rs)time.rs)Add this to your Cargo.toml:
[dependencies]
righ-dm-rs = "0.1.0"
use righ_dm_rs::*;
// Create a mesh node identifier
let node_id = RighNodeID::new("mesh-node-001");
println!("Node ID: {}", node_id);
// Configure a Wi-Fi network
let mut wifi_config = RighWifiConfig::default();
wifi_config.ssid = RighSSID::new("MyMeshNetwork".to_string());
wifi_config.id = Some(1);
println!("Is primary SSID: {}", wifi_config.is_primary_ssid());
// Create a network interface
let interface = RighIfName::new("wlan0");
println!("Interface: {}", interface);
// Handle MAC addresses
let mac = RighMacAddr::broadcast();
println!("Broadcast MAC: {}", mac);
use righ_dm_rs::*;
// Create a 5GHz channel with 80MHz bandwidth
let channel = RighChannel::new(36);
let bandwidth = RighChannelWidth::RighChannel80Mhz;
let band = RighBand::RighBand5ghz;
// Check DFS requirements
if channel.is_dfs(&bandwidth) {
println!("DFS monitoring required for channel {}", channel.id());
}
// Configure radio
let radio = RighRadio {
name: RighIfName::new("radio0"),
freq_band: band,
channel,
channel_width: bandwidth,
};
The library follows a modular design with clear separation of concerns:
righ-dm-rs/
├── src/
│ ├── lib.rs # Library root and re-exports
│ ├── id.rs # Node and device identifiers
│ ├── network.rs # Network address management
│ ├── common.rs # Device and interface management
│ ├── time.rs # Time utilities and validation
│ └── wifi.rs # Wi-Fi configuration and management
└── examples/ # Usage examples
anyhowcargo build
# Run all tests
cargo test
# Run documentation tests
cargo test --doc
# Generate documentation
cargo doc --open
The project maintains high code quality standards:
This project is licensed under the MIT License - see the LICENSE file for details.
This library is part of the Righ distributed mesh networking platform. For more information about Righ's networking solutions, visit righ.com.
Note: This is a data model library focused on type safety and validation. For runtime mesh networking functionality, see the companion libraries in the Righ ecosystem.