Here are the steps to install Zig Compiler in Termux Android...
Install Termux from F-Droid, because the Google Play version is outdated...
Launch Termux on Android and enter...
pkg upgrade
pkg update
In Termux Android, download Zig Compiler for Linux AArch64...
## Download Zig Compiler
curl -O -L https://ziglang.org/builds/zig-linux-aarch64-0.11.0-dev.3333+32e719e07.tar.xz
tar xf zig-linux-aarch64-0.11.0-dev.3333+32e719e07.tar.xz
zig-linux-aarch64-0.11.0-dev.3333+32e719e07/zig version
## Add Zig Compiler to PATH
nano ~/.bashrc
## Add this line, then save and exit:
export PATH="$PATH:$HOME/zig-linux-aarch64-0.11.0-dev.3333+32e719e07"
## Update PATH
. ~/.bashrc
## Create Zig App
mkdir hello-world
cd hello-world
zig init-exe
## Build and run the Zig App
zig build run
zig-out/bin/hello-world
Ignore the warnings...
$ zig build run
zig build-exe hello-world Debug native: error:
warning: Encountered error: FileNotFound, falling back to default ABI and dynamic linker.
All your codebase are belong to us.
Run `zig build test` to run the tests.
Up Next: Create a Zig App with Termux GUI
TODO: Run an LVGL Graphical App with Termux GUI and Zig Compiler