[package] name = "jouleclaw-omni" version.workspace = true edition.workspace = true authors.workspace = true license.workspace = true repository.workspace = true description = "JouleClaw omni-modal generation tier. Diffusion (40+ samplers), Stable Diffusion / SDXL / SD3 / Flux paths, MusicGen, Whisper, Gaussian3D, video, cross-modal fusion, MoE expert cache. Ported wholesale from efficient-genai; preserves the internal module structure for now (hal / inference / modalities / runtime / orchestrator / quality / server / tensor / weight_store / core). Future phases will split this into separate crates as the architecture stabilises." [lib] name = "jouleclaw_omni" path = "src/lib.rs" [features] default = ["std"] std = [] # Hardware backends # cudarc refuses to build unless a CUDA version is chosen. Asking the build # system (nvcc) beats pinning a version here: this fleet has 12.8, another # host will have something else, and a pinned feature would break it. cuda = ["dep:cudarc", "cudarc/cuda-version-from-build-system"] metal = ["dep:metal", "dep:objc2"] # HIP is opened at runtime with libloading, so no ROCm is needed to build: # this compiles on every host and finds devices only where HIP is installed. rocm = ["dep:libloading"] vulkan = ["dep:ash", "dep:gpu-allocator"] # JIT compilation jit = ["dep:cranelift", "dep:cranelift-jit"] # Model formats safetensors = ["dep:safetensors"] gguf = [] # Optimizations simd = [] rayon = ["dep:rayon"] # Server server = ["dep:axum", "dep:tower-http", "dep:tracing-subscriber", "dep:image", "dep:uuid", "dep:base64"] # Note: the jouledb feature from efficient-genai was dropped during the # JouleClaw port. It path-depended on `joulesperbit/crates/joule-db-{weights,core}` # (JoulesPerBit IP) which does not port into the public open standard. # The `src/weight_store/` module remains under a `#[cfg(feature = "jouledb")]` # gate so a downstream consumer who DOES have the JouleDB crates can re-enable # the feature without forking jouleclaw-omni. The feature is declared to # check-cfg below (after [features]) so the gate doesn't surface as an # `unexpected_cfgs` warning when the feature is absent. # Convenience: everything except cuda + jit (which often require external # toolchains) so a developer can `cargo build --features dev` on bare # macOS/Linux without provisioning extra SDKs. dev = ["metal", "vulkan", "safetensors", "rayon", "simd", "server"] full = ["cuda", "metal", "vulkan", "jit", "safetensors", "rayon", "simd", "server"] [lints.rust] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(feature, values("jouledb"))'] } [dependencies] # JouleClaw foundation jouleclaw-loader-gguf = { path = "../jouleclaw-loader-gguf" } # Core thiserror = "2.0" tracing = "0.1" parking_lot = "0.13" dashmap = "6.2" crossbeam = "0.8" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" # Async runtime tokio = { version = "1.54", features = ["rt-multi-thread", "sync", "macros", "time", "fs", "net", "io-util"] } async-stream = "0.3" futures = "0.3" # Memory management bumpalo = "3.20" memmap2 = "0.9" # Serialization (zero-copy) rkyv = { version = "0.8" } bytemuck = { version = "1.25", features = ["derive"] } # Math half = { version = "2.7", features = ["bytemuck", "num-traits"] } num-traits = "0.2" rand = "0.10" rustfft = "6.4" # Text processing regex = "1.13" tokenizers = "0.23" # Native libc bindings libc = "0.2.191" # Optional: CUDA cudarc = { version = "0.19", optional = true } libloading = { version = "0.9", optional = true } # Optional: Metal (macOS/iOS) - using objc2 for modern Rust bindings metal = { version = "0.33", optional = true } objc2 = { version = "0.6", optional = true } # Optional: Vulkan ash = { version = "0.38", optional = true } gpu-allocator = { version = "0.28", optional = true, features = ["vulkan"] } # Optional: JIT compiler cranelift = { version = "0.137", optional = true } cranelift-jit = { version = "0.137", optional = true } # Optional: Model formats safetensors = { version = "0.8", optional = true } # Optional: Parallelism rayon = { version = "1.12", optional = true } # Optional: Server stack axum = { version = "0.8", optional = true } tower-http = { version = "0.7", features = ["trace", "cors", "fs"], optional = true } tracing-subscriber = { version = "0.3", optional = true } image = { version = "0.25", optional = true } uuid = { version = "1.29", features = ["v4"], optional = true } base64 = { version = "0.23", optional = true } # HTTP client for model_fetch (HF Hub / S3 downloads). reqwest = { version = "0.13", features = ["rustls", "stream", "json"], default-features = false } [dev-dependencies] proptest = "1.12" tokio-test = "0.4" # tests/metal_kernels.rs dispatches shaders directly and reads f16 back. half = { version = "2.7", features = ["bytemuck"] } # The metal crate is macOS-only, so it cannot be an unconditional # dev-dependency: the linux fabric jobs would fail to resolve it. [target.'cfg(target_os = "macos")'.dev-dependencies] metal = "0.33"