zig

The Zig compiler and toolchain.

TLDR

Compile the project in the current directory

$ zig build
copy

Compile and run the project in the current directory

$ zig build run
copy

Initialize a zig build application

$ zig init-exe
copy

Intitialize a zig build library

$ zig init-lib
copy

Create and run a test build

$ zig test [path/to/file.zig]
copy

Reformat Zig source into canonical form

$ zig fmt [path/to/file.zig]
copy

Use Zig as a drop-in C compiler

$ zig cc [path/to/file.c]
copy

Use Zig as a drop-in C++ compiler

$ zig c++ [path/to/file.cpp]
copy

Copied to clipboard
linuxmousepad