diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 00000000..b62027a3 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,10 @@ +[target.'cfg(target_arch = "wasm32")'] +rustflags = [ + "-C", "panic=abort", + # "-C", "lto=yes", // https://users.rust-lang.org/t/error-lto-can-only-be-run-for-executables-cdylibs-and-static-library-outputs/73369 + "-C", "embed-bitcode=yes", + "-C", "debuginfo=0", + "-C", "opt-level=z", + "-C", "codegen-units=1", + "-C", "debug-assertions=no", +] diff --git a/Cargo.toml b/Cargo.toml index c96eec43..daf4f8cc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,11 +9,3 @@ members = [ # See https://blog.rust-lang.org/2021/03/25/Rust-1.51.0.html#splitting-debug-information [profile.dev] split-debuginfo = "unpacked" - -[profile.release] -codegen-units = 1 -strip = "symbols" -debug = false -lto = true -opt-level = "z" -panic = 'abort'