Tune build profiles and workspace deps
Browse files at this commitf5d5359306dea53901e013ce32f974f2fee41ccdParent: 49be9b1- chore
- tune build profiles and workspace deps
2 changed files +41 -8
- .cargo/config.toml +25 -1
- Cargo.toml +16 -7
.cargo/config.tomlmodified+25 -1
| @@ -1,2 +1,26 @@ | |||
| 1 | +[target.x86_64-unknown-linux-gnu] | ||
| 2 | +rustflags = [ | ||
| 3 | + "-C", "target-cpu=native", | ||
| 4 | + "-C", "link-arg=-Wl,--gc-sections", | ||
| 5 | + "-C", "link-arg=-Wl,-O2", | ||
| 6 | +] | ||
| 7 | + | ||
| 8 | +[target.aarch64-apple-darwin] | ||
| 9 | +rustflags = [ | ||
| 10 | + "-C", "target-cpu=native", | ||
| 11 | + "-C", "link-arg=-Wl,-dead_strip", | ||
| 12 | +] | ||
| 13 | + | ||
| 14 | +[target.x86_64-apple-darwin] | ||
| 15 | +rustflags = [ | ||
| 16 | + "-C", "target-cpu=native", | ||
| 17 | + "-C", "link-arg=-Wl,-dead_strip", | ||
| 18 | +] | ||
| 19 | + | ||
| 1 | [target.x86_64-pc-windows-msvc] | 20 | [target.x86_64-pc-windows-msvc] |
| 2 | -rustflags = ["-C", "target-feature=+crt-static"] | 21 | +rustflags = [ |
| 22 | + "-C", "target-feature=+crt-static", | ||
| 23 | + "-C", "target-cpu=native", | ||
| 24 | + "-C", "link-arg=/OPT:REF", | ||
| 25 | + "-C", "link-arg=/OPT:ICF" | ||
| 26 | +] | ||
Cargo.tomlmodified+16 -7
| @@ -1,13 +1,22 @@ | |||
| 1 | [workspace] | 1 | [workspace] |
| 2 | resolver = "2" | 2 | resolver = "2" |
| 3 | -members = [ | 3 | +members = ["crates/client", "crates/common", "crates/server"] |
| 4 | - "crates/client", | 4 | + |
| 5 | - "crates/common", | 5 | +[profile.release] |
| 6 | - "crates/server", | 6 | +opt-level = 3 |
| 7 | -] | 7 | +lto = "fat" |
| 8 | +codegen-units = 1 | ||
| 9 | +panic = "abort" | ||
| 10 | +strip = "symbols" | ||
| 11 | +debug = false | ||
| 12 | +overflow-checks = false | ||
| 13 | +incremental = false | ||
| 8 | 14 | ||
| 9 | [workspace.dependencies] | 15 | [workspace.dependencies] |
| 10 | common = { path = "crates/common" } | 16 | common = { path = "crates/common" } |
| 11 | -tokio = {version = "1.51.1", features = ["full"]} | 17 | +tokio = { version = "1.52.3", features = ["full"] } |
| 12 | bitcode = "0.6.9" | 18 | bitcode = "0.6.9" |
| 13 | -quinn = "0.11.9" | 19 | +quinn = { version = "0.11.9", default-features = false, features = [ |
| 20 | + "runtime-tokio", | ||
| 21 | +] } | ||
| 22 | +rustls = "0.23.40" | ||