From fe4fc9d2509843f787dfc65f89111adc1987e059 Mon Sep 17 00:00:00 2001 From: Ben Reeves Date: Sat, 7 Sep 2024 19:02:53 -0500 Subject: [PATCH] feat: New `data-threads` attribute for rust assets. This enables the `threads`, `bulk-memory`, and `mutable-globals` options in `wasm-opt`, which if absent can result in `wasm-opt` failing to optimize wasm modules compiled with threading features. Fixes #866. --- examples/wasm_threads/index.html | 1 + guide/src/assets/index.md | 1 + site/content/assets.md | 1 + src/pipelines/rust/mod.rs | 10 ++++++++++ 4 files changed, 13 insertions(+) diff --git a/examples/wasm_threads/index.html b/examples/wasm_threads/index.html index 4e0f3890..4a2d2f8e 100644 --- a/examples/wasm_threads/index.html +++ b/examples/wasm_threads/index.html @@ -14,6 +14,7 @@ rel="rust" href="Cargo.toml" data-wasm-opt="z" + data-threads data-bindgen-target="web" /> diff --git a/guide/src/assets/index.md b/guide/src/assets/index.md index dd8f6be4..85318652 100644 --- a/guide/src/assets/index.md +++ b/guide/src/assets/index.md @@ -31,6 +31,7 @@ This will typically look like: `