Introduction

Zig is a general-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.

  • Robust - behavior is correct even for edge cases such as out of memory.
  • Optimal - write programs the best way they can behave and perform.
  • Reusable - the same code works in many environments which have different constraints.
  • Maintainable - precisely communicate intent to the compiler and other programmers. The language imposes a low overhead to reading code and is resilient to changing requirements and environments.

Often the most efficient way to learn something new is to see examples, so this documentation shows how to use each of Zig’s features. It is all on one page so you can search with your browser’s search tool.

The code samples in this document are compiled and tested as part of the main test suite of Zig.

This HTML document depends on no external files, so you can use it offline.

Where is the documentation for the Zig standard library?