https://github.com/ziglang/zig/tree/4236b85c722b36cb31595634bae0ff28d6082761 Skip to content Navigation Menu Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + GitHub Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Resources + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} ziglang / zig Public * * Notifications You must be signed in to change notification settings * Fork 2.3k * Star 31.5k * General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software. ziglang.org License MIT license 31.5k stars 2.3k forks Branches Tags Activity Star Notifications You must be signed in to change notification settings * Code * Issues 2.8k * Pull requests 152 * Actions * Projects 4 * Wiki * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Projects * Wiki * Security * Insights ziglang/zig This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. 4236b85 BranchesTags Go to file Code Folders and files Name Name Last commit message Last commit date Latest commit History 19 Commits cmake cmake src src test test .gitignore .gitignore CMakeLists.txt CMakeLists.txt LICENSE LICENSE README.md README.md View all files Repository files navigation * README * License zig lang An experiment in writing a low-level programming language with the intent to replace C. Zig intends to be a small language, yet powerful enough to write readable, safe, optimal, and concise code to solve any computing problem. Goals * Ability to run arbitrary code at compile time and generate code. * Completely compatible with C libraries with no wrapper necessary. * Creating a C library should be a primary use case. Should be easy to export an auto-generated .h file. * Generics such as containers. * Do not depend on libc unless explicitly imported. * First class error code support. * Include documentation generator. * Eliminate the need for make, cmake, etc. * Friendly toward package maintainers. * Eliminate the need for C headers (when using zig internally). * Ability to declare dependencies as Git URLS with commit locking (can provide a tag or sha1). * Tagged union enum type. * Opinionated when it makes life easier. + Tab character in source code is a compile error. + Whitespace at the end of line is a compile error. * Resilient to parsing errors to make IDE integration work well. * Source code is UTF-8. * Shebang line OK so language can be used for "scripting" as well. * Ability to mark functions as test and automatically run them in test mode. * Memory zeroed by default, unless you initialize with "uninitialized". Roadmap * Hello, world. + Build AST + Code Gen + Produce .o file. * Produce executable file instead of .o file. * Add debugging symbols. * Debug/Release mode. * C style comments. * Unit tests. * Simple .so library * How should the Widget use case be solved? In Genesis I'm using C++ and inheritance. Primitive Numeric Types: zig C equivalent Description i8 | int8_t | signed 8-bit integer u8 | uint8_t | unsigned 8-bit integer i16 | int16_t | signed 16-bit integer u16 | uint16_t | unsigned 16-bit integer i32 | int32_t | signed 32-bit integer u32 | uint32_t | unsigned 32-bit integer i64 | int64_t | signed 64-bit integer u64 | uint64_t | unsigned 64-bit integer f32 | float | 32-bit IEE754 floating point f64 | double | 64-bit IEE754 floating point f128 | long double | 128-bit IEE754 floating point isize | ssize_t | signed pointer sized integer usize | size_t | unsigned pointer sized integer About General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software. ziglang.org Topics language compiler zig Resources Readme License MIT license Code of conduct Code of conduct Activity Custom properties Stars 31.5k stars Watchers 354 watching Forks 2.3k forks Report repository Releases 17 0.13.0 Latest Jun 7, 2024 + 16 releases Sponsor this project Sponsor Learn more about GitHub Sponsors Packages 0 No packages published Contributors 877 * @andrewrk * @kubkon * @Vexu * @jacobly0 * @LemonBoy * @Luukdegram * @Snektron * @joachimschmidt557 * @squeek502 * @mlugg * @jedisct1 * @mikdusan * @kristoff-it * @daurnimator + 863 contributors Languages * Zig 97.1% * C 1.7% * C++ 0.9% * Python 0.1% * CMake 0.1% * JavaScript 0.1% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.