Pure-Rust spiking-neural-network substrate + PyO3 Python bindings. Published as hebb on crates.io and hebb-py on PyPI.
This repo is library-only. The desktop app and visualizer live at hebb-project/hebb_app and consume this crate as a versioned dep.
src/— thehebbRust crate. Pure-Rust, no I/O by default. Filesystem support is opt-in behind thediskfeature.python/— PyO3 bindings. Cargo packagehebb-py, cdylib[lib] name = "hebb_py"so Python usersimport hebb_py. Built with maturin; produces thehebb-pyPyPI wheel.tests/— integration tests against the public Rust API.SCHEMA.md— on-disk format spec for.cortex/folders.
- In scope: neuron models (
src/domain/neuron*.rs), synapse models (src/domain/synapse*.rs), the simulation engine (src/engine/), seed-network generators (src/seeds.rs), the on-disk format (src/format/,src/disk/), theSimEngine/Cortexpublic API, and the PyO3 wrappers inpython/src/. - Out of scope: anything that depends on tokio / axum / diesel / a database / a UI / an LLM bridge. That's the app's concern; it belongs in hebb-project/hebb_app. If you're tempted to add an I/O dep here, push back.
After a change to the public Rust API:
- Bump the version in
Cargo.toml(andpyproject.toml). cargo publish(Rust crate) andmaturin publish(Python wheel) — see below.- Bump the
hebb = "..."line in hebb-project/hebb_app'score/Cargo.tomlanddesktop/src-tauri/Cargo.toml. Fix any breakage incore/src/anddesktop/src-tauri/src/if the API changed.
The app repo should not break silently because of a refactor here. If you rename or remove anything in the public API, also open a PR against the app repo and link it.
- Rust:
cargo publish -p hebbfrom the repo root (needscargo loginonce). - Python:
maturin publishfrom the repo root (needsMATURIN_PYPI_TOKENor a.pypircentry).
Don't publish a 0.x bump unless cargo test --features disk and maturin build are both green.
- Rust API: keep
pubsurface stable within a0.xline. Breaking changes get a minor-version bump. - Python API:
import hebb_pyexposesSim,Cortex, and theseedssubmodule. Treat those as a public contract. - On-disk format:
.cortex/folders are versioned viametadata.json. Bumping the schema requires a migration path or a hard version gate informat/metadata.rs.
Make frequent, small, logically-scoped commits as work progresses — one commit per coherent unit (a neuron model, a fix, a fixture, a config change). Each commit should compile and pass cargo test --features disk where applicable. Commit messages explain the why, not just the what.