Sans compiles to native machine code via LLVM. The sans binary is a self-contained compiler — no package manager, no runtime to install.
Paste the following in your terminal:
curl -fsSL https://github.com/sans-language/sans/releases/latest/download/sans-macos-arm64.tar.gz | tar xz && sudo mv sans /usr/local/bin/
Works on both Apple Silicon and Intel Macs (Intel runs via Rosetta 2). Verify the install:
sans --version
xcode-select --install
brew install llvm@17
cc)llc at runtime to compile programs. The sans binary finds it automatically from Homebrew.macOS may block the binary on first run since it is not notarized. To clear the quarantine flag after installing:
xattr -d com.apple.quarantine /usr/local/bin/sans
curl -fsSL https://github.com/sans-language/sans/releases/latest/download/sans-linux-x86_64.tar.gz | tar xz && sudo mv sans /usr/local/bin/
sudo apt install build-essential llvm-17 libcurl4-openssl-dev libssl-dev
llc at runtime to compile programsDownload and extract the archive, then add sans.exe to your PATH:
curl -fsSL https://github.com/sans-language/sans/releases/latest/download/sans-windows-x86_64.tar.gz | tar xz && move sans.exe C:\usr\local\bin\
Or download manually from the table below and add the directory to your PATH. Verify the install:
sans --version
Install MSYS2, then from a MINGW64 shell:
pacman -S mingw-w64-x86_64-llvm mingw-w64-x86_64-clang mingw-w64-x86_64-curl mingw-w64-x86_64-openssl mingw-w64-x86_64-zlib
llc at runtime to compile programsRun sans from the MSYS2 MINGW64 shell so the dependencies are on the PATH.
| Platform | Arch | Download |
|---|---|---|
| macOS | ARM64 (Apple Silicon + Intel via Rosetta) | sans-macos-arm64.tar.gz |
| Linux | x86_64 | sans-linux-x86_64.tar.gz |
| Windows | x86_64 | sans-windows-x86_64.tar.gz |
Sans is self-hosted — the compiler is written in Sans. Building from source requires a bootstrap binary (any recent release) and LLVM 17.
git clone https://github.com/sans-language/sans
cd sans
sans build compiler/main.sans # uses bootstrap binary to compile the compiler
sudo mv sans /usr/local/bin/
The sans binary is the full compiler. It compiles .sans source files to native executables via LLVM. No separate runtime is needed — the standard library is compiled from source alongside your program on each build.
sans build hello.sans # produces ./hello
sans run hello.sans # build + run, cleans up
See the documentation for language reference and examples.
All release archives and changelogs are on the GitHub releases page.