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

Experimental: Use Wasm exceptions for SjLj when using V8 #5282

Open
syrusakbary opened this issue Dec 4, 2024 — with Linear · 0 comments
Open

Experimental: Use Wasm exceptions for SjLj when using V8 #5282

syrusakbary opened this issue Dec 4, 2024 — with Linear · 0 comments
Assignees

Comments

Copy link
Member

syrusakbary commented Dec 4, 2024

Support WASIX longjmp/setjmp via Wasm exceptions using --v8.

We'll need to modify wasix-libc to use Wasm Exceptions when calling longjmp/setjmp (so longjmp/setjmp can be called using Wasm exceptions, and not using asyncify as we were doing until now).

Idea:

  1. Been able to compile this file with WASIX (using Wasm exceptions)
    https://github.com/wasix-org/wasix-libc/blob/main/examples/longjmp.c
  2. Run the generated wasm file (that has exceptions on it) with Wasmer + V8

Some resources: https://emscripten.org/docs/porting/exceptions.html#webassembly-exception-handling-based-support

Files: https://github.com/emscripten-core/emscripten/blob/main/system/lib/compiler-rt/emscripten_setjmp.c

@xdoardo xdoardo changed the title Support Wasm Exceptions in WASIX Experimental: Use Wasm exceptions for SjLj when using V8 Dec 5, 2024
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

No branches or pull requests

2 participants