Expand description
Network resource module.
Provides typed access to fabric network resources via NET host
functions. Programs request leased network interfaces with optional
bandwidth guarantees. The underlying NET_ALLOC control op (0x0700)
is implemented in fabricbiosd with macvlan/SR-IOV VF allocation.
On wasm32 targets, the host functions link to real imports
(fabricbios_net_v0). On native targets, mock implementations
allow testing without network hardware.
§Example
use grafos_std::net::{NetBuilder, FabricNet};
let lease = NetBuilder::new().min_bandwidth(1_000_000_000).acquire()?;
assert_eq!(lease.net().bandwidth(), 1_000_000_000);
assert_eq!(lease.net().interface_name(), "eth-fab0");Structs§
- Fabric
Net - Safe handle to a leased fabric network interface.
- NetBuilder
- Builder for acquiring a fabric network lease.
- NetLease
- A network lease that auto-frees on drop.