Code Monkey home page Code Monkey logo

ocaml-wasmtime's Introduction

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.

ocaml-wasmtime's People

Contributors

laurentmazare avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ocaml-wasmtime's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.