Zig is a general-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
https://ziglang.org/documentation/master/#Introduction
cd ~/devtools
wget https://ziglang.org/builds/zig-macos-x86_64-0.9.0-dev.729+bd8baefaa.tar.xz
xz -d zig-macos-x86_64-0.9.0-dev.729+bd8baefaa.tar.xz
PATH=$PATH:~/devtools/zig-macos-x86_64-0.9.0-dev.729+bd8baefaa
zig env
brew install zig
From Git HEAD
brew install zig --HEAD
cd hello
zig build-exe hello.zig
wc -c hello
./hello
zig build-exe hello.zig -O ReleaseSmall --strip --single-threaded
wc -c hello
zig build-exe hello.zig -O ReleaseSmall --strip --single-threaded -target x86_64-macos
wc -c hello
file hello
cd global_variables
zig test global_variables.zig
TODO
cd test_null
zig test test_null.zig
cd curl
zig build-exe curl.zig
cd config/
zig build-exe config.zig
./config
TODO
TODO
TODO
cd cross-compile-arm/
zig targets
zig targets | jq .arch
zig targets | jq .os
zig targets | jq .abi
zig targets | jq .libc
zig build-exe hello.zig -target armeb-linux-musleabi --library c --strip --single-threaded
file hello
cd benchmark/
./benchmark.sh
See https://github.com/Sahnvour/zig-benchmark See https://benchmarksgame-team.pages.debian.net/benchmarksgame/why-measure-toy-benchmark-programs.html See https://github.com/tiehuis/zig-benchmarks-game