mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 23:23:28 +00:00
flatten events, include aarch + os, remove eid
This commit is contained in:
@@ -4,6 +4,11 @@ const Loop = @import("jsruntime").Loop;
|
||||
const Allocator = std.mem.Allocator;
|
||||
const Telemetry = @import("telemetry/telemetry.zig").Telemetry;
|
||||
|
||||
pub const RunMode = enum {
|
||||
serve,
|
||||
fetch,
|
||||
};
|
||||
|
||||
// Container for global state / objects that various parts of the system
|
||||
// might need.
|
||||
pub const App = struct {
|
||||
@@ -11,14 +16,14 @@ pub const App = struct {
|
||||
allocator: Allocator,
|
||||
telemetry: Telemetry,
|
||||
|
||||
pub fn init(allocator: Allocator) !App {
|
||||
pub fn init(allocator: Allocator, run_mode: RunMode) !App {
|
||||
const loop = try allocator.create(Loop);
|
||||
errdefer allocator.destroy(loop);
|
||||
|
||||
loop.* = try Loop.init(allocator);
|
||||
errdefer loop.deinit();
|
||||
|
||||
const telemetry = Telemetry.init(allocator, loop);
|
||||
const telemetry = Telemetry.init(allocator, loop, run_mode);
|
||||
errdefer telemetry.deinit();
|
||||
|
||||
return .{
|
||||
|
||||
Reference in New Issue
Block a user