Install
Install the latest mach release with a single command, grab a precompiled binary, or build the self-hosted compiler from source. There are no external toolchain dependencies to install first.
Quick install
The one-line installer fetches the latest release for your platform.
On Unix and macOS:
curl -fsSL https://machlang.org/install.sh | sh
On Windows (PowerShell):
irm https://machlang.org/install.ps1 | iex
The docs read like a pamphlet, not a bible, and assume you know basic programming concepts from other languages. Skim the language reference alongside this guide as you go.
What the installer does
Each script verifies the download against the release SHA256SUMS before installing, then drops the mach binary into a per-user location.
| Platform | Install location |
|---|---|
| Unix / macOS | ~/.local/bin |
| Windows | %LOCALAPPDATA%\mach\bin |
Precompiled binaries
Precompiled binaries for each release are available directly on the releases page. Download the archive for your target and place the mach binary on your PATH if you prefer not to use the installer.
Build from source
Mach builds itself, so compiling from source needs an existing mach installation. Install a release first, then clone, pull dependencies, and build.
git clone https://github.com/briar-systems/mach
cd mach
mach dep pull
mach build .
The compiler is written to out/<target>/bin/mach, where <target> is the selected target name.
Because mach is self-hosted, there is no bootstrap path without a working mach binary. Use the quick installer or a precompiled binary to get the first compiler, then build from source.
See also
- Hello world - write, build, and run your first program
- Project layout - scaffold a project with
mach init - CLI - the
machcommand-line reference - Dependencies - what
mach dep pullvendors