[package]
edition = "2024"
name = "khal"
version = "0.2.1"
authors = ["Sébastien Crozet <sebcrozet@dimforge.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Abstractions for running compute shaders with Rust."
readme = "README.md"
license = "MIT OR Apache-2.0"
repository = "https://github.com/dimforge/khal"
resolver = "2"
[features]
cpu = ["khal-derive?/cpu"]
cuda = [
"dep:cudarc",
"khal-derive?/cuda",
]
default = ["webgpu"]
derive = ["khal-derive"]
metal = [
"dep:metal",
"dep:naga",
"dep:block",
"khal-derive?/webgpu",
]
push_constants = []
subgroup_ops = []
webgpu = ["khal-derive?/webgpu"]
[lib]
name = "khal"
path = "src/lib.rs"
[[test]]
name = "metal_timestamps"
path = "tests/metal_timestamps.rs"
[dependencies.anyhow]
version = "1"
[dependencies.async-channel]
version = "2"
[dependencies.bytemuck]
version = "1"
features = [
"derive",
"extern_crate_std",
]
[dependencies.cudarc]
version = "0.19"
features = [
"driver",
"nvrtc",
"cuda-version-from-build-system",
]
optional = true
[dependencies.include_dir]
version = "0.7"
[dependencies.khal-derive]
version = "0.2"
optional = true
[dependencies.smallvec]
version = "1"
[dependencies.thiserror]
version = "2"
[dependencies.wgpu]
version = "29"
features = [
"naga-ir",
"spirv",
"wgsl",
]
[target.'cfg(not(target_arch = "nvptx64"))'.dependencies.bitflags]
version = "2"
[target.'cfg(not(target_arch = "nvptx64"))'.dependencies.paste]
version = "1"
[target.'cfg(not(target_arch = "nvptx64"))'.dependencies.regex]
version = "1"
[target.'cfg(target_os = "macos")'.dependencies.block]
version = "0.1.6"
optional = true
[target.'cfg(target_os = "macos")'.dependencies.metal]
version = "0.32"
optional = true
[target.'cfg(target_os = "macos")'.dependencies.naga]
version = "29"
features = [
"spv-in",
"msl-out",
]
optional = true
[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = ['cfg(feature, values("cargo-clippy"))']