Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 6, 2023. It is now read-only.
/tui-rsPublic archive

Build terminal user interfaces and dashboards using Rust

License

NotificationsYou must be signed in to change notification settings

fdehau/tui-rs

Repository files navigation

⚠️August 2023: This crate is no longer maintained. Seehttps://github.com/ratatui-org/ratatui for an actively maintained fork.⚠️

Build StatusCrate StatusDocs Status

Demo cast under Linux Termite with Inconsolata font 12pt

tui-rs is aRust library to build rich terminaluser interfaces and dashboards. It is heavily inspired by theJavascriptlibraryblessed-contrib and theGo librarytermui.

The library supports multiple backends:

The library is based on the principle of immediate rendering with intermediatebuffers. This means that at each new frame you should build all widgets that aresupposed to be part of the UI. While providing a great flexibility for rich andinteractive UI, this may introduce overhead for highly dynamic content. So, theimplementation try to minimize the number of ansi escapes sequences generated todraw the updated UI. In practice, given the speed ofRust the overhead rathercomes from the terminal emulator than the library itself.

Moreover, the library does not provide any input handling nor any event system andyou may rely on the previously cited libraries to achieve such features.

I'm actively looking for help maintaining this crate. Seethis issue

Rust version requirements

Since version 0.17.0,tui requiresrustc version 1.56.1 or greater.

Demo

The demo shown in the gif can be run with all available backends.

# crosstermcargo run --example demo --release -- --tick-rate 200# termioncargo run --example demo --no-default-features --features=termion --release -- --tick-rate 200

wheretick-rate is the UI refresh rate in ms.

The UI code is inexamples/demo/ui.rs while theapplication state is inexamples/demo/app.rs.

If the user interface contains glyphs that are not displayed correctly by your terminal, you may want to runthe demo without those symbols:

cargo run --example demo --release -- --tick-rate 200 --enhanced-graphics false

Widgets

The library comes with the following list of widgets:

Click on each item to see the source of the example. Run the examples with withcargo (e.g. to run the gauge examplecargo run --example gauge), and quit by pressingq.

You can run all examples by runningcargo make run-examples (requirecargo-make that can be installed withcargo install cargo-make).

Third-party widgets

Apps using tui

Alternatives

You might want to checkoutCursive for analternative solution to build text user interfaces in Rust.

License

MIT

About

Build terminal user interfaces and dashboards using Rust

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors87

Languages


[8]ページ先頭

©2009-2025 Movatter.jp