browser: start browser API

This commit is contained in:
Pierre Tachoire
2023-12-19 14:29:43 +01:00
parent b53d4a149c
commit 1642741027
3 changed files with 210 additions and 0 deletions

View File

@@ -115,6 +115,29 @@ pub fn build(b: *std.build.Builder) !void {
// step
const wpt_step = b.step("wpt", "WPT tests");
wpt_step.dependOn(&wpt_cmd.step);
// get
// -----
// compile and install
const get = b.addExecutable(.{
.name = "browsercore-get",
.root_source_file = .{ .path = "src/main_get.zig" },
.target = target,
.optimize = mode,
});
try common(get, options);
b.installArtifact(get);
// run
const get_cmd = b.addRunArtifact(get);
get_cmd.step.dependOn(b.getInstallStep());
if (b.args) |args| {
get_cmd.addArgs(args);
}
// step
const get_step = b.step("get", "request URL");
get_step.dependOn(&get_cmd.step);
}
fn common(