From d5010024d4f60fadbcc76c351b320af29292d89e Mon Sep 17 00:00:00 2001 From: xfy Date: Tue, 26 May 2026 08:26:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20release=20profile=20?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - opt-level = "z": 优化二进制体积 - lto = true: 启用链接时优化 - codegen-units = 1: 单代码生成单元以换取更优优化 - panic = "abort": 移除 panic 展开开销 - strip = true: 去除调试符号 Co-Authored-By: Claude Opus 4.7 (1M context) --- Cargo.toml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 9d6074e..8480aa2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,6 +21,14 @@ getrandom = { version = "0.2", features = ["js"] } web-sys = { version = "0.3", features = ["Document", "Window", "HtmlDocument", "Storage", "Element"] } wasm-bindgen = "0.2" +[profile.release] +debug = false +opt-level = "z" +lto = true +codegen-units = 1 +panic = "abort" +strip = true + [features] default = ["web", "server"] web = ["dioxus/web"]