cargo: deps and compile options
This commit is contained in:
parent
06a6873d82
commit
41e96aa320
3 changed files with 4322 additions and 0 deletions
5
.cargo/config.toml
Normal file
5
.cargo/config.toml
Normal file
|
@ -0,0 +1,5 @@
|
|||
[target.x86_64-unknown-linux-gnu]
|
||||
rustflags = [
|
||||
# (Nightly) Make the current crate share its generic instantiations
|
||||
"-Zshare-generics=y",
|
||||
]
|
4289
Cargo.lock
generated
4289
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
28
Cargo.toml
28
Cargo.toml
|
@ -4,3 +4,31 @@ version = "0.1.0"
|
|||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
bevy = "0.14.0"
|
||||
|
||||
# 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
|
||||
|
||||
# Enable more optimization in the release profile at the cost of compile time.
|
||||
[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 for size in the wasm-release profile to reduce load times and bandwidth usage on web.
|
||||
[profile.wasm-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"
|
||||
|
|
Loading…
Reference in a new issue