This repository contains code and data which can be used to generate a JSON file containing information about the WASM SIMD proposal. The generated data is published to https://nemequ.github.io/wasm-simd-data/wasm-simd-data.json
Currently, we have complete data for the WebAssembly 128-bit packed SIMD Extension. We intend to add data for other proposals, such as the Relaxed SIMD proposal for WebAssembly and the Flexible Vectors Proposal for WebAssembly as they mature.
The data/ directory contains descriptions of the API, including opcodes, instruction names and parameters, as well as data about the corresponding higher-level APIs in both wasm_simd128.h and WAV; we are open to adding data for APIs in other languages (e.g., Rust).
The lowering/ directory then uses that information to generate more data on which instructions are expected to be used on various architectures to implement the WASM SIMD instructions, as well as performance data (number of uOps and latency). Note that this data should not currently be considered accurate; the lowering/ directory has more information, but basically many of the functions have not yet been optimized and engines such as V8 are likely to contain much better implementations.
For information on how to generate the lowering data, please see the README in the lowering/ directory.
Once you have generated the lowering data, you can generate the final
output using scripts/generate.py
. If you provide an argument to that
scrip it will be used as an output file for a minified (no extra
whitespace) JSON dump. If you do not provide an argument a
non-minified JSON dump of the same data intended to be (relatively
speaking) human-readable will be sent to stdout.
Please note that the format of this data should not be considered stable (yet?).
The license for the data has not yet been determined. Currently, copy some information from the WebAssembly 128-bit packed SIMD Extension proposal, which means it would be subject to the W3C license, but I'm leaning towards re-writing those sections anyways. Not only would this allow us to use a more permissive license (perhaps even a public domain dedication), it would allow more flexibility in how the content is organized.