From aa7f791dfdba5845c4253a4014d9bc210e5fb817 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Sat, 13 Jul 2024 05:19:05 +0900 Subject: [PATCH] perf(bindings): Invert Wasm size shrink (#9224) Reverts swc-project/swc#9191 I'm reverting because it applies even to `@swc/core`. Instead, I used an environment variable. --- bindings/Cargo.toml | 3 +-- bindings/binding_typescript_wasm/scripts/build.sh | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/bindings/Cargo.toml b/bindings/Cargo.toml index 0ebbdcbd5f72..8dcc3014dd95 100644 --- a/bindings/Cargo.toml +++ b/bindings/Cargo.toml @@ -16,12 +16,11 @@ resolver = "2" # lto = "fat" # debug = true -opt-level = 'z' +# opt-level = 'z' # Strip debug symbols strip = "symbols" -codegen-units = 1 [profile.dev.package."*"] debug-assertions = false diff --git a/bindings/binding_typescript_wasm/scripts/build.sh b/bindings/binding_typescript_wasm/scripts/build.sh index 67b4a990fdba..fa5cbf507473 100755 --- a/bindings/binding_typescript_wasm/scripts/build.sh +++ b/bindings/binding_typescript_wasm/scripts/build.sh @@ -2,8 +2,8 @@ set -eux export CARGO_PROFILE_RELEASE_LTO="fat" -# export CARGO_PROFILE_RELEASE_OPT_LEVEL="z" +export CARGO_PROFILE_RELEASE_OPT_LEVEL="z" wasm-pack build --out-name wasm --release --scope=swc --target nodejs ls -al ./pkg -node ./scripts/patch.mjs \ No newline at end of file +node ./scripts/patch.mjs