WebAssembly / WebAssembly/custom-descriptors

Are descriptor structs allowed in ToJSValue?

Open
#42 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
WebAssembly
Stars
12
Forks
3
Avg merge
3d 2h
Merged PRs (30d)
1

Description

One goal I've heard is that descriptor structs can be eventually implemented directly using the existing Shape/Map/Structure objects that Web VMs already use on wasm GC objects.

However, a Shape (in SM at least) is not a JS object and should not be accessible to JS scripts. I don't think it could conceivably work even as an opaque thing like wasm GC objects are now. Things like typeof wouldn't know what to do with it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing Shape/Map/Structure objects in Web VMs and the current ToJSValue behavior for wasm GC objects. Determine whether descriptor structs can be exposed without making internal shapes accessible to scripts, including defined behavior for typeof; done means a documented decision on their allowed representation and JavaScript observability.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, wasm
Domain
api, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.