forked from cloudflare/workers-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
31 lines (27 loc) · 1.06 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
[workspace]
members = [
"worker",
"worker-build",
"worker-macros",
"worker-sandbox",
"worker-sys"
]
[profile.release]
# rustc supports two "optimize for size" levels: opt-level = "s" and "z".
# These names were inherited from clang / LLVM and are not too descriptive
# but "z" is meant to give the idea that it produces smaller binaries than "s".
# https://docs.rust-embedded.org/book/unsorted/speed-vs-size.html#optimize-for-size
opt-level = "z"
# by compiling as a single codegen unit (i.e. not in parallel),
# it's possible to reduce size even further at the expense of
# compilation time
codegen-units = 1
# by enabling link-time optimization, we can reduce size even further
# by telling cargo to optimize at the link stage (in addition to the
# normal optimizations during the compilation stage)
lto = true
# by overriding our dependencies' compilation settings, we can further optimize for size
# https://docs.rust-embedded.org/book/unsorted/speed-vs-size.html#optimizing-dependencies
[profile.release.package."*"]
codegen-units = 1
opt-level = "z"