Home / Zig · हिन्दी
Zig
Learn Zig: explicit control flow, slices and pointers, errors and optionals, allocators, comptime generics, C interop, cross-compiling, build.zig and tests.
Start course →
What you'll learn Explain Zig's design principles and use the zig toolchain, build modes and project layout. Write Zig with explicit types and casts, control-flow expressions, arrays, slices, strings and pointers. Model data with structs, enums and tagged unions, and handle failures with error unions and optionals. Manage memory with allocators, defer and errdefer, and use standard containers safely. Use comptime for constants, generics and reflection, and understand safety checks and integer semantics. Interoperate with C, cross-compile, build and test with build.zig, and write concurrent, efficient code.
Syllabus Getting Started with Zig What Zig Is and Why It Exists Installing Zig and Using the Toolchain Variables, Types and Integers
Control Flow, Arrays, Slices and Pointers if, while, for, switch and Labelled Blocks Arrays, Slices and Strings Pointers and Optional Pointers
Structs, Unions and Error Handling Structs, Methods and Namespaces Enums, Tagged Unions and Exhaustive switch Errors, Optionals, try, catch and errdefer
Memory and Allocators Allocators: Explicit Memory Management defer, errdefer and Ownership ArrayList, HashMap and Other Containers
Compile-Time Programming comptime Basics Generic Types and Functions Reflection with @typeInfo and anytype
Safety, C Interop and Cross-Compilation Integer Semantics, Safety Checks and Undefined Behaviour Interoperating with C Cross-Compilation and zig cc
The Build System, Packages and Testing build.zig: Builds as Zig Code Packages and Dependencies with build.zig.zon Testing in Zig
Concurrency, Performance, Idioms and Revision Threads, Atomics and Synchronisation Low-Level Performance: Layout, SIMD and Buffered I/O Idiomatic Zig and Common Pitfalls Revision and Interview Questions