Skip to content

Commit 99c69ed

Browse files
committed
fix(wasm): remove -Zbuild-std flag (no longer supported with emscripten target)
Recent Rust nightly no longer supports -Zbuild-std with wasm32-unknown-emscripten. wasm-opt still provides good size optimization.
1 parent 031d1e7 commit 99c69ed

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

docker/build.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,10 @@ case "$TARGET" in
6565
export BINDGEN_EXTRA_CLANG_ARGS="--sysroot=$EMSDK/upstream/emscripten/cache/sysroot"
6666
# Set rustflags for WASM target (side module for Godot)
6767
export CARGO_TARGET_WASM32_UNKNOWN_EMSCRIPTEN_RUSTFLAGS="-C link-args=-pthread -C target-feature=+atomics -C link-args=-sSIDE_MODULE=2 -C panic=abort -Zlink-native-libraries=no -Cllvm-args=-enable-emscripten-cxx-exceptions=0"
68-
# Use 'wasm' profile (size-optimized, no LTO - LTO + build-std exceeds CI memory)
68+
# Use 'wasm' profile (size-optimized, no LTO)
69+
# Note: -Zbuild-std is no longer supported with wasm32-unknown-emscripten target
6970
cargo +nightly build --manifest-path bindings/godot/Cargo.toml \
70-
--target-dir target --profile wasm -Zbuild-std=std,panic_abort --target wasm32-unknown-emscripten
71+
--target-dir target --profile wasm --target wasm32-unknown-emscripten
7172
# Run wasm-opt for aggressive size optimization (more efficient than LTO for WASM)
7273
WASM_FILE="target/wasm32-unknown-emscripten/wasm/bobbin_godot.wasm"
7374
WASM_OPT="$EMSDK/upstream/bin/wasm-opt"

0 commit comments

Comments
 (0)