@@ -4,6 +4,7 @@ const Allocator = std.mem.Allocator;
44const log = @import ("log.zig" );
55const Loop = @import ("runtime/loop.zig" ).Loop ;
66const http = @import ("http/client.zig" );
7+ const Platform = @import ("runtime/js.zig" ).Platform ;
78
89const Telemetry = @import ("telemetry/telemetry.zig" ).Telemetry ;
910const Notification = @import ("notification.zig" ).Notification ;
@@ -13,6 +14,7 @@ const Notification = @import("notification.zig").Notification;
1314pub const App = struct {
1415 loop : * Loop ,
1516 config : Config ,
17+ platform : * const Platform ,
1618 allocator : Allocator ,
1719 telemetry : Telemetry ,
1820 http_client : http.Client ,
@@ -28,6 +30,7 @@ pub const App = struct {
2830
2931 pub const Config = struct {
3032 run_mode : RunMode ,
33+ platform : * const Platform ,
3134 tls_verify_host : bool = true ,
3235 http_proxy : ? std.Uri = null ,
3336 proxy_type : ? http.ProxyType = null ,
@@ -53,6 +56,7 @@ pub const App = struct {
5356 .loop = loop ,
5457 .allocator = allocator ,
5558 .telemetry = undefined ,
59+ .platform = config .platform ,
5660 .app_dir_path = app_dir_path ,
5761 .notification = notification ,
5862 .http_client = try http .Client .init (allocator , loop , .{
0 commit comments