Cargo Features

[dependencies]
slang-hal = { version = "0.3.0", default-features = false, features = ["runtime", "derive", "comptime", "webgpu", "cuda", "cublas", "vulkan", "metal", "cpu"] }
default = webgpu

The webgpu feature is set by default whenever slang-hal is added without default-features = false somewhere in the dependency tree.

runtime = minislang
derive = slang-hal-derive
comptime = include_dir, slang-hal-build, slang-hal-derive

Enables comptime of slang-hal-derive

webgpu default

Enables webgpu of optional slang-hal-derive

Affects backend::Backend.as_webgpu

cuda = cudarc

Enables cuda of optional slang-hal-derive

Affects backend::Backend.as_cuda

cublas

Enables cublas of optional cudarc ^0.16

CUDA runtime

Affects cuda::Cuda.cublas, cuda::Cuda.cublas_enabled

vulkan = ash

Enables vulkan of optional slang-hal-derive

Affects backend::Backend.as_vulkan

metal

Enables metal of optional slang-hal-derive and metal ^0.32

Metal runtime

Affects backend::Backend.as_metal

cpu = libloading, rayon, uuid

Enables cpu of optional slang-hal-derive

Affects backend::Backend.as_cpu

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

include_dir build comptime?
minislang runtime?
slang-hal-derive comptime? derive?
cudarc cuda?

Enables cudarc ^0.16

ash vulkan?

Enables ash

Vulkan runtime

libloading cpu?

Enables libloading ^0.8

CPU runtime

uuid cpu?
rayon cpu?
slang-hal-build build comptime?