Releases: zig-wasm/wasmer-zig-api
Release v0.4.0
What's Changed
- Add Zig 0.15.X support by @burdzwastaken in #6
- Require program name for WASI config init
try wasmer.WasiConfig.init("example_program");by @Afirium in #7
Using it
In your zig project folder (where build.zig is located), run:
zig fetch --save "git+https://github.com/zig-wasm/wasmer-zig-api#v0.4.0"Then, in your build.zig's build function, add the following before
b.installArtifact(exe):
const wasmer_zig_api = b.dependency("wasmer_zig_api", .{
.target = target,
.optimize = optimize,
});
exe.root_module.addImport("wasmer", wasmer_zig_api.module("wasmer"));
exe.root_module.link_libc = true;
exe.root_module.addLibraryPath(.{ .cwd_relative = "/home/path_to_your_wasmer/.wasmer/lib" });
exe.root_module.linkSystemLibrary("wasmer", .{});New Contributors
- @burdzwastaken made their first contribution in #6
Full Changelog: v0.3.0...v0.4.0
Release v0.3.0
What's Changed
Using it
In your zig project folder (where build.zig is located), run:
zig fetch --save "git+https://github.com/Afirium/wasmer-zig-api#v0.3.0"Then, in your build.zig's build function, add the following before
b.installArtifact(exe):
const wasmerZigAPI= b.dependency("wasmer_zig_api", .{
.target = target,
.optimize = optimize,
});
exe.root_module.addImport("wasmer", wasmerZigAPI.module("wasmer"));
exe.linkLibC();
exe.addLibraryPath(.{ .cwd_relative = "/home/path_to_your_wasmer/.wasmer/lib" });
exe.linkSystemLibrary("wasmer");New Contributors
Full Changelog: v0.2.0...v0.3.0
Release v0.2.0
What's Changed
- build: add docs step by @Afirium in #1
- Add hash to readme and remove personal info from addLibraryPath by @acgollapalli in #2
- Add support for zig 0.14.0 by @Afirium in #3
Using it
In your zig project folder (where build.zig is located), run:
zig fetch --save "git+https://github.com/Afirium/wasmer-zig-api#v0.2.0"Then, in your build.zig's build function, add the following before
b.installArtifact(exe):
const wasmerZigAPI= b.dependency("wasmer_zig_api", .{
.target = target,
.optimize = optimize,
});
exe.root_module.addImport("wasmer", wasmerZigAPI.module("wasmer"));
exe.linkLibC();
exe.addLibraryPath(.{ .cwd_relative = "/home/path_to_your_wasmer/.wasmer/lib" });
exe.linkSystemLibrary("wasmer");New Contributors
- @acgollapalli made their first contribution in #2
Full Changelog: v0.1.0...v0.2.0
Release v0.1.0
Using it
To use in your own projects, put this dependency into your build.zig.zon:
.wasmer_zig_api = .{
.url = "https://github.com/Afirium/wasmer-zig-api/archive/refs/tags/v0.1.0.tar.gz",
}Here is a complete build.zig.zon example:
.{
.name = "My example project",
.version = "0.0.1",
.dependencies = .{
.wasmer_zig_api = .{
.url = "https://github.com/Afirium/wasmer-zig-api/archive/refs/tags/v0.1.0.tar.gz",
},
.paths = .{
"",
},
}
}
Then, in your build.zig's build function, add the following before
b.installArtifact(exe):
const wasmerZigAPI= b.dependency("wasmer_zig_api", .{
.target = target,
.optimize = optimize,
});
exe.root_module.addImport("wasmer", wasmerZigAPI.module("wasmer"));
exe.linkLibC();
exe.addLibraryPath(.{ .cwd_relative = "/home/path_to_your_wasmer/.wasmer/lib" });
exe.linkSystemLibrary("wasmer");