#gui #windows

witas

An asynchronous window library in Rust for Windows

15 releases (8 breaking)

0.9.0 Apr 18, 2023
0.7.0 Apr 11, 2023
0.6.2 Mar 23, 2023
0.5.0 Dec 13, 2022
0.2.0 Nov 23, 2022

#247 in GUI

Download history 8/week @ 2023-01-25 11/week @ 2023-02-01 16/week @ 2023-02-08 24/week @ 2023-02-15 13/week @ 2023-02-22 22/week @ 2023-03-01 27/week @ 2023-03-08 26/week @ 2023-03-15 24/week @ 2023-03-22 33/week @ 2023-03-29 38/week @ 2023-04-05 45/week @ 2023-04-12 26/week @ 2023-04-19 11/week @ 2023-04-26 23/week @ 2023-05-03 21/week @ 2023-05-10

91 downloads per month
Used in mltg

MIT license

145KB
4.5K SLoC

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


lib.rs:

An asynchronous window library in Rust for Windows

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;
        }
    }
}

Dependencies

~173MB
~3M SLoC