clasp-wasm

Crates.ioclasp-wasm
lib.rsclasp-wasm
version3.0.1
created_at2026-01-17 00:47:04.803567+00
updated_at2026-01-24 01:00:47.645709+00
descriptionCLASP WebAssembly bindings
homepage
repository
max_upload_size
id2049614
size86,470
Moheeb Zara (virgilvox)

documentation

README

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

Commit count: 0

cargo fmt