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

What's the roadmap for Garbage Collection? #44

Closed
PoignardAzur opened this issue Nov 5, 2018 · 17 comments
Closed

What's the roadmap for Garbage Collection? #44

PoignardAzur opened this issue Nov 5, 2018 · 17 comments

Comments

@PoignardAzur
Copy link

The activity for this proposal has slowed down quite a bit since August, and the current MVP implementation is full of TODOs. I'm sure work on the proposal is still ongoing, and I don't know what the priorities of the Wasm team are, but I'm really excited by the GC proposal and what it would mean for Wasm adoption.

How can we contribute? Could we get a general roadmap for what needs to be done before the GC proposal is implemented? Is there some area where the community could be helpful?

I would ordinarily look at existing repository issues for starting points, but most of the issues here seem to be inactive; mostly old questions and people proposing alternate schemes.

@chicoxyzzy
Copy link
Member

chicoxyzzy commented Nov 6, 2018

Updated after @lars-t-hansen's comment.

Note: probably there can be inaccuracies in answer below


@PoignardAzur There is Reference Types proposal which is came out of GC and Host Bindings proposals and provides a way to reference host objects inside wasm. Reference Types doesn't imply GC in wasm (GC is necessary only if host references are GC'ed) but they are the basis for GC proposal. Reference Types are on phase 3 of WebAssembly W3C Process.
You can use these links to track status of Reference Types and GC:

Also there are some open questions in GC proposal (which is on phase 1):

  • for integration with JS hosts, nominal typing in JS Typed Objects vs structural typing in wasm should be solved, also nullability, etc (see Describe JS API for GC #45)
  • for all hosts these issues should be solved
  • Typed Objects proposal for ECMAScript needs update based on WebAssembly requirements

@lars-t-hansen
Copy link
Contributor

lars-t-hansen commented Nov 7, 2018

@chicoxyzzy, the spidermonkey links in your post are incorrect. Reftypes are in progress (metabugs for milestone 1, milestone 2) but are absolutely not finished, nor is the reftypes spec completely finished either, there are plenty of open issues and more are coming. The implementation of GC is in progress, but the link you reference above (under Reference Types) is to an initial prototype implementation of some partial ideas, and we are at least many months away from finishing this feature.

@chicoxyzzy
Copy link
Member

chicoxyzzy commented Nov 7, 2018

@lars-t-hansen thank you for your corrections! I updated my comment.

@tschneidereit
Copy link
Member

Typed Objects proposal for ECMAScript is inactive and needs a huge update based on WebAssembly requirements

It's not really inactive, but I should update all the places to reflect that.

@chicoxyzzy
Copy link
Member

It's not really inactive, but I should update all the places to reflect that.

Thanks. Fixed

@PoignardAzur
Copy link
Author

PoignardAzur commented Nov 8, 2018

@chicoxyzzy Thank you for your answer.

Even with the information you've given here, the advancement of Wasm GC still feels somewhat vague. It woud probably be helpful to post some of this in the README or the overview.

Some questions that I still have:

  • What portion of the "GC" proposal does the "Reference types" proposal cover? The GC proposal goes in some detail about what kinds of data structures references would be able to access, and how they'd access these structures. The proposal says that references should exist, but how would these references be created, written to and read from?

  • What is the roadmap for Reference Types, and how can community members contribute to it? I presume a large part of the development (eg updating the Wasm compilers on each browser) will be mostly in-house for Morilla, Google and Microsoft, but are aspects of the RT proposal that could benefit from community contributions?

  • @tschneidereit What is the status of the "Typed Objects" proposal? Same questions as above, really. And how necessary are ES Typed Objects to Webasm GC, given that the GC proposal already spells out its own type system?

@PoignardAzur
Copy link
Author

@lars-t-hansen Interesting. Correct me if I'm wrong, but is the Mozilla team currently developing the "GC" proposal independently of the progression of "Reference Types" and "Types Object", hence why you're implementing aggregate types?

Or am I misunderstanding these links?

@lars-t-hansen
Copy link
Contributor

@PoignardAzur, The reftypes proposal is not intended to require the GC proposal nor anything like typed objects for JS, and we are indeed developing reftypes semi-independently from the other proposals. (Of course in Firefox, reftypes will be backed by a garbage collector and will be able to handle JS objects, but there are other embeddings where this is not interesting or necessary.)

@chicoxyzzy
Copy link
Member

There is discussion in proposals repo about tracking implementation status of proposals WebAssembly/proposals#21

@PoignardAzur
Copy link
Author

PoignardAzur commented Nov 8, 2018

@lars-t-hansen That seems a little contradictory with the current MVP specification, which says its language is

Based on reference types proposal, which introduces type anyref etc.

I think it would be a lot easier for volunteers to provide help (both in writing down specs and implementing solutions) if there was a written consensus on what is done, what is to be done, and what needs to be agreed on.

Right now it seems that the GC and Reftypes blueprints (eg spec+implem) reside in large part in the minds of Mozilla and Google engineers, which is obviously not ideal. People can't e.g. contribute to the spec if they don't know what's the official spec and what's outdated. Same thing for contributing code.

@chicoxyzzy
Copy link
Member

chicoxyzzy commented Nov 8, 2018

@PoignardAzur you can join WebAssembly W3C Community Group to participate in CG meetings

@tschneidereit
Copy link
Member

* @tschneidereit What is the status of the "Typed Objects" proposal? Same questions as above, really.

@PoignardAzur the proposal is in very early stages—I haven't yet presented it to TC39, so the explainer is pretty much all the information available right now.

And how necessary are ES Typed Objects to Webasm GC, given that the GC proposal already spells out its own type system?

WebAssembly's GC proposal is technically independent from JS Typed Objects, but Typed Objects are the JS reflection of the same objects specified in Wasm GC proposal. Think of it as two different aspects of the same underlying concerns. The reason we need both proposals is that these objects need to be efficiently accessible both from WebAssembly and from JS in order to be maximally useful.

@binji
Copy link
Member

binji commented Nov 8, 2018

@PoignardAzur you may want to take a look at the notes from the most recent CG meeting at TPAC, as well as the presentations on the reference-types and GC proposals. They don't have all the spec information, but they do have the current status.

@XVilka
Copy link

XVilka commented Apr 30, 2020

Has anything changed in these two years?

@rossberg
Copy link
Member

rossberg commented May 5, 2020

@XVilka, most of the work has been spent on splitting off smaller, incremental proposals as preliminaries and advancing them separately. Concretely, the reference types proposal, the typed references proposal, and the type imports proposal. Unfortunately, that work is taking much longer than we anticipated.

In the meantime, some prototyping on the proposal itself has started.

@wisehackermonkey
Copy link

I see this as the most important feature to get mass adoption of other languages in the web!
I'm really excited to see gc languages in wasm.

@tlively
Copy link
Member

tlively commented Feb 10, 2022

There has been much more activity on this proposal recently and we are scheduled to poll for phase 2 at the CG meeting on February 15. Closing this issue for now since the original question has been answered.

@tlively tlively closed this as completed Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants