-
-
Save michidk/743dc2b06fc3cdc95ab06604111f1a65 to your computer and use it in GitHub Desktop.
Zig 0.17.0 Hello World via standard-library Linux syscalls; 157 bytes with minimal.ld, 213 with the default GNU ld script
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
| const linux = @import("std").os.linux; | |
| pub export fn _start() noreturn { | |
| const msg: [14]u8 = "Hello, World!\n".*; | |
| _ = linux.write(1, &msg, msg.len); | |
| linux.exit(0); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment