mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 15:13:28 +00:00
Basic version using Browser
Signed-off-by: Francis Bouvier <francis@lightpanda.io>
This commit is contained in:
@@ -20,6 +20,7 @@ const std = @import("std");
|
||||
|
||||
const jsruntime = @import("jsruntime");
|
||||
|
||||
const Browser = @import("browser/browser.zig").Browser;
|
||||
const server = @import("server.zig");
|
||||
|
||||
const parser = @import("netsurf");
|
||||
@@ -60,7 +61,9 @@ pub fn main() !void {
|
||||
defer srv.deinit();
|
||||
try srv.listen(addr);
|
||||
std.debug.print("Listening on: {s}...\n", .{socket_path});
|
||||
server.socket_fd = srv.sockfd.?;
|
||||
|
||||
try jsruntime.loadEnv(&arena, server.execJS);
|
||||
var browser = try Browser.init(arena.allocator(), vm);
|
||||
defer browser.deinit();
|
||||
|
||||
try server.listen(&browser, srv.sockfd.?);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user