Skip to content

Search

Documentation

Build from source

The Rust toolchain, the packages each platform needs, and the first build of the Balaur engine and editor.

On this page

Toolchain

  • Rust 1.98.1 through rustup. rust-toolchain.toml pins it, so any cargo command in the checkout installs and selects it.
  • Git, and a C and C++ compiler: the Xcode Command Line Tools on macOS, the MSVC "Desktop development with C++" workload on Windows.

Linux packages

sudo apt-get install -y \
  git build-essential pkg-config \
  libasound2-dev libudev-dev \
  libx11-dev libxcursor-dev libxrandr-dev libxi-dev \
  libxkbcommon-dev libwayland-dev
Package Pulled in by
build-essential a C compiler for zstd and ring; a C++ one for HarfBuzz, the web export's font subsetter
libasound2-dev ALSA, through rodio and cpal: the audio feature
libudev-dev gamepads, through gilrs
libx11-dev, libxcursor-dev, libxrandr-dev, libxi-dev, libxkbcommon-dev, libwayland-dev winit, the window feature
  • Fedora: git gcc gcc-c++ pkgconf-pkg-config alsa-lib-devel systemd-devel libX11-devel libXcursor-devel libXrandr-devel libXi-devel libxkbcommon-devel wayland-devel
  • Arch: git base-devel pkgconf alsa-lib systemd-libs libx11 libxcursor libxrandr libxi libxkbcommon wayland

Build

git clone https://github.com/balaurengine/balaur.git
cd balaur
cargo run -p balaur_cli -- run examples/hello --headless --frames 120   # no GPU, no window
cargo run -p balaur_cli --features window -- edit examples/hello        # the editor

The windowed build compiles 541 crates the first time; after that it is incremental.

On PATH

cargo build --release -p balaur_cli --features window --bin balaur
export PATH="$PWD/target/release:$PATH"
balaur --version      # 0.2.0 (source build)

The binary finds the editor through editor/ beside the sources, at a path baked in at build time. Moved elsewhere, it needs --editor <dir> or BALAUR_EDITOR.

Features

window and extensions are off by default; audio, http, websocket, webtransport, gamend, web and parallel are on. --no-default-features drops those seven.

If it fails

Error Fix
names edition2024 or a version under 1.98.1 rustup update; drop any rustup override or +toolchain flag
Package alsa was not found in the pkg-config search path libasound2-dev, or alsa-lib-devel. The next missing library fails the same way, so install the whole list
no editor project found; pass --editor <dir> run it from the checkout, or pass --editor

Before a pull request, scripts/precommit.sh runs what CI runs; see CONTRIBUTING.md.