mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 01:24:49 +01:00
std: find a better home for the "preopens" concept
This commit is contained in:
parent
d2d8b969a1
commit
6a5bb3ede3
10 changed files with 106 additions and 84 deletions
|
|
@ -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 });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue