Skip to content

Add Wasm Custom Descriptors #3244

@jakobkummerow

Description

@jakobkummerow

Specification

https://github.com/WebAssembly/custom-descriptors/blob/main/proposals/custom-descriptors/Overview.md

Description

A follow-up to WasmGC, this feature adds a way to associate data with a type, by using a WebAssembly struct as a "descriptor" for other structs. This reflects the concept that many languages call "static properties" (per-class rather than per-instance). Compared to previous user-space implementations, the standardized feature saves memory, because the custom per-type data can be integrated with engine-internal per-type metadata.
The second part of the proposal, building on the first, is a way to attach JavaScript prototypes to exported Wasm objects, for much more ergonomic WasmGC/JS interop.

To be in line with other Wasm features, I expect that the feature/file name in this repository will be wasm-custom-descriptors.yml. The group is "webassembly".

Documentation

https://github.com/WebAssembly/custom-descriptors/blob/main/proposals/custom-descriptors/Overview.md

Browser support

Chrome is about to run an Origin Trial for this.

Firefox has expressed support and is working on an implementation as well.

Finalization of the proposal and shipping by default in browsers is tentatively expected to happen some time in 2026, possibly quite early in the year.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature definitionCreating or defining new features or groups of features.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions