Centralizes configuration, eliminates unnecessary copying of config

This commit is contained in:
Nikolay Govorov
2026-01-26 03:22:45 +00:00
parent 6d9517f6ea
commit f71aa1cad2
13 changed files with 836 additions and 742 deletions

View File

@@ -58,11 +58,16 @@ pub fn main() !void {
defer writer.deinit();
lp.log.opts.level = .warn;
var app = try lp.App.init(allocator, .{
.run_mode = .serve,
.tls_verify_host = false,
.user_agent = "User-Agent: Lightpanda/1.0 internal-tester",
});
const config = lp.Config{
.mode = .{ .serve = .{
.common = .{
.tls_verify_host = false,
.user_agent_suffix = "internal-tester",
},
} },
.exec_name = "lightpanda-wpt",
};
var app = try lp.App.init(allocator, &config);
defer app.deinit();
var browser = try lp.Browser.init(app, .{});