mirror of
https://github.com/ziglang/zig.git
synced 2024-11-26 14:20:25 +00:00
16 lines
409 B
Zig
16 lines
409 B
Zig
const std = @import("std");
|
|
|
|
pub fn main() !void {
|
|
var general_purpose_allocator: std.heap.GeneralPurposeAllocator(.{}) = .init;
|
|
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
|