rebind-client 0.1.0

Rust client for the Rebind remote access WebSocket protocol
Documentation

rebind-client

Rust client for the Rebind remote access WebSocket protocol. Async, typed, built on tokio.

Install

[dependencies]
rebind-client = "0.1"

Example

use rebind_client::RebindClient;

#[tokio::main]
async fn main() -> rebind_client::Result<()> {
    let client = RebindClient::connect("ws://127.0.0.1:19561").await?;

    client.hid_move(30, -5);
    client.hid_press("Mouse1", 20);

    let (x, y) = client.system_mouse().await?;
    let pixel = client.screen_pixel(x, y).await?;

    let mut events = client.mouse_events().await?;
    while let Some(pos) = events.recv().await {
        println!("{} {}", pos.x, pos.y);
    }

    client.close().await;
    Ok(())
}

Links