Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gold-silver-copper/egui_ratatui
A ratatui backend that is also an egui widget. Deploy on web with WASM or ship natively with bevy, macroquad, or eframe
https://github.com/gold-silver-copper/egui_ratatui
bevy egui gui ratatui rust tui wasm web
Last synced: 6 days ago
JSON representation
A ratatui backend that is also an egui widget. Deploy on web with WASM or ship natively with bevy, macroquad, or eframe
- Host: GitHub
- URL: https://github.com/gold-silver-copper/egui_ratatui
- Owner: gold-silver-copper
- License: apache-2.0
- Created: 2024-04-19T04:08:44.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-11-13T02:55:42.000Z (about 1 month ago)
- Last Synced: 2024-12-08T20:16:53.321Z (13 days ago)
- Topics: bevy, egui, gui, ratatui, rust, tui, wasm, web
- Language: Rust
- Homepage: https://gold-silver-copper.github.io/
- Size: 21.5 MB
- Stars: 99
- Watchers: 1
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
- awesome-ratatui - egui-ratatui - A ratatui backend that is also an egui widget. Deploy on web with WASM or ship natively with bevy, macroquad, or eframe. (📦 Libraries / 🏗️ Frameworks)
README
# egui_ratatui : egui widget + ratatui backend (WASM)
[![Crates.io](https://img.shields.io/crates/v/egui_ratatui.svg)](https://crates.io/crates/egui_ratatui)
[![Documentation](https://docs.rs/egui_ratatui/badge.svg)](https://docs.rs/egui_ratatui/latest/egui_ratatui/)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/bevyengine/bevy/blob/master/LICENSE)
[![Downloads](https://img.shields.io/crates/d/egui_ratatui.svg)](https://crates.io/crates/egui_ratatui) + [![Downloads](https://img.shields.io/crates/d/ratframe.svg)](https://crates.io/crates/ratframe)Discord: https://discord.gg/tDBPkdgApN https://discord.gg/tDBPkdgApN
See Bevy and Macroquad folders for game engine examples
Web Demo : https://gold-silver-copper.github.io/ (works best on firefox)
See also:
https://ratatui.rs/
https://github.com/emilk/eguiRataguiBackend is the name of the backend/widget in code
`cargo add egui_ratatui`
`git clone https://github.com/gold-silver-copper/egui_ratatui.git`
`cd egui_ratatui`
`cd bevy_example`
`cargo run`
This repo provides the Ratagui Backend, which is also a Widget for egui. So you can have a whole ratatui terminal inside of egui. Also since egui is so WASM compatible, this means we can use this to compile ratatui to WASM !
If you would like more information about compiling to WASM please consult the relevant EGUI backend documentation:
Bevy: https://bevy-cheatbook.github.io/platforms/wasm.html
Macroquad: https://macroquad.rs/articles/wasm/
eframe: https://github.com/emilk/eframe_template
![](https://github.com/gold-silver-copper/egui_ratatui/blob/main/tyorhun.gif)
![](https://github.com/gold-silver-copper/egui_ratatui/blob/main/screen1.png)
![](https://github.com/gold-silver-copper/egui_ratatui/blob/main/screen2.png)Previously this repo was called 'ratatatui_egui_wasm' and the crate was called 'ratframe' , I decided to rename it to egui_ratatui for clarity and discoverability , please see the PRE-RENAME branch for the last version of ratframe.
Warning: seems theres currently a weird bug with high DPI displays that can break the render a bit. This bug is also pushing me to remove the internal use of the Label widget for wrapping the text layout. Will do that soon enough.