Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
34 lines (33 loc) · 1.56 KB
/
Copy pathCargo.toml
File metadata and controls
34 lines (33 loc) · 1.56 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
[workspace]
resolver = "2"
members = [
"crates/busbar",
"crates/api",
"crates/plugin-abi",
"crates/plugin-sdk",
"crates/plugin-testkit",
"crates/plugin-loader",
"crates/plugin-sign",
"crates/plugin-pack",
"crates/secret-ref",
"crates/auth-admin-tokens",
"crates/auth-static-plugin",
"crates/hook-test-plugin",
"crates/secret-example-plugin",
"crates/store-example-plugin",
"crates/export-example-plugin",
"crates/hooks-ranking",
"crates/store-memory",
]
[profile.release]
# Tuned for the shipped "deploy-and-done" binary: max optimization and smallest size,
# at the cost of slower release compiles (fine — releases are built in CI, not in the loop).
opt-level = 3 # opt-3 for the CPU-bound in-process work (parse/translate/serialize on the hot
# path). Larger than opt-level "s", but the stripped binary is still small (~11 MB)
# and the extra size is negligible in production, where provider round-trips dwarf it.
lto = "fat" # whole-program inlining across crates: faster hot path + smaller binary
codegen-units = 1 # let LTO optimize across the whole crate graph (best codegen, smaller output)
strip = true # strip symbols from the shipped binary (much smaller; set RUST_BACKTRACE aside)
# panic is left at the default `unwind` ON PURPOSE: a panic in one request task must unwind that
# task, not abort the whole gateway. `panic = "abort"` would trade per-request isolation for a
# little size — the wrong trade for a service in the request path.