Thanks to visit codestin.com
Credit goes to lib.rs

1 unstable release

Uses new Rust 2024

0.0.1-alpha.1 Jun 28, 2025

#2008 in GUI

Apache-2.0

465KB
606 lines

🚧 WIP: Zintl - Building GUI with Rust

| Source code | Crates.io | Docs |

Stateful counter app example

use zintl::*;

#[derive(Default)]
struct HelloWorld {
    count: usize,
    context: Context,
}

impl HelloWorld {
    pub fn new(count: usize) -> Self {
        HelloWorld {
            count,
            ...Default::default(),
        }
    }
}

impl Composable for HelloWorld {
    fn compose(&self) -> impl View {
        VStack::new().children(v![
            Label::new("Hello, world!"),
            Label::new(format!("Count: {}", self.count),
            Button::new("Increment").on_click(||
                self.count += 1;
            })
        ])
    }
}

fn main() {
    let app = App::new(
        StatefulView::new::<usize>(marker!(), 0, |value| {
            HelloWorld::new(value)
        }),
    );
    run_app(app);
}

Stay simple, go fast

Dependencies

~8–28MB
~396K SLoC