1 comments

  • jagveerllc 2 hours ago ago

    Recently I've been obsessed with chaos theory, complex dynamic systems, and simulations. I spent some time over winter break building a platform that lets you write simulations in familiar Python syntax and run them in the browser using Rust + Web Assembly.

    The idea is that users write Python DSL and build the simulation. The backend compiles this into an IR which is then run inside the Chaox Engine. The engine is written in Rust, and in addition to serving as a VM to run the user's simulation code, it provides implementations of common things you might need for simulations. The complete binary artifact (including the IR and the compiled engine) runs on the user's browser in a web worker. Events from inside the simulation are periodically transmitted from the web worker to main process allowing for streaming visualizations.

    There is also cloud and plugin support although this is still a WIP and incompletely implemented. This allows you to create your own Rust plugins and use them in simulations. You can select dependencies for plugins (i.e. Onnx runtime, Candle) and specify requirements (i.e. CPU/RAM/GPU). Others can then use your plugin in their simulations. The purpose of this is to provide ergonomic handles for simulations to leverage advanced functionality. i.e. LLM plugin, and a user simulation which simulates a conversation between multiple people.

    Would love to hear thoughts & feedback!

    https://www.youtube.com/watch?v=MAl2jQrXQP4