LOX · Liquid Oxygen for Embedded Systems

LOX DB

Predictable persistent data on constrained firmware.

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.

Install fromPlatformIO RegistryArduino Library ManagerSearch for loxdb in either library manager.
Stablev1.5.3MITC99
Last verified
2026-08-17
Platform scope
Portable C99; integration depends on caller-provided adapters

What it solves

Predictable persistent data on constrained firmware.

How it works

1Application2LOX DB3KV / TS / REL4WAL5storage HAL

Use it when

Install it from the PlatformIO Registry
Find and install loxdb in the Arduino Library Manager
Store configuration or binary state by key
Keep typed telemetry streams with retention policies
Use small indexed fixed-schema tables
Recover a storage-backed database after an interrupted write

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

01

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.

02

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.

03

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