GitXplorerGitXplorer
L

ocaml-wasmtime

public
34 stars
4 forks
3 issues

Commits

List of commits on branch main.
Unverified
679cd6283dbf29fbd4b4aef26fa525be4dd792f9

Add some configuration options.

LLaurentMazare committed 4 years ago
Unverified
59e64abe072cdb912d688cffa5cf6a272b4b0903

Add more bindings.

LLaurentMazare committed 4 years ago
Unverified
d4348b0639c2cab2183e5e13fabac43cc1d5a58b

Factorize the GADT code for value kinds.

LLaurentMazare committed 4 years ago
Unverified
02e962ed540024f40d24ce745ecb479e233b969c

More tuple typing.

LLaurentMazare committed 4 years ago
Unverified
6a73782ed9a690e273368878cff97d82c221aef9

Use some GADT to improve typing of wrapped callbacks.

LLaurentMazare committed 4 years ago
Unverified
8d3767cffd722b81dedcbe1c5bb27cefe2c88495

Move values to a separate file.

LLaurentMazare committed 4 years ago

README

The README file for this repository.

ocaml-wasmtime

OCaml WebAssembly runtime powered by wasmtime

This library let you run WebAssembly modules within OCaml with some support for wasi for system calls. It acts as a low-level and typesafe wrapper around the wasmtime C library, only a subset of the functions are supported for now but it should be enough to run some basic examples, see the tests directory for details.

Installation

Using Opam

The simplest way to install this library is via opam, this installs both the C library and the OCcaml bindings.

opam install wasmtime

Building from source

First the wasmtime C library has to be installed. This can either be done via opam.

opam install libwasmtime

Or this can be done manually.

  • Download the wasmtime c-api library from the github repo.
  • Uncompress the archive and set the LIBWASTIME environment variable to point at them.
wget https://github.com/bytecodealliance/wasmtime/releases/download/v0.22.0/wasmtime-v0.22.0-x86_64-linux-c-api.tar.xz
tar xf wasmtime-v0.22.0-x86_64-linux-c-api.tar.xz
export LIBWASTIME=$PWD/wasmtime-v0.22.0-x86_64-linux-c-api

Once the C library has been installed and the repo has been checked out, the examples can be run with dune.

dune runtest

This has been tested with wasmtime v0.21.0 and v0.22.0 on a linux platform.