rui
Experimental Rust UI library for Audulus. "rui" is a temporary name.
Looks like this:
fn counter(start: usize) -> impl View {
state(start, |count: State<usize>| {
let count2 = count.clone();
let value_string = format!("value: {:?}", *count.get());
stack! {
text(value_string.as_str());
button("increment", move || {
*count.get() += 1;
});
button("decrement", move || {
*count2.get() -= 1;
})
}
})
}
- Encode UI in types to ensure stable identity.
- Use immediate mode initially, then optimize to reduce redraw later.
- Use a forthcoming rust port of vger for rendering.
References
Towards principled reactive UI