Your First main Function
Anatomy of a minimal Zig program.
Where Programs Begin
Every Zig executable starts at a function named main. The compiler looks for it and runs it first when your program launches. 🚀
Import the Standard Library
Most programs begin by pulling in tools. You bind the standard library to a name using @import, a built-in that loads a module.
const std = @import("std");All lessons in this course
- Install Zig on Any Platform
- Your First main Function
- Printing with std.debug.print
- Compile and Run in One Step