| ... | @@ -56,11 +56,11 @@ pub const panic = crash_report.panic; | ... | @@ -56,11 +56,11 @@ pub const panic = crash_report.panic; |
| 56 | pub const debug = crash_report.debug; | 56 | pub const debug = crash_report.debug; |
| 57 | | 57 | |
| 58 | var wasi_preopens: fs.wasi.Preopens = undefined; | 58 | var wasi_preopens: fs.wasi.Preopens = undefined; |
| 59 | pub fn wasi_cwd() std.os.wasi.fd_t { | 59 | pub 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 | } |
| 65 | | 65 | |
| 66 | const fatal = std.process.fatal; | 66 | const fatal = std.process.fatal; |