proposals icon indicating copy to clipboard operation
proposals copied to clipboard

🛤 Garbage collection

Open binji opened this issue 7 years ago • 0 comments

This is a tracking issue for a post-MVP feature It will be updated as the issue progresses.

Topic Garbage collection Champion Andreas Rossberg (@rossberg-chromium) Status In progress Phase Feature proposal Linked issues https://github.com/WebAssembly/design/issues/985 https://github.com/WebAssembly/design/issues/919 https://github.com/WebAssembly/design/issues/733 https://github.com/WebAssembly/design/issues/715 https://github.com/WebAssembly/design/issues/484 https://github.com/WebAssembly/design/issues/289 https://github.com/WebAssembly/design/issues/238 Linked repositories github.com/WebAssembly/gc/

Details

To realize the high-level goals of (1) integrating well with the existing Web platform and (2) supporting languages other than C++, WebAssembly needs to be able to:

  • reference DOM and other Web API objects directly from WebAssembly code;
  • call Web APIs (passing primitives or DOM/GC/Web API objects) directly from WebAssembly without calling through JavaScript; and
  • efficiently allocate and manipulate GC objects directly from WebAssembly code.

An important constraint is that, while WebAssembly should allow tight integration with the Web, it should not bake in details or Web standards dependencies that prevent execution in a non-Web embedding. This suggests a design (called opaque reference types) that hides the details of JavaScript and WebIDL behind Web-embedding-specific builtin modules. On the other hand, WebAssembly can define a set of native GC primitives that allowed portable GC code to be written regardless of the host environment.

binji avatar Oct 16 '18 22:10 binji