embedmq v0.1.0 — the first release.
A lightweight, zero-dependency C message dispatch library for embedded
Linux and RTOS. Intra-process, thread-to-thread event dispatch with
UUID routing — no string comparison on the hot path.
Highlights
- 3 core functions —
register/post/ handler. Drop-in simple. - Zero dependencies — pure C11, copy the sources and compile.
- Zero heap in static mode — caller-provided buffer, fit for MCU/RTOS.
- UUID dispatch — names hashed once at registration; runtime compares integers.
- Thread-safe
post()— lock-free read, mutex-protected multi-producer write. - Header-only C++ wrapper — lambdas + RAII (
embedmq.hpp).
Platform support (PAL backends)
| Backend | Status |
|---|---|
| Linux | pthreads + POSIX semaphore |
| FreeRTOS | verified on the FreeRTOS POSIX simulator (GCC_POSIX) in CI |
| Bare-metal | C11 atomics spinlock, driven by embedmq_poll() |
Performance (x86-64, Release)
- ~3.0M msgs/sec throughput · ~38 µs avg end-to-end latency · 45M hashes/sec
Quick start
embedmq_t *q = embedmq_create(NULL);
embedmq_register(q, "battery.changed", on_battery, NULL);
embedmq_post(q, "battery.changed", &info, sizeof(info));
Docs
- README (README.md) · API reference (docs/API.md) · Build guide (docs/BUILD.md)
Notes
This is a 0.x release: the API is usable but may still evolve. The
FreeRTOS backend is verified on the POSIX simulator (CI), not yet on
real hardware. Feedback and issues welcome.