Installing
This page shows how to install the Zig language and have an environment which allows you to easily experiment.
Linux
-
Go to the download page
-
Scroll down to the Linux section inside master
-
Download the binary for your computer architecture. For example, if you have a x86-64 CPU, download the file named zig-linux-x86_64-[version].tar.xz
-
Extract it and put it in a suitable place.
-
Add it to PATH
-
Open a terminal. Run
zig zen
If you get something like
* Communicate intent precisely.
* Edge cases matter.
* Favor reading code over writing code.
* Only one obvious way to do things.
* Runtime crashes are better than bugs.
* Compile errors are better than runtime crashes.
* Incremental improvements.
...
Congratulations 😀. You have successfully installed zig 🎉🎉. Now go to the section to create a zig project.
Windows
-
Go to the download page
-
Scroll down to the Windows section inside master
-
Download the binary for your computer architecture. For example, if you have a x86-64 CPU, download the file named zig-windows-x86_64-[version].zip
-
Extract it and put it in a suitable place.
-
Add it to PATH
-
Open a terminal. Run
zig zen
If you get something like
* Communicate intent precisely.
* Edge cases matter.
* Favor reading code over writing code.
* Only one obvious way to do things.
* Runtime crashes are better than bugs.
* Compile errors are better than runtime crashes.
* Incremental improvements.
...
Congratulations 😀. You have successfully installed zig 🎉🎉. Now go to the next section to create a zig project.
macOS
-
Go to the download page
-
Scroll down to the macOS section inside master
-
Download the binary for your computer architecture. For example, if you have an Apple Silicon, download the file named zig-macos-aarch64-[version].tar.xz
-
Extract it and put it in a suitable place.
-
Add it to PATH
-
Open a terminal. Run
zig zen
If you get something like
* Communicate intent precisely.
* Edge cases matter.
* Favor reading code over writing code.
* Only one obvious way to do things.
* Runtime crashes are better than bugs.
* Compile errors are better than runtime crashes.
* Incremental improvements.
...
Congratulations 😀. You have successfully installed zig 🎉🎉. Now go to the next section to create a zig project.