YouTip LogoYouTip

Zig Tutorial - Getting Started

Zig Basics

const std = @import("std");

pub fn main() void {
    std.debug.print("Hello, World!\n", .{});
}

Variables

const x: i32 = 42;      // constant
var y: i32 = 10;         // mutable
y = 20;

Summary

  • Zig is a systems programming language
  • No hidden control flow or allocations
← Assembly Tutorial - Getting StJulia Tutorial - Getting Start β†’