| Crates.io | kimi-fann-core |
| lib.rs | kimi-fann-core |
| version | 0.1.4 |
| created_at | 2025-07-13 20:54:59.139903+00 |
| updated_at | 2025-07-14 01:50:53.533423+00 |
| description | Optimized micro-expert neural architecture for Kimi-K2 WASM conversion with 5-10x performance improvements |
| homepage | |
| repository | https://github.com/ruvnet/Synaptic-Neural-Mesh |
| max_upload_size | |
| id | 1750791 |
| size | 680,268 |
A high-performance neural inference engine with 5-agent swarm architecture, optimized for WebAssembly and native environments. Part of the Synaptic Neural Mesh project.
cargo install kimi-fann-core
[dependencies]
kimi-fann-core = "0.1.3"
# Ask any question - Kimi will route to the best expert
kimi "What is machine learning?"
# Use specific expert
kimi --expert coding "Write a bubble sort function"
# Multi-expert consensus
kimi --consensus "Design a neural network"
# Show performance metrics
kimi --performance "Explain quantum computing"
# Interactive mode
kimi --interactive
When using cargo run, you MUST include -- to separate cargo arguments:
# ✅ CORRECT - With -- separator
cargo run --bin kimi -- "your question here"
cargo run --bin kimi -- --expert mathematics "What is 2+2?"
cargo run --bin kimi -- --consensus "Complex problem"
# ❌ WRONG - Without -- separator (will fail)
cargo run --bin kimi "your question"
cargo run --bin kimi --expert coding "Write code"
For easier development, use the included wrapper script:
# Make it executable
chmod +x kimi.sh
# Use without worrying about --
./kimi.sh "your question"
./kimi.sh --expert coding "write a function"
./kimi.sh --consensus "complex question"
use kimi_fann_core::{KimiCore, ExpertType};
// Initialize Kimi
let mut kimi = KimiCore::new();
// Ask a question with automatic routing
let response = kimi.process("What is rust?");
println!("Response: {}", response);
// Use specific expert
let response = kimi.process_with_expert(
"Write a sorting algorithm",
ExpertType::Coding
);
// Get consensus from multiple experts
let response = kimi.process_with_consensus(
"Design a distributed system"
);
| Expert | Specialization | Example Use Case |
|---|---|---|
| Reasoning | Logic, analysis, critical thinking | "Analyze the pros and cons of microservices" |
| Coding | Programming, algorithms, software design | "Implement a binary search tree" |
| Mathematics | Calculations, formulas, numerical analysis | "Calculate the derivative of x^3" |
| Language | Translation, text processing, linguistics | "Translate 'hello world' to Japanese" |
| Tool-Use | Commands, operations, technical procedures | "How to use Docker compose?" |
| Context | Memory, conversation tracking, references | "What did we discuss earlier?" |
Get multiple expert opinions for complex questions:
let response = kimi.process_with_consensus("Design a blockchain system");
// Returns aggregated insights from multiple experts
Track neural inference metrics:
let (response, metrics) = kimi.process_with_metrics("Complex question");
println!("Inference time: {}ms", metrics.inference_time_ms);
println!("Tokens processed: {}", metrics.tokens_processed);
Optimized for browser environments:
import init, { KimiCore } from './pkg/kimi_fann_core.js';
await init();
const kimi = KimiCore.new();
const response = kimi.process("What is WebAssembly?");
console.log(response);
# Clone the repository
git clone https://github.com/ruvnet/Synaptic-Neural-Mesh
cd Synaptic-Neural-Mesh/standalone-crates/synaptic-mesh-cli/crates/kimi-fann-core
# Build native
cargo build --release
# Build for WASM
wasm-pack build --target web
# Run tests
cargo test
# Run benchmarks
cargo bench
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under either of:
at your option.
Built as part of the Synaptic Neural Mesh project, advancing distributed AI systems.