Created
November 8, 2025 17:03
-
-
Save joubertnel/194f2dba8160c7d9a7f099cdcdff66f4 to your computer and use it in GitHub Desktop.
Zig hello world
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 std = @import("std"); | |
| pub fn main() !void { | |
| var stdout_buffer: [1024]u8 = undefined; | |
| var stdout_writer = std.fs.File.stdout().writer(&stdout_buffer); | |
| const writer = &stdout_writer.interface; | |
| try writer.print("Hello, {s}!\n", .{"world"}); | |
| try writer.flush(); | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tested on Zig version 0.15.2