WebAssembly Virtual Machine Built In Elixir
Clone or download
fantypants Merge pull request #27 from ElixiumNetwork/external-memory-api
Expose memory API & create host function DSL
Latest commit a66b75a Jan 19, 2019

README.md

WaspVM Banner

Packagist Build Status

WebAssembly Virtual Machine written in Elixir. Currently used as the Wasm VM in the Elixium Network

Usage

{:ok, ref} = WaspVM.start() # Start WaspVM
WaspVM.load_file(ref, "path/to/wasm/file.wasm") # Load a module
WaspVM.execute(ref, "some_exported_function") # Call a function
# => {:ok, total_gas_cost, :function_return_value}

More detailed usage instructions can be found on HexDocs.

Installation

Add wasp_vm to your list of dependencies in mix.exs:

def deps do
  [
    {:wasp_vm, "~> 0.7"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/wasp_vm.