1
1
mirror of https://github.com/tweag/asterius.git synced 2024-09-21 05:48:04 +03:00
asterius/docs/wasm-experimental.md

35 lines
2.1 KiB
Markdown
Raw Normal View History

# Using experimental WebAssembly features
2020-04-24 19:00:46 +03:00
By default, Asterius only emits code that uses WebAssembly MVP features. There
2019-08-11 17:45:33 +03:00
are [flags](ahc-link.md) to make use of WebAssembly experimental features:
2019-08-11 17:45:33 +03:00
* `--tail-calls`: Emits tail call opcodes for Cmm function calls; overrides the
default trampoline approach. Only supported by the `wasm-toolkit` backend at
the moment.
* `--debug`: Uses i64 BigInt integration for passing i64 values between js/wasm.
2019-08-11 17:45:33 +03:00
The above features require specific flags to switch on in V8. They are known to
work in latest Node.js 12.x versions, and we test them on CI.
The V8 team maintains a Node.js 13.x build which integrates V8 trunk, described
[here](https://v8.dev/docs/node-next-generation). It's possible to use that
build to evaluate experimental WebAssembly features; we provide a
[script](https://github.com/tweag/asterius/blob/master/utils/v8-node.py) which
unzips the latest test-passing build to the current directory, so it's possible
2020-04-24 19:00:46 +03:00
to use the `node` binary for testing bleeding-edge Wasm features in V8.
2019-08-11 17:45:33 +03:00
We are keeping an eye on the development of experimental WebAssembly features.
Here is a list of V8 tracking issues of the features we are interested in. Some
are already available in recent Node.js or Chromium releases.
* [WebAssembly SIMD](https://bugs.chromium.org/p/v8/issues/detail?id=6020)
* [WebAssembly Multi-value](https://bugs.chromium.org/p/v8/issues/detail?id=6672)
* [WebAssembly nontrapping float-to-int conversions](https://bugs.chromium.org/p/v8/issues/detail?id=7226)
* [Tail call opcodes](https://bugs.chromium.org/p/v8/issues/detail?id=7431)
* [Reference types](https://bugs.chromium.org/p/v8/issues/detail?id=7581)
* [WebAssembly i64 BigInt integration](https://bugs.chromium.org/p/v8/issues/detail?id=7741)
* [WebAssembly JS Reflection API](https://bugs.chromium.org/p/v8/issues/detail?id=7742)
* [WebAssembly Bulk Memory](https://bugs.chromium.org/p/v8/issues/detail?id=7747)
2019-08-11 17:45:33 +03:00
* [Garbage Collection](https://bugs.chromium.org/p/v8/issues/detail?id=7748)
* [Exception handling](https://bugs.chromium.org/p/v8/issues/detail?id=8091)