-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCargo.toml
83 lines (69 loc) · 2.51 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
[package]
name = "symbiants_pkg"
version = "0.1.0"
edition = "2021"
build = "build.rs"
[lib]
name = "symbiants_lib"
crate-type = ["cdylib", "rlib"]
[workspace]
resolver = "2"
members = ["rendering", "simulation", "ui"]
[build-dependencies]
fs_extra = "1.3"
[dependencies]
simulation = { path = "./simulation" }
rendering = { path = "./rendering" }
ui = { path = "./ui" }
bevy = { version = "0.14.0", default-features = false, features = [
"bevy_asset",
"bevy_scene",
"bevy_winit",
"bevy_render",
"bevy_core_pipeline",
"bevy_sprite",
"bevy_text",
"default_font",
"png",
] }
bevy_turborand = { version = "0.9.0" }
# WASM builds require extra dependencies for logging and persisting state to local storage.
# WASM builds do not require x11 and cannot use dynamic_linking.
[target.'cfg(target_family = "wasm")'.dependencies]
console_error_panic_hook = { version = "0.1.7" }
# Linux builds require x11 or wayland for display.
[target.'cfg(not(target_family = "wasm"))'.dependencies]
bevy = { version = "0.14.0", default-features = false, features = [
"x11",
# TODO: support wayland w/ hardware accelerated GPU rendering. Currently crashes on startup and forces a Docker container restart.
# https://github.com/bevyengine/bevy/issues/13923 breaks gl rendering for me
# "wayland",
# NOTE: If native release builds are introduced then this will need to be excluded, it's excluded automatically for WASM builds.
"dynamic_linking",
] }
[dev-dependencies]
wasm-bindgen-test = "0.3.42"
[features]
dev-inspector = ["ui/dev-inspector"]
# Enable a small amount of optimization in debug mode
[profile.dev]
opt-level = 1
# Enable high optimizations for dependencies (incl. Bevy), but not for our code:
[profile.dev.package."*"]
opt-level = 3
# Remove expensive debug assertions due to <https://github.com/bevyengine/bevy/issues/14291>
[profile.dev.package.wgpu-types]
debug-assertions = false
# Don't change profile.release away from WASM or it'll break Trunk: https://github.com/trunk-rs/trunk/issues/605
[profile.release]
# Compile the entire crate as one unit.
# Slows compile times, marginal improvements.
codegen-units = 1
# Do a second optimization pass over the entire program, including dependencies.
# Slows compile times, marginal improvements.
lto = "thin"
# Optimize with size in mind (also try "z", sometimes it is better).
# Slightly slows compile times, great improvements to file size and runtime performance.
opt-level = "s"
# Strip all debugging information from the binary to slightly reduce file size.
strip = "debuginfo"