trunk-rs / trunk

Build, bundle & ship your Rust WASM application to the web.
https://trunkrs.dev/
Apache License 2.0
3.43k stars 251 forks source link

Audio worklet support #92

Open rfwatson opened 3 years ago

rfwatson commented 3 years ago

Add support for bundling audio worklets.

Audio worklets are somewhat similar to web workers but have some different restrictions/challenges. This list isn't necessarily exhaustive, just what I remember from hacking with this previously:

  1. Worklets are loaded using audioWorklet property instead of new Worker()
  2. importScripts is not available in audio worklet scope
  3. TextEncoder/TextDecoder not available in audio worklet scope, these are used by wasm-bindgen glue code so would probably have to be polyfilled

Related wasm-pack issue: https://github.com/rustwasm/wasm-pack/issues/689

I'd be potentially interested in helping with this, but opening this issue for tracking purposes.

github-actions[bot] commented 9 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.