[package] name = "mesh-engine-gguf" version.workspace = true edition.workspace = true license.workspace = true repository.workspace = true description = "Mesh — a real serving backend: wraps the family's pure-Rust GGUF/Metal inference substrate as a ServingEngine, so the mesh routes and meters actual model tokens. Behind the `gguf` feature so the default workspace build stays light." [dependencies] mesh-schema = { workspace = true } mesh-engine = { workspace = true } jouleclaw-loader-gguf = { workspace = true, optional = true } thiserror = { workspace = true } # Used only by the `serve_falcon` bin (required-features = ["gguf"]). mesh-core = { workspace = true, optional = true } mesh-meter = { workspace = true, optional = true } mesh-router = { workspace = true, optional = true } jcp-schema = { workspace = true, optional = true } jcp-grant = { workspace = true, optional = true } ed25519-dalek = { workspace = true, optional = true } serde_json = { workspace = true, optional = true } mesh-openai = { path = "../mesh-openai", optional = true } # The GPU load for `ProcessMeter`'s liveness probe, with the `metal` feature. jouleclaw-backend-apple = { workspace = true, optional = true } [features] default = [] # Pull the GGUF/safetensors loader and compile the real engines. Off by default: # the loader is a heavier dependency (mmap, tokenizer, per-arch decode), and the # default `cargo test --workspace` should not need model weights on disk. gguf = [ "dep:jouleclaw-loader-gguf", "dep:mesh-core", "dep:mesh-meter", "dep:mesh-router", "dep:jcp-schema", "dep:jcp-grant", "dep:ed25519-dalek", "dep:serde_json", "dep:mesh-openai", "mesh-openai/server", ] # Apple Silicon UMA Metal overlay (zero-copy GGUF → GPU). Forwarded to the loader. # Decode on the GPU, in process, and meter each serve by this process's own CPU # and GPU energy (`mesh_meter::ProcessMeter`) rather than the load estimator. metal = ["gguf", "jouleclaw-loader-gguf/metal", "mesh-meter/hw-meter-apple", "dep:jouleclaw-backend-apple"] # Data-parallel matmul in the loader (faster CPU decode). rayon = ["gguf", "jouleclaw-loader-gguf/rayon"] [[bin]] name = "serve_falcon" path = "src/bin/serve_falcon.rs" required-features = ["gguf"] [[bin]] name = "serve_openai_falcon" path = "src/bin/serve_openai_falcon.rs" required-features = ["gguf"] [[bin]] name = "serve_gemma_metered" path = "src/bin/serve_gemma_metered.rs" required-features = ["metal"] [lints] workspace = true