Installing and Using Legion
Explore how to install and configure Legion within a Rust game development environment. Understand the benefits of pinning dependencies, re-exporting Legion in the prelude, and managing game entities as modular components via ECS architecture. Learn to transition game state and resources to work with Legion's World and Systems for scalable, clean code.
We'll cover the following...
Legion is included in Rust’s crates system, so installing it is similar to installing bracket-lib. Legion dependency is added in Cargo.toml as shown.
Note that we’re using an exact version number for Legion with the equals (=) sign. Legion is rapidly improving, and this guarantees that our code will work with that published version.
When you’re working on a project, it’s a good idea to pin your dependencies with the equals (
=) sign once you progress beyond initial ...