1818
1919const std = @import ("std" );
2020
21- const public = @import ("jsruntime" );
22- const Completion = public .IO .Completion ;
23- const AcceptError = public .IO .AcceptError ;
24- const RecvError = public .IO .RecvError ;
25- const SendError = public .IO .SendError ;
26- const CloseError = public .IO .CloseError ;
27- const TimeoutError = public .IO .TimeoutError ;
21+ const jsruntime = @import ("jsruntime" );
22+ const Completion = jsruntime .IO .Completion ;
23+ const AcceptError = jsruntime .IO .AcceptError ;
24+ const RecvError = jsruntime .IO .RecvError ;
25+ const SendError = jsruntime .IO .SendError ;
26+ const CloseError = jsruntime .IO .CloseError ;
27+ const TimeoutError = jsruntime .IO .TimeoutError ;
2828
2929const MsgBuffer = @import ("msg.zig" ).MsgBuffer ;
3030const Browser = @import ("browser/browser.zig" ).Browser ;
@@ -43,7 +43,7 @@ const BufReadSize = 1024; // 1KB
4343const MaxStdOutSize = 512 ; // ensure debug msg are not too long
4444
4545pub const Ctx = struct {
46- loop : * public .Loop ,
46+ loop : * jsruntime .Loop ,
4747
4848 // internal fields
4949 accept_socket : std.posix.socket_t ,
@@ -64,7 +64,7 @@ pub const Ctx = struct {
6464 // JS fields
6565 browser : * Browser , // TODO: is pointer mandatory here?
6666 sessionNew : bool ,
67- // try_catch: public .TryCatch, // TODO
67+ // try_catch: jsruntime .TryCatch, // TODO
6868
6969 // callbacks
7070 // ---------
@@ -253,7 +253,7 @@ pub const Ctx = struct {
253253 }
254254
255255 // JS env of the current session
256- inline fn env (self : Ctx ) public .Env {
256+ inline fn env (self : Ctx ) jsruntime .Env {
257257 return self .browser .currentSession ().env ;
258258 }
259259
@@ -399,7 +399,7 @@ pub fn sendSync(ctx: *Ctx, msg: []const u8) !void {
399399
400400pub fn listen (
401401 browser : * Browser ,
402- loop : * public .Loop ,
402+ loop : * jsruntime .Loop ,
403403 server_socket : std.posix.socket_t ,
404404 timeout : u64 ,
405405) anyerror ! void {
0 commit comments