rspack icon indicating copy to clipboard operation
rspack copied to clipboard

[Feature Request]: Native WebAssembly Support

Open ulivz opened this issue 2 years ago • 2 comments

What problem does this feature solve?

Currently Rspack doesn't support load *.wasm file:

image

I just created a reproduction here: https://github.com/ulivz/rusty-react, reproduction steps are as follows:

git clone [email protected]:joshfinnie/rusty-react.git
cd rusty-react
pnpm i
pnpm run dev

Refs:

  • Rspack: https://github.com/web-infra-dev/rspack/blob/b4f206819061e0d6efd19b33886aad9430478f49/crates/node_binding/src/js_values/source.rs#L69-L72
  • Webpack: https://github.com/webpack/webpack/blob/main/lib/wasm-sync/WebAssemblyParser.js

What does the proposed API of configuration look like?

  1. Introduce native WebAssembly support like Webpack.
  2. Introduce experiments.asyncWebAssembly support.

ulivz avatar Mar 11 '23 03:03 ulivz

@hardfist hi,guys I'm very interested in this feature, can you assign it to me?

tuchg avatar Mar 11 '23 13:03 tuchg

go ahead!

hardfist avatar Mar 13 '23 16:03 hardfist