EXO-AI 2025: Rust Libraries & Crates Catalog
SPARC Research Phase: Implementation Building Blocks
This document catalogs Rust crates and libraries applicable to the EXO-AI cognitive substrate architecture.
1. Tensor & Neural Network Frameworks
Primary Frameworks
| Crate |
Description |
WASM |
no_std |
Use Case |
| burn |
Next-gen DL framework with backend flexibility |
✅ |
✅ |
Core tensor operations, model training |
| candle |
HuggingFace minimalist ML framework |
✅ |
❌ |
Transformer inference, production models |
| ndarray |
N-dimensional arrays |
❌ |
❌ |
General numerical computing |
| burn-candle |
Burn backend using Candle |
✅ |
❌ |
Unified interface over Candle |
| burn-ndarray |
Burn backend using ndarray |
❌ |
✅ |
CPU-only, embedded targets |
Key Characteristics
Burn Framework:
Candle Strengths:
- Transformer-specific optimizations
- ONNX model loading
- Quantization support (INT8, BF16)
- ~429KB WASM binary for BERT-style models
Tensor Train Decomposition
Note: This appears to be the only Rust-specific Tensor Train implementation, focused on PDEs rather than neural network compression. Opportunity exists for TT decomposition crate targeting learned manifold storage.
2. Graph & Hypergraph Libraries
Core Graph Libraries
| Crate |
Description |
Features |
Use Case |
| petgraph |
Primary Rust graph library |
Graph/StableGraph/GraphMap, algorithms |
Base graph operations |
| simplicial_topology |
Simplicial complexes |
Random generation (Linial-Meshulam), upward/downward closure |
TDA primitives |
petgraph Capabilities
Simplicial Complex Operations
Supported Models:
- Linial-Meshulam (random hypergraphs)
- Lower/Upper closure
- Pure simplicial complexes
Gap Analysis
No dedicated Rust hypergraph crate exists. Current approach:
- Use petgraph for base graph operations
- Extend with simplicial_topology for TDA
- Implement hyperedge layer consuming ruvector-graph
3. Topological Data Analysis
Persistent Homology
| Crate |
Description |
Features |
| tda |
TDA for neuroscience |
Persistence diagrams, Mapper algorithm |
| teia |
Persistent homology library |
Column reduction, persistence pairing |
| annembed |
UMAP-style dimension reduction |
Links to Julia Ripserer.jl for TDA |
tda Crate Structure
teia CLI
Planned Features (teia):
- Persistent cohomology
- Lower-star complex
- Vietoris-Rips complex
4. WASM & NAPI-RS Integration
WASM Ecosystem
NAPI-RS for Node.js
| Crate |
Description |
Use Case |
| napi |
Node.js bindings |
Server-side deployment |
| napi-derive |
Macro support |
Ergonomic API generation |
Integration Pattern (ruvector style)
WASM Neural Network Inference
| Tool |
Description |
Size |
| WasmEdge WASI-NN |
TensorFlow/ONNX in WASM |
Container: ~4MB |
| Tract |
Native ONNX inference engine |
Binary: ~500KB |
| EdgeBERT |
Custom BERT inference |
~429KB WASM + 30MB model |
5. Post-Quantum Cryptography
Primary Libraries
| Crate |
Description |
Algorithms |
| pqcrypto |
Post-quantum crypto |
Multiple NIST candidates |
| liboqs-rust |
OQS bindings |
Full liboqs suite |
| kyberlib |
CRYSTALS-Kyber |
ML-KEM (FIPS 203) |
NIST Standardized Algorithms
Algorithm Support
- ML-KEM (Kyber): Key encapsulation
- ML-DSA (Dilithium): Digital signatures
- FALCON: Alternative signatures
- SPHINCS+: Hash-based signatures
6. Distributed Systems & Consensus
Consensus Primitives
| Crate |
Description |
Use Case |
| ruvector-raft |
Raft consensus |
Leader election, log replication |
| ruvector-cluster |
Cluster management |
Node discovery, sharding |
| ruvector-replication |
Data replication |
Multi-region sync |
CRDT Candidates
| Crate |
Description |
Status |
| crdts |
CRDT implementations |
Production-ready |
| automerge |
JSON CRDT |
Collaborative editing |
ruvector Integration
7. Performance & SIMD
SIMD Libraries
| Crate |
Description |
Use Case |
| simsimd |
SIMD similarity functions |
Distance metrics |
| packed_simd_2 |
Portable SIMD |
General vectorization |
| wide |
Wide SIMD types |
AVX-512 operations |
ruvector Usage
Parallelism
| Crate |
Description |
Use Case |
| rayon |
Data parallelism |
Parallel iterators |
| crossbeam |
Concurrency primitives |
Lock-free structures |
| tokio |
Async runtime |
Async I/O, networking |
8. Serialization & Storage
Serialization
| Crate |
Description |
Speed |
Size |
| rkyv |
Zero-copy deserialization |
Fastest |
Moderate |
| bincode |
Binary serialization |
Fast |
Small |
| serde |
Serialization framework |
Varies |
Varies |
Storage Backends
| Crate |
Description |
Use Case |
| redb |
Embedded ACID database |
Persistent storage |
| memmap2 |
Memory mapping |
Large file access |
| hnsw_rs |
HNSW index |
Vector similarity |
9. Emerging Research Libraries
Neuromorphic Simulation
| Status |
Description |
Gap |
| ⚠️ Limited |
No mature Rust SNN library |
Opportunity |
Current Options:
- Bind to C++ Brian2/NEST via FFI
- Port key algorithms from Python implementations
- Build minimal spike encoding layer
Photonic Simulation
| Status |
Description |
Gap |
| ⚠️ None |
No Rust photonic neural network library |
Major gap |
Approach: Abstract optical matrix-multiply as backend trait
Memristor Simulation
| Status |
Description |
Gap |
| ⚠️ None |
No Rust memristor crossbar simulation |
Research opportunity |
10. Recommended Stack for EXO-AI
Core Foundation (ruvector SDK)
ML/Tensor Operations
TDA/Topology
Post-Quantum Security
WASM/NAPI
Distribution
Library Maturity Assessment
| Category |
Maturity |
Notes |
| Tensors/ML |
🟢 High |
Burn, Candle production-ready |
| Graphs |
🟢 High |
petgraph is mature |
| Hypergraphs |
🟡 Medium |
Need to build on simplicial_topology |
| TDA |
🟡 Medium |
tda/teia usable, feature-incomplete |
| PQ Crypto |
🟢 High |
Multiple options, NIST standardized |
| WASM |
🟢 High |
wasm-bindgen ecosystem mature |
| NAPI-RS |
🟢 High |
ruvector already uses successfully |
| Neuromorphic |
🔴 Low |
Major gap, build or bind |
| Photonic |
🔴 Low |
No existing libraries |
| Memristor |
🔴 Low |
Research prototype needed |