[package]
authors = [
    "Dilshod Tadjibaev (@antimora)",
    "Nathaniel Simard (@nathanielsimard)",
]
description = "Library for importing datamodels into the Burn framework"
edition.workspace = true
license.workspace = true
name = "burn-import"
readme.workspace = true
repository = "https://github.com/tracel-ai/burn/tree/main/crates/burn-import"
documentation = "https://docs.rs/burn-import"
version.workspace = true

[lints]
workspace = true

[features]
default = ["pytorch", "safetensors", "onnx", "burn-onnx?/default"]

onnx = ["burn-onnx"]
onnx-mmap = ["burn-onnx", "burn-onnx/mmap"]
pytorch = ["burn/record-item-custom-serde", "thiserror", "zip"]
safetensors = [
    "burn/record-item-custom-serde",
    "thiserror",
    "zip",
    "candle-core",
]

[dependencies]
burn = { path = "../burn", version = "=0.21.0", default-features = false, features = [
    "std",
] }
burn-ndarray = { path = "../burn-ndarray", version = "=0.21.0", default-features = false, optional = true }
burn-store = { path = "../burn-store", version = "=0.21.0", default-features = false, features = ["std", "pytorch", "burnpack"] }
burn-onnx = { path = "../burn-onnx", version = "=0.21.0", default-features = false, optional = true }
candle-core = { workspace = true, optional = true }
derive-new = { workspace = true }
regex = { workspace = true, features = ["default"] }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true, features = ["std"] }
thiserror = { workspace = true, optional = true }
zip = { workspace = true, optional = true }

[package.metadata.docs.rs]
features = ["default"]
rustdoc-args = ["--cfg", "docsrs"]
