Feature Flags

Schubert uses additive feature gates — enabling a feature adds functionality without breaking existing API.

Available Features

FeatureWhat It Enables
std (default)HashMap, SystemTime, thread-safe Mutex audit
serdeSerialize/Deserialize on all types, JSON I/O
karpalproof module: Proven, Property, Rewrite, law checks
parallelcheck_batch(), stability_batch(), compose_batch() via rayon
policypolicy module: TOML parsing, validate, roundtrip
wasmwasm module: WasmController with JS bindings
cryptocrypto module: Ed25519 CapabilityToken, Issuer, Verifier
karpal-verifyverify module: SMT/Lean proof obligations, Certified trust boundary
surrealsurreal_trust module: RationalSurreal + EpsilonPolynomial
holographicholographic module: Minuet integration

Common Combinations

# Production with crypto tokens and policy loading
cargo build --features serde,policy,crypto

# Research with proofs and verification
cargo build --features karpal,karpal-verify,surreal

# Browser with wasm bindings
cargo build --target wasm32-unknown-unknown --features wasm

# Everything (for development)
cargo build --all-features

All features are designed to compose freely. Enable only what you need — each feature adds compile time and binary size.

Adding Your Own Feature

Feature gates follow the IA ecosystem convention:

  1. Add to [features] in Cargo.toml
  2. Use #[cfg(feature = "my-feature")] on module declarations
  3. Use #[cfg(feature = "my-feature")] on impl blocks and functions
  4. Document in src/lib.rs