Installation
The fastest way to get March is a prebuilt binary. You can also build from source with OCaml 5.3.0 + dune (managed with opam).
Prebuilt binaries (recommended)
Prebuilt releases for darwin-arm64, linux-x86_64, and linux-aarch64 are published on the releases page. Each archive bundles march, forge, the standard library, and the C runtime sources.
curl -fsSL https://raw.githubusercontent.com/march-language/march/main/install.sh | sh
The installer downloads the latest release into ~/.march, verifies its checksum, and installs march and forge into ~/.march/bin. Add that directory to your PATH (the installer prints the exact line). Use MARCH_VERSION=nightly for the latest nightly or MARCH_VERSION=<tag> to pin a version.
The binaries are self-contained (macOS statically links blake3/zstd/brotli; Linux builds are static), so interpreting programs requires no extra setup. To use march --compile, install a C toolchain: clang + LLVM (macOS: xcode-select --install; Linux: e.g. clang llvm).
Switch between installed versions with forge:
forge toolchain install # latest stable (or newest nightly)
forge toolchain use <version> # activate an installed toolchain
forge toolchain list # show installed versions
See the README for the manual-download alternative and details.
Just want to try it? With a prebuilt binary installed you’re done; head straight to Getting Started and write your first program. Everything below is for contributors building the compiler from source, and can be skipped.
Building from source (contributors)
The rest of this page walks through building March’s compiler, standard library, and tooling from source with OCaml 5.3.0 + dune. You only need this if you’re hacking on March itself.
Prerequisites
| Tool | Version | Purpose |
|---|---|---|
| opam | 2.x | OCaml package manager |
| OCaml | 5.3.0 | Set up via opam switch |
| dune | 3.7+ | Build system (installed by opam) |
| LLVM / clang | 18+ | Native code compilation |
| git | any | Clone the repository |
macOS
brew install opam llvm
opam init --bare -y
Homebrew puts clang on your PATH automatically. LLVM 18+ is required; earlier versions may work but are untested.
Linux (Debian / Ubuntu)
sudo apt-get install -y opam clang-18 llvm-18-dev libllvm18
opam init --bare -y
For other distributions use your package manager to install opam and a recent clang / llvm-dev.
1. Clone
git clone https://github.com/march-language/march.git
cd march
2. Create the opam switch
March uses a dedicated opam switch pinned to OCaml 5.3.0. This keeps its dependencies isolated from other OCaml projects.
opam switch create march 5.3.0
This downloads and compiles OCaml; it takes a few minutes the first time.
3. Install dependencies
opam install . --deps-only -y
Key packages installed:
| Package | Purpose |
|---|---|
menhir |
Parser generator |
ppx_deriving |
Derivation macros (show, eq, …) |
alcotest |
Test framework |
qcheck-core |
Property-based tests |
notty |
REPL TUI rendering |
4. Build
dune build
This compiles everything: the compiler, the stdlib, the C runtime, the forge build tool, and the LSP server.
5. Verify
forge run examples/list_lib.march
Expected output:
range 1..10: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
length: 10
sum 1..10: 55
product 1..5: 120
max: 10
reversed: [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]
append [1..3] [4..6]: [1, 2, 3, 4, 5, 6]
6. Run tests (optional)
forge test
All tests should pass. The suite covers the parser, typechecker, evaluator, stdlib, and forge.
Installing forge to PATH (optional)
To use forge directly without a path prefix, install it after building:
dune install forge
This copies the binary to your opam switch’s bin directory, which is already on PATH. After this, forge commands work from anywhere:
forge run my_program.march
forge new my_project
Binary locations after build
_build/default/
├── bin/main.exe # march compiler / interpreter
├── forge/bin/main.exe # forge build tool
└── lsp/bin/main.exe # LSP server (for editor integration)
Hello, March
Create hello.march:
mod Hello do
needs IO.Console
fn main() do
println("Hello, March!")
end
end
Run it:
march hello.march
# Hello, March!
Troubleshooting
Error: No switch installed
Run opam switch march (or eval $(opam env --switch=march)) to activate the switch in your current shell.
clang: error: unknown target triple 'x86_64-unknown-linux-gnu'
Your LLVM version is too old. Install LLVM 18+.
dune build fails with missing menhir
Run opam install . --deps-only -y again; the switch may not have been active when you first ran it.
Tests fail on Linux with libffi errors
sudo apt-get install libffi-dev
Next Steps
- Getting Started: write your first real program
- Language Tour: a guided introduction to the language
- Tooling: forge, LSP, and the debugger
Coming from another language? Python · TypeScript · Haskell/Elixir/OCaml.