witas

Crates.iowitas
lib.rswitas
version0.11.2
sourcesrc
created_at2022-11-22 07:28:28.217211
updated_at2023-10-10 01:17:36.48693
descriptionAn asynchronous window library in Rust for Windows
homepage
repositoryhttps://github.com/LNSEAB/witas
max_upload_size
id720664
size184,141
LNSEAB (LNSEAB)

documentation

https://docs.rs/witas

README

witas

wita at crates.io wita at docs.rs

An asynchronous window library in Rust for Windows

The simple example

#[tokio::main]
async fn main() {
    let mut rx = witas::EventReceiver::new();
    let _window = witas::Window::builder()
        .title("witas hello")
        .inner_size(witas::LogicalSize::new(640, 480))
        .set_receiver(&rx)
        .await
        .unwrap();
    loop {
        let (event, _) = rx.recv().await; 
        println!("{:?}", event);
        if let witas::Event::Closed = event {
            break;
        }
    }
}

Licensed under MIT License

Copylight (c) 2022 LNSEAB

Commit count: 69

cargo fmt