Macroquad

Simple and easy to use game library for Rust programming language.

Browse examples

HTML5

First class browsers support, WebGL1 and iOS Safari supported.

Android

Single command docker-powered android builds.

iOS

Export to XCode project for iOS.

PC

Linux/Mac/Windows with no external system dependencies.

Batteries included

UI, efficient 2D rendering, sound system—everything needed to make a 2D game included!

Get Started with Macroquad

Macroquad has a simple, small API that's quick to get started with.

1. Install Rust and create a new project with Cargo: cargo new my_game
2. Add Macroquad: cargo add macroquad
3. Start coding by adding the following to src/main.rs:
            
use macroquad::prelude::*;

#[macroquad::main("MyGame")]
async fn main() {
    loop {
        clear_background(RED);

        draw_line(40.0, 40.0, 100.0, 200.0, 15.0, BLUE);
        draw_rectangle(screen_width() / 2.0 - 60.0, 100.0, 120.0, 60.0, GREEN);

        draw_text("Hello, Macroquad!", 20.0, 20.0, 30.0, DARKGRAY);

        next_frame().await
    }
}
            
          
4. Run with cargo run
5. Dig into the docs

Learn more in the GitHub README.