19 releases

0.2.0 Sep 12, 2020
0.1.6 Jun 1, 2020
0.1.5 May 23, 2020
0.1.4 Apr 25, 2020
0.1.0-alpha2 Nov 19, 2019

#28 in #event-stream

Download history 36/week @ 2024-06-10 67/week @ 2024-06-17 69/week @ 2024-06-24 27/week @ 2024-07-08 74/week @ 2024-07-15 59/week @ 2024-07-22 68/week @ 2024-07-29 55/week @ 2024-08-05 94/week @ 2024-08-12 52/week @ 2024-08-19 66/week @ 2024-08-26 62/week @ 2024-09-02 55/week @ 2024-09-09 52/week @ 2024-09-16 70/week @ 2024-09-23

252 downloads per month
Used in 4 crates (2 directly)

MIT/Apache

58KB
1.5K SLoC

blinds

blinds covers up the details of your windowing for you, by providing an async API.

use blinds::{run, Event, EventStream, Key, Settings, Window};

fn main() {
    run(Settings::default(), app);
}

async fn app(_window: Window, mut events: EventStream) {
    loop {
        while let Some(ev) = events.next_event().await {
            println!("{:?}", ev);
        }
    }
}

lib.rs:

blinds covers up the details of your windowing for you, by providing an async API.

A quick example of some code that prints all incoming events:

use blinds::{run, Event, EventStream, Key, Settings, Window};

run(Settings::default(), app);

async fn app(_window: Window, mut events: EventStream) {
    loop {
        while let Some(ev) = events.next_event().await {
            println!("{:?}", ev);
        }
    }
}

The core of blinds is run, which executes your app and provides your Window and EventStream instances.

Dependencies

~0.6–13MB
~158K SLoC