-
Notifications
You must be signed in to change notification settings - Fork 70
Expand file tree
/
Copy pathCargo.toml
More file actions
115 lines (95 loc) · 3.58 KB
/
Cargo.toml
File metadata and controls
115 lines (95 loc) · 3.58 KB
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
[package]
name = "bevy_new_2d"
version = "0.1.0"
edition = "2024"
license = "MIT OR Apache-2.0 OR CC0-1.0"
[dependencies]
# Use only features needed for a 2D game to improve compile time and size
bevy = { version = "0.18", default-features = false, features = ["2d"] }
rand = "0.9"
# Compile out low-severity logs to improve performance.
# Remove these features if you want to profile your game with tracy.
# (see <https://github.com/bevyengine/bevy/blob/main/docs/profiling.md#tracy-profiler>)
tracing = { version = "0.1", features = [
"max_level_debug",
"release_max_level_warn",
] }
[target.wasm32-unknown-unknown.dependencies]
getrandom = { version = "0.3", features = ["wasm_js"] }
[features]
# Default to a native dev build.
default = ["dev_native"]
dev = [
# Improve compile times for dev builds by linking Bevy as a dynamic library.
"bevy/dynamic_linking",
"bevy/bevy_dev_tools",
"bevy/bevy_ui_debug",
# Improve error messages coming from Bevy
"bevy/track_location",
]
dev_native = [
"dev",
# Enable asset hot reloading for native dev builds.
"bevy/file_watcher",
# Enable embedded asset hot reloading for native dev builds.
"bevy/embedded_watcher",
]
[package.metadata.bevy_cli.release]
# Disable dev features for release builds.
default-features = false
[package.metadata.bevy_cli.web]
# Disable native features for web builds.
default-features = false
[package.metadata.bevy_cli.web.dev]
features = ["dev"]
[lints.rust]
# Mark `bevy_lint` as a valid `cfg`, as it is set when the Bevy linter runs.
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(bevy_lint)"] }
[lints.clippy]
# Bevy supplies arguments to systems via dependency injection, so it's natural for systems to
# request more than 7 arguments, which would undesirably trigger this lint.
too_many_arguments = "allow"
# Queries may access many components, which would undesirably trigger this lint.
type_complexity = "allow"
# Make sure macros use their standard braces, such as `[]` for `bevy_ecs::children!`.
nonstandard_macro_braces = "warn"
# You can configure the warning levels of Bevy lints here. For a list of all lints, see:
# <https://thebevyflock.github.io/bevy_cli/bevy_lint/lints/>
[package.metadata.bevy_lint]
# panicking_methods = "deny"
# pedantic = "warn"
# Compile with Performance Optimizations:
# <https://bevyengine.org/learn/quick-start/getting-started/setup/#compile-with-performance-optimizations>
# Enable a small amount of optimization in the dev profile.
[profile.dev]
opt-level = 1
# Enable a large amount of optimization in the dev profile for dependencies.
[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
[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"
# This profile will be used by `bevy run web` automatically.
[profile.web-release]
# Default to release profile values.
inherits = "release"
# 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"
# Optimize for build time in CI.
[profile.ci]
inherits = "dev"
opt-level = 0
debug = "line-tables-only"
codegen-units = 4
[profile.ci.package."*"]
opt-level = 0