Skip to content

patte/fluidsim-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

27 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Fluidsim

Make particles go splish splash. Inspired by Coding Adventure: Simulating Fluids

Written in Rust in the Bevy engine's ECS system, which makes sheduling easy with the cost of simplicity.

native

run

cargo run --release

develop

cargo watch -x "run --release" --ignore '*.json'

wasm

prepare

rustup target add wasm32-unknown-unknown
## make sure to get update wasm-bindgen binary
cargo install -f wasm-bindgen-cli

run

cargo build --profile wasm-release --target wasm32-unknown-unknown
wasm-bindgen --no-typescript --target web \
    --out-dir ./out/ \
    --out-name "fluidsim" \
    ./target/wasm32-unknown-unknown/wasm-release/fluidsim.wasm

serve

dufs -p 3000 ./out/

https://github.com/sigoden/dufs

develop

cargo watch --ignore '*.json' -s "cargo build --profile wasm-release --target wasm32-unknown-unknown && wasm-bindgen --no-typescript --target web --out-dir ./out/ --out-name \"fluidsim\" ./target/wasm32-unknown-unknown/wasm-release/fluidsim.wasm"