[workspace]
# Try
# require version 2 to avoid "feature" additiveness for dev-dependencies
# https://doc.rust-lang.org/cargo/reference/resolver.html#feature-resolver-version-2
resolver = "2"

members = [
    "crates/*",
    "crates/burn-import/pytorch-tests",
    "crates/burn-import/safetensors-tests",
    "crates/burn-onnx/onnx-tests",
    "crates/burn-collective/multinode-tests",
    "examples/*",
    "xtask",
]

exclude = [
    "examples/notebook",
    "examples/raspberry-pi-pico",
    "crates/burn-onnx/model-checks/*", # exclude model checking crates from workspace
]

[workspace.package]
edition = "2024"
license = "MIT OR Apache-2.0"
readme = "README.md"
version = "0.21.0"

[workspace.lints.clippy]

[workspace.lints.rustdoc]
broken_intra_doc_links = "deny"
invalid_html_tags = "deny"

[workspace.dependencies]
atomic_float = "1"
axum = "0.8.8"
bytemuck = "1.24.0"
bytes = { version = "1.10", default-features = false }
candle-core = { version = "0.9.1" }
ciborium = { version = "0.2", default-features = false }
clap = { version = "4.5.48", features = ["derive"] }
colored = "3.0.0"
console_error_panic_hook = "0.1.7"
const-random = "0.1"
csv = "1.3.1"
dashmap = "6.1.0"
data-encoding = { version = "2.10.0", default-features = false, features = [
    "alloc",
] }
dirs = "6.0.0"
encoding_rs = "0.8.33"
fake = "4.4.0"
flate2 = "1.1.4"
float-cmp = "0.10.0"
futures = "0.3"
futures-util = "0.3"
gix-tempfile = { version = "20.0.0", features = ["signals"] }
globwalk = "0.9.1"
hashbrown = "0.16"
hound = "3.5.1"
image = "0.25.9"
indicatif = "0.18.0"
insta = "1.45.0"
js-sys = "0.3.77"
libm = "0.2.15"
log = { default-features = false, version = "0.4.29" }
opentelemetry = "0.31.0"
opentelemetry-aws = "0.19.0"
opentelemetry-otlp = "0.31.0"
opentelemetry_sdk = "0.31.0"
parking_lot = { version = "0.12.5", default-features = false }
paste = "1"
planus = { version = "=1.1" }
polars = { version = "0.51.0", features = ["lazy"] }
pretty_assertions = "1.4.1"
proc-macro2 = "1.0.106"
protobuf = "3.7.2"
protobuf-codegen = "3.7.2"
quote = "1.0.42"
r2d2 = "0.8.10"
r2d2_sqlite = "0.31.0"
rayon = "1.10.0"
regex = { version = "1.12.1", default-features = false, features = [
    "perf",
    "unicode",
] }
reqwest = { version = "0.12.23", default-features = false, features = [
    "rustls-tls",
] }
rmp-serde = { version = "1.3.1", default-features = false }
rstest = "0.26.1"
rusqlite = "0.37.0"
rust-format = "0.3.4"
sanitize-filename = "0.6.0"
serde_bytes = { version = "0.11.18", default-features = false, features = [
    "alloc",
] } # alloc for no_std
serde_rusqlite = "0.40.0"
serial_test = "3.2.0"
spin = { version = "0.10.0", features = [
    "mutex",
    "spin_mutex",
    "portable-atomic",
] }
strum = { version = "0.27.2", features = ["derive"] }
syn = { version = "2.0.111", features = ["full", "extra-traits"] }
tar = "0.4.44"
tempfile = "3.24.0"
textdistance = { version = "1.1.1", default-features = false }
thiserror = { version = "2", default-features = false }
tokio = { version = "1.49.0", features = ["rt", "macros"] }
tokio-tungstenite = "0.28"
tokio-util = "0.7"
tracing = { version = "0.1.44", default-features = false }
tracing-appender = "0.2.3"
tracing-core = { version = "0.1.36", default-features = false }
tracing-opentelemetry = "0.32.0"
tracing-subscriber = "0.3.20"
zip = "7.2.0"

# Persist related
memmap2 = { version = "0.9" }
safetensors = { version = "0.7.0", default-features = false }

# Async handling
async-channel = "2.5"
futures-lite = { version = "2.6.1", default-features = false }

# Terminal UI
ratatui = "0.30.0"

# WGPU stuff
text_placeholder = "0.5.1"

bincode = { version = "2.0.1", features = [
    "alloc",
    "serde",
], default-features = false }

#
# The following packages disable the "std" feature for no_std compatibility
#
cfg-if = "1.0.1"
derive-new = { version = "0.7.0", default-features = false }

blas-src = { version = "0.14.0", default-features = false }
bon = "3.8.2"
half = { version = "2.7.1", features = [
    "alloc",
    "num-traits",
    "serde",
], default-features = false }
macerator = { version = "0.2.9" }
matrixmultiply = { version = "0.3.10", default-features = false }
ndarray = { version = "0.17.2", default-features = false }
num-traits = { version = "0.2.19", default-features = false, features = [
    "libm",
] } # libm is for no_std
openblas-src = "0.10.14"
rand = { version = "0.9.2", default-features = false }
rand_distr = { version = "0.5.1", default-features = false }
serde = { version = "1.0.228", default-features = false, features = [
    "derive",
    "alloc",
] } # alloc is for no_std, derive is needed
serde_json = { version = "1.0.148", default-features = false }
uuid = { version = "1.20.0", default-features = false }

byteorder = { version = "1.5.0", default-features = false }
libc = "0.2.179"
nvml-wrapper = "0.11.0"
sysinfo = "0.38.0"
systemstat = "0.2.5"
tch = "0.22.0"
torch-sys = "0.22.0"                                        # matches what tch is using, required for lib detection

ahash = { version = "0.8.12", default-features = false }
portable-atomic = { version = "1.13.0" }
portable-atomic-util = { version = "0.2.4", features = ["alloc"] }

### For the main burn branch. ###
cubecl = { git = "https://github.com/tracel-ai/cubecl", default-features = false, rev = "a3987c60e410d77b6b38e99d1c2a6bc0979d38ba" }
cubecl-common = { git = "https://github.com/tracel-ai/cubecl", default-features = false, rev = "a3987c60e410d77b6b38e99d1c2a6bc0979d38ba" }
cubek = { git = "https://github.com/tracel-ai/cubek", default-features = false, rev = "a06b2fcf59873b63bf3d543e508153c732f28c07" }
### For local development. ###
# cubecl = { path = "../cubecl/crates/cubecl", default-features = false }
# cubecl-common = { path = "../cubecl/crates/cubecl-common", default-features = false }
# cubek = { path = "../cubek/crates/cubek", default-features = false }
### For the release. ###
# cubecl = { version = "=0.9.0", default-features = false }
# cubecl-common = { version = "=0.9.0", default-features = false }
# cubek = { version = "=0.1.0", default-features = false }

### For xtask crate ###
tracel-xtask = "=4.10.0"
# ### For local development. ###
# tracel-xtask = { path = "../xtask/crates/tracel-xtask", default-features = false }

[profile.dev]
debug = 1 # Speed up compilation time and not necessary.
