/elixir-wasm

Encoding the WASM binary format.

Primary LanguageElixirMIT LicenseMIT

elixir-wasm

Functions and types for encoding WebAssembly.

For more information, see the WebAssembly spec, the Binary section, and the types documented for this module.

Scope

This module does not compile Elixir to WebAssembly, it lets Elixir encode a WebAssembly module using tuples of instructions.

Please see ElixirScript, where Elixir will eventually compile to WebAssembly using this module.

Documentation

See the Hexdocs.

Testing

The tests compare Elixir-compiled WASM and WAT-compiled WASM using the command wat2wasm (from the WebAssembly Binary Toolkit), so this needs to be installed or else the tests will fail.

After the tests, you can inspect the binaries at _build/test/*.wasm with wasm2wat, hexdump, etc.