bevy_ratatui
Set up a Ratatui application, using bevy to manage the update loop, handle input events, draw to the buffer, etcetera.
getting started
cargo add bevy_ratatui ratatui crossterm
use *;
use ScheduleRunnerPlugin;
use ;
To read user input, you can listen for the crossterm input events forwarded by this crate:
use AppExit;
use KeyEvent;
use KeyCode;
...or use the enable_input_forwarding option in RatatuiPlugins which will
map crossterm input events to normal bevy input events.
demo

See the demo example for the code and more information.
see also
integrates with
- bevy: A refreshingly simple data-driven game engine built in Rust.
- ratatui: A Rust crate for cooking up terminal user interfaces (TUIs).
more tools
- egui_ratatui: A ratatui backend that is also an egui widget. Deploy on web with WASM or ship natively with bevy, macroquad, or eframe. Demo at https://gold-silver-copper.github.io/.
- bevy_ratatui_camera: Print a bevy scene to the terminal. Provides a ratatui widget that converts a bevy camera's rendered image to text and draws it to the terminal with ratatui.
alternatives
- widgetui: A wrapper for ratatui that reduces boilerplate and handles the update loop. Uses an approach similar to bevy systems.
- bevyterm: A bevy crossterm integration that uses bevy systems to set up a terminal application.
compatibility
| bevy | bevy_ratatui |
|---|---|
| 0.16 | 0.8 |
| 0.15 | 0.7 |
| 0.14 | 0.6 |
| 0.13 | 0.5 |
license
Copyright (c) Josh McKinney Copyright (c) Cooper Jax Reiff
This project is licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.