authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-01-03 10:31:32-08:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-01-04 00:27:09-08:00
log5b9e6a2b2daf6b3c17adee4cea32d9319337dd2e
tree3edcdd4d67f16e0bd1d16eaf7812c6fc163f3bdd
parente19c686c22d6e1666244075909b9fe1993e1ee2b

compiler: fix wasi compilation


1 files changed, 2 insertions(+), 2 deletions(-)

src/main.zig+2-2
...@@ -56,11 +56,11 @@ pub const panic = crash_report.panic;...@@ -56,11 +56,11 @@ pub const panic = crash_report.panic;
56pub const debug = crash_report.debug;56pub const debug = crash_report.debug;
5757
58var wasi_preopens: fs.wasi.Preopens = undefined;58var wasi_preopens: fs.wasi.Preopens = undefined;
59pub fn wasi_cwd() std.os.wasi.fd_t {59pub fn wasi_cwd() Io.Dir {
60 // Expect the first preopen to be current working directory.60 // Expect the first preopen to be current working directory.
61 const cwd_fd: std.posix.fd_t = 3;61 const cwd_fd: std.posix.fd_t = 3;
62 assert(mem.eql(u8, wasi_preopens.names[cwd_fd], "."));62 assert(mem.eql(u8, wasi_preopens.names[cwd_fd], "."));
63 return cwd_fd;63 return .{ .handle = cwd_fd };
64}64}
6565
66const fatal = std.process.fatal;66const fatal = std.process.fatal;