Coder Social home page Coder Social logo

wasmtime-zig's Introduction

wasmtime-zig

github build status

Zig embedding of Wasmtime

Disclaimer

This is a very much work-in-progress library so drastic changes to the API are anything but expected, and things might just not work as expected yet.

Building

To build this library, you will need Zig nightly 0.8.0, as well as gyro package manager.

This library consumes the C API of the Wasmtime project which you can download with every release of Wasmtime. It relies on version v0.24.0 of Wasmtime and you need it to build tests and examples. You can download the library from here.

After you unpack it, if you installed the lib in path that is not your system search path for lld, you can add the installed path to the build command using the following flag

gyro build --search-prefix=<path-to-libwasmtime>

Running examples

simple.zig

The simple.zig example is equivalent to hello.c example in Wasmtime. You can run it with

gyro build run -Dexample=simple

Optionally, if you installed libwasmtime into some custom path, you can tell zig where to find it with

gyro build run -Dexample=simple --search-prefix=<path-to-libwasmtime>

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.