What it solves
Predictable persistent data on constrained firmware.
How it works
Use it when
Quick Start
#include "lox.h"
#include "lox_port_ram.h"
lox_t db; lox_storage_t storage;
lox_cfg_t cfg = {0};
if (lox_port_ram_init(&storage, 64u * 1024u) != LOX_OK) return 1;
cfg.storage = &storage; cfg.ram_kb = 32u;
if (lox_init(&db, &cfg) != LOX_OK) return 1;
uint8_t value = 7u;
if (lox_kv_put(&db, "k", &value, sizeof value) != LOX_OK) return 1;
/* Expected: LOX_OK; key k contains one byte with value 7. */Real scenarios
Install it from the PlatformIO Registry
Predictable-memory C99 database with key-value, time-series and small relational engines, optional WAL recovery, and direct installation from PlatformIO or the Arduino Library Manager.
Find and install loxdb in the Arduino Library Manager
Predictable-memory C99 database with key-value, time-series and small relational engines, optional WAL recovery, and direct installation from PlatformIO or the Arduino Library Manager.
Store configuration or binary state by key
Predictable-memory C99 database with key-value, time-series and small relational engines, optional WAL recovery, and direct installation from PlatformIO or the Arduino Library Manager.
Engineering evidence
- The public repository publishes PlatformIO library.json and Arduino library.properties manifests
- 595 microtest cases across 61 C test files plus one C++ wrapper test are documented by the current repository
- Evidence matrix separates source-visible, host-tested and hardware claims
- ESP32-S3 published measurements use an in-RAM flash-like backend, not physical NOR or brownout testing
Known limits
- Not a SQL database or multi-process server
- No unbounded queries, transparent large-object storage or advanced indexing
- The core allocation guarantee excludes ports and user callbacks