diff --git a/CHANGELOG.md b/CHANGELOG.md index fafcecec4..3ebbbc970 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,14 @@ [pull/1585]: https://github.com/wasm-bindgen/wasm-pack/pull/1585 + - **Download prebuilt wasm-opt binary on Windows aarch64/arm64 - [pull/1605]** + + wasm-pack now downloads prebuilt `wasm-opt` binaries for Windows on AARCH64/ARM64 + (`arm64-windows`) from Binaryen releases instead of failing with an + unrecognized target error. + + [pull/1605]: https://github.com/wasm-bindgen/wasm-pack/pull/1605 + ## 🌷 0.15.0 - ### ✨ Features diff --git a/src/install/mod.rs b/src/install/mod.rs index 85f7619c3..830fb051c 100644 --- a/src/install/mod.rs +++ b/src/install/mod.rs @@ -184,6 +184,7 @@ pub fn prebuilt_url_for(tool: &Tool, version: &str, arch: &Arch, os: &Os) -> Res (Os::MacOS, Arch::AArch64, _) => "aarch64-apple-darwin", (Os::Windows, Arch::X86_64, Tool::WasmOpt) => "x86_64-windows", (Os::Windows, Arch::X86_64, _) => "x86_64-pc-windows-msvc", + (Os::Windows, Arch::AArch64, Tool::WasmOpt) => "arm64-windows", _ => bail!("Unrecognized target!"), }; match tool { diff --git a/tests/all/download.rs b/tests/all/download.rs index 1ed1011db..ba6dcc46c 100644 --- a/tests/all/download.rs +++ b/tests/all/download.rs @@ -62,6 +62,7 @@ fn can_download_prebuilt_cargo_generate() { all(target_os = "macos", target_arch = "x86_64"), all(target_os = "macos", target_arch = "aarch64"), all(windows, target_arch = "x86_64"), + all(windows, target_arch = "aarch64"), ))] fn can_download_prebuilt_wasm_opt() { let dir = tempfile::TempDir::new().unwrap();