Skip to main content

Crate rustview

Crate rustview 

Source
Expand description

§RustView — A Streamlit/Gradio Equivalent for Pure Rust

RustView lets any Rust developer turn a function into a live browser UI with a single macro call — no HTML, no JavaScript, no build toolchain required.

§Quick Start

use rustview::prelude::*;

fn app(ui: &mut Ui) {
    let name = ui.text_input("Your name", "World");
    let times = ui.int_slider("Repeat", 1..=10);
    for _ in 0..times {
        ui.write(format!("Hello, {}!", name));
    }
}

fn main() {
    rustview::run(app);
}

Re-exports§

pub use interface::Interface;

Modules§

cache
interface
Interface mode — Gradio-style fn → UI automatic generation.
prelude
Prelude — import everything needed to write a RustView app.
server
session
testing
Testing utilities for RustView applications.
ui
vdom
widgets

Functions§

run
Run the RustView application with default configuration.
run_async
Run the RustView application from within an existing async context.
run_async_with_config
Run the RustView application from within an existing async context, with custom configuration.
run_with_config
Run the RustView application with custom configuration.

Attribute Macros§

app
Re-export proc macros. Marks a function as a RustView application entry point.
cached
Re-export proc macros. Caches the return value of a function based on its arguments.