| Crates.io | clasp-client |
| lib.rs | clasp-client |
| version | 3.1.0 |
| created_at | 2026-01-16 04:35:40.695454+00 |
| updated_at | 2026-01-25 07:23:40.404779+00 |
| description | CLASP client library |
| homepage | https://clasp.to |
| repository | https://github.com/lumencanvas/clasp |
| max_upload_size | |
| id | 2047902 |
| size | 191,815 |
Async client library for CLASP (Creative Low-Latency Application Streaming Protocol).
use clasp_client::{Clasp, ClaspBuilder};
#[tokio::main]
async fn main() -> anyhow::Result<()> {
// Connect using builder
let client = ClaspBuilder::new("ws://localhost:7330")
.name("My App")
.connect()
.await?;
// Set a parameter
client.set("/lights/front/brightness", 0.75.into()).await?;
// Get a parameter
let value = client.get("/lights/front/brightness").await?;
println!("Brightness: {:?}", value);
// Subscribe to changes
let _unsub = client.subscribe("/lights/*", |value, addr| {
println!("{} = {:?}", addr, value);
}).await?;
// Close connection
client.close().await?;
Ok(())
}
Visit clasp.to for full documentation.
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Maintained by LumenCanvas | 2026