egui_ratatui : egui widget + ratatui backend
RataguiBackend is a combined ratatui Backend and egui Widget that lets you render a full Ratatui terminal inside an egui UI. Because egui is WASM-friendly, this makes it easy to run terminal-style TUI apps in desktop GUIs or in the browser.
Highlights
egui_ratatui builds on top of the [soft_ratatui] library and inherits its features:
- Multiple font backends:
embedded-graphics,embedded-ttf,bdf-parser,cosmic-text. - High performance: optimized for real-time UIs (hundreds of FPS on normal workloads).
- WASM compatible: run your ratatui apps in the browser via egui.
- Bevy & GUI friendly — bevy and eframe examples included.
Installation
Add the crate to your project:
You will typically also add soft_ratatui (the rendering backends) and ratatui:
Or clone and run the included examples:
Quick usage
Minimal example
use egui;
use RataguiBackend;
use Terminal;
use Stylize;
use ;
use ;
use ;

Feature Flags (set these on soft_ratatui dependency)
soft_ratatui (and therefore egui_ratatui) is modular. Enable only the backends you need to reduce binary size and dependencies. (Note: these features flags must be set on the soft_ratatui dependency, I am only mentioning them here for visibility)
| Feature | Enables | Description |
|---|---|---|
unicodefonts |
[embedded_graphics_unicodefonts] |
Embedded-graphics fonts with Unicode support. Automatically enables embedded-graphics. Enabled by default. |
embedded-graphics |
[EmbeddedGraphics] |
Uses embedded-graphics font atlases for TUI rendering. |
bdf-parser |
[Bdf] |
Bitmap Distribution Format font support. |
embedded-ttf |
[EmbeddedTTF] |
TrueType font rendering via RustType. Automatically enables embedded-graphics. |
cosmic-text |
[CosmicText] |
Advanced text shaping, layout, and Unicode support using CosmicText engine. |
Tip: Only enable the font backends you actually use in
Cargo.tomlto keep compile times and binary size down.
Integration notes
- The crate is designed so
RataguiBackend<R>is generic over anyR: RasterBackend. That means you can use the sameRataguiBackendcode withSoftBackend<EmbeddedGraphics>,SoftBackend<EmbeddedTTF>,SoftBackend<Bdf>, or whichever backend you enable. RataguiBackendimplements Ratatui'sBackendtrait, so it can be used anywhere aratatui::Terminalis expected.- For web/WASM deployment, remember to enable the appropriate features and follow the host GUI / wasm backend guide (see links below).
Examples
bevy_example/— embedding Ratagui inside Bevy (with bevy_egui).eframe_example/— minimal eframe example.- See the
soft_ratatuirepo for font/backend-specific examples (BDF, TTF, CosmicText, embedded-graphics).
Useful links
soft_ratatui— software rendering backends used by egui_ratatui.ratatui— terminal UI crate.egui— immediate mode GUI used to embed the widget.bevy_ratatui— Bevy integration for Ratatui.mousefood- a no-std embedded-graphics backend for Ratatui!ratzilla- Build terminal-themed web applications with Rust and WebAssembly.ratatui-wgpu- A wgpu based rendering backend for ratatui.bevy_ratatui_camera- A bevy plugin for rendering your bevy app to the terminal using ratatui.
WASM & platform guides:
- Bevy WASM guide: https://bevy-cheatbook.github.io/platforms/wasm.html
- Macroquad WASM: https://macroquad.rs/articles/wasm/
- eframe (egui desktop + wasm): https://github.com/emilk/eframe_template
Font and text engine links:
Cool BDF fonts
License
Dual-licensed under MIT or Apache 2.0.