https://ziglang.org/ Home [ ] Download Learn News Source Code Join a Community [heart]Sponsor the ZSF Download Learn News Source Code Join a Community [heart]Sponsor the Zig Software Foundation Zig is a general-purpose programming language and toolchain for maintaining robust, optimal, and reusable software. GET STARTED Latest Release: 0.9.1 Documentation Changes [?] A Simple Language Focus on debugging your application rather than debugging your programming language knowledge. * No hidden control flow. * No hidden memory allocations. * No preprocessor, no macros. [?] Comptime A fresh approach to metaprogramming based on compile-time code execution and lazy evaluation. * Call any function at compile-time. * Manipulate types as values without runtime overhead. * Comptime emulates the target architecture. [?] Maintain it with Zig Incrementally improve your C/C++/Zig codebase. * Use Zig as a zero-dependency, drop-in C/C++ compiler that supports cross-compilation out-of-the-box. * Leverage zig build to create a consistent development environment across all platforms. * Add a Zig compilation unit to C/C++ projects; cross-language LTO is enabled by default. In-depth overview More code samples const std = @import("std"); const json = std.json; const payload = \\{ \\ "vals": { \\ "testing": 1, \\ "production": 42 \\ }, \\ "uptime": 9999 \\} ; const Config = struct { vals: struct { testing: u8, production: u8 }, uptime: u64, }; const config = x: { var stream = json.TokenStream.init(payload); const res = json.parse(Config, &stream, .{}); // Assert no error can occur since we are // parsing this JSON at comptime! break :x res catch unreachable; }; pub fn main() !void { if (config.vals.production > 50) { @compileError("only up to 50 supported"); } std.log.info("up={d}", .{config.uptime}); } Community [ziggy] The Zig community is decentralized Anyone is free to start and maintain their own space for the community to gather. There is no concept of "official" or "unofficial", however, each gathering place has its own moderators and rules. See all Communities Main development The Zig repository can be found at https://github.com/ziglang/zig, where we also host the issue tracker and discuss proposals. Contributors are expected to follow Zig's Code of Conduct. [zero] Zig Software Foundation The ZSF is a 501(c)(3) non-profit corporation. The Zig Software Foundation is a non-profit corporation founded in 2020 by Andrew Kelley, the creator of Zig, with the goal of supporting the development of the language. Currently, the ZSF is able to offer paid work at competitive rates to a small number of core contributors. We hope to be able to extend this offer to more core contributors in the future. The Zig Software Foundation is sustained by donations. Learn More Sponsors Corporate Sponsors The following companies are providing direct financial support to the Zig Software foundation. [pex-dark] GitHub Sponsors Thanks to people who sponsor Zig, the project is accountable to the open source community rather than corporate shareholders. In particular, these fine folks sponsor Zig for $200/month or more: Pex Kirk Scheibelhut drfuchs tarasbob CoilHQ Lager Data Stephen Gutekanst Derek Collison Karrick McDermott Joran Dirk Greef The Lycus Foundation Stevie Hryciw Bjorn Linse Dustin Taylor Jose M Rico Simon A. Nielsen Knights This section is updated at the beginning of each month. This page is also available in the following languages Francais Deutsch Italiano Espanol Portugues `rby frsy Jian Ti Zhong Wen hangug eo