Loading repository data…
Loading repository data…
EdgeTypE / repository
A Streamlit/Gradio equivalent for pure Rust. Build live browser UIs in seconds with no HTML, CSS, or JS required.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
A Streamlit/Gradio equivalent for pure Rust. Write a plain Rust function, and RustView turns it into a live browser UI -- no HTML, no JavaScript, no frontend build step.
The project is under active development. The core widget set and layout system are usable today, but the API is not yet stable. Expect breaking changes before a 1.0 release.
If you've used Streamlit or Gradio in Python, you know how fast you can go from an idea to a working UI. RustView brings that same experience to Rust. No HTML, no CSS, no JavaScript, no npm, no build step. Just a function.
This makes it a good fit when you already have Rust code and want to put a UI on it without switching languages or maintaining a separate frontend. Internal tools, ML model demos, data explorers, system dashboards: anything where you want a real browser UI without the overhead of a full web stack.

Add the dependency to your Cargo.toml:
[dependencies]
rustview = "0.1.5"
Or use cargo add:
cargo add rustview
Write your app:
use rustview::prelude::*;
fn app(ui: &mut Ui) {
let name = ui.text_input("Your name", "World");
let times = ui.int_slider("Repeat", 1..=10, 3);
for _ in 0..times {
ui.write(format!("Hello, {}!", name));
}
}
fn main() {
rustview::run(app);
}
Run it:
cargo run
# opens http://127.0.0.1:8501
RustView ships 50+ widgets across these categories:
| Category | Widgets |
|---|---|
| Input | text_input, int_slider, slider, checkbox, button, toggle, radio, select, selectbox, multi_select, text_area, number_input, int_input, color_picker, date_picker, file_upload, image_upload |
| Output | write, heading, subheading, caption, markdown, code, json, table, dataframe, metric, progress, spinner, divider, badge, link |
| Alerts | success, warning, info, error, toast |
| Media | image, audio, video, download_button |
| Layout | container, sidebar, columns, tabs, expander, row, modal, empty |
| Forms | form, form_submit_button |
| Charts | line_chart, bar_chart, scatter_chart, histogram |
| Theming | Theme struct with CSS custom properties |
Full API docs: docs/widgets.md
Four runnable examples are included:
cargo run --example hello # minimal text-in / text-out
cargo run --example counter # stateful counter with buttons
cargo run --example dashboard # multi-column layout with charts
cargo run --example showcase # every widget on a single page
Here are some projects powered by RustView:
use rustview::server::RustViewConfig;
let config = RustViewConfig {
bind: "0.0.0.0:8080".parse().unwrap(),
title: "My Dashboard".into(),
session_ttl_secs: 3600,
max_upload_bytes: 10_000_000,
..Default::default()
};
rustview::run_with_config(app, config);
Themes are customizable through a Theme struct:
use rustview::server::{RustViewConfig, Theme};
let config = RustViewConfig {
theme: Theme {
background: "#ffffff".into(),
foreground: "#1a1a1a".into(),
primary: "#0066ff".into(),
..Theme::default()
},
..Default::default()
};
Every widget remembers its value across re-renders automatically. For
user-defined state, use get_state and set_state:
fn counter(ui: &mut Ui) {
let count = ui.get_state::<i64>("n", 0);
if ui.button("Increment") {
ui.set_state("n", count + 1);
}
ui.write(format!("Count: {}", ui.get_state::<i64>("n", 0)));
}
For simple input-to-output functions, the Gradio-style Interface API avoids
writing any UI code:
use rustview::prelude::*;
fn greet(name: String) -> String {
format!("Hello, {}!", name)
}
fn main() {
Interface::from_fn(greet)
.title("Greeter")
.description("Type a name to greet")
.launch();
}
RustView uses a thin-client / server-rendered model:
#[cached] proc-macro can cache expensive computations across renders.See docs/architecture.md for a detailed walkthrough.
The TestUi harness lets you unit-test apps without starting a server:
use rustview::testing::TestUi;
#[test]
fn test_counter() {
let mut t = TestUi::new();
t.run(|ui| {
let n = ui.get_state::<i64>("n", 0);
if ui.button("Inc") { ui.set_state("n", n + 1); }
ui.write(format!("Count: {}", ui.get_state::<i64>("n", 0)));
});
assert!(t.contains_text("Count: 0"));
t.click_button("Inc");
t.run(|ui| {
let n = ui.get_state::<i64>("n", 0);
if ui.button("Inc") { ui.set_state("n", n + 1); }
ui.write(format!("Count: {}", ui.get_state::<i64>("n", 0)));
});
assert!(t.contains_text("Count: 1"));
}
The list below reflects what exists today and what is planned. Items may shift depending on community feedback.
Done
#[cached] proc-macroNear-term
Medium-term
Long-term
See CONTRIBUTING.md for setup instructions, coding guidelines, and how to submit a pull request.