zig
The Zig compiler and toolchain. More information: https://ziglang.org.
-
Compile the project in the current directory:
zig build
-
Compile and run the project in the current directory:
zig build run
-
Initialize a
zig build
application:
zig init-exe
-
Initialize a
zig build
library:
zig init-lib
-
Create and run a test build:
zig test {{path/to/file.zig}}
-
Reformat Zig source into canonical form:
zig fmt {{path/to/file.zig}}
-
Use Zig as a drop-in C compiler:
zig cc {{path/to/file.c}}
-
Use Zig as a drop-in C++ compiler:
zig c++ {{path/to/file.cpp}}
License and Disclaimer
The content on this page is copyright © 2014—present the tldr-pages team and contributors.This page is used with permission under Creative Commons Attribution 4.0 International License.
While we do attempt to make sure content is accurate, there isn't a warranty of any kind.