pulzr-codec
pulzr-codec
The runtime for IoT device codecs: JavaScript payload formatters and Rust modules, run on WebAssembly with hard limits and a small, versioned host API. Write a codec, test it exactly as it will run, or serve codecs yourself.
- WebAssembly
Rust
- JavaScript
Codecs you already have
The Things Stack and ChirpStack payload formatters, zigbee-herdsman-converters and Z-Wave JS run unchanged, answer for answer.
Devices on a LAN
Plugs, lights and cameras that speak their own protocol over IP: the codec answers each command with the requests to make.
Libraries, only what is used
A codec requires a library's modules by id; only those it uses are bundled into it.
A sandbox with limits
No filesystem, network or clock. Time and memory are bounded, and a failing codec leaves nothing behind.

Crypto in the host
AES, AES-GCM, HMAC, SHA, CRC, base64 and XML as host calls, ten times faster than JavaScript.
Fast
0.13 ms to start a compiled codec, 0.02 ms a warm call, 290 MB for 256 warm codecs.