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

GC struct and array types passing to and from JS and Typed Objects proposal status #715

Closed
chicoxyzzy opened this issue Jun 30, 2016 · 6 comments

Comments

@chicoxyzzy
Copy link
Member

It's said that

The GC struct and array types could be passed to and from JavaScript by reflecting the WebAssembly GC objects in JavaScript using the Typed Objects proposal.

Typed Objects proposal was removed from stage 0 as inactive because there is currently no champion for it.

I've created this issue to track progress of Typed Objects proposal.

@lars-t-hansen
Copy link
Contributor

There has been some work on TO at Mozilla during the last half year, but not enough to present it.

There have also been some objections to TO as being redundant relative to optimized representations for JS, but I expect WebAssembly will change the calculus on that.

@sunfishcode sunfishcode modified the milestone: Future Features Jul 8, 2016
@jfbastien
Copy link
Member

The GC proposal should take care of this.

@milindsmart
Copy link

milindsmart commented Jun 23, 2024

Can anybody shed light on what proposal is tracking adding direct DOM access to wasm? GC is already done and everyone seems to refer to GC as synonymous with DOM. Now where is the DOM? @binji

@mrgzi
Copy link

mrgzi commented Jun 23, 2024

@milindsmart I've been wondering the same thing all day, and came across to your comment :)

@rossberg
Copy link
Member

@milindsmart, @mrgzi, the relevant part that got split off from the GC proposal early on and already made it into Wasm 2.0 as released a few years ago are reference types. In particular, externref was added as a new value type that allows JavaScript objects to be handed to Wasm code and back.

That addresses the first bullet in the issue you linked to. Addressing the second bullet was never intended to be part of the GC proposal itself, but rather be enabled by it — the issue description is a bit misleading in that regard.

Based on externref, there is an active proposal for providing direct access to JavaScript strings. This isn't DOM objects, but the notion of builtins that it introduces is a blueprint for further embedder-specific functionality, like other JavaScript or Web interfaces.

Of course, for something like a full DOM interface to happen concretely, somebody would need to volunteer to start the actual work of designing, implementing, and championing it. Wasm is an open standard, so if either of you is interested in taking the initiative, the group would certainly be interested. :)

@milindsmart
Copy link

Thanks @rossberg, this info on current situation wasn't available till now (or maybe just not easy to grasp from existing material for lurkers/observers rather than implementers - like that issue description).

Another couple of issues where I commented on similar lines.

I would need to read up/gear up a lot more to try :)

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

7 participants