-
Notifications
You must be signed in to change notification settings - Fork 114
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
Support a WASI reactor target #587
Comments
Javy-generated modules, are WASI-compliant by default. More concretely, Javy-generated modules are Commands, which according to the WASI specification:
The |
Right, I figured that was the case. The reason for my issue is because if we look at say TinyGo's WASM/WASI target, it requires you to call Why this is relevant is my use-case loads extensions written in any programming language which are compiled to a WASI module, and we have to workaround and support the various calling conventions and ceremony each compiler requires since everyone is fast and loose with the standards. So, with that being said, a reactor target would be great for Javy so we can have setup code and still call exported functions. |
If you're willing to work on a PR to add this functionality, I'd be happy to review it. |
Operating system: macOS
Processor architecture: M1 (arm64)
Rust version: not applicable
Javy version: latest
Problem
WASI/WASM ceremony is all over the place depending on what compiler produced the module. Most expect _start or _initialize to be called prior to any exported functions being invoked.
In the case of modules produced by Javy, if _start is called any subsequent calls to exported functions will fail with wasmtime reporting they’re unreachable.
If I remove my calls to _start then I can call into my exported functions without issue.
The text was updated successfully, but these errors were encountered: