Intent to Ship: WebAssembly Reference Types

148 views
Skip to first unread message

Andreas Haas

unread,
Aug 24, 2021, 5:48:49 AM8/24/21
to blink-dev

Contact emails

ah...@chromium.org, ad...@chromium.org, va...@chromium.org


Explainer

https://github.com/WebAssembly/reference-types 


Specification

https://github.com/WebAssembly/reference-types


Summary

Allow WebAssembly modules to hold references to JS/DOM objects, passing them as arguments, storing them in locals and globals, and storing them in WebAssembly.Table objects.




Blink component

Blink>JavaScript>WebAssembly


Search tags

wasm, webassembly, host bindings, anyref


TAG review

Not required for WebAssembly feature launches


TAG review status

Not applicable


Risks



Interoperability and Compatibility


Gecko: Already shipped (https://bugzilla.mozilla.org/show_bug.cgi?id=1444925)


WebAssembly Reference Types are already standardized and part of the core WebAssembly spec



Debuggability

Supported using DevTools



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

Yes, tests are provided by the WebAssembly spec.


Flag name

WebAssembly Reference Types can be enabled and disabled by the V8 Flag: --experimental-wasm-reftypes


Requires code in //chrome?

False


Tracking bug

https://bugs.chromium.org/p/v8/issues/detail?id=7581


Launch bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1155598


Estimated milestones

M95



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5166497248837632


This intent message was generated by Chrome Platform Status.

Yoav Weiss

unread,
Aug 25, 2021, 9:59:46 AM8/25/21
to blink-dev, Andreas Haas
On Tuesday, August 24, 2021 at 11:48:49 AM UTC+2 Andreas Haas wrote:

Contact emails

ah...@chromium.org, ad...@chromium.org, va...@chromium.org


Explainer

https://github.com/WebAssembly/reference-types 


Specification

https://github.com/WebAssembly/reference-types


Summary

Allow WebAssembly modules to hold references to JS/DOM objects, passing them as arguments, storing them in locals and globals, and storing them in WebAssembly.Table objects.




Blink component

Blink>JavaScript>WebAssembly


Search tags

wasm, webassembly, host bindings, anyref


TAG review

Not required for WebAssembly feature launches


TAG review status

Not applicable


Risks



Interoperability and Compatibility


Gecko: Already shipped (https://bugzilla.mozilla.org/show_bug.cgi?id=1444925)


Signals from Safari/WebKit? https://bit.ly/blink-signals
 

WebAssembly Reference Types are already standardized and part of the core WebAssembly spec


Any developer signals? I'd imagine developers would be excited about this.

Andreas Haas

unread,
Aug 26, 2021, 11:43:33 AM8/26/21
to blink-dev, yoav...@chromium.org, Andreas Haas
I am aware of two uses of WebAssembly Reference Types:
For one, wasm-bindgen (Rust's main Wasm toolchain) has an implementation based on reference types that allows them to avoid bunch of custom JS for managing values: https://rustwasm.github.io/docs/wasm-bindgen/reference/reference-types.html
Another example is AssemblyScript which also allows switching to reference types under a flag: https://www.assemblyscript.org/status.html#webassembly-features

Andreas Haas

unread,
Aug 26, 2021, 12:14:36 PM8/26/21
to Yoav Weiss, blink-dev
I am aware of two uses of WebAssembly Reference Types:
For one, wasm-bindgen (Rust's main Wasm toolchain) has an implementation based on reference types that allows them to avoid bunch of custom JS for managing values: https://rustwasm.github.io/docs/wasm-bindgen/reference/reference-types.html
Another example is AssemblyScript which also allows switching to reference types under a flag: https://www.assemblyscript.org/status.html#webassembly-features

Yoav Weiss

unread,
Aug 26, 2021, 3:16:41 PM8/26/21
to blink-dev, Andreas Haas, blink-dev, Yoav Weiss
LGTM1

Given that this is listed in https://github.com/WebAssembly/proposals/blob/master/finished-proposals.md I'm assuming Safari are supportive and no further signals are required.

Mike West

unread,
Aug 26, 2021, 3:17:44 PM8/26/21
to blink-dev, Yoav Weiss, Andreas Haas, blink-dev
LGTM2, with the same rationale.

-mike

Chris Harrelson

unread,
Aug 26, 2021, 3:25:13 PM8/26/21
to Mike West, blink-dev, Yoav Weiss, Andreas Haas
LGTM3

--
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 on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/87658f63-3536-453d-a152-db8c2e374adan%40chromium.org.
Reply all
Reply to author
Forward
0 new messages