rustnetconf-yang
YANG model code generation for rustnetconf. Generates typed Rust structs from YANG models so your network config is validated at compile time.
How it works
- Place
.yangmodel files in your project'syang-models/directory - Add
rustnetconf-yangas a dependency - Run
cargo build— the build script generates Rust structs inOUT_DIR - Use the generated types with
edit_config_typed()
// Generated from ietf-interfaces.yang:
use Interfaces;
let config = Interfaces ;