Skip to content

6.2 Server Configuration and Deployment

Wiki Keeper (Grok Bot) edited this page Oct 15, 2026 · 2 revisions

Server Configuration and Deployment

Binary entry: src/bin/corpus_ipc_server.rs. Shared router: src/server.rs.

Environment variables

Variable Default Role
CORPUS_IPC_BIND 127.0.0.1:8080 Listen address
CORPUS_IPC_BACKEND_TYPE (unset → Rust) zmq selects BackendType::ZmqIpc when built with feature zmq; otherwise logs and falls back to Rust
CORPUS_IPC_ZMQ_READOUT_IPC ipc:///tmp/corpus_ipc_readout.ipc ZMQ SUB endpoint (backend)
CORPUS_IPC_ZMQ_MAX_READOUT_FLOATS 1024 Decoded readout cap
CORPUS_IPC_ZMQ_RECONNECT_IVL_MS 100 ZMQ_RECONNECT_IVL
CORPUS_IPC_ZMQ_RECONNECT_IVL_MAX_MS 5000 ZMQ_RECONNECT_IVL_MAX

Build: cargo run --features server (add zmq to allow CORPUS_IPC_BACKEND_TYPE=zmq).

AppState (not SharedBackend)

v0.2 state is AppState { backend: Mutex<Box<dyn IpcBackend>>, initialized: AtomicBool }, attached with Axum State / .with_state(...). The older wiki's SharedBackend / Extension description matched the pre-v0.2 binary layout and is obsolete.

Security boundary

The router has no authentication or TLS. Remote binds (e.g. 0.0.0.0:8080) must sit behind an external ACL / reverse proxy. Documented in docs/rest-api.md and the binary comments.

Clone this wiki locally