net-lattice 0.12.3

A modern, cross-platform Rust library for configuring and inspecting operating system networking through a single, strongly typed API.
Documentation

Cross-platform inspection, mutation, and monitoring of operating-system networking through a strongly typed Rust API.

Start with [Lattice::connect] to inspect interfaces, addresses, routes, DNS configuration, and neighbor tables; perform supported mutations; or subscribe to network change events.

Example

use net_lattice::{Lattice, Result};

fn main() -> Result<()> {
    let lattice = Lattice::connect()?;
    for interface in lattice.interfaces()? {
        println!("{interface:?}");
    }
    Ok(())
}

Facade design

Re-exports the types consumers need from net-lattice-model and net-lattice-ip, selects a default backend based on cfg(target_os = "..."), and enforces model convergence: net-lattice-platform's generic provider traits are constrained here to Net Lattice's own model types, without net-lattice-platform ever depending on net-lattice-model. See ARCHITECTURE.md for the full rationale.