An over-engineered asynchronous biological simulation engine in Rust - strahinjastojanovic826-code/organic_os

3 points•srbin•6 days ago•1 comment•

1 comment

srbin6 days ago
Hi HN!

I built Organic OS as an experiment to see what happens when you treat micro-biological simulation like a mission-critical distributed system.

Instead of traditional OO structures, every single biological cell is an asynchronous actor communicating via Tokio mpsc channels.

Key technical highlights: - WASM Sandboxing (Wasmtime): Cell metabolism code runs inside isolated WebAssembly runtime environments to prevent unhandled panics from crashing the main OS loop. - Self-Healing Supervision Tree: Implemented an automated immune system that isolates and quarantines rogue/mutated cells. - Snapshot Persistence: Full async save/load capabilities for simulation state to disk via JSON. - GUI: Rendered locally using Macroquad.

The stack is Rust, Tokio, Wasmtime, and Macroquad. Licensed under AGPL-3.0.

Would love any feedback on the architecture or ideas for extending the cell mechanics!

Read the full thread on Hacker News →

Related stories