Skip to content
Raul Montoya Cardenas edited this page Jul 29, 2026 · 3 revisions

brainstem-daemon

Wiki hero

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

High-performance spiking neural-network runtime written in Rust.

Version: 0.1.2 | Edition: 2024 | License: MIT OR Apache-2.0

brainstem-daemon is the headless inference process for the Limen SNN stack: it loads a TOML config, steps a neuromod::SpikingNetwork on a fixed tick, ingests stimuli through a pluggable backend, and publishes spikes. Training and weight optimization live in plasticity-lab — this crate is inference-only.

What This Crate Covers

  • Library: BrainstemDaemon, DaemonConfig, config-driven ServiceRegistry
  • Pluggable I/O: StimulusSource / SpikeSink / BackendPair (local types)
  • Default stub backend (no libzmq; core builds and tests stay pure Rust)
  • Optional corpus-ipc feature: ZeroMQ PUB/SUB via corpus-ipc + zmq
  • Binary: soma-daemon — thin CLI wrapper over the library
  • Dual Docker targets (core / full) and GitHub Actions CI

Start Here

Page Description
Getting Started Build, config, run, feature flags
Project Structure Layout, modules, Cargo features
Architecture Runtime model and tick pipeline
Configuration TOML fields, paths, validation
Backend I/O Traits, stub, ZMQ implementations
Service Registry Named services, enable/disable
Tick Loop Ingress → decode → step → emit
Public API Exported library surface
soma-daemon Binary CLI, env vars, systemd notes
Docker Multi-stage core / full images
CI and Quality GitHub Actions, local gates
Testing Unit tests and backend coverage
Role and Boundaries Ownership matrix vs sibling repos
Glossary Terms and constants

Ecosystem Role

Layer Responsibility Entity
Encoding Continuous → spikes axon-encoder
Reservoir / cortex (GPU) Large LSM LiquidCortex.jl
SNN core library LIF / Izhikevich network + neuromodulators neuromod
Headless runtime Tick loop, config, ingress/egress brainstem-daemon
IPC fabric ZMQ spine, message types corpus-ipc (optional dep)
Critic / modulators Upstream dopamine etc. limbic-critic (via ingress)
Downstream consumers Spike stream consumers silicon-bridge, others
Training Plasticity / weight ops plasticity-lab

Quick Commands

cargo build --release --bin soma-daemon
cargo test --all-features
cargo clippy --all-targets --all-features -- -D warnings
cargo fmt --check

Default (no features) uses the stub backend. Enable ZeroMQ with --features corpus-ipc (needs libzmq3-dev / vendored zmq as appropriate).

License

Dual-licensed under MIT or Apache-2.0 at your option.


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

Clone this wiki locally