Skip to content

zigwasm/wasmtime-zig

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
ci
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 

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>

About

Zig embedding of Wasmtime

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published