nidhoggfgg/rsille
概要
The rsille is a Rust library for drawing graphics in the terminal
デザイン・メディアできること
- raster - Yes - An RGB canvas for displaying pixels in terminals that support the Kitty graphics protocol or Sixel.
- overlay - No - Interactive widgets over a running shell and events for tracking shell commands. Also enables raster.
計測したスター増加
- 24時間
- +1
- 7日間
- +6
- 15日間
- +6
- 1か月
- +6
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルrsille
English · 中文
rsille is a Rust framework for building terminal interfaces with widgets and graphics. You can put buttons, text editors, and a drawing canvas in the same layout, then run it inline at the prompt or as a fullscreen application.
Examples
| TUI · Build draggable windows from widgets | Canvas · Draw color graphics with Unicode characters |
|---|---|
![]() |
![]() ![]() |
Math rendering · Typeset with Typst and plot with rsille draw |
overlay · Draw over other TUIs and shells |
|---|---|
![]() ![]() |
![]() |
Quick start
Build a searchable theme picker
Type li to find Light and press Enter to switch the whole palette to light colors. You can also choose a theme with ↑ / ↓. Press Esc to exit.

Add rsille to your Rust project's Cargo.toml.
[dependencies]
rsille = "3"
Put this in src/main.rs and run cargo run.
use rsille::tui::prelude::*;
fn main() -> WidgetResult<()> {
App::new(String::from("Tokyo Night"))
.mode(Mode::Inline)
.with_theme_from(|name| match name.as_str() {
"Light" => Theme::light(),
"Dracula" => Theme::dracula(),
_ => Theme::tokyo_night(),
})
.update(|name, choice, ctx| match choice {
Some(next) => *name = next,
None => ctx.exit(),
})
.view(|name| {
command_palette()
.border(BorderStyle::Rounded)
.title(format!("Theme · {name}"))
.placeholder("Search themes")
.items(["Tokyo Night", "Dracula", "Light"].map(|s| CommandItem::new(s, s)))
.on_submit(Some)
.on_close(|| None)
})
.run()?;
Ok(())
}
Try the Playground
Install the separate rsille-playground package and run rsille to open the interactive demo menu.
cargo install rsille-playground --locked
rsille
You can also open the function plotter with rsille draw or launch the terminal pet with rsille pet. See the Playground guide for all commands and supported terminals.
Cargo features
| Feature | Enabled by default | What it adds |
|---|---|---|
raster |
Yes | An RGB canvas for displaying pixels in terminals that support the Kitty graphics protocol or Sixel. |
overlay |
No | Interactive widgets over a running shell and events for tracking shell commands. Also enables raster. |
To build a shell overlay, enable overlay in Cargo.toml.
[dependencies]
rsille = { version = "3", features = ["overlay"] }
If you only need the core widgets and Unicode canvas, you can set default-features = false on the rsille dependency.
Other resources
- Rust API reference · Widgets and layout · Unicode canvas · Terminal buffers and rendering
- Extension crates for Typst math and syntax highlighting
- rsille coding agent skill · MIT license
関連プロジェクトを探す
読み込み中…





