{build,wasmserve}: use wasmserve, drop apple_pie
This commit is contained in:
parent
ebb4b9c2fe
commit
5be9f04d85
18 changed files with 747 additions and 133 deletions
15
tools/wasmserve/build.zig
Normal file
15
tools/wasmserve/build.zig
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
const std = @import("std");
|
||||
const wasmserve = @import("wasmserve.zig");
|
||||
|
||||
pub fn build(b: *std.build.Builder) !void {
|
||||
const mode = b.standardReleaseOptions();
|
||||
|
||||
const exe = b.addSharedLibrary("test", "test/main.zig", .unversioned);
|
||||
exe.setBuildMode(mode);
|
||||
exe.setTarget(.{ .cpu_arch = .wasm32, .os_tag = .freestanding, .abi = .none });
|
||||
exe.install();
|
||||
|
||||
const serve_step = try wasmserve.serve(exe, .{ .watch_paths = &.{"wasmserve.zig"} });
|
||||
const run_step = b.step("test", "Start a testing server");
|
||||
run_step.dependOn(&serve_step.step);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue