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

runtime: implement WASM-GC #63904

Open
mihaiav opened this issue Nov 2, 2023 · 10 comments
Open

runtime: implement WASM-GC #63904

mihaiav opened this issue Nov 2, 2023 · 10 comments
Labels
arch-wasm WebAssembly issues compiler/runtime Issues related to the Go compiler and/or runtime. FeatureRequest NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@mihaiav
Copy link

mihaiav commented Nov 2, 2023

Go applications compiled to WASM with the browser as target are quite inefficient and large. Both the download payload and performance could be improved by implementing support for WASM-GC.

Chrome recently enabled WASM-GC
https://developer.chrome.com/blog/wasmgc/

@gopherbot gopherbot added this to the Proposal milestone Nov 2, 2023
@sekoyo
Copy link

sekoyo commented Nov 2, 2023

Another good article: https://v8.dev/blog/wasm-gc-porting

@mauri870 mauri870 added the arch-wasm WebAssembly issues label Nov 2, 2023
@xushiwei
Copy link

This is what I want most in future Go version iterations.

@syrusakbary
Copy link

Once Go ships with Wasm-GC support, the binaries produced should be super small... eager to see how the Go team progresses on this!

@ianlancetaylor
Copy link
Contributor

CC @golang/wasm

@ianlancetaylor ianlancetaylor changed the title proposal: implement WASM-GC runtime: implement WASM-GC Dec 2, 2023
@ianlancetaylor ianlancetaylor modified the milestones: Proposal, Backlog Dec 2, 2023
@ianlancetaylor ianlancetaylor added the compiler/runtime Issues related to the Go compiler and/or runtime. label Dec 2, 2023
@johanbrandhorst
Copy link
Member

After looking briefly at various articles about this, I expect this will be an enormous amount of work, almost comparable to writing an entirely separate compiler. There would have to be special cases at many levels within the compiler. I would also love to see this, but I think it will be hard without considerable effort.

@dmitshur dmitshur added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. FeatureRequest labels Dec 4, 2023
@mknyszek
Copy link
Contributor

mknyszek commented Dec 6, 2023

+1 to what @johanbrandhorst said. Another big blocker to this is the fact that the Wasm GC, IIUC, doesn't yet support interior pointers, which are ubiquitous in Go code.

@mknyszek mknyszek modified the milestones: Backlog, Unplanned Dec 6, 2023
@daveshanley
Copy link

Who do I need to pay to make this happen?

tinygo is great, but cannot handle anything beyond basic go apps.

Please. God. This.

@evanphx
Copy link
Contributor

evanphx commented Dec 7, 2023

I think folks are presuming that WASM-GC would mean that the generated programs would change a lot. What changes are folks presume? From the comments above, there is the perception that it would make the binaries smaller, but that's not the case. The code to run the GC is tiny in compared to the rest of the program.

@daveshanley
Copy link

daveshanley commented Dec 7, 2023

I am ignorant, so please excuse that fact, but wouldn't completely removing the 1.5mb+ of additional GC golang bulk, only reduce WASM size?

@evanphx
Copy link
Contributor

evanphx commented Dec 7, 2023

Where are you seeing this 1.5MB?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-wasm WebAssembly issues compiler/runtime Issues related to the Go compiler and/or runtime. FeatureRequest NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests