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

#37 in #event-stream

Download history 62/week @ 2024-09-18 106/week @ 2024-09-25 42/week @ 2024-10-02 20/week @ 2024-10-09 45/week @ 2024-10-16 40/week @ 2024-10-23 63/week @ 2024-10-30 45/week @ 2024-11-06 16/week @ 2024-11-13 39/week @ 2024-11-20 64/week @ 2024-11-27 68/week @ 2024-12-04 170/week @ 2024-12-11 70/week @ 2024-12-18 4/week @ 2024-12-25 53/week @ 2025-01-01

302 downloads per month
Used in 5 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
~159K SLoC