Install Silex
Silex 0.44 is distributed as a standalone executable. Using it requires neither Zig, Git, nor a local copy of the repository.
Published distributions support all six desktop hosts:
| System | ARM64 | x64 |
|---|---|---|
| macOS | macos-arm64 |
macos-x64 |
| Linux | linux-arm64 |
linux-x64 |
| Windows | windows-arm64 |
windows-x64 |
The script selects the native architecture's archive. On Windows ARM64, it therefore keeps installing ARM64 Silex even when launched from x64 PowerShell running through the system compatibility layer.
Install on macOS or Linux
You can inspect the official script before running it:
curl -fsSL https://raw.githubusercontent.com/Matanek/Silex/v0.44.0/install.sh \
| SILEX_VERSION=0.44.0 sh
The script distinguishes macOS from Linux, then ARM64 from x64, verifies the
corresponding archive's SHA-256 checksum, and installs silex in
~/.local/bin.
Make the command available
The installation script does not modify your shell configuration. If the
terminal cannot immediately find silex, add the installation folder to the
current session's PATH:
export PATH="$HOME/.local/bin:$PATH"
If you set SILEX_INSTALL_DIR, replace ~/.local/bin with your chosen folder.
To preserve this setting in future terminals, add the same line to your shell configuration file:
~/.zshrcwith Zsh, notably on macOS;~/.bashrcwith Bash, common on Linux.
With Zsh, reload the file without closing the terminal:
source ~/.zshrc
With Bash:
source ~/.bashrc
On some Linux distributions, ~/.profile already adds ~/.local/bin to
PATH. In that case, source ~/.profile is enough after the first
installation.
Install on Windows
Run this command in PowerShell:
$env:SILEX_VERSION = "0.44.0"
irm https://raw.githubusercontent.com/Matanek/Silex/v0.44.0/install.ps1 | iex
The script verifies the SHA-256 checksum and installs silex.exe in
%LOCALAPPDATA%\Silex\bin. The Windows executable is not signed yet, so
Windows may show a reputation warning the first time you use it.
The script does not modify PATH on Windows either. If PowerShell cannot find
silex, make the command available in the current session:
$env:PATH = "$env:LOCALAPPDATA\Silex\bin;$env:PATH"
To preserve this setting, add %LOCALAPPDATA%\Silex\bin to your account's
Path in the Windows environment variables, then open a new terminal.
Verify the installation
In the terminal where you just reloaded the configuration, or in a new terminal, run:
silex --version
For this documentation, the command must print:
silex 0.44.0
Then prepare the verified compilation tools:
silex setup
This step installs LLVM 21.1.8 on macOS 14 or later on ARM64 so the explicit LLVM backend is available. It does not require a system installation of LLVM or Zig. Silex uses the native backend by default on every supported host.
You can now write and run your first program.
Choose the installation folder
On macOS or Linux, place the binary in another folder with
SILEX_INSTALL_DIR:
curl -fsSL https://raw.githubusercontent.com/Matanek/Silex/v0.44.0/install.sh \
| SILEX_VERSION=0.44.0 SILEX_INSTALL_DIR="$HOME/bin" sh
In PowerShell:
$env:SILEX_VERSION = "0.44.0"
$env:SILEX_INSTALL_DIR = "$HOME\bin"
irm https://raw.githubusercontent.com/Matanek/Silex/v0.44.0/install.ps1 | iex