Skip to content

Rust Engine API (sc_neurocore_engine)

The high-performance Rust engine provides SIMD-accelerated stochastic computing with SIMD-accelerated bitstream operations, IR compilation, and HDC support.

Browse the full Rust API documentation →

Key Modules

Module Description
bitstream Packed bitstream types and SIMD operations (AND, popcount, rotate)
encoder LFSR-based stochastic encoders with decorrelated seeds
neuron Fixed-point LIF neuron with Q8.8 arithmetic
layer Dense layer pipeline with vectorised forward pass
ir Intermediate representation for graph compilation
graph Computational graph builder and verifier
attention Stochastic attention mechanism
grad Surrogate gradient training support
scpn SCPN layer primitives (Petri net places/transitions)
simd Platform-adaptive SIMD kernels (AVX2, SSE4.1, NEON, portable)
analysis 22 spike train analysis modules (see Rust Analysis Engine)
neurons 100+ neuron models — biophysical, maps, hardware, interneurons

Criterion Benchmarks → — all measured latencies for engine, neurons, and analysis.

Building from Source

Bash
cd engine
cargo build --release
cargo test
cargo doc --open

Python Bindings (PyO3)

The engine is exposed to Python via the local sc_neurocore_engine bridge. For source checkouts:

Bash
cd bridge
maturin develop --release
Python
import sc_neurocore_engine as engine

# Compile an IR graph
graph = engine.IRGraph()
graph.add_encode(0, 1024, 0xACE1)
graph.verify()
sv_code = graph.emit_sv()