Full Course: Zig Programming From Zero to Hero
Full Course: Zig Programming From Zero to Hero
Master Zig, the general-purpose programming language designed for robustness, optimality, and maintainability. This 50-lesson journey takes you from absolute beginner to an advanced level, covering low-level memory management, the revolutionary 'comptime', C interoperability, and building high-performance software without hidden control flow.
Lessons
- Introduction to Zig and Installation
- The Zig Zen
- Hello World and Build System
- Variables and Constants
- Primitive Data Types
- Control Flow: If and Else
- Loops: While and For
- Functions: Basics and Returning Values
- Errors: The Error Set and Try
- Defer: Cleaning Up Resources
- Switch Statements
- Pointers: The Basics
- Arrays and Slices
- Structs: Organizing Data
- Enums and Unions
- Optional Types
- Memory Allocation and Allocators
- FixedBufferAllocator
- ArenaAllocator
- Comptime: Intro to Compile-Time Magic
- Generics with Comptime
- Inline Loops and Switches
- String Handling in Zig
- Error Propagation and errdefer
- Working with Files
- Command Line Arguments
- Unit Testing
- C Interoperability
- Memory Mapping (mmap)
- Concurrency: Threads
- Atomics and Mutexes
- Standard Library: HashMap
- Standard Library: ArrayList
- Formatting and Printing
- Understanding Build.zig
- Cross-Compilation
- Networking Basics
- Json Parsing
- Random Number Generation
- Unsafe Zig: @ptrCast and @intToPtr
- Function Pointers and Closures
- Assembly Integration
- The Zig Package Manager
- SIMD Instructions
- Reflection with @typeInfo
- Standard Library: Iterators
- Signals and Interrupts
- Memory Alignment
- Final Project: Building a CLI Tool
- The Future of Zig and Resources