From c3845c3223f37422538ba6808b0ca25290b742a1 Mon Sep 17 00:00:00 2001 From: Peter Wielander Date: Sat, 30 May 2026 09:57:15 +0200 Subject: [PATCH] fix(swc-plugin): allow wasm host imports during link --- .changeset/salty-ears-act.md | 2 ++ packages/swc-plugin-workflow/.cargo/config.toml | 5 +++++ 2 files changed, 7 insertions(+) create mode 100644 .changeset/salty-ears-act.md diff --git a/.changeset/salty-ears-act.md b/.changeset/salty-ears-act.md new file mode 100644 index 0000000000..a845151cc8 --- /dev/null +++ b/.changeset/salty-ears-act.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/packages/swc-plugin-workflow/.cargo/config.toml b/packages/swc-plugin-workflow/.cargo/config.toml index 5e9878a1bb..455439a196 100644 --- a/packages/swc-plugin-workflow/.cargo/config.toml +++ b/packages/swc-plugin-workflow/.cargo/config.toml @@ -3,3 +3,8 @@ # Alias to build actual plugin binary for the specified target. build-wasip1 = "build --target wasm32-wasip1" build-wasm32 = "build --target wasm32-unknown-unknown" + +[target.wasm32-unknown-unknown] +# SWC supplies these imports when it loads the plugin. Some rust-lld builds +# reject them by default, notably on Windows CI, unless we allow host imports. +rustflags = ["-C", "link-arg=--allow-undefined"]