Skip to content

Getting Started

Raul Montoya Cardenas edited this page Jul 29, 2026 · 2 revisions

Getting Started

Wiki hero

Generated with Grok Build: Grok 4.5 · xAI Imagine (/imagine)

Requirements

Requirement Detail
Rust Stable toolchain; crate uses edition 2024
System (ZMQ path) libzmq3-dev (or equivalent) when building with corpus-ipc
Default path No ZeroMQ required — stub backend only

If --all-features fails to find C++ standard headers when building vendored ZMQ:

CC=gcc CXX=g++ cargo build --all-features

Clone and Build

git clone https://github.com/Limen-Neural/brainstem-daemon.git
cd brainstem-daemon

# Core (stub backend)
cargo build --release --bin soma-daemon

# Full (ZMQ + corpus-ipc)
cargo build --release --bin soma-daemon --features corpus-ipc

Binary: target/release/soma-daemon.

Minimal Config

Default path on Linux: ~/.config/soma/daemon.toml (via dirs::config_dir()). Override with --config.

lif_count      = 16
izh_count      = 5
channels       = 16
tick_rate_hz   = 1000
log_level      = "info"
spine_sub_port = 5555
spine_pub_port = 5556
model_path     = "~/models/soma16.mem"

[[services]]
name = "telemetry"
enabled = true

[[services]]
name = "critic-ipc"
enabled = true

See Configuration for field semantics and validation.

Run

# Default config path
./target/release/soma-daemon

# Explicit config
./target/release/soma-daemon --config /path/to/daemon.toml

Logs:

  • Stub build: 🔌 Using stub backend (corpus-ipc disabled)
  • Feature build: 📡 Using ZMQ corpus-ipc backend (spine ports active)

Stop with Ctrl+C (graceful: flush sink, shutdown source).

Library Quick Start (stub)

use brainstem_daemon::{BackendPair, BrainstemDaemon, DaemonConfig};
// Prefer fallible constructors for user-provided config:
// let daemon = BrainstemDaemon::try_with_backend(cfg, BackendPair::stub())?;

BrainstemDaemon::new / with_backend always use the stub for library defaults (even if corpus-ipc is compiled in). The binary builds the real ZMQ pair when the feature is on.

Local Quality Bar

cargo fmt --check
cargo clippy --all-targets --all-features -- -D warnings
cargo check --no-default-features
cargo check --features corpus-ipc
cargo test --all-features

Next Steps


Last updated: July 28, 2026 Updated by: Grok Build: Grok 4.5 Package tip reference: 8176c58 (main)

Clone this wiki locally