Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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