Files
another-boids-in-rust/Cargo.toml
Robert Garrett 68d6de9a83 Add a WASM build configuration
The config.toml lets me run `cargo run --target wasm32-unknown-unknown`
and host a dev server.

I've adjusted the Cargo.toml to use the kdtree_rayon feature by default,
but disable the Rayon feature for WASM builds (because it doesn't work).
2025-09-03 14:41:53 -05:00

51 lines
939 B
TOML

[package]
name = "another-boids-in-rust"
version = "0.2.0-dev1"
edition = "2024"
[dependencies]
bevy = "0.16.0"
# Grand-dependency pins
ab_glyph = "0.2.16"
fnv = "1.0.6"
gilrs = "0.10.5"
lazy_static = "1.0.2"
lock_api = "0.4.7"
miniz-sys = "0.1.10"
nonmax = "0.5.1"
rand = "0.8.0"
# Use regular bevy_spatial on non-WASM builds
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
bevy_spatial = "0.11.0"
# Use bevy_spatial *without* the kdtree_rayon feature when building for WASM.
[target.'cfg(target_arch = "wasm32")'.dependencies.bevy_spatial]
version = "0.11.0"
default-features = false
features = ["kdtree"]
[profile.dev]
opt-level = 1
[profile.dev.package."*"]
opt-level = 3
[profile.release]
# codegen-units = 1
lto = "fat"
[profile.mini]
inherits = "release"
lto = true
opt-level = "z"
codegen-units = 1
strip = "symbols"
panic = "abort"
[profile.wasm-release]
inherits = "release"
opt-level = "z"
strip = "debuginfo"