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)

Install

[dependencies]
synaptic-mesh = "0.2"

Or from git:

synaptic-mesh = { git = "https://github.com/Limen-Neural/synaptic-mesh" }

From a clone:

cargo test
cargo build --release

Edition: 2024. Runtime dependency: serde only.

Minimal mesh

use synaptic_mesh::topology::generators::generate_small_world;
use synaptic_mesh::mesh::SynapticMesh;

// N=1024, k=6, beta=0.1, max_delay=10, inh_fraction=0.2
let graph = generate_small_world(1024, 6, 0.1, 10, 0.2).unwrap();
let mut mesh = SynapticMesh::new(graph);

let mut spikes = vec![false; 1024];
spikes[0] = true;
let currents = mesh.propagate(&spikes).unwrap();
// currents[i] = total synaptic current at neuron i this tick

Minimal router

use synaptic_mesh::{ChannelRouter, RouterConfig};

let mut router = ChannelRouter::new(); // default 3 channels
let decision = router.route(&[0.8, 0.2, 0.1]);
// decision.active_channels, decision.firing_rates

let config = RouterConfig {
    channel_count: 8,
    ..RouterConfig::default()
};
let mut router8 = ChannelRouter::with_config(config);
let _ = router8.route(&[0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0]);

Generators (import path)

Prefer synaptic_mesh::topology::generators::{generate_small_world, generate_scale_free, generate_random, generate_layered} (also re-exported via topology module as used in rustdoc examples).

Next


Last updated: July 29, 2026 Updated by: Grok Build: Grok 4.5 Package tip reference: 1486191 (main) Devin DeepWiki: commit 14861916 · synaptic-mesh

Clone this wiki locally