[package]
name = "khal"
authors = ["Sébastien Crozet <sebcrozet@dimforge.com>"]
description = "Abstractions for running compute shaders with Rust."
repository = "https://github.com/dimforge/khal"
version = { workspace = true }
edition = "2024"
license = "MIT OR Apache-2.0"
[features]
default = ["webgpu"]
derive = ["khal-derive"]
webgpu = ["khal-derive?/webgpu"]
cpu = ["khal-derive?/cpu"]
cuda = ["dep:cudarc", "khal-derive?/cuda"]
metal = ["dep:metal", "dep:naga", "khal-derive?/webgpu"]
push_constants = []
subgroup_ops = []
[dependencies]
wgpu = { workspace = true, features = ["wgsl"] }
bytemuck = { workspace = true }
anyhow = { workspace = true }
async-channel = { workspace = true }
thiserror = { workspace = true }
smallvec = "1"
include_dir = "0.7"
khal-derive = { version = "0.2", path = "../khal-derive", optional = true }
cudarc = { workspace = true, optional = true }
[target.'cfg(not(target_arch = "nvptx64"))'.dependencies]
regex = "1"
bitflags = "2"
paste = "1"
[target.'cfg(target_os = "macos")'.dependencies]
metal = { version = "0.32", optional = true }
naga = { version = "29", optional = true, features = ["spv-in", "msl-out"] }
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(feature, values("cargo-clippy"))'] }