← Software

Zig

A general-purpose programming language and toolchain.

Zig is a small, statically typed systems language with no hidden control flow, no implicit allocations, and a powerful comptime feature for compile-time computation. Functions can run at compile time on the compiler's own VM, which lets Zig express generics, conditional compilation, and constant evaluation through the same mechanism rather than separate macro or template systems.

Zig also ships a self-hosted compiler that doubles as a drop-in replacement for clang and a cross-compilation tool for many targets. "zig cc" can compile C and C++ for any supported target without separate toolchains, which has made Zig unexpectedly popular as a build tool even in projects that don't use Zig as a programming language.

Andrew Kelley started Zig in 2015. The Zig Software Foundation was set up in 2020 as a non-profit to receive donations and employ the small core team. The language is still pre-1.0 and breaking changes are common between releases, but it has a substantial and growing user base, particularly among programmers who feel C++ is too complex and Rust too strict.

License: MIT

Category: Language

Website: https://ziglang.org/

Install

Download from https://ziglang.org/download/
Or:
  Arch:    sudo pacman -S zig
  macOS:   brew install zig

Authors

  • Andrew Kelley (creator)
  • Zig Software Foundation
PreviousZ shell (Zsh) Nextzoxide

This site is currently in Beta. Contact: Chris Paton

Textbook of AI · Textbook of Usability · Textbook of Digital Health

Auckland Maths and Science Tutoring