Skip to content

Instantly share code, notes, and snippets.

@michidk
Created October 10, 2026 10:50
Show Gist options
  • Select an option

  • Save michidk/743dc2b06fc3cdc95ab06604111f1a65 to your computer and use it in GitHub Desktop.

Select an option

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
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