Description
bracket-lib is the Roguelike Toolkit, known as RLTK, implemented for Rust. It is the primary support library for the author's book Hands-on Rust, and it is now used well beyond roguelikes. The project is divided into crates so you can pick the pieces you need. bracket-terminal provides the terminal and rendering layer, bracket-algorithm-traits exposes the traits used by the algorithm crates, bracket-color handles RGB and HSV colour, bracket-geometry supplies geometric primitives, bracket-noise is a port of Auburn's FastNoise, bracket-pathfinding offers an A-star pathing system and Dijkstra maps, and bracket-random is a dice-oriented random number generator that can parse RPG-style strings such as 3d6+12. The rltk crate re-exports everything so existing RLTK projects keep working. By default it renders with OpenGL, or WebGL when compiled for the browser. You can switch to a WebGPU backend, which supports Vulkan, Metal and WebGPU, or to crossterm for a text terminal, by disabling default features and enabling one backend flag. Optional specs and serde flags help integration with other systems, and a threaded flag enables multi-threading in some parts.…
Highlights
- Roguelike toolkit for Rust, split into crates
- A-star pathing and Dijkstra maps
- Dice roller that parses strings like 3d6+12
- OpenGL, WebGL, WebGPU and crossterm backends
- Noise, colour and geometry helpers
Ratings & Reviews
No ratings yet
Be the first to rate Bracket Lib.
People also visit
Bracket Lib FAQ
What is bracket-lib?
A Rust toolkit for roguelikes and other games, known as RLTK, with terminal rendering, pathfinding, noise and random number helpers.
Is it free?
Yes. It is an open-source project on GitHub.
Which rendering backends can I use?
OpenGL by default, WebGL in the browser, WebGPU through wgpu, and crossterm for a text terminal.
How do I use it in a project?
Add the bracket-lib dependency to your Cargo.toml file. For WebGPU, the README says to add resolver = 2 to Cargo.toml.
Can I use only part of it?
Yes. The crates are split so you can use just the pathfinding, noise, colour or geometry parts.
Is there a tutorial?
The README links to an online tutorial series on writing a roguelike with the library, and the author's book.
What are the best Bracket Lib alternatives?
Popular alternatives to Bracket Lib include Ratzilla, Rattles and Create Rust App. See all Bracket Lib alternatives

