Feature Flags
The Cargo feature flags of the kernel, the weftos and weaver binaries, and where the full per-crate reference lives.
Feature Flag Reference
Cargo feature flags control optional subsystems and native versus browser builds. The workspace has 65 member crates (Cargo.toml [workspace] members, counted 2026-10-27), so this page covers only the crates people build with, and points to the maintained reference for the rest.
Source of truth: each crate's Cargo.toml under [features]. The developer reference that tracks them is docs/development/feature-flags.md in the repository; if it and a crate disagree, trust the crate. Earlier versions of this page carried per-crate tables for 22 crates; they went stale and were removed instead of being kept in step.
clawft-kernel
Default features: native, exochain, cluster, tilezero, ecc, mesh, quic, workload-runtime.
| Feature | What it enables | Default |
|---|---|---|
native | Tokio runtime, the A2A router, agent loop, full kernel boot | yes |
exochain | Audit chain, resource tree, governance events (RVF crypto and wire, ed25519, CBOR) | yes |
tilezero | TileZeroGate (implies exochain) | yes |
cluster | ruvector cluster, raft and replication | yes |
ecc | Cognitive substrate: causal graph, HNSW memory, tick loop (implies core vector-memory) | yes |
mesh | Mesh networking: Noise, WebSocket, leaf devices | yes |
quic | QUIC mesh transport (implies mesh) | yes |
workload-runtime | Workload runtime adapters: native process, container engines, Seed API (implies native, ecc, exochain) | yes |
os-patterns | Restart strategies, dead letter queue, metrics, log and timer services (implies exochain) | no |
wasm-sandbox | wasmtime tool sandbox | no |
containers | Empty marker feature | no |
treesitter | tree-sitter symbol extraction in assessment | no |
http-api | http_api and http_facade modules | no (the clawft-services crate enables it) |
onnx-embeddings | ONNX embedding inference (ort, tokenizers) | no |
diskann | Real DiskANN backend; without it the DiskANN backend is a linear-scan stub | no |
sensor | Sensor graph module | no |
mesh-rvf | Experimental RVF IPC encoding; encode and decode return UnsupportedEncoding | no |
quantum-pasqal, quantum-braket | Experimental quantum backends; interface only, stubs return NotImplemented | no |
rabitq-bench | Bench-only RaBitQ runner | no |
test-support | Test hooks for other crates' integration tests | no |
Source: crates/clawft-kernel/Cargo.toml, [features] and its comments.
weftos (binary crate)
Default: native. Features delegate to clawft-kernel: exochain, cluster, mesh (also enables quic), ecc, wasm-sandbox, containers, os-patterns. full enables all of them (crates/weftos/Cargo.toml).
clawft-weave (the weaver binary)
Default: cluster, ecc, exochain, mesh, placement. placement enables clawft-kernel/workload-runtime plus mesh, ecc and exochain. wasmtime-project (implies placement) builds the native launcher for the pinned wasmtime runner. rvf-rpc adds the RVF wire protocol. test-support is for integration tests (crates/clawft-weave/Cargo.toml).
Native versus browser
Platform-facing crates (clawft-types, clawft-platform, clawft-llm, clawft-tools, clawft-core, clawft-wasm) use a mutually exclusive native / browser pair. For wasm32-unknown-unknown, disable defaults and enable browser. Never enable both on one compile unit (ADR-083). Use scripts/build.sh browser, which owns those flags.
Building with features
scripts/build.sh native # defaults for the weaver and weft binaries
scripts/build.sh native --features voice,channels
scripts/build.sh check # fast compile check
scripts/build.sh gate # full phase gate before committingTo add a feature gate: add the feature and its optional dependencies to the crate's Cargo.toml, guard code with #[cfg(feature = "...")], update docs/development/feature-flags.md, and run scripts/build.sh gate.