rebind-client
Rust client for the Rebind remote access WebSocket protocol. Async, typed, built on tokio.
Install
[]
= "0.2"
Quick start
use RebindClient;
async
Read input state
let keys = client.input_keys.await?;
let mods = client.input_modifiers.await?;
let shift_held = client.input_is_down.await?;
Screen sampling
let = ;
// sample center pixel
let px = client.screen_pixel.await?;
// react to a specific on-screen color (e.g. a UI state in a QA test)
if px.r > 200 && px.g < 50 && px.b < 50
Window management
if let Some = client.window_find.await?
Clipboard
let text = client.clipboard_get.await?;
client.clipboard_set.await?;
Any server command
Commands without a typed method are reachable through call, which takes a
JSON object of arguments and returns the reply:
use json;
let r = client.call.await?;
println!;
Auth
let client = connect_with_token.await?;
Concurrent RPCs
The client is cheaply clonable via Arc for use across tasks:
use Arc;
let client = new;
let c1 = client.clone;
let c2 = client.clone;
let = join!;
Links
- crates.io: rebind-client
- GitHub: usinput/rebind-client-rs
- Docs: docs.rebind.gg