{"id":13503965,"url":"https://github.com/amethyst/bracket-lib","last_synced_at":"2025-12-12T10:55:57.882Z","repository":{"id":37891302,"uuid":"194901523","full_name":"amethyst/bracket-lib","owner":"amethyst","description":"The Roguelike Toolkit (RLTK), implemented for Rust.","archived":false,"fork":false,"pushed_at":"2024-02-14T05:43:02.000Z","size":11884,"stargazers_count":1588,"open_issues_count":105,"forks_count":118,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-05-15T01:42:49.813Z","etag":null,"topics":["amethyst-support","cp437","crates","retrogaming","rltk","roguelike","rust-crate","rust-crates"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amethyst.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-02T16:47:21.000Z","updated_at":"2025-05-11T19:46:39.000Z","dependencies_parsed_at":"2023-02-08T20:00:40.582Z","dependency_job_id":"371533be-9e7c-4e96-90d3-c9053bc09bf5","html_url":"https://github.com/amethyst/bracket-lib","commit_stats":{"total_commits":1076,"total_committers":54,"mean_commits":"19.925925925925927","dds":0.1496282527881041,"last_synced_commit":"0d2d5e6a9a8e7c7ae3710cfef85be4cab0109a27"},"previous_names":["thebracket/bracket-lib"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amethyst%2Fbracket-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amethyst%2Fbracket-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amethyst%2Fbracket-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amethyst%2Fbracket-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amethyst","download_url":"https://codeload.github.com/amethyst/bracket-lib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254355335,"owners_count":22057354,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amethyst-support","cp437","crates","retrogaming","rltk","roguelike","rust-crate","rust-crates"],"created_at":"2024-07-31T23:00:51.206Z","updated_at":"2025-12-12T10:55:57.878Z","avatar_url":"https://github.com/amethyst.png","language":"Rust","readme":"# Welcome to bracket-lib\n\n\u003e Note that you may need to run `cargo update` to pull some dependency updates. If you are coming from Hands-on Rust, the code is maintained [here](https://github.com/thebracket/handsonrust)\n\n![](https://github.com/thebracket/bracket-lib/workflows/Rust/badge.svg)\n\n\u003e You can read a tutorial series on writing a Roguelike with this library at: [https://bfnightly.bracketproductions.com/rustbook/](https://bfnightly.bracketproductions.com/rustbook/)\n\n\u003e *Bracket-lib* is the primary support library for my book, [Hands-on Rust](https://hands-on-rust.com/). Please consider checking out my book.\n\nEarly work has begun on writing a manual. You can find it in the `manual` folder, or [read it online](https://bfnightly.bracketproductions.com/bracket-lib/what_is_it.html).\n\n**BREAKING CHANGE ALERT**: The `crossterm` feature is now `cross_term` if you are using `bracket-terminal` directly. It's still `crossterm` for `bracket-lib` and `rltk`.\n\n**IMPORTANT**: If you are running the `webgpu` backend, you need to add `resolver = 2` to your `Cargo.toml` file. WGPU requires it for platform selection.\n\n## What happened to RLTK?\n\nThis *is* RLTK, renamed because it is increasingly finding usage outside of just Roguelikes. It's also been divided into a number of crates, to make it easy to pick-and-choose the features you need.\n\n* `rltk` crate wraps `bracket-lib` and re-exports in the `rltk::` and `rltk::prelude` namespace. This preserves compatibility with all existing RLTK projects.\n* `bracket-algorithm-traits` exposes the traits required for the various algorithm systems in other crates.\n* `bracket-color` is my RGB/HSV color management system.\n* `bracket-geometry` exposes various geometric primitives and helpers. Supports other crates.\n* `bracket-noise` is a port of [Auburn's FastNoise](https://github.com/Auburns/FastNoise) to Rust.\n* `bracket-pathfinding` provides a high-performance A* (A-Star) pathing system, as well as Dijkstra maps.\n* `bracket-random` is a dice-oriented random number generator, including parsing of RPG-style dice strings such as `3d6+12`.\n\n## Using `bracket-lib`\n\nIn your `Cargo.toml` file, include:\n\n```toml\n[dependencies]\nbracket-lib = \"~0.8\"\n```\n\n## Feature Flags\n\nThere are a few feature flags designed to aide integration with other systems:\n\n* `specs` tells various `bracket-lib` sub-systems to export important primitives as having Specs' `Component` type applied.\n* `serde` tells various `bracket-lib` sub-systems to support using `Serde` for serialization/de-serialization.\n\nPerformance:\n\n* `threaded` enables multi-threading on some sub-systems.\n\nTerminal mode:\n\nBy default, `bracket-lib` runs in OpenGL mode (or WebGL if it detects that you are compiling for `wasm32-unknown-unknown`). If you want to use other rendering back-ends, *disable default features* and apply *one* of the following feature flags:\n\n* `webgpu` to use the `wgpu` system as a back-end, supporting Vulkan, Metal and WebGPU.\n* `crossterm` to use the excellent `Crossterm` terminal library.\n* `curses` to use `pancurses` for `ncurses` or `pdcurses` support depending upon your platform.\n\n## Sample Projects\n\n- https://github.com/Micutio/innit\n- https://github.com/amethyst/shotcaller\n- https://github.com/bofh69/rouge\n- https://github.com/carsin/miners\n- https://github.com/baszalmstra/my-little-robots\n- https://github.com/Havegum/Terrain-Generator\n- https://github.com/Bobox214/rs-gliphus\n- https://github.com/Maxgy/blademaster\n- https://github.com/Maxgy/text-rts\n","funding_links":[],"categories":["Libraries","Rust","库 Libraries"],"sub_categories":["Game development","游戏开发 Game development"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famethyst%2Fbracket-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famethyst%2Fbracket-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famethyst%2Fbracket-lib/lists"}