webui-rs 0.1.0

A lightweight, idiomatic Rust wrapper for WebUI.
Documentation
1
2
3
4
5
6
7
8
9
use webui::*;

fn main() -> Result<(), WebUIError> {
    let window = Window::new();
    window.bind("say_hello", |_| println!("Hello, world!"));
    window.show(r#"<html><head><title>Hello, world!</title><script src="webui.js"></script></head><body><button onclick="say_hello()">Hello</button></body></html>"#)?;
    wait();
    Ok(())
}