Intent to Experiment: WebAssembly Custom Descriptors

189 views
Skip to first unread message

Thomas Lively

unread,
Aug 11, 2025, 7:02:42 PMAug 11
to blin...@chromium.org, Emanuel Ziegler, Jakob Kummerow

Contact emails

tli...@google.comecmzi...@chromium.orgjkum...@chromium.org

Explainer

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

Specification

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

Summary

Allows WebAssembly to store data associated with source-level types more efficiently in new "custom descriptor" objects. These custom descriptors can be configured with prototypes for the WebAssembly objects of that source-level type. This allows methods to be installed on a WebAssembly object's prototype chain and called directly from JS using normal method call syntax. The prototypes and methods can be configured declaratively using an imported builtin function.



Blink component

Blink>JavaScript>WebAssembly

TAG review

None

TAG review status

Pending

Origin Trial documentation link

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

Risks



Interoperability and Compatibility

None



Gecko: No signal

WebKit: No signal

Web developers: No signals

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None



Goals for experimentation

Initially we are looking to measure real-world performance, heap usage, and OOM rate impact of just the core Wasm part of the proposal. We want to verify that heap usage and OOM rates will decrease as expected and that the performance impact is negligible. If we do measure a performance impact, that will inform additional optimization work we would need to do in the implementation. Notably, the JS interop features of the proposal are out of scope for this initial experimentation. They will likely be evaluated in follow-on experiments.



Ongoing technical constraints

None.



Debuggability

None



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?

No

Is this feature fully tested by web-platform-tests?

No

Flag name on about://flags

None

Finch feature name

None

Non-finch justification

None

Requires code in //chrome?

False

Estimated milestones

Origin trial desktop first141
Origin trial desktop last147


Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/6024844719947776?gate=5062088692858880

This intent message was generated by Chrome Platform Status.

Jakob Kummerow

unread,
Aug 12, 2025, 4:59:05 AMAug 12
to Thomas Lively, blin...@chromium.org, Emanuel Ziegler

Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?

No

FYI, that's just missing data in the form. Of course the feature will be available on all platforms, like all Wasm features. And it will be fully tested by WebAssembly tests, which are mirrored into the WPT suite.

Daniel Bratell

unread,
Aug 13, 2025, 10:58:39 AMAug 13
to Thomas Lively, blin...@chromium.org, Emanuel Ziegler, Jakob Kummerow

The explainer link is dead, but maybe it was meant to be the same as the Specification link? 

/Daniel

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAJZD_EWidxA-LogDRBnDVM9cOMbu3OX3_3onqCZcSLVJm7%3DnvA%40mail.gmail.com.

Thomas Lively

unread,
Aug 13, 2025, 2:05:26 PMAug 13
to Daniel Bratell, blin...@chromium.org, Emanuel Ziegler, Jakob Kummerow
Yes, apologies. The explainer link should be the same as the specification link: https://github.com/WebAssembly/custom-descriptors/blob/main/proposals/custom-descriptors/Overview.md

Daniel Bratell

unread,
Aug 13, 2025, 3:24:43 PMAug 13
to Thomas Lively, blin...@chromium.org, Emanuel Ziegler, Jakob Kummerow

I might have missed it, but how is this new feature going to be used by web developers? Do you have custom C compiler for the experiment? And do you need to do something in C to enable it? Or whatever language people prefer.

/Daniel

Thomas Lively

unread,
Aug 13, 2025, 4:41:29 PMAug 13
to Daniel Bratell, blin...@chromium.org, Emanuel Ziegler, Jakob Kummerow
Good question! The first toolchain to support custom descriptors is j2cl, which is an open source Java-to-JS/Wasm compiler developed by Google. Developers will enable the feature via an option passed to the compiler. We hope that once the feature is available via an origin trial, other toolchains will be motivated to start experimenting with it as well.

Note that in the initial experiments we don't expect toolchains to expose any new developer-facing functionality based on this feature. The use of custom descriptors will only be an internal implementation detail in the compiler that results in less memory usage at runtime. Later experimentation will additionally enable the JS interop features built on top of custom descriptors, and it will vary from toolchain to toolchain whether this enables new developer-facing functionality or enables a performance improvement in existing functionality.

Also note that this feature will generally only be usable from managed-memory languages that compile to WasmGC such as Java, Kotlin, and Dart. It's unlikely that C/C++/Rust and similar languages will ever make use of custom descriptors.

Mike Taylor

unread,
Aug 19, 2025, 10:37:52 AMAug 19
to Thomas Lively, Daniel Bratell, blin...@chromium.org, Emanuel Ziegler, Jakob Kummerow
Reply all
Reply to author
Forward
0 new messages