Feature Flags
Five Cargo features control what gets compiled into the binary.
| Feature | Default | Purpose |
|---|---|---|
approuter | off | Register with approuter on startup; enables subdomain proxy routing |
admin | off | Database routes: intake submissions, analytics, session management |
dev | off | Developer routes: /dev/source, /dev/rules, /dev/ai-orchestration |
tests | off | Full test suite + exopack screenshot harness; pulls in admin + dev |
exopack | off | Screenshot/interface testing (pulled in by tests) |
Common Combinations
# Production server — registers with approuter, no dev/test routes
cargo build --release -p cochranblock --features approuter
# Offline installable binary — opens browser, no server registration
cargo build --release -p cochranblock
# Full test run — TRIPLE SIMS gate
cargo run -p cochranblock --bin cochranblock-test --features tests
# Local dev with admin panel
cargo run -p cochranblock --features admin,dev
approuter
The approuter feature links approuter-client and calls it on startup to register the binary as a backend with the approuter proxy. In production, approuter routes subdomains (knox.cochranblock.org, simplify.cochranblock.org, etc.) to the correct binary by port.
Without approuter, the binary opens a browser tab to localhost:8081 on start — suitable for cargo install and local use.
admin
Enables the embedded admin panel backed by redb. Routes:
/admin— dashboard/admin/intake— tech intake submissions/admin/analytics— visit log/admin/sessions— active sessions
Requires ADMIN_PASSWORD and REDB_PATH env vars at runtime.
dev
Enables developer-facing routes that expose internals. Never compiled into release builds without explicitly passing --features dev.
Routes:
/dev/source— raw Rust source of the running server/dev/rules— Cursor rules view/dev/exec-summary— executive summary/dev/ai-orchestration— AI orchestration docs/dev/prompts— prompt reference
▸ THE COCHRAN BLOCK, LLC · CAGE 1CQ66 · UEI W7X3HAQL9CF9 · UNLICENSE · cochranblock.org