Zig
Zig book notes, into 24 chapters.
Zig
| Chapter | Title | Description |
|---|---|---|
| 1 | Part 1. Introduction and Setup | Zig is a programming language for writing fast, small, reliable programs. |
| 2 | Part 2. Zig Language Fundamentals | A program stores values so it can use them later. In Zig, you store values with two main keywords: |
| 3 | Part 3. Control Flow | Programs need to make choices. |
| 4 | Part 4. Functions | Functions are reusable blocks of code. |
| 5 | Part 5. Error Handling | Most programming languages need a way to handle failure. |
| 6 | Part 6. Pointers and Memory | Memory is where a program keeps its data while it runs. |
| 7 | Part 7. Arrays, Slices, and Strings | An array is a group of values stored next to each other. |
| 8 | Part 8. Structs, Enums, and Unions | A struct is a type that groups several values together. |
| 9 | Part 9. Optionals and Advanced Types | An optional type is a type that can hold either a value or no value. |
| 10 | Part 10. Compile-Time Programming | comptime means “compile time.” |
| 11 | Part 11. Zig Builtins | Zig has special built-in functions whose names start with @. |
| 12 | Part 12. Allocators and Memory Management | Memory is one of the most important ideas in Zig. |
| 13 | Part 13. Collections and Data Structures | An ArrayList is one of the most important data structures in Zig. |
| 14 | Part 14. The Standard Library | std is Zig’s standard library. |
| 15 | Part 15. Build System and Tooling | Zig has a built-in build system. |
| 16 | Part 16. Testing and Debugging | Zig has a built-in test system. You do not need a separate testing library to start writing tests. |
| 17 | Part 17. Interfacing with C | Zig works unusually well with C because it treats C as a first-class part of systems programming. |
| 18 | Part 18. Concurrency and Async | A thread is a separate path of execution inside one program. |
| 19 | Part 19. Systems Programming | A memory mapped file is a file that the operating system places into your program's address space. |
| 20 | Part 20. Performance and Optimization | Performance is one of the main reasons people choose Zig. |
| 21 | Part 21. Advanced Zig | Zig has a formatting system built into the standard library. You have already used it many times through std.debug.print. |
| 22 | Part 22. Cross-Platform Development | Windows is one of Zig’s main supported platforms. You can write Zig programs on Windows, build Windows executables, call Windows system APIs, link with C libraries, and... |
| 23 | Part 23. Real Projects | In this project, we will build a small command-line calculator. |
| 24 | Part 24. Reading and Contributing to Zig | The Zig compiler is not only a compiler for the Zig language. It is also the center of the Zig toolchain. |
| Appendix | Appendix | Zig is a programming language for writing fast, small, reliable programs. |