Installation
SUB runs on Linux, macOS, Windows, and FreeBSD. Choose the method that suits your platform.
Universal Installer
The fastest way to install on any Unix-like system. This script detects your platform and installs the correct binaries.
curl -fsSL https://raw.githubusercontent.com/subhobhai943/sub-lang/main/installer/install.sh | sh
Tip: The installer places binaries in /usr/local/bin by default. Pass PREFIX=$HOME/.local to install to a custom location.
Windows
MSI Installer (recommended)
Download the .msi installer from the latest release and run it. The installer adds subi, subc, and sub to your PATH.
Build from Source (MinGW)
If you prefer to build from source on Windows, you need MinGW-w64:
git clone https://github.com/subhobhai943/sub-lang.git
cd sub-lang
make CC=x86_64-w64-mingw32-gcc
make install PREFIX=/c/sub-lang
macOS
.pkg Installer (recommended)
Download the .pkg installer for your architecture from the latest release. Supports both Apple Silicon (arm64) and Intel (x86_64).
Homebrew (coming soon)
Homebrew support is planned. For now, use the .pkg installer or build from source.
Build from Source
git clone https://github.com/subhobhai943/sub-lang.git
cd sub-lang
make
sudo make install
You need Xcode Command Line Tools installed: xcode-select --install.
Linux
Debian / Ubuntu (.deb)
wget https://github.com/subhobhai943/sub-lang/releases/latest/download/sub-lang_1.0.11_amd64.deb
sudo dpkg -i sub-lang_1.0.11_amd64.deb
Also available for arm64.
Fedora / RHEL (.rpm)
wget https://github.com/subhobhai943/sub-lang/releases/latest/download/sub-lang-1.0.11-1.x86_64.rpm
sudo rpm -i sub-lang-1.0.11-1.x86_64.rpm
Also available for aarch64.
Arch Linux (PKGBUILD)
git clone https://github.com/subhobhai943/sub-lang.git
cd sub-lang/packaging/arch
makepkg -si
Alpine Linux (APKBUILD)
git clone https://github.com/subhobhai943/sub-lang.git
cd sub-lang/packaging/alpine
abuild -r
AppImage
A portable AppImage is available for any Linux distribution:
wget https://github.com/subhobhai943/sub-lang/releases/latest/download/sub-lang-x86_64.appimage
chmod +x sub-lang-x86_64.appimage
./sub-lang-x86_64.appimage --install
Build from Source
git clone https://github.com/subhobhai943/sub-lang.git
cd sub-lang
make
sudo make install
Requires GCC or Clang. No other dependencies — SUB is self-contained C.
FreeBSD
pkg(8)
pkg install https://github.com/subhobhai943/sub-lang/releases/latest/download/sub-lang-1.0.11-amd64.pkg
Build from Source
git clone https://github.com/subhobhai943/sub-lang.git
cd sub-lang
gmake
sudo gmake install
Note: Use gmake (GNU make) on FreeBSD. The BSD make is not supported.
Building from Source
All platforms share the same build process. The only requirement is a C compiler (GCC or Clang).
git clone https://github.com/subhobhai943/sub-lang.git
cd sub-lang
# Build all three tools
make
# Install to /usr/local (default)
sudo make install
# Install to a custom location
make install PREFIX=$HOME/.local
Build targets
| Command | Description |
|---|---|
make | Build subi, subc, and sub |
make install | Install binaries, stdlib, and man pages |
make test | Run the conformance test suite |
make clean | Remove build artifacts |
Make variables
| Variable | Default | Description |
|---|---|---|
CC | cc | C compiler |
PREFIX | /usr/local | Installation prefix |
CFLAGS | -O2 -Wall | Compiler flags |
Verifying Checksums
Every release ships with a checksums-sha256.txt file. Verify your download:
# Download the checksums file
wget https://github.com/subhobhai943/sub-lang/releases/latest/download/checksums-sha256.txt
# Verify a specific file
sha256sum -c checksums-sha256.txt --ignore-missing
# Or on macOS
shasum -a 256 -c checksums-sha256.txt
Warning: Always verify checksums when downloading from the internet. A mismatched checksum indicates the file may have been tampered with.
Uninstallation
Universal installer / source build
# If installed with PREFIX=/usr/local (default):
sudo rm /usr/local/bin/subi
sudo rm /usr/local/bin/subc
sudo rm /usr/local/bin/sub
sudo rm -rf /usr/local/lib/sub-lang
sudo rm -rf /usr/local/share/man/man1/sub*.1
Debian / Ubuntu
sudo apt remove sub-lang
Fedora / RHEL
sudo rpm -e sub-lang
Windows
Use Add or Remove Programs in Settings, or run the MSI installer again and choose "Remove".
macOS
sudo rm -rf /usr/local/bin/subi /usr/local/bin/subc /usr/local/bin/sub
sudo rm -rf /usr/local/lib/sub-lang
FreeBSD
sudo pkg delete sub-lang
Next Steps
- Getting Started — write your first program
- Language Reference — full syntax guide