You can build a text-based interface that will run in the terminal using Dioxus.
Note: this book was written with HTML-based platforms in mind. You might be able to follow along with TUI, but you'll have to adapt a bit.
TUI support is currently quite experimental. But, if you're willing to venture into the realm of the unknown, this guide will get you started.
Start by making a new package and adding Dioxus and the TUI renderer as dependancies.
cargo new --bin demo
cd demo
cargo add dioxus
cargo add dioxus-tui
Then, edit your main.rs
with the basic template.
{{#include ../../../examples/hello_world_tui.rs}}
To run our app:
cargo run
Press "ctrl-c" to close the app. To switch from "ctrl-c" to just "q" to quit you can launch the app with a configuration to disable the default quit and use the root TuiContext to quit on your own.
{{#include ../../../examples/hello_world_tui_no_ctrl_c.rs}}