Cross-Compiling
Build the engine for platforms you are not sitting at: a Windows runtime from Linux, a macOS or Android one from Windows.
This is what Docker is for, and the only thing it is for. Each target needs its own compiler, linker and SDK, and installing six of those by hand is the problem a container solves. To build and run on your own machine, use cargo renzora; nothing on that page needs Docker.
What cross-compiling produces: runtimes, not editors
The containers build game runtimes, the binaries the exporter uses as each platform's export template. They do not stage an editor for another platform, and that is a hard limit rather than a missing feature: an editor ships a plugin SDK, and an SDK cannot be cross-built. Its proc-macro libraries are artefacts of the machine that ran the compiler, so a Linux container can only ever produce Linux ones, and a Windows user handed them gets can't find crate for bevy_derive and every name in bevy::prelude with it.
So the three ways to build divide cleanly:
| Path | Produces |
|---|---|
cargo renzora | your own platform, complete: editor, runtime and SDK |
renzora build (the containers) | runtimes and export templates for every platform, no editor |
| CI's native desktop lanes | the published editors, one runner per platform |
The web is the exception: a web editor has no SDK and compiles no Rust at run time, so the wasm lane builds both the web runtime and the web editor.
The renzora CLI
The CLI that drives the containers is a separately published tool, not part of the engine workspace.
- Install:
cargo install renzora - crates.io: crates.io/crates/renzora
- Source: github.com/renzora/cli
| Command | What it does |
|---|---|
renzora init | Pull or build the host toolchain image and create and start its container (safe to run again) |
renzora check | cargo check in the Linux container |
renzora test [args] | Run the test suite in the Linux container (no arguments: the workspace suite) |
renzora build [platforms] | Cross-build for one or more platforms (no arguments: all of them) |
renzora run | Build for this host and launch it (the editor by default) |
renzora add <name> | Scaffold a new plugin crate |
renzora remove <name> | Delete a plugin crate |
renzora shell | Interactive shell inside the Linux container |
renzora destroy | Remove this checkout's containers and build-cache volumes |
renzora prune | Remove this checkout's stale toolchain images |
renzora new | Create a new project by cloning the engine |
Linux-native operations (test, check, shell, add, remove) run in the Linux container. renzora build, add, remove and upx wrap the scripts in docker/ (build-all.sh, add-plugin.sh, remove-plugin.sh, upx-compress.sh). Because they run in a container, none of them adds to the host's target/ directory.
Installing Docker
You need Docker only for the commands above, and for exporting a game from the editor to an operating system other than the one you are on.
Windows
Install Docker Desktop with the WSL 2 backend:
winget install Docker.DockerDesktop
Restart when asked, then start Docker Desktop once so it finishes setting up WSL 2. If it stays on "Starting" forever, hardware virtualization is off: turn on SVM Mode (AMD) or Intel Virtualization Technology (Intel) in your BIOS or UEFI settings.
macOS
brew install --cask docker
Open Docker Desktop once from Applications to finish setup. The toolchain images are published for both Intel and Apple Silicon.
Linux
Install Docker Engine from your distribution, enable it, and add yourself to the docker group:
| Distribution | Install |
|---|---|
| Ubuntu, Debian, Mint, Pop!_OS | sudo apt install docker.io |
| Fedora | sudo dnf install moby-engine |
| Arch, Manjaro, EndeavourOS, CachyOS | sudo pacman -S docker |
| openSUSE Tumbleweed | sudo zypper install docker |
sudo systemctl enable --now docker
sudo usermod -aG docker "$USER"
Log out and back in so the group change applies. On NixOS, set virtualisation.docker.enable = true; and add "docker" to your user's extraGroups, then sudo nixos-rebuild switch.
Check it works with docker run --rm hello-world. "Permission denied" on Linux means the group change has not taken effect yet.
Building
cargo install renzora
renzora init
renzora build windows linux # specific platforms
renzora build # every platform
Output lands in dist/<platform>/. The platform names docker/build-all.sh accepts:
| Name | Builds |
|---|---|
linux | Linux for the container's own arch, plus the other one by cross-compiling (linux-x64, linux-arm64); either alone by name |
windows | windows-x64 (MSVC, via xwin) |
macos | macos-x64 and macos-arm64 (via osxcross); macos-x64 or macos-arm64 alone |
wasm | web-wasm32: the web runtime and the web editor |
android | android-arm64 and android-x86 (the x86_64 emulator slice); either alone |
ios | ios-arm64 (a static library for the Xcode template) |
Windows on ARM
windows-arm64 is not in that list because no container can produce it. The only MSVC pieces Microsoft allows to be redistributed (so xwin can bake them into a public image) are the C runtime and the Windows SDK, which leaves clang as the C compiler, and clang cannot stand in for MSVC on ARM64: it emits MSVC NEON intrinsics as undefined symbols no redistributable library provides. That slice is built natively, with the real MSVC toolchain.
Windows builds use the dist profile
build-all.sh forces the dist profile for every windows-* platform. A PE export ordinal is 16 bits, so a DLL can export at most 65,535 symbols, and bevy_dylib crosses that at opt-level = "s" while staying well under it at opt-level = 2. Windows therefore trades binary size for the shared-image plugin system.
The toolchain images
The toolchain is one shared base image plus one image per platform built FROM it, all published to ghcr.io/renzora/ by .github/workflows/docker-image.yml:
| Image | Adds |
|---|---|
base | Rust (FROM rust:1.100.0-bookworm), the native Linux build and link dependencies, and the LLVM 19 layer the macOS, iOS and Windows cross toolchains share |
linux | cross-gcc and link dependencies for the other Linux arch, appimagetool, UPX |
windows | xwin (the redistributable MSVC CRT and SDK) |
macos | osxcross and the macOS SDK, plus rcodesign |
ios | osxcross and the iPhoneOS SDK |
android | the Android NDK |
wasm | wasm-bindgen and binaryen (wasm-opt) |
Each image is built for linux/amd64 and linux/arm64. On an ARM64 host the Android NDK's compilers, which Google ships for x86_64 only, run under Docker's x86_64 emulation.
Tags are content hashes. The base tag is the first 12 hex digits of the SHA-256 of docker/base/Dockerfile; each platform tag hashes the base tag together with its own Dockerfile. A change to one platform's Dockerfile therefore moves only that platform's tag, while a change to the base (in practice a Rust version bump) moves every tag. The CLI pulls only the images a command needs: renzora run the host platform's, renzora build windows the Windows one, renzora build all of them.
The Rust version lives in two files kept in lockstep: docker/base/Dockerfile for the containers and rust-toolchain.toml for native builds. A bump must edit both.
Exporting from the editor
A lean export recompiles the engine from source, and cargo can only target the host. Exporting a game to another operating system therefore runs the build inside the same ghcr.io/renzora/<platform> image. The editor talks to docker directly rather than through the CLI, because someone running a downloaded editor has Docker but not necessarily the CLI. See Export System and Export Templates.
Compressing a build with UPX
renzora upx # every platform under dist/
renzora upx dist/windows-x64 # one platform
This packs an already-built tree on request. Releases are not packed: see Releases for why.