| Crates.io | mielin |
| lib.rs | mielin |
| version | 0.1.0-rc.1 |
| created_at | 2025-12-06 04:31:37.139939+00 |
| updated_at | 2026-01-18 03:32:01.356163+00 |
| description | MielinOS - A microkernel-based operating system for distributed AI agents with neural mesh networking |
| homepage | |
| repository | https://github.com/cool-japan/mielin |
| max_upload_size | |
| id | 1969614 |
| size | 114,548 |
A Microkernel-Based Operating System for Distributed AI Agents
MielinOS is a next-generation operating system designed from the ground up for distributed AI agents with neural mesh networking capabilities. Named after the myelin sheath that enables rapid signal transmission in biological neural networks, MielinOS provides the infrastructure for agents to migrate, communicate, and execute across heterogeneous hardware platforms.
Current Status: v0.1.0-rc.1 "Oligodendrocyte" (Released 2026-01-18)
MielinOS provides a complete platform for building, deploying, and managing distributed AI agent systems:
Add MielinOS to your project:
[dependencies]
mielin = "0.1.0-rc.1"
Basic usage:
use mielin::prelude::*;
fn main() {
// Detect hardware capabilities
let arch = detect_architecture();
println!("Running on: {:?}", arch);
// Create an agent
let agent_id = AgentId::new();
println!("Agent ID: {}", agent_id);
// Access tensor operations
let tensor = Tensor::zeros(&[2, 3]);
println!("Tensor shape: {:?}", tensor.shape());
}
MielinOS is organized as a workspace with specialized crates:
| Crate | Description | crates.io |
|---|---|---|
mielin |
Meta crate re-exporting all components | |
mielin-kernel |
Microkernel with capability-based IPC | |
mielin-hal |
Hardware Abstraction Layer | |
mielin-rt |
Embedded runtime for IoT devices | |
mielin-mesh-core |
Distributed hash table and routing | |
mielin-mesh-wire |
QUIC-based wire protocol | |
mielin-cells |
Agent SDK and lifecycle management | |
mielin-wasm |
WebAssembly runtime integration | |
mielin-tensor |
Tensor operations with hardware acceleration | |
mielin-cli |
Command-line interface |
You can depend on specific crates instead of the meta crate:
[dependencies]
mielin-hal = "0.1.0-rc.1" # Hardware abstraction only
mielin-tensor = "0.1.0-rc.1" # Tensor operations only
mielin-cells = "0.1.0-rc.1" # Agent SDK only
MielinOS uses a layered architecture inspired by biological neural networks:
┌─────────────────────────────────────────────────────────────────┐
│ Layer 4: Applications & Agents │
│ • AI Agents (WASM sandboxed) │
│ • User Applications │
├─────────────────────────────────────────────────────────────────┤
│ Layer 3: Services & Runtime │
│ • mielin-cells (Agent SDK) │
│ • mielin-wasm (WebAssembly Runtime) │
│ • mielin-tensor (Tensor Operations) │
├─────────────────────────────────────────────────────────────────┤
│ Layer 2: Mesh Networking │
│ • mielin-mesh-core (DHT, Routing) │
│ • mielin-mesh-wire (QUIC Protocol) │
├─────────────────────────────────────────────────────────────────┤
│ Layer 1: Kernel & Runtime │
│ • mielin-kernel (Microkernel) │
│ • mielin-rt (Embedded Runtime) │
├─────────────────────────────────────────────────────────────────┤
│ Layer 0: Hardware Abstraction │
│ • mielin-hal (HAL) │
│ ↕ │
│ Physical: Arm | RISC-V | x86 | Cortex-M | NPU | GPU │
└─────────────────────────────────────────────────────────────────┘
| Platform | Architecture | Status |
|---|---|---|
| AWS Graviton | AArch64 | ✅ Full support |
| Apple Silicon | AArch64 | ✅ Full support |
| Intel/AMD | x86_64 | ✅ Full support |
| Raspberry Pi | AArch64/Arm | ✅ Full support |
| STM32 | Cortex-M | ✅ Embedded support |
| ESP32 | RISC-V/Xtensa | ✅ Embedded support |
| SiFive | RISC-V 64 | ⚠️ Experimental |
# Start a mesh node
cargo run -p mielin-cli -- mesh start --bind 0.0.0.0:9000
# Join an existing cluster
cargo run -p mielin-cli -- mesh join 192.168.1.100:9000
# Deploy an agent
cargo run -p mielin-cli -- agent deploy ./my-agent.wasm
use mielin::prelude::*;
use mielin::cells::{Agent, AgentState, Policy};
// Define agent behavior
struct MyAgent {
counter: u64,
}
impl Agent for MyAgent {
fn on_message(&mut self, msg: Message) -> Result<(), AgentError> {
self.counter += 1;
println!("Received message #{}", self.counter);
Ok(())
}
fn on_migrate(&self) -> AgentState {
// Serialize state for migration
AgentState::new(self.counter)
}
}
use mielin::tensor::{Tensor, TensorOps};
use mielin::hal::capabilities::HardwareProfile;
fn main() {
let hw = HardwareProfile::detect();
println!("Vector width: {} bits", hw.max_vector_width());
// Operations automatically use best available SIMD
let a = Tensor::randn(&[1024, 1024]);
let b = Tensor::randn(&[1024, 1024]);
let c = a.matmul(&b);
println!("Result shape: {:?}", c.shape());
}
rustup target add x86_64-unknown-nonerustup target add wasm32-wasip1# Build all default crates
cargo build
# Build with all features
cargo build --all-features
# Build the kernel (requires bare-metal target)
cargo build -p mielin-kernel --target x86_64-unknown-none
# Run tests
cargo test
# Run benchmarks
cargo bench -p benches
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
Areas where we need help:
Licensed under either of:
at your option.
MielinOS is developed by COOLJAPAN OU (Team Kitasan).
Special thanks to the Rust community and the authors of our dependencies.
MielinOS - Enabling AI agents to traverse seamlessly across the neural mesh
Named after the myelin sheath - the biological structure enabling rapid signal transmission in neural networks