The Chasm compiler ships as a single native binary plus a Go-based CLI. The quickest path is the one-line installer.
Requirements
- macOS arm64, pre-built binary included
- Other platforms, build from the Zig source in
archive/zig-compiler/ - CLI build from source, Go 1.21+
Install
Run the installer
curl -fsSL https://github.com/Chasm-lang/Chasm/releases/latest/download/install.sh | sh
This installs the compiler to ~/.chasm and symlinks the chasm binary into ~/.local/bin.
Add to PATH (if needed)
If ~/.local/bin is not in your PATH, add it to your shell profile:
# zsh
echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.zshrc && source ~/.zshrc
# bash
echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.bashrc && source ~/.bashrc
Verify
chasm version
You should see the installed version number.
Install from Source
Clone the repository
git clone https://github.com/Chasm-lang/Chasm.git
cd Chasm
Build the CLI
go build -o ~/.local/bin/chasm ./cmd/cli
The CLI uses the pre-built bootstrap binary in bootstrap/bin/ to compile Chasm programs.
Set CHASM_HOME
The CLI needs to know where the repo lives to find the runtime header and standard library:
export CHASM_HOME=$(pwd)
Add that to your shell profile to make it permanent.
Editor Support
The VS Code extension provides syntax highlighting, LSP completions, go-to-definition, format on save, and ▶ Run CodeLens above entry points.
Install it by searching Chasm Language in the VS Code extension marketplace, or via the command palette:
ext install chasm-lang.chasm
CLI Reference
| Command | Description |
|---|---|
chasm run <file.chasm> | Compile and run a standalone script |
chasm compile <file.chasm> | Compile to C only |
chasm watch <file.chasm> | Watch for changes and re-run |
chasm fmt <file.chasm> | Format a source file |
chasm version | Print the compiler version |
chasm help | Show usage |
Engine flags:
Pass --engine raylib or --engine godot to compile against those engine APIs.
Without a flag, the output is a standalone binary with no graphics dependencies.