Easy-to-use rust GUI library, with an api heavily based on pysimplegui's.
Current features:
- Automatic layout using just vec![] 2d arrays.
- Widgets : Text, Button, CheckBox, Radio, [Text]Input, Slider, Separator
- Customisable widget size, padding, color
- Boilerplate for adding new back-ends (somewhat modular)
Future plans:
-
More backends.
-
Fix some akwardness in the API.
-
Add more functionality. (Custom colours, etc)
-
Prepare crate for cargo
Here's the pysimplegui example translated to rust:
use rustsimplegui as sg;
fn main() {
let layout = vec![ vec![sg::text("What's your name?")],
vec![sg::input()],
vec![sg::button("Ok")] ];
let window = sg::window("Window Title", layout);
let (_event, values) = window.read();
println!("Hello {}! Thanks for trying RustSimpleGUI", values[0]);
window.close();
}
Yields:
rsg_tk - Tkinter (Tcl/wish) backend for rsg, built on top of :
rstk - Modified version of https://crates.io/crates/rstk
rsg_core - core data structures shared by all backends, and user.
rustsimplegui - interface between backends <-> user.
example - How to use.