Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Rust
  3. raylib-rs

raylib-rs

NOASSERTIONC

Rust bindings for raylib, providing idiomatic and safe access to the 2D/3D game development library.

GitHubGitHub
915 stars176 forks0 contributors

What is raylib-rs?

raylib-rs is a Rust binding for raylib 5.5, a simple and easy-to-use library for 2D/3D game development. It provides a safe, idiomatic Rust interface that automatically manages resources like textures and fonts using RAII, while maintaining close compatibility with the original C API. This enables Rust developers to leverage raylib's capabilities for building multimedia applications and games.

Target Audience

Rust developers interested in game development, multimedia applications, or cross-platform graphical projects who want a safe, idiomatic interface to raylib's functionality. It is particularly suited for those who prefer Rust's memory safety and concurrency guarantees over C.

Value Proposition

Developers choose raylib-rs because it offers thread safety through RaylibHandle, eliminates manual resource management with RAII, and provides an idiomatic Rust API with native string handling and feature flags for customization. It preserves the simplicity of raylib while adding Rust's safety features, making game development in Rust more accessible and efficient.

Overview

Rust bindings for raylib

Use Cases

Best For

  • Building 2D or 3D games in Rust with a simple, cross-platform library.
  • Developing multimedia applications in Rust that require graphics, audio, and input handling.
  • Creating educational or prototyping tools for game development with Rust's safety guarantees.
  • Cross-compiling Rust projects for Windows, Linux, macOS, or Web platforms using raylib.
  • Integrating raylib into Rust projects with customizable build configurations via feature flags.
  • Leveraging raylib's capabilities like rgui (Immediate Mode GUI) or rlgl (OpenGL abstraction) in Rust.

Not Ideal For

  • Projects requiring the latest raylib features beyond version 5.5, as the binding may lag behind upstream updates.
  • AAA game development with high-performance demands, as raylib is designed for simplicity rather than cutting-edge optimizations.
  • Targeting Android or relying on rlgl on Linux/macOS, as support is marked as unsupported or limited in the platform table.
  • Teams unwilling to manage C dependencies like glfw and cmake, which are required for building and can complicate setup.

Pros & Cons

Pros

Automatic Resource Cleanup

Uses RAII to automatically unload textures, fonts, and models when they go out of scope, eliminating manual cleanup calls and preventing memory leaks, as detailed in the Safe Binding characteristics.

Thread-Safe Design

Enforces single initialization with RaylibHandle and makes the API thread-safe, allowing safe concurrent access in Rust applications without manual synchronization.

Idiomatic Rust Integration

Replaces C string functions like SubText and FormatText with Rust's native string slicing and format! macro, making code more natural and safe for Rust developers.

Flexible Build Configuration

Allows customization via feature flags to enable or disable support for specific file formats and OpenGL versions, matching raylib's build options.

Cons

Complex Build Requirements

Requires external tools like glfw, cmake, and curl, and specific system packages for Wayland, which can complicate setup and cross-platform development compared to pure Rust crates.

Partial Platform Feature Support

Features like rgui and rlgl have limited or uncertain support on platforms like Web and Linux/macOS, as shown in the platform table, restricting advanced functionality.

Versioning Instability

May release intermediate versions (e.g., 5.6) with breaking changes based on raylib 5.5, leading to potential migration efforts and instability, as noted in the versioning explanation.

Frequently Asked Questions

Quick Stats

Stars915
Forks176
Contributors0
Open Issues57
Last commit10 months ago
CreatedSince 2018

Tags

#gamedev#opengl#3d-graphics#game-development#rust-bindings#cross-platform#raylib#safe-api#rust-crate#rust#game-engine#2d-graphics#multimedia

Built With

G
GLFW
R
Rust
C
CMake
O
OpenGL
C
C++

Included in

Rust56.6k
Auto-fetched 4 hours ago

Related Projects

BevyBevy

A refreshingly simple data-driven game engine built in Rust

Stars45,860
Forks4,537
Last commit15 hours ago
PumpkinPumpkin

Empowering everyone to host fast and efficient Minecraft servers.

Stars7,523
Forks506
Last commit12 hours ago
ggezggez

Rust library to create a Good Game Easily

Stars4,619
Forks441
Last commit29 days ago
gdnativegdnative

Rust bindings for Godot 3

Stars3,633
Forks208
Last commit4 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub