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:
Worklets are loaded using audioWorklet property instead of new Worker()
importScripts is not available in audio worklet scope
TextEncoder/TextDecoder not available in audio worklet scope, these are used by wasm-bindgen glue code so would probably have to be polyfilled
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:
audioWorklet
property instead ofnew Worker()
importScripts
is not available in audio worklet scopeTextEncoder
/TextDecoder
not available in audio worklet scope, these are used by wasm-bindgen glue code so would probably have to be polyfilledRelated 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.