A beautiful and performant evolution simulation written in Rust with WebGPU-accelerated graphics and WebAssembly, running entirely in the browser.
- Rust Nightly:
rustup toolchain install nightly-2024-08-02 - WASM Target:
rustup target add wasm32-unknown-unknown - Node.js & npm: Install Node.js
- WebGPU-capable browser: Chrome 113+, Firefox 121+, or Safari 17.4+
# Install dependencies and set up environment
npm run setupnpm run dev
# Then open http://localhost:8788Deploy to Cloudflare Pages:
npm run deployFor detailed instructions, see docs/DEPLOYMENT.md.
evo/
├── src/
│ ├── components.rs # ECS components
│ ├── genes/ # Genetic algorithms
│ ├── systems/ # Movement, Interaction, Reproduction
│ ├── simulation/ # Main simulation logic
│ └── web/ # WebGPU renderer
├── web/ # Frontend assets (HTML, CSS, JS)
└── scripts/ # Build scripts
| Command | Description |
|---|---|
npm run dev |
Start local dev server |
npm run build |
Compile to WASM |
npm run deploy |
Build and deploy to Cloudflare Pages |
cargo test |
Run Rust tests |
cargo clippy |
Run linter |
For a deep dive into the simulation mechanics, see docs/SIMULATION_SYSTEM.md.
MIT License.
