singularity-rs/Cargo.toml
xfy 76be513bb5 deps: add rand + rand_chacha for deterministic planet seeding
ChaCha8Rng needs both crates: rand (the core traits Rng/SeedableRng) and
rand_chacha (the ChaCha8Rng type, split out of rand since 0.9). rand was
already a transitive dep via bevy_math but not declared directly.

Pinned to 0.8/0.3 (LTS, API-stable with the Bevy 0.19 ecosystem) rather
than the newer 0.10 line, which would force a wider dep upgrade.
2026-07-16 17:41:56 +08:00

46 lines
1.5 KiB
TOML

[package]
name = "singularity-rs"
version = "0.1.0"
edition = "2024"
[lib]
name = "singularity_rs"
path = "src/lib.rs"
[dependencies]
bevy = "0.19"
bevy_egui = "0.41"
# Deterministic PRNG for planet seeding (ChaCha8Rng). `rand` is a transitive
# dep via bevy_math but not declared directly; `rand_chacha` ships ChaCha8Rng.
# Pinned to 0.8/0.3 (LTS, API-compatible with the Bevy 0.19 ecosystem).
rand = "0.8"
rand_chacha = "0.3"
# Web-only deps for WebGPU detection + fallback message.
[target.'cfg(target_arch = "wasm32")'.dependencies]
web-sys = { version = "0.3", features = ["Gpu", "Navigator", "Window", "Document", "HtmlElement", "Element"] }
wasm-bindgen = "0.2"
js-sys = "0.3"
# Desktop release tuning. This renderer is GPU-bound, but Bevy's CPU path
# (resource management, system scheduling, egui, wgpu command submission)
# still benefits measurably from cross-crate LTO and a single codegen unit:
# - lto = "fat": cross-crate inlining, removes trampolines through Bevy/wgpu.
# - codegen-units = 1: best optimization, at the cost of slower compiles.
# - panic = "abort": smaller binary, no unwind tables in the hot path.
# - strip: drop debug symbols from the shipped binary.
# `wasm-release` inherits release, so web picks these up too (then overrides
# opt-level to "z" for binary size).
[profile.release]
lto = "fat"
codegen-units = 1
panic = "abort"
strip = "symbols"
# Smaller wasm binary in release web builds (per Bevy examples README).
[profile.wasm-release]
inherits = "release"
opt-level = "z"
lto = "fat"
codegen-units = 1