A lightweight LwM2M 1.0/1.1 client library in pure Rust, targeting embedded Linux hosts and ESP-IDF (ESP32-S3) devices. Lekki is Polish for "lightweight" — a nod to Lightweight M2M.
| Crate | Role |
|---|---|
crates/lekki |
Protocol core: CoAP message + exchange layers, data-model dispatch, registration, firmware update. No sockets — transport and clock are trait seams. |
crates/lekki-mbedtls |
UdpTransport + DtlsTransport (DTLS-PSK). mbedTLS backend cfg-switched: esp-idf-sys on device, mbedtls-host-sys on host. |
crates/mbedtls-host-sys |
FFI bindings over the vendored mbedTLS (vendor/mbedtls) for host builds/tests. |
crates/lekki-testkit |
ScriptedTransport, SimClock, and the self-built pinned Leshan demo server harness. |
Single server, binding U only. No bootstrap, no Queue Mode, no SMS/TCP, no
ACLs. Streaming server→client Block1 uploads, client Block2 pull
downloads (firmware), and client Block1 Register/Update for oversized
object lists are in scope. Phase A is LwM2M 1.0 (TLV); Phase B adds
1.1 + SenML-CBOR behind the lwm2m11 feature; Observe/Notify with
pmin/pmax (poll-and-diff, all-CON) lives behind the default-off observe
feature — without it, Observe is refused with a plain 2.05. See
docs/conformance.md for the deviation ledger.
git submodule update --init # vendor/mbedtls (needed from Step L4 on)
cargo test --workspaceThe Leshan harness image:
docker build -t lekki-leshan crates/lekki-testkit/docker/leshan
docker run --rm -p 8080:8080 -p 5683:5683/udp -p 5684:5684/udp lekki-leshan
curl http://localhost:8080/api/clientsApache-2.0. Vendored/third-party components keep their
own licenses (see deny.toml).