Skip to content

Instantly share code, notes, and snippets.

@joubertnel
Created November 8, 2025 17:03
Show Gist options
  • Select an option

  • Save joubertnel/194f2dba8160c7d9a7f099cdcdff66f4 to your computer and use it in GitHub Desktop.

Select an option

Save joubertnel/194f2dba8160c7d9a7f099cdcdff66f4 to your computer and use it in GitHub Desktop.

Revisions

  1. joubertnel created this gist Nov 8, 2025.
    10 changes: 10 additions & 0 deletions hello.zig
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    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();
    }