clasp-embedded
Minimal no_std implementation of the standard CLASP v3 protocol for embedded devices.
Features
- v3 Protocol Compatible - Same wire format as desktop/cloud CLASP
- no_std + no_alloc - Works without heap allocation
- Client + Server - Both modes supported
- ~3KB RAM - Suitable for ESP32, RP2040, etc.
Usage
Client Mode
use ;
Server Mode (MiniRouter)
use MiniRouter;
use Value;
Memory Budget
| Component | Size |
|---|---|
Client |
~3KB |
MiniRouter |
~4KB |
| State cache (32 entries) | ~2KB |
ESP32: Uses <2% of available 320KB SRAM.
Features (Cargo.toml)
[]
= { = "0.1", = ["client"] }
# Or for server mode:
= { = "0.1", = ["server"] }
# Or both:
= { = "0.1", = ["client", "server"] }
Protocol Compatibility
Messages are 100% compatible with the full CLASP router. An ESP32 running clasp-embedded can:
- Connect to a cloud/desktop CLASP router as a client
- Act as a local hub (MiniRouter) that sensors connect to
- Forward messages to a main router
Supported Platforms
- ESP32 (Xtensa, RISC-V)
- RP2040 / Raspberry Pi Pico
- ARM Cortex-M
- Any platform with
no_stdRust support
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Maintained by LumenCanvas