-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
Raul Montoya Cardenas edited this page Jul 29, 2026
·
2 revisions

Generated with Grok Build: Grok 4.5 · xAI Imagine (/imagine)
Default branch on GitHub is often Main (capital M); use your remote’s actual default:
[dependencies]
nir-rs = { git = "https://github.com/Limen-Neural/nir-rs", branch = "main" }
# With HDF5 .nir I/O (links libhdf5):
# nir-rs = { git = "...", features = ["hdf5"] }| Platform | Package |
|---|---|
| Ubuntu/Debian | apt install libhdf5-dev |
| macOS | brew install hdf5 |
| Hermetic | depend on hdf5-metno with features = ["static", "zlib"] so unification applies |
use nir_rs::nodes::{Input, Output};
use nir_rs::{NirGraph, NirNode};
fn main() -> nir_rs::Result<()> {
let mut g = NirGraph::new();
g.insert_node("input", NirNode::Input(Input {
shape: vec![4],
metadata: Default::default(),
}))?;
g.insert_node("output", NirNode::Output(Output {
shape: vec![4],
metadata: Default::default(),
}))?;
g.add_edge("input", "output");
g.validate_structure()?;
Ok(())
}// requires features = ["hdf5"]
let graph = nir_rs::io::read("model.nir")?;
nir_rs::io::write("copy.nir", &graph)?;Without the feature, io::read / write still exist and return NirError::Unimplemented.
cargo fmt --check
cargo test
cargo test --all-features
cargo clippy --all-targets --all-features -- -D warnings
cargo doc --no-deps --all-featuresNo Python in build, tests, or CI — fixtures are vendored binary .nir files.
Last updated: July 29, 2026
Updated by: Grok Build: Grok 4.5
Package tip reference: df72fc9 (main)