-
Notifications
You must be signed in to change notification settings - Fork 285
Support Tail Call extension #2397
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
Comments
interesting, it might be the first time I find this used in the wild. What kind of workload is that? Not ruling out eventually supporting that proposal, but in many cases you are just a compiler flag away from removing that instruction from the output binary |
@evacchi Check out the WASM file attached in this release https://github.com/alexbiehl/sqlc-hs/releases/tag/0.1.0.0. It was produced by the WASM backend of GHC and unfortunately it seems like I can't make it stop emitting that instruction. |
Hi @alexbiehl - I happened to build a GHC binary recently and found the workaround of using an older ghc-wasm-meta to work fine for now in case it helps. https://github.com/wasilibs/go-hadolint/blob/main/buildtools/wasm/Dockerfile#L6 @evacchi I think one issue with this in particular is haskell seems to compile wasi-libc themselves, and do enable tail call for it, so even if I try disabling it in my downstream build it ends up in the binary. |
@anuraaga FYI I inteded working on tail calls for a while, and in the meantime I implemented them, but it needs a little more testing I have a working branch on my own fork: evacchi#61 |
Uh oh!
There was an error while loading. Please reload this page.
Is your feature request related to a problem? Please describe.
I am trying to run a WASM workload that makes use of the return_call instruction (see https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/Control_flow/call).
Currently execution fails with
Describe the solution you'd like
Ideally wazero supports that instruction. Some research revealed it’s part of https://github.com/WebAssembly/tail-call/blob/main/proposals/tail-call/Overview.md. After all it would be nice if wazero supported the tail call extension.
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: