Welcome to Realms - the lightweight Rust game library!
Realms is a library that allows you to easily make games, animations and any 2D graphics using Rust.
This is a 'mid-level' crate which provides an extremely simple API to easily draw to a graphical window, without being bloated like a typical game engine. Realms is a game library.
Getting started
First, create a new project with cargo new <project_name>.
Next, import Realms into your Rust project by adding the following line to your Cargo.toml:
= "VERSION_NUMBER"
Replace VERSION_NUMBER with the latest Realms version (displayed above). Alternatively, run this command in your terminal from inside your project directory:
Replace project_name with the name of the game you want to create.
Finally, add this code to the src/main.rs file:
use Event;
use Window
use Colour;
Running this code using cargo run will give you this result:

Congratulations! You have successfully written your first Realms game :)
Note: For more info, please see the full explanation at github.com/dylanopen/realms
Example: Shapes and events
So far, we've just filled the background colour. What if we wanted to draw some shapes?
In this example, we will build a program where a rectangle follows your mouse pointer on the screen.
Copy this code into your main.rs file:
use Event;
use Rect;
use Window;
use Colour;
Run the program and you should see an orange rectangle follow the cursor!
Note: For more info, please see the full explanation at github.com/dylanopen/realms
Documentation
The above examples are just a very brief introduction to the Realms library.
Please view the documentation on GitHub. There is also some information available at docs.rs, although documentation there is limited.
Thank you for choosing Realms to build your next great game!