Skip to content

Conversation

@sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Dec 12, 2025

There are some use cases where its useful to be able to run emscripten generated code in an audio worklet without building with -sAUDIO_WORKLET. One major one is for deploying in a context where shared memory not available (i.e. no cross origin isolation)

Fixes: #22979, #25943

@sbc100 sbc100 force-pushed the audio_worklet branch 4 times, most recently from 39ec937 to c983f22 Compare December 12, 2025 20:45
@sbc100 sbc100 requested review from cwoffenden, juj and kripken December 12, 2025 20:45
sbc100 added a commit to sbc100/emscripten that referenced this pull request Dec 13, 2025
- Skip caching of JS output in the presence of user JS libraries.
- Include our core js files, since changing them should invalid the
  cache.

Followup to emscripten-core#25942
sbc100 added a commit that referenced this pull request Dec 15, 2025
- Skip caching of JS output in the presence of user JS libraries.
- Include our core js files, since changing them should invalid the
cache.

Followup to #25942
Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm % comments

Copy link

@lindell lindell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my limited experience, it LGTM.

One thing that we might want to add to the docs in some way is to make it clearer in some way that AUDIO_WORKLET and ENVIRONMENT=worklet is two different things?

@sbc100 sbc100 force-pushed the audio_worklet branch 2 times, most recently from a39ca89 to 0fbc359 Compare December 17, 2025 16:43
@sbc100
Copy link
Collaborator Author

sbc100 commented Dec 17, 2025

I added some docs.

There are some use cases where its useful to be able to run emscripten
generated code in an audio worklet without building with
`-sAUDIO_WORKLET`.  One major one is for deploying in a context where
shared memory not available (i.e. no cross origin isolation)

Fixes: emscripten-core#25943, emscripten-core#25943
@sbc100
Copy link
Collaborator Author

sbc100 commented Dec 17, 2025

@juj, thoughts on this before we land?

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.

Using module in environments without setTimeout, clearTimeout, atob causing memory leak

3 participants