From 5b9e6a2b2daf6b3c17adee4cea32d9319337dd2e Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sat, 3 Jan 2026 10:31:32 -0800 Subject: [PATCH] compiler: fix wasi compilation --- src/main.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.zig b/src/main.zig index ff17b86a3c9d9505a0c7848c522e90306d33d998..8bc3b583910ca58db23dbfdae9fb9f8a46e2632e 100644 --- a/src/main.zig +++ b/src/main.zig @@ -56,11 +56,11 @@ pub const panic = crash_report.panic; pub const debug = crash_report.debug; var wasi_preopens: fs.wasi.Preopens = undefined; -pub fn wasi_cwd() std.os.wasi.fd_t { +pub fn wasi_cwd() Io.Dir { // Expect the first preopen to be current working directory. const cwd_fd: std.posix.fd_t = 3; assert(mem.eql(u8, wasi_preopens.names[cwd_fd], ".")); - return cwd_fd; + return .{ .handle = cwd_fd }; } const fatal = std.process.fatal; -- 2.54.0