-
Notifications
You must be signed in to change notification settings - Fork 699
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
Plan for GC and beyond #2348
Comments
Without addressing the rest of the questions here I would note the binaryen does have a new text parser that is nearing completion that will be able to be fully spec compliant. IIUC (@tlively will correct me) it should allow binaryen to then run the full spec tests in their upstream form. |
That is accurate I think. Binaryen is proving really useful as an optimizer for WasmGC content on multiple languages, with speedups and code size improvements that are pretty significant (e.g. 2x faster for Java). So I expect our investment there to continue. Note that porting wasm2c to Binaryen could benefit from that optimizer as well, as wasm2js already does: wasm2js runs some specific optimization passes aimed to help JS execution speed (the IR is designed for that kind of thing, and maybe we'll find ideas for wasm2c). For those reasons I think porting wasm2c to Binaryen can make sense. As a Binaryen developer I'd support that. Regarding the downsides:
Correct, Binaryen is an optimizer, not a general-purpose tool. It constructs a full IR for its input, in particular, which is why it can be slower compared to a tool that just scans the wasm in-place. And it doesn't round-trip wasm binaries perfectly. Overall I'd say wasm2c could be ported to Binaryen, but the non-wasm2c tools could not. So one possible path to consider here could be (which combines two of your ideas @keithw):
I don't know enough about the status and momentum of those parts of |
Hey folks 👋 I'm the author of a VideoGame engine and libraries using Kotlin and did some tools regarding wasm myself, and I'm interested in the evolution of wasm2c + GC. I'm specially interested into being able to generate C code calling native libraries like SDL/Opengl from Kotlin WASM. |
Hello - my understanding of this issue is it's not necessarily specific to GC but about features in any new Wasm proposal. If that understanding seems off let me know and I can file a different one. From what I can tell, currently https://github.com/WebAssembly/threads/tree/upstream-rebuild/test/core/threads
|
@anuraaga The binaryen parser already supports the threads proposal (without that, it would not be able to optimize pthreads content in Emscripten, for example, so that was implemented quite some time ago already). |
@kripken Ah sorry if it was confusing, I meant the thread invocation syntax in the linked test cases, not atomics (I wish the proposal was caller Webassembly atomics instead of threads...). I don't know if this is the correct place to look but I don't see any IR related to those thread commands, which would make sense since they don't translate to Wasm IIUC, only test harness commands Would parsing those test-specific commands also be in scope? |
Yes, I think parsing the full wast scripting language including threads extensions should be in-scope for the new parser, since the end point for that project is to be able to run all the upstream spec tests. I've added that to the list of remaining issues here: WebAssembly/binaryen#6208. |
👋 wanted to drop in as someone who works on wasm-tools and say that I'm happy to help out if that's the direction wabt maintainers/users feel is best. From a maintenance perspective I can perhaps add some color on the wasm-tools side of things as well. The core libraries (Rust crates) like Not to say the BA or folks are disinterested in the CLI itself of course, mostly just instead saying that while core functionality will likely be well-looked-after some of the surrounding bits are likely ripe for more interest and/or help maintaining. |
Personally, we would like to see this happen. wasm GC scares us, but other than that... |
The function-references and gc proposals are going to be merged into the spec soon (as well as the "v4" revision of the exception-handling proposal, which we don't support yet). It could be good to talk about our plan for supporting these features in WABT. I think there's a few options to put on the table:
I don't think anything is forcing us to make a decision here, but tentatively I'd rather make one than sort of avoid it.
The text was updated successfully, but these errors were encountered: