[package]
authors = [
    "Dilshod Tadjibaev (@antimora)",
    "Nathaniel Simard (@nathanielsimard)",
]
description = "ONNX-IR is a pure Rust library for parsing ONNX models into an intermediate representation that can be used to generate code for various ML/DL frameworks"
edition.workspace = true
license.workspace = true
name = "onnx-ir"
readme.workspace = true
repository = "https://github.com/tracel-ai/burn/tree/main/crates/onnx-ir"
documentation = "https://docs.rs/onnx-ir"
version.workspace = true

[lints]
workspace = true

[features]
default = ["mmap"]
mmap = ["memmap2"]

[dependencies]
burn-tensor = { path = "../burn-tensor", version = "=0.21.0", default-features = false }
onnx-ir-derive = { path = "../onnx-ir-derive", version = "=0.21.0" }
bytemuck = { workspace = true, features = ["extern_crate_alloc"] }
derive-new = { workspace = true }
half = { workspace = true, features = ["bytemuck"] }
log = { workspace = true }
protobuf = { workspace = true, features = ["with-bytes"] }
regex = { workspace = true, features = ["default"] }
serde = { workspace = true, features = ["derive"] }
strum = { workspace = true }
bytes = { workspace = true }
memmap2 = { workspace = true, optional = true }

[build-dependencies]
protobuf-codegen = { workspace = true }

[dev-dependencies]
pretty_assertions = { workspace = true }
rstest = { workspace = true }
tempfile = { workspace = true }
divan = "0.1"

[[bench]]
name = "mmap_loading"
harness = false
