Zig
Zig is a programming language that tries to be a modern C. Thanks to being a C-compatible compiler, it is a really good option for compiling C on Windows
WARNING
Zig is still not stable yet. Therefore we are installing the latest dev version from the website instead of through package managers
Install
- Windows:
- Download ZIP from https://ziglang.org/download/ and put it in
Downloads
- Set version for scriptspowershell
$version="0.14.0-dev.2079+ba2d00663"
- Extract itpowershell
7z x -y ~/Downloads/zig-windows-x86_64-$version.zip "-o$HOME/dotbin/extra/portable"
- Configure linkpowershell
Add-Content -Path ~\dotbin\extra\portable\link -Value "zig-*/zig.exe" sudo dotbin-link
- Verify installationpowershell
zig version
- Exclude
zig
from Windows Defender so compilation is fasterpowershellAdd-MpPreference -ExclusionPath ~/dotbin Add-MpPreference -ExclusionProcess zig
WARNING
Run as admin!
- Download ZIP from https://ziglang.org/download/ and put it in
- Linux
- Set version for scriptsbash
VERSION="0.14.0-dev.2079+ba2d00663"
- Download and extractbash
wget https://ziglang.org/builds/zig-linux-x86_64-$VERSION.tar.xz -O ~/zig-$VERSION.tar.xz 7z x -y ~/zig-$VERSION.tar.xz -so | 7z x -y -si -ttar "-o$HOME/dotbin/extra/portable" chmod +x ~/dotbin/extra/portable/zig-*/zig
- Configure linkbash
echo "zig-*/zig" >> ~/dotbin/extra/portable/link dotbin-link
- Verify installationbash
zig version
- Set version for scripts