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

Building

A Rusteal build has five steps:

StepNameWhat it does
1UE buildBuilds the project with the Unreal Build Tool, which exports the engine’s reflection to Intermediate/Rusteal/uht/.
2CodegenReads the reflection and generates the bindings crate and the C++ wrappers.
3UE rebuildBuilds the generated C++ wrappers into the Rusteal plugin.
4Cargo buildBuilds your game crate (and each Rust plugin’s) with Cargo.
5DeployCopies the libraries to the plugins’ Binaries/<Platform>/, where the editor loads them.

Which build to run

You changedRun
Rust code in your craterusteal build
Rust code, many times while you workrusteal watch
rusteal.toml (engine modules, blocklist)rusteal build --all
The engine versionrusteal build --all
A cloned project, built for the first time on this machinerusteal build --all

rusteal build runs steps 4 and 5: that is all a change to Rust code needs, and it takes seconds. rusteal build --all runs the five, and takes as long as the engine build and the bindings generation take.

Flags

rusteal build
rusteal build --all
rusteal build --from 2
rusteal build --step 3
rusteal build --release
rusteal build --plugin Inventory
rusteal build /path/to/MyGame
FlagWhat it does
--allRuns every step.
--from <n>Runs step n and every step after it.
--step <n>Runs only step n.
--releaseBuilds the libraries with the release profile, for shipping.
--plugin <Name>Limits codegen, Cargo and deploy to one Rust plugin of the project.

--all cannot be combined with --from or --step.

Generating the bindings alone

rusteal generate

Regenerates the bindings crate and the C++ wrappers from the reflection already exported, without building anything.

When the build fails

The build prints the output of the tool that failed: Cargo’s errors for your code, the Unreal Build Tool’s for the engine steps. A Rust compile error leaves the library the editor runs as it was: fix the code and build again.

The Unreal Build Tool runs one build at a time per engine. If another build is running, from the editor or from another project, wait for it to finish.

If rusteal build says the bindings are missing, the project has never been built on this machine, or Rust/bindings/ was deleted: run rusteal build --all.