[package]
edition = "2024"
name = "cubecl-environment"
version = "0.11.0-pre.2"
authors = [
"Dilshod Tadjibaev (@antimora)",
"Nathaniel Simard (@nathanielsimard)",
]
build = "build.rs"
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Environment compatibility layer for CubeCL: sync primitives, futures, streams, config and persistence across std, no-std, wasm and tokio"
readme = "README.md"
keywords = [
"gpu",
"cuda",
"wgpu",
]
categories = [
"science",
"mathematics",
"algorithms",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/tracel-ai/cubecl/tree/main/crates/cubecl-environment"
resolver = "2"
[features]
browser-cache = [
"dep:web-sys",
"dep:js-sys",
"dep:wasm-bindgen",
"oneshot/async",
]
cache = [
"std",
"dep:rusqlite",
]
default = ["std"]
shared-bytes = ["dep:bytes"]
std = [
"rand/std",
"rand/thread_rng",
"serde_json/std",
"ciborium/std",
"dep:futures-lite",
"dep:parking_lot",
"dep:backtrace",
"dep:etcetera",
"oneshot/std",
"async-channel/std",
"dep:toml",
]
tokio = [
"std",
"dep:tokio",
]
tracing = ["dep:tracing"]
[lib]
name = "cubecl_environment"
path = "src/lib.rs"
[[test]]
name = "bundle"
path = "tests/bundle.rs"
[[test]]
name = "read_path"
path = "tests/read_path.rs"
[[bench]]
name = "kv_store"
path = "benches/kv_store.rs"
harness = false
required-features = ["cache"]
[dependencies.async-channel]
version = "2.3"
default-features = false
[dependencies.backtrace]
version = "0.3"
features = ["std"]
optional = true
default-features = false
[dependencies.bytemuck]
version = "1.16.1"
features = ["derive"]
[dependencies.bytes]
version = "1.10"
optional = true
default-features = false
[dependencies.cfg-if]
version = "1.0.0"
[dependencies.ciborium]
version = "0.2.2"
default-features = false
[dependencies.embassy-futures]
version = "0.1.1"
[dependencies.foldhash]
version = "0.2"
default-features = false
[dependencies.futures-lite]
version = "2.3.0"
features = ["std"]
optional = true
default-features = false
[dependencies.hashbrown]
version = "0.17"
[dependencies.log]
version = "^0.4.22"
default-features = false
[dependencies.parking_lot]
version = "0.12.5"
optional = true
default-features = false
[dependencies.rand]
version = "0.10.0"
features = ["std_rng"]
default-features = false
[dependencies.serde]
version = "1.0.204"
features = [
"derive",
"alloc",
]
default-features = false
[dependencies.serde_bytes]
version = "0.11.17"
features = [
"alloc",
"alloc",
]
default-features = false
[dependencies.serde_json]
version = "1.0.119"
features = ["alloc"]
default-features = false
[dependencies.toml]
version = "1"
optional = true
[dependencies.tracing]
version = "^0.1.43"
features = ["attributes"]
optional = true
default-features = false
[dev-dependencies.criterion]
version = "0.8"
features = ["html_reports"]
[dev-dependencies.serial_test]
version = "3.1.1"
[dev-dependencies.tempfile]
version = "3.20"
[dev-dependencies.test-log]
version = "^0.2"
features = ["trace"]
default-features = false
[build-dependencies.cfg_aliases]
version = "0.2.1"
[target.'cfg(not(target_family = "wasm"))'.dependencies.etcetera]
version = "0.11.0"
optional = true
[target.'cfg(not(target_family = "wasm"))'.dependencies.rusqlite]
version = "0.40"
features = ["bundled"]
optional = true
[target.'cfg(not(target_family = "wasm"))'.dependencies.tokio]
version = "^1.47.1"
features = ["rt"]
optional = true
default-features = false
[target.'cfg(not(target_family = "wasm"))'.dev-dependencies.tokio]
version = "^1.47.1"
features = [
"macros",
"rt-multi-thread",
]
default-features = false
[target.'cfg(not(target_has_atomic = "ptr"))'.dependencies.async-channel]
version = "2.3"
features = ["portable-atomic"]
default-features = false
[target.'cfg(not(target_has_atomic = "ptr"))'.dependencies.bytes]
version = "1.10"
features = ["extra-platforms"]
optional = true
default-features = false
[target.'cfg(not(target_has_atomic = "ptr"))'.dependencies.portable-atomic]
version = "1.11"
features = [
"serde",
"fallback",
]
default-features = false
[target.'cfg(not(target_has_atomic = "ptr"))'.dependencies.portable-atomic-util]
version = "0.2.4"
features = ["alloc"]
[target.'cfg(not(target_has_atomic = "ptr"))'.dependencies.spin]
version = "0.10.0"
features = [
"mutex",
"spin_mutex",
"mutex",
"spin_mutex",
"portable_atomic",
]
[target.'cfg(not(target_os = "none"))'.dependencies.web-time]
version = "1.1.0"
[target.'cfg(target_family = "wasm")'.dependencies.js-sys]
version = "0.3"
optional = true
[target.'cfg(target_family = "wasm")'.dependencies.wasm-bindgen]
version = "0.2"
optional = true
[target.'cfg(target_family = "wasm")'.dependencies.wasm-bindgen-futures]
version = "0.4.45"
[target.'cfg(target_family = "wasm")'.dependencies.web-sys]
version = "0.3"
features = [
"DomException",
"DomStringList",
"Event",
"EventTarget",
"IdbDatabase",
"IdbFactory",
"IdbKeyRange",
"IdbObjectStore",
"IdbOpenDbRequest",
"IdbRequest",
"IdbTransaction",
"IdbTransactionMode",
]
optional = true
[target.'cfg(target_has_atomic = "ptr")'.dependencies.oneshot]
version = "0.2.1"
default-features = false
[target.'cfg(target_has_atomic = "ptr")'.dependencies.spin]
version = "0.10.0"
features = [
"mutex",
"spin_mutex",
"mutex",
"spin_mutex",
]
[target.'cfg(target_os = "none")'.dependencies.embassy-time]
version = "0.5"
default-features = false
[lints.clippy]
doc_markdown = "warn"
[lints.rust]
warnings = "warn"
[lints.rustdoc]
broken_intra_doc_links = "warn"
invalid_html_tags = "warn"