Skip to content

Add support for wasm-bindgen's browser-only hint#1403

Open
nightspc wants to merge 1 commit intodrager:masterfrom
Klik2Learn-com:bundler-browser-only-hint
Open

Add support for wasm-bindgen's browser-only hint#1403
nightspc wants to merge 1 commit intodrager:masterfrom
Klik2Learn-com:bundler-browser-only-hint

Conversation

@nightspc
Copy link

@nightspc nightspc commented Jul 2, 2024

Does not fully address #689 as this only works in very specific environments (usually requires wasm is inlined as base64 by a bundler plugin).

Code that runs in a Worklet/AudioWorklet context only has access to a limited subset of browser APIs. To allow running under these restrictions, wasm-bindgen provides the --browser flag which alters the generated JS code for these environments.

Currently, there is no way to tell wasm-pack to use this flag when building. This PR adds support for forwarding this flag to wasm-bindgen.

  • You have the latest version of rustfmt installed
  • You ran cargo fmt on the code base before submitting
  • You reference which issue is being closed in the PR text

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant