Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jamen/elixir-wasm
Encoding the WASM binary format.
https://github.com/jamen/elixir-wasm
Last synced: 17 days ago
JSON representation
Encoding the WASM binary format.
- Host: GitHub
- URL: https://github.com/jamen/elixir-wasm
- Owner: jamen
- License: mit
- Created: 2017-06-13T20:17:28.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-22T10:26:30.000Z (over 5 years ago)
- Last Synced: 2024-10-25T19:36:28.900Z (19 days ago)
- Language: Elixir
- Homepage:
- Size: 391 KB
- Stars: 134
- Watchers: 8
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# elixir-wasm
Functions and types for encoding WebAssembly.
For more information, see the [WebAssembly spec](https://github.com/WebAssembly/spec), the [Binary section](http://webassembly.github.io/spec/core/bikeshed/index.html#binary-format%E2%91%A0), and the [types documented for this module](https://hexdocs.pm/wasm/Wasm.html).
## Scope
This module **does not compile Elixir to WebAssembly**, it lets Elixir encode a WebAssembly module using tuples of instructions.
Please see [ElixirScript](https://github.com/elixirscript/elixirscript), where Elixir [will eventually](https://github.com/elixirscript/elixirscript/issues/454) compile to WebAssembly using this module.
## Documentation
See the [Hexdocs](https://hexdocs.pm/wasm).
## Testing
The tests compare Elixir-compiled WASM and WAT-compiled WASM using the command `wat2wasm` (from the [WebAssembly Binary Toolkit](https://github.com/WebAssembly/wabt)), 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.