Tools
Installation
Burn is installed and managed by burnup, a version manager written in Burn:
curl -fsSL https://raw.githubusercontent.com/burnlang/burnup/master/install.sh | shThis installs burnup, the newest Burn and ash into ~/.burn and adds ~/.burn/bin to your PATH in
~/.profile, ~/.bashrc, ~/.zshrc (whichever exist) and fish. Open a new terminal (or run . ~/.burn/env)
and check it:
burn version
burni -e 'print("hello")'| Command | What it is |
|---|---|
burn |
the all-in-one driver: run, build, check, fmt, init, repl, lsp |
burni |
the interpreter: runs programs on bvm and starts the REPL |
burnc |
the compiler: native executables, JavaScript, bvm bytecode and runnable .bar archives |
burnfmt |
the code formatter, written in Burn itself |
burn-lsp |
the language server for editors |
bvm |
the Burn virtual machine: runs, assembles and inspects bytecode |
ash |
the package manager, written in Burn itself |
burnup |
installs, updates and switches Burn versions |
See the toolchain for what each command does.
Requirements
- Linux or macOS (Windows: see manual installation)
git, which burnup and ash use to download Burn versions and packages- A C compiler (
cc),tarandxzfor versions built from source (branches such asmaster, and any version without a prebuilt release): the C compiler assembles the seed that comes with the sources, which builds the rest. Nothing else is needed, no Burn and no Rust. - A C toolchain (
cc) to build native executables withburnc. Everything else works without it.
Versions
burnup install 26.1 # a release: the newest 26.1.x
burnup install master # the newest commit, built from source
burnup default 26.1 # the version used everywhere
burnup list # installed versions
burnup list --remote # versions that can be installed
burnup update # rebuild branch versions that moved, and update ash
burnup uninstall masterA version is a release (26.1, v26.1.0, ^26.1), latest, a branch or a commit. Each one lives in its own
folder in ~/.burn/toolchains, and the commands in ~/.burn/bin are small shims that run the active one.
A version per project
A project asks for a Burn version in its burn.toml:
[package]
name = "github.com/you/app"
burn = "26.1"A .burn-version file does the same for any folder, and burnup pin 26.1 writes whichever fits. Inside the
folder every Burn command runs that version; burnup installs it the first time it is needed. The order is
BURN_TOOLCHAIN, then the nearest burn.toml with burn or .burn-version, then the default.
burnup show # which version runs here, and why
burnup which burnc # the file that runs
burnup run master burn check # one command with another versionUpdating and uninstalling
burnup update # branch versions and ash
burnup self update # burnup itself
burnup self uninstall # everything: versions, packages, commands and the PATH linesInstaller options
| Option | Description |
|---|---|
--prefix <dir> |
install into <dir> instead of ~/.burn |
--toolchain <version> |
the Burn version to install first (default: the latest) |
--from-source |
build Burn and burnup from source instead of downloading them |
--no-ash |
do not install ash |
--no-modify-path |
do not touch your shell profile |
Pass them with sh -s --:
curl -fsSL https://raw.githubusercontent.com/burnlang/burnup/master/install.sh | sh -s -- --prefix /opt/burn --no-modify-pathThe old address, burnlang/burn/master/install.sh, still works and runs burnup.
Working on Burn itself
scripts/package.sh builds a checkout into the same layout as a release. Add the result to burnup as a version:
sh scripts/package.sh --prefix ~/burn-dev
burnup link dev ~/burn-dev
burnup run dev burn versionPrebuilt releases
Tagged versions (v*) are built by the release workflow for linux-x86_64, macos-x86_64 and macos-aarch64,
and burnup downloads them. To unpack one by hand:
tar -xzf burn-linux-x86_64.tar.gz
./burn/bin/burn versionManual installation
Linux and macOS, on x86-64 and arm64, can build the toolchain from a checkout with a C compiler, tar and xz:
sh scripts/package.sh --prefix ~/.burnThis assembles the seed in compiler/boot (the compiler written in Burn, as assembly for this platform), lets it
build the compiler from compiler/src until the compiler reproduces itself
(how the compiler builds itself), builds bin/burn and
the runtime libraries with it, and lays out bin/ (burni, burnc, burn-lsp and bvm are links to burn,
burnfmt is a script) and share/burn/. It takes under a minute.