mirror of
https://github.com/ziglang/zig.git
synced 2024-11-27 07:32:44 +00:00
16 lines
404 B
Zig
16 lines
404 B
Zig
const std = @import("std");
|
|
|
|
pub fn main() !void {
|
|
var general_purpose_allocator = std.heap.GeneralPurposeAllocator(.{}){};
|
|
const gpa = general_purpose_allocator.allocator();
|
|
const args = try std.process.argsAlloc(gpa);
|
|
defer std.process.argsFree(gpa, args);
|
|
|
|
for (args, 0..) |arg, i| {
|
|
std.debug.print("{}: {s}\n", .{ i, arg });
|
|
}
|
|
}
|
|
|
|
// exe=succeed
|
|
// target=wasm32-wasi
|