Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Packaging a game

The goal: a build of the game that runs without the editor, to try it, share it or ship it.

rusteal package
rusteal package --shipping --output ~/Builds/MyGame

rusteal package builds every Rust library with the release profile, then cooks and packages the game for the platform it runs on, with the engine’s own BuildCookRun. The packaged game stages each Rust library it loads: the game’s and its runtime plugins’.

FlagWhat it does
(none)A Development build, into <project>/Packaged.
--shippingA Shipping build: no console, no logging, fully optimized.
--output <dir>Where the packaged game goes.
--optimizations offLeaves out the platform optimizations, which the game carries by default.

Before packaging

  • Assets only Rust loads by path. The cooker packages the assets that something references. An asset that only load_object loads, by a path in Rust code, is not found: list its directory in Edit > Project Settings, Packaging, Additional Asset Directories to Cook. Assets assigned to properties in Blueprints or levels are found on their own.
  • The default maps. Project Settings > Maps & Modes names the map the game opens (Game Default Map); a packaged game does not start from the level open in the editor.
  • Hot reload is for the editor. A packaged game loads its libraries once, at start.

Screenshot: Project Settings, Packaging, with a directory in Additional Asset Directories to Cook. (images/shipping/additional_directories.png)

Running it

The packaged game is in the output directory, under the platform’s name: run the executable there (MyGame.sh on Linux, MyGame.exe on Windows).

When something is missing

A packaged game that starts but misses Rust behavior usually lacks a library or an asset:

  • the log (Saved/Logs/ next to the executable, in a Development build) shows whether the Rusteal libraries loaded, and their errors;
  • an asset that is in the editor but not in the package is the case above: add its directory to cook.