5 Rust game engines to consider for your next project
Tags: rust, webdev, gamedev
Published: 2022-05-24 19:23:14

**Written by [Victor Jonah](https://blog.logrocket.com/author/victorjonah/)✏️**

More and more developers are choosing Rust over C++ as their go-to language for game development. There are many game engines you can use for projects in Rust. Let’s take a look at five popular Rust game engines and discuss how to choose the best option for your needs. 

In this article:

*   [Why use Rust for game development?](#why-use-rust-for-game-development)
*   [5 popular Rust game engines](#5-popular-rust-game-engines)
    *   [Amethyst](#amethyst)
    *   [Bevy](#bevy)
    *   [Fyrox](#fyrox)
    *   [Piston](#piston)
    *   [Nannou](#nannou)
*   [How to decide which Rust game engine to use](#how-to-decide-which-rust-game-engine-to-use)

## Why use Rust for game development?

Before Rust was released, C++ was the go-to language for game development. Languages like C and Assembly provided reliable performance and speed in past years as well. 

Many developers still use these languages for game development. However, the [Rust community](https://www.rust-lang.org/community) is strong, active, and growing, particularly in the game development domain. 

According to [Stack Overflow’s 2021 survey](https://insights.stackoverflow.com/survey/2021#technology-most-loved-dreaded-and-wanted), Rust has been the most-loved language for the past six years. Its growing [list of production users](https://www.rust-lang.org/production/users) includes tech giants such as Atlassian, Mozilla, and more. 

There are many [reasons why Rust is so popular](https://blog.logrocket.com/why-is-rust-popular/) amongst large companies and developers. For example:

*   Rust is extremely fast because it does not use a garbage collector
*   [Rust‘s build system, Cargo](https://blog.logrocket.com/demystifying-cargo-in-rust/), helps manage your libraries, keep versions locked, and more
*   Rust supports functional and imperative paradigms

Typically, Rust is at least as fast as C/C++, and it may become a bit faster in the future because of upcoming performance updates to the language. 

Rust also has a great capacity for game development because of its concurrency. [Concurrency in Rust](https://blog.logrocket.com/deep-dive-concurrency-rust-programming-language/) prevents data races and provides epic memory management to help make it impossible for your application to crash. 

To me, Rust is a well-designed and very clean language. Though some consider Rust to have a steep learning curve, the [extensive documentation](https://www.rust-lang.org/learn) and expanding [crate registry](https://crates.io) can certainly help you quickly learn best practices.

## 5 popular Rust game engines

Let us look at some Rust game engines you might want to consider for projects in the game development domain.

### Amethyst

[Amethyst](https://amethyst.rs/) is a data-driven and data-oriented game engine written in Rust. This free and open source software has grown popular because it’s fast and easy to use. 

The core principles of Amethyst include:

*   Massively parallel architecture
*   Follows the [Entity Component System (ECS)](https://en.wikipedia.org/wiki/Entity_component_system) paradigm to organize game logic
*   Uses Rusty Object Notation (RON), which is simple and supports all data types

ECS makes Amethyst entirely thread-safe and avoids memory-locking of any sort. Learn more in the [ECS infographic](https://github.com/ArturoNereu/ECS_101) below: ![Five Panel Infographic Defining Entity Component System](https://blog.logrocket.com/wp-content/uploads/2022/05/ecs-infographic.png) 

In addition, ECS enforces code modularity. As a result, you can share components such as your data structures or logic rather than having to rewrite them. 

Amethyst is mainly used to develop 2D and 3D games. People getting started with Rust for game development find Amethyst to be beginner-friendly thanks to the [precise documentation](https://amethyst.rs/doc) available to help developers working with the engine. 

To install the Amethyst engine, add the following code below to your `Cargo.toml` file:

```rust 
amethyst = "0.15.3"
```

As of this writing, Amethyst is partnered with the Bevy engine, meaning [Bevy is essentially Amethyst 2.0](https://community.amethyst.rs/t/bevy-engine-addressing-the-elephant-in-the-room/1645). Developers should be aware that the Amethyst creators plan to eventually [archive the amethyst/amethyst repo](https://amethyst.rs/posts/amethyst--starting-fresh). 

The Amethyst and Bevy projects are meant to be collaborative, not competitive. There are plans to streamline the different areas of these projects into one game engine in the future. Learn more about Bevy in the next section.

### Bevy

[Bevy](https://bevyengine.org/) is another simple data-driven game engine. While it is still in the early stages of development and likely to undergo significant changes, this does not stop its vital features from shining. 

To use the Bevy engine, add the following line to your `Cargo.toml`:

```rust 
bevy = "0.7.0"
```

Like Amethyst, Bevy uses ECS, applying modular architecture so components can be reused or even replaced. It is easy to use for beginners getting started in Rust for game development. 

However, developers are warned against using Bevy for serious projects because the API is [still in development and expected to significantly change](https://github.com/bevyengine/bevy). 

You can use Bevy for 2D and 3D rendering, or you can compose a custom rendering flow using a graph data structure. Another great feature is the Bevy UI, which helps you compose UI dynamically either in code or using the scene format. 

My favorite Bevy feature is [`hot_asset_reloading`](https://bevy-cheatbook.github.io/assets/hot-reload.html), which allows you to modify and reload assets without having to compile your changes. If you add an asset at runtime, this feature will catch it and reload it to be used, which is great for enhancing productiveness. 

To enable this feature, just add this line:

```rust
$ asset_server.watch_for_changes().unwrap();
```

If you think this is the game engine you need, make sure you follow this [full tutorial](https://bevyengine.org/learn/book/introduction) to gain a better understanding. As I said earlier, Bevy is still very much in development as of this writing, and its APIs are expected to change.

### Fyrox

[Fyrox](https://crates.io/crates/rg3d) is a production-ready engine with extensive [documentation](https://docs.rs/fyrox/latest/fyrox/) and [resources](https://lib.rs/crates/fyrox-resource) that focuses on 2D and 3D rendering. To use the Fyrox engine, add the following line to your `Cargo.toml`:

```rust
rg3d = "0.24.0"
```

Besides being clear and easy to use, one of its popular features is the [scene editor](https://github.com/FyroxEngine/Fyrox/tree/master/editor), which provides a scene preview as [demonstrated in this example](https://github.com/mrDIMAS/StationIapetus): ![Fyrox Scene Editor Showing World Outliner, Scene Preview, and Node Properties](https://blog.logrocket.com/wp-content/uploads/2022/05/fyrox-scene-editor.jpeg) 

The Fyrox engine was originally called rg3d, but the project founder [changed this working title based on a community poll](https://github.com/FyroxEngine/Fyrox/issues/239). The [current release (v0.24)](https://github.com/FyroxEngine/Fyrox/releases) supports Windows, Linux, macOS, and WebAssembly. 

Unlike some other game engines, Fyrox features reliably quick iterative compilation. 

Other new or improved features include 2D support, performance improvements in the UI layout and rendering, and more. The [sound (rg3d_sound) was also optimized](https://docs.rs/rg3d-sound/latest/rg3d_sound/) to be 30 percent faster.

### Piston

The Piston project is maintained by an active group of contributors. Due to this sharing of maintenance and resources, it is described as a modular open source game engine. 

To use the Piston engine, add the following line to your `cargo.toml` file:

```rust
piston = "0.53.1"
```

Piston’s extensive library collection encompasses 2D, 3D, image processing, event programming, a GUI, sound and animation, and other features. These libraries can be used independently depending on the project you are working on.

Maintenance of the libraries is shared amongst the developers to provide more time, increase productivity, and achieve higher quality in the codebases. 

In addition to its modular libraries, Piston‘s public API allows you to access inputs like a gamepad, mouse, or keypad. Another great thing about Piston is the event loop. You can either pass your game logic into the event loop or create a separate thread for it. 

Piston also uses a dynamic scripting language called [Dyon](http://www.piston.rs/dyon-tutorial/), which was specifically created for game engines and designed to work with Rust. People with no programming experience will find it easy to pick up and use. 

Make sure you check out this [Piston repository](https://github.com/pistondevelopers/piston-tutorials) to review some helpful examples and other necessary tutorials.

### Nannou

[Nannou](https://github.com/nannou-org/nannou) is an open source game framework that is still in its early days. It is also more hands-on for developers, but it is still a popular game engine that is greatly in use at the moment. As of this writing, the [Nannou crate](https://crates.io/crates/nannou) has over 35,000 downloads. 

To use the Nannou engine, add the following line to your `cargo.toml` file:

```rust 
nannou = "0.18.1"
```

Nannou consists of a full palette of creative tools for graphics, audio, lasers, lighting, and more. In many ways, it is like a toolkit for artists — its many tools allow creative individuals to work productively. 

This project is also a good toolkit to learn the Rust language. It aims to use only Rust libraries and will require you to use `cargo build` for compilation. 

However, remember Rust has interoperability with other languages, especially with C and C++. If there are no Rust libraries available for the functionality you’re looking for, you can use something like [`bindgen`](https://rust-lang.github.io/rust-bindgen/) to access another library.

## How to decide which Rust game engine to use

After learning about the above five engines, you may be wondering which one you should use. The answer is not so straightforward. However, you can look at common patterns in what they offer to help determine which options best match your needs. 

For example, all offer the GUI and an editor. A few focus on performance, especially Piston and Fyrox. Bevy offers `hot_asset_reloading` for more productivity. 

The above options are not necessarily the best out of [all the engines available](https://arewegameyet.rs/ecosystem/engines/). However, they all have high numbers of downloads, useful features, extensive documentation, and more. Any one of them might be a great option for your project. 

In my opinion, the best approach to choosing a Rust game engine is to go through various game engine features and pick one that supports what you are trying to build. Ask yourself questions such as:

*   What features do I need for my project?
*   What unique features does each engine offer?
*   Is there documentation and community support available?

## Conclusion

In this article, we looked at the Rust game engines Amethyst, Bevy, Fyrox, Piston, and Nannou. We also explored why Rust is such a widely loved language, which contributes to it being used more often in game development. 

I hope this helped show you how to choose the most favorable game engine for your needs. If you enjoyed this article and
want to fully begin your experience in game development, you can head over to see some [tutorials using various engines](https://arewegameyet.rs/resources/tutorials/).

---

## LogRocket: Full visibility into production Rust apps

Debugging Rust applications can be difficult, especially when users experience issues that are difficult to reproduce. If you’re interested in monitoring and tracking performance of your Rust apps, automatically surfacing errors, and tracking slow network requests and load time, [try LogRocket](https://logrocket.com/signup). 

[![LogRocket Dashboard Free Trial Banner](https://blog.logrocket.com/wp-content/uploads/2017/03/1d0cd-1s_rmyo6nbrasp-xtvbaxfg.png)](https://logrocket.com/signup)

[LogRocket](https://logrocket.com/signup) is like a DVR for web apps, recording literally everything that happens on your Rust app. Instead of guessing why problems happen, you can aggregate and report on what state your application was in when an issue occurred. LogRocket also monitors your app’s performance, reporting metrics like client CPU load, client memory usage, and more.

Modernize how you debug your Rust apps — [start monitoring for free](https://logrocket.com/signup).