nir-rs 0.4.2

Pure-Rust implementation of the Neuromorphic Intermediate Representation (NIR) — the standard interchange format for spiking neural networks.
Documentation
[package]
name = "nir-rs"
version = "0.4.2"
edition = "2024"
# Supported toolchain — keep in lockstep with rust-toolchain.toml and CI
# (`toolchain: "1.97.1"`). Raise when the pin moves.
rust-version = "1.97.1"
license = "MIT OR Apache-2.0"
authors = ["Raul Montoya Cardenas <montoyaraul34@gmail.com>"]
description = "Pure-Rust implementation of the Neuromorphic Intermediate Representation (NIR) — the standard interchange format for spiking neural networks."
repository = "https://github.com/Limen-Neural/nir-rs"
homepage = "https://github.com/Limen-Neural/nir-rs"
documentation = "https://docs.rs/nir-rs"
readme = "README.md"
keywords = ["nir", "neuromorphic", "snn", "spiking", "interoperability"]
categories = ["science", "algorithms", "encoding"]
exclude = [
    "/.cursor/",
    "/.devcontainer/",
    "/.github/",
    "/AGENTS.md",
    "/CLAUDE.md",
    "/REVIEW.md",
    "/cubic.yaml",
    "/fuzz/",
    "/qodana.yaml",
    "/scripts/",
]

[lib]
name = "nir_rs"
path = "src/lib.rs"

[[example]]
name = "load_inspect_lif"
required-features = ["hdf5"]

[features]
default = []
# HDF5 `.nir` read/write. Opt-in because it links the native libhdf5 library:
# `apt install libhdf5-dev` (Ubuntu) or `brew install hdf5` (macOS). For a
# hermetic build, see the static-linking note in README.md.
hdf5 = ["dep:hdf5", "dep:hdf5-sys", "dep:tempfile", "dep:libc"]
# Debug/export traits only. JSON helpers intentionally remain consumer-side.
serde = ["dep:serde", "indexmap/serde"]

[dependencies]
indexmap = "2"
thiserror = "2"
# Maintained metno fork via package rename; the abandoned aldanor/hdf5 0.8 crate
# (last released 2021) must not be used.
hdf5 = { package = "hdf5-metno", version = "0.14", optional = true }
serde = { version = "1", features = ["derive"], optional = true }
hdf5-sys = { package = "hdf5-metno-sys", version = "0.12", optional = true }
tempfile = { version = "3", optional = true }
# Used only by the HDF5 writer (Unix staging ownership checks). Optional so
# graph-only consumers do not pull it under the default feature set.
libc = { version = "0.2", optional = true }

[dev-dependencies]
proptest = "1.6"
serde_json = "1"
tempfile = "3"

[package.metadata.docs.rs]
# docs.rs has no libhdf5, so document the default build. Every public item in
# `io` exists in that build; only the bodies are feature-gated, so nothing is
# missing from the rendered docs.
features = []