# Intent to ship: "Multi-value" WebAssembly proposal This feature adds support for WebAssembly functions that return multiple values and receive multiple return values, including across the JS/wasm call boundary.
The multi-value feature also adds support for multiple results from "blocks" (a structured control flow construct inside a WebAssembly function), and extends blocks to also accept multiple parameters. The combination of all of these features allows for more efficient encoding of WebAssembly programs, and also serves as a more capable base in which to express other WebAssembly extensions such as exception handling and interface types. ## Tracking bugs Implementation: https://bugzilla.mozilla.org/show_bug.cgi?id=1401675 Shipping: https://bugzilla.mozilla.org/show_bug.cgi?id=1628321 ## Standard https://github.com/WebAssembly/multi-value/ https://webassembly.github.io/multi-value/ Since early February, the proposal is in "phase 4" in the WebAssembly standarization process: https://github.com/WebAssembly/proposals/blob/master/README.md#phase-4---standardize-the-feature-wg ## Platform coverage All ## Devtools support Tracker at https://bugzilla.mozilla.org/show_bug.cgi?id=1628352. Loading multi-value wasm modules in a debugger doesn't crash but doesn't do much of use either as the debugger doesn't display the WebAssembly virtual stack. Limited tests indicate that stepping does not crash. ## Restricted to secure contexts No. (Not a worry as no additional capabilities granted.) ## Is this feature enabled by default in sandboxed iframes? Yes. (Not a worry as no additional capabilities granted.) ## Estimated or target release 77 (soft freeze 30 April, train leaving 4 May) ## Support in other browser / JS engines Chrome / V8 implements the proposal. Staged in October 2019, not shipped yet: https://bugs.chromium.org/p/v8/issues/detail?id=6672 Safari / JavaScriptCore implements the proposal, and the option is shipped by default in the WebKit open source project since October 2019 also. https://bugs.webkit.org/show_bug.cgi?id=202250 WasmTime / Cranelift also implements the proposal: https://hacks.mozilla.org/2019/11/multi-value-all-the-wasm/ However the SpiderMonkey shims for Cranelift will need adapting for SpiderMonkey's multi-value ABI. ## Upstream test coverage Minimal WPT coverage for the interface with JavaScript: testing/web-platform/tests/wasm/jsapi/constructor/multi-value.any.js Good upstream WebAssembly spec coverage but we are still sorting out some flags issues: https://bugzilla.mozilla.org/show_bug.cgi?id=1621645 ## Where to send your bugs Andy Wingo (:wingo). _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform