Zig History Example Code References
Home Search



Zig - Langpedia

Zig

Created by: Andrew Kelley

First appeared: Feb 2016, 10 years ago

Memory management: Manual

Implementation language: Zig

OS: Linux, macOS, FreeBSD, Windows

License: MIT

Filename extensions: .zig, .zir, .zigr, .zon

Website:

ziglang.org

Zig

Zig is a general-purpose programming language licensed under the MIT license. It is designed to be an improvement to C, but with differences in control flow, function calls, library imports, variable declaration, and Unicode support. Zig, like C, requires manual memory management. Zig was created by Andrew Kelley, and first announced in 2016.

History

When Andrew Kelley began to develop a DAW (digital audio workstation), he found "Go interoperability with C libraries difficult, and found the garbage collector caused audio delays". When he pivoted and tried C++, he found small mistakes quickly led to memory corruption bugs that took weeks to fix. After trying Rust, he gave up there also, because he struggled to write code that satisfied Rust's rules, and reportedly spent a month trying to make font rendering work.

He eventually gave up and decided to create his own language, using a script that generated random combinations of letters starting with the letter Z to come up with the name.

Zig version 0.1.0, released on February 2016, introduced basic syntax and core concepts. Zig version 0.5.0, released on September 26, 2019, added async functions, Android compatibility, and RISC-V support. Zig version 0.10.0, released on October 31, 2022, added the self-hosted compiler backend, allowing independence from LLVM for certain targets and enhanced WebAssembly support. Zig version 0.11.0, released on August 4, 2023, introduced built-in package management. Version 0.14.0, released on March 5, 2025, expanded target support for cross-compilation to more architectures, and increased performance and reduced build times. The current stable release, version 0.16.0, released on April 14, 2026, includes a revamped std.Io interface for async I/O and simplified package management with dependencies moved to a zig-pkg directory.

On 26 November 2025, Zig development moved from GitHub to Codeberg, and the primary reason being Microsoft's AI policy.

Example Code

The following code sample prints "hello world!" to the screen

Credit: ziglang.org/learn/samples
const std = @import("std");
const Io = std.Io;

pub fn main(init: std.process.Init) !void {
    try Io.File.stdout().writeStreamingAll(init.io, "hello world!\n");
}

References

Full overview. https://ziglang.org. Retrieved August 7, 2026.

En Wikipedia Org. (2026). Zig (Programming Language). https://en.wikipedia.org/wiki/Zig_(programming_language). Retrieved August 7, 2026.

Full. https://corecursive.com/067-zig-with-andrew-kelley. Retrieved August 7, 2026.




All Langpedia content is licensed under the Creative Commons Attribution-ShareAlike 4.0 License.