diff --git a/.cargo/config.toml b/.cargo/config.toml index ac2b23f..5643a70 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,26 @@ +[target.x86_64-unknown-linux-gnu] +rustflags = [ + "-C", "target-cpu=native", + "-C", "link-arg=-Wl,--gc-sections", + "-C", "link-arg=-Wl,-O2", +] + +[target.aarch64-apple-darwin] +rustflags = [ + "-C", "target-cpu=native", + "-C", "link-arg=-Wl,-dead_strip", +] + +[target.x86_64-apple-darwin] +rustflags = [ + "-C", "target-cpu=native", + "-C", "link-arg=-Wl,-dead_strip", +] + [target.x86_64-pc-windows-msvc] -rustflags = ["-C", "target-feature=+crt-static"] +rustflags = [ + "-C", "target-feature=+crt-static", + "-C", "target-cpu=native", + "-C", "link-arg=/OPT:REF", + "-C", "link-arg=/OPT:ICF" +] diff --git a/Cargo.toml b/Cargo.toml index 313df12..a57fbd7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,13 +1,22 @@ [workspace] resolver = "2" -members = [ - "crates/client", - "crates/common", - "crates/server", -] +members = ["crates/client", "crates/common", "crates/server"] + +[profile.release] +opt-level = 3 +lto = "fat" +codegen-units = 1 +panic = "abort" +strip = "symbols" +debug = false +overflow-checks = false +incremental = false [workspace.dependencies] common = { path = "crates/common" } -tokio = {version = "1.51.1", features = ["full"]} +tokio = { version = "1.52.3", features = ["full"] } bitcode = "0.6.9" -quinn = "0.11.9" +quinn = { version = "0.11.9", default-features = false, features = [ + "runtime-tokio", +] } +rustls = "0.23.40"