replace zig-async-io and std.http.Client with a custom HTTP client

This commit is contained in:
Karl Seguin
2025-03-14 19:40:56 +08:00
parent fd35724aa8
commit 2017d4785b
17 changed files with 1566 additions and 2145 deletions

View File

@@ -177,6 +177,9 @@ fn common(
options: jsruntime.Options,
) !void {
const target = step.root_module.resolved_target.?;
const optimize = step.root_module.optimize.?;
const dep_opts = .{ .target = target, .optimize = optimize };
const jsruntimemod = try jsruntime_pkgs.module(
b,
options,
@@ -189,15 +192,7 @@ fn common(
netsurf.addImport("jsruntime", jsruntimemod);
step.root_module.addImport("netsurf", netsurf);
const asyncio = b.addModule("asyncio", .{
.root_source_file = b.path("vendor/zig-async-io/src/lib.zig"),
});
step.root_module.addImport("asyncio", asyncio);
const tlsmod = b.addModule("tls", .{
.root_source_file = b.path("vendor/tls.zig/src/root.zig"),
});
step.root_module.addImport("tls", tlsmod);
step.root_module.addImport("tls", b.dependency("tls", dep_opts).module("tls"));
}
fn moduleNetSurf(b: *std.Build, target: std.Build.ResolvedTarget) !*std.Build.Module {