an ergonomic interface for building and executing wasm bytecode. check out the
tests in src/main.zig if you'd like to see what it looks like :)
this was made with zig 0.11.0 though it may work for newer versions:
add to your build.zig.zon dependencies:
.fluent-wasm = .{
.url = "https://github.com/garrisonhh/fluent-wasm/tarball/<COMMIT-HASH>",
.hash = "<TARBALL-HASH>",
},add to your build.zig:
const wasm_dep = b.dependency("fluent-wasm", .{});
const wasm_mod = wasm_dep.module("fluent-wasm");
const wasm_lib = wasm_dep.artifact("fluent-wasm");
const exe = // ...
exe.linkLibC();
exe.linkLibrary(wasm_lib);
exe.addModule(wasm_mod);