8 stable releases
| new 4.1.0 | Mar 6, 2026 |
|---|---|
| 4.0.3 | Feb 22, 2026 |
| 3.3.1 | Feb 18, 2026 |
| 3.3.0 | Jan 26, 2026 |
| 0.1.5 | Jan 17, 2026 |
#805 in Web programming
230KB
5.5K
SLoC
clasp-wasm
WebAssembly bindings for CLASP (Creative Low-Latency Application Streaming Protocol).
Features
- Browser Support - Use CLASP directly in web browsers
- wasm-bindgen - Seamless JavaScript interop
- Async/Await - Native Promise support
Installation
npm install @clasp-to/wasm
Or build from source:
wasm-pack build --target web
Usage
import init, { ClaspWasm } from '@clasp-to/wasm';
await init();
const client = new ClaspWasm('ws://localhost:7330');
await client.connect();
// Set a parameter
await client.set('/lights/brightness', 0.75);
// Get a parameter
const value = await client.get('/lights/brightness');
// Subscribe to changes
client.subscribe('/lights/*', (value, address) => {
console.log(`${address} = ${value}`);
});
await client.close();
Building
# Install wasm-pack
cargo install wasm-pack
# Build for web
wasm-pack build --target web
# Build for Node.js
wasm-pack build --target nodejs
Documentation
Visit clasp.to for full documentation.
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Maintained by LumenCanvas | 2026
Dependencies
~9–13MB
~220K SLoC