16 stable releases

new 4.5.0 Mar 29, 2026
4.4.0 Mar 29, 2026
4.0.3 Feb 22, 2026
3.5.0 Feb 19, 2026
0.1.8 Jan 22, 2026

#181 in Video


Used in 8 crates (5 directly)

MIT/Apache

315KB
7.5K SLoC

clasp-transport

Transport layer implementations for CLASP (Creative Low-Latency Application Streaming Protocol).

Supported Transports

Transport Feature Flag Description
WebSocket websocket (default) Primary transport for browser and server communication
QUIC quic Low-latency UDP-based transport with TLS 1.3
TCP tcp Reliable streaming transport
UDP udp Lightweight datagram transport for LAN
WebRTC webrtc P2P data channels with NAT traversal
BLE ble Bluetooth Low Energy GATT service
Serial serial Hardware serial port communication

Usage

use clasp_transport::WebSocketTransport;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let transport = WebSocketTransport::connect("ws://localhost:7330").await?;

    // Send messages
    transport.send(message).await?;

    // Receive messages
    while let Some(msg) = transport.recv().await {
        println!("Received: {:?}", msg);
    }

    Ok(())
}

Features

  • Async/await with Tokio
  • Automatic frame encoding/decoding
  • Connection health monitoring
  • TLS support

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–55MB
~770K SLoC