Created
November 4, 2021 00:49
-
-
Save ileonte/7556942d230ae000b9e2165a6a2e6f42 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ileonte@ltkcentral ~/Work/projects/test1-zig $ cat helloworld.zig | |
const std = @import("std"); | |
const stdout = std.io.getStdOut().writer(); | |
fn test_fn(args: anytype) void { | |
stdout.print("Got {} args\n", .{args.len}) catch {}; | |
} | |
pub fn main() !void { | |
test_fn(.{1, 2, "3"}); | |
try stdout.print("Hello, {any}\n", .{"world!"}); | |
} | |
ileonte@ltkcentral ~/Work/projects/test1-zig $ ~/Work/projects/zig/zig build-exe helloworld.zig -Drelease-small | |
ileonte@ltkcentral ~/Work/projects/test1-zig $ ls -lh helloworld | |
-rwxr-xr-x 1 ileonte users 560K Nov 4 02:48 helloworld | |
ileonte@ltkcentral ~/Work/projects/test1-zig $ strip --strip-unneeded -R .comment helloworld | |
ileonte@ltkcentral ~/Work/projects/test1-zig $ ls -lh helloworld | |
-rwxr-xr-x 1 ileonte users 206K Nov 4 02:48 helloworld |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment