A boids flock simulation written in Rust for the WASM-4 fantasy console.
install w4 and wasm-opt
sh .devcontainer/postCreateCommand.sh
add wasm32 target
rustup target add wasm32-unknown-unknown
Build the cart by running:
cargo build --release
Then run it with:
w4 run target/wasm32-unknown-unknown/release/cart.wasm
For more info about setting up WASM-4, see the quickstart guide.
cargo build --release
wasm-opt target/wasm32-unknown-unknown/release/cart.wasm -o boids-cart-opt.wasm -Oz --strip-dwarf --strip-producers --zero-filled-memory
w4 bundle boids-cart-opt.wasm --title "wasm-4 boids" --html index.html
cargo run_tests
- Documentation: Learn more about WASM-4.
- Snake Tutorial: Learn how to build a complete game with a step-by-step tutorial.
- GitHub: Submit an issue or PR. Contributions are welcome!