You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #128628 I switched the way of handling function pointer casts in emscripten to an approach based on wasm-gc. Unlike the previous approaches this should work on the wasi targets, at least the ones that include wasm-gc. There's some difficulty in that there's no support for the instructions in the clang C front end, nor really in the backend yet. So I'm not sure what is the best way to emit these instructions. We only would need to generate one short function using them though.
What's the specific benefit for trying to make the switch for WASI when "there's no support for the instructions in the clang C front end, nor really in the backend yet" as I don't think wasmtime has landed their GC proposal support fully yet? Plus there isn't a WASI trampoline like there is with Emscripten, so I'm not sure where you're suggesting to insert the assembly code, unless you're trying to broaden the trampoline to be WASM-agnostic?
Right well if wasmtime or your favorite wasi runtime don't support wasm-gc yet then there's no benefit until they do. But wasi has the same function pointer cast problem as emscripten. Once the wasi runtimes all support wasm I think it makes sense to think about how to get a trampoline running. But it is indeed annoying if it's necessary to hand craft an object file. I'll look into what the options are, maybe there's a reasonable way with a .s file or inline assembly.
Uh oh!
There was an error while loading. Please reload this page.
In #128628 I switched the way of handling function pointer casts in emscripten to an approach based on wasm-gc. Unlike the previous approaches this should work on the wasi targets, at least the ones that include wasm-gc. There's some difficulty in that there's no support for the instructions in the clang C front end, nor really in the backend yet. So I'm not sure what is the best way to emit these instructions. We only would need to generate one short function using them though.
@brettcannon WDYT?
The text was updated successfully, but these errors were encountered: