Skip to content

Conversation

juj
Copy link
Collaborator

@juj juj commented Sep 4, 2024

No description provided.

#endif

#if ASYNCIFY == 1 // ASYNCIFY-mode requires checking ABORT variable to avoid operating if code has aborted during an unwind
var ABORT = 0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

It seems like this relates to ASYNCIFY == 1 but the PR title talks about JSPI. Does this change cover both?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Err, yes. Updated the title to clarify that this PR addresses both ASYNCIFY and JSPI.

}
#endif

#if ASYNCIFY == 1 // ASYNCIFY-mode requires checking ABORT variable to avoid operating if code has aborted during an unwind
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this a debug feature or do we need to add this new variable even in release builds?

I worry that this makes the feature matrix even more complicated and there could be other places in the codebase that deal with ABORT that need to be changes now that ABORT does exist undef MINIMAL_RUNTIME but only with ASYNCIFY is enabled.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added that variable to help places like this and this to compile.

There seem to be places that call to it in library_async.js: https://github.com/emscripten-core/emscripten/blob/main/src/library_async.js#L18 so looks like in ASYNCIFY==1 mode we cannot avoid adding ABORT in the build. In ASYNCIFY==2 mode, maybe we could.

Overall, I think the support would be ok to be expanded incrementally via proof by test cases.

@juj juj changed the title Add JSPI support to MINIMAL_RUNTIME build mode. Add ASYNCIFY+JSPI support to MINIMAL_RUNTIME build mode. Sep 10, 2024
Copy link
Collaborator

@sbc100 sbc100 left a comment

Choose a reason for hiding this comment

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

Can we land this?

@sbc100
Copy link
Collaborator

sbc100 commented Aug 15, 2025

The esm_integration test failure is something is broken on maim. My fault: #24946.

Feel free to to land without waiting for that to get fixed.

@juj juj merged commit 14dcab4 into emscripten-core:main Aug 15, 2025
28 of 30 checks passed
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.

2 participants