std: find a better home for the "preopens" concept

This commit is contained in:
Andrew Kelley 2026-01-07 12:09:09 -08:00
parent d2d8b969a1
commit 6a5bb3ede3
10 changed files with 106 additions and 84 deletions

View file

@ -1,10 +1,8 @@
const std = @import("std");
pub fn main(init: std.process.Init) !void {
const preopens = try std.fs.wasi.preopensAlloc(init.arena.allocator());
for (preopens.names, 0..) |preopen, i| {
std.debug.print("{d}: {s}\n", .{ i, preopen });
pub fn main(init: std.process.Init) void {
for (init.preopens.map.keys(), 0..) |preopen, i| {
std.log.info("{d}: {s}", .{ i, preopen });
}
}