forked from iCodeIN/proxy-wasm-zig-sdk
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.zig
26 lines (21 loc) · 803 Bytes
/
build.zig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
const std = @import("std");
const Builder = std.build.Builder;
pub fn build(b: *Builder) void {
b.setPreferredReleaseMode(std.builtin.Mode.Debug);
const mode = b.standardReleaseOptions();
const bin = b.addExecutable("example", "example/example.zig");
bin.setBuildMode(mode);
bin.setTarget(.{ .cpu_arch = .wasm32, .os_tag = .wasi });
bin.addPackage(.{
.name = "proxy-wasm-zig-sdk",
.source = .{ .path = "lib/lib.zig" },
});
bin.wasi_exec_model = .reactor;
bin.install();
// e2e test setup.
var e2e_test = b.addTest("example/e2e_test.zig");
e2e_test.setBuildMode(mode);
e2e_test.step.dependOn(&bin.step);
const e2e_test_setp = b.step("e2e", "Run End-to-End test with Envoy proxy");
e2e_test_setp.dependOn(&e2e_test.step);
}