# MaJerle/lwrb

Lightweight generic ring buffer manager library

Repository: https://github.com/MaJerle/lwrb
Canonical: https://ross.abutalabs.com/products/lwrb
Language: C
License: MIT
License Family: permissive
Topics: ring, ring-buffer, c, library, generic, manager, cyclic, cyclic-buffer, buffer, fifo, pipe
Last push: 2026-08-21T16:02:27+00:00

## Health v2 (maintenance only)
Score: 87/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 65, longevity 100
- inputs: {"age_days": 2789, "days_push": 12, "days_rel": 20, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1526, forks 352 (observed 2026-08-28T04:04:58.350568+00:00)

## What it is
lwrb is a lightweight, platform-independent C library implementing a generic FIFO ring (cyclic) buffer with no dynamic memory allocation. It supports zero-copy DMA transfers, peek/skip/advance operations, event notifications, and is thread/interrupt-safe for single-producer single-consumer use on CPUs with atomic size_t access.

## Use cases
- implement a fifo byte buffer in embedded c
- buffer uart or spi data with dma zero-copy
- single producer single consumer pipe between isr and main loop
- cyclic buffer without dynamic memory allocation
- peek and skip bytes in a stream buffer
- ring buffer for serial communication on stm32

## When to choose
- you need a small, dependency-free C ring buffer for embedded systems
- you want interrupt/DMA-safe single-writer single-reader buffering
- no dynamic allocation is allowed on your target

## When to avoid
- you need multi-producer multi-consumer thread-safe queues
- you want a high-level language buffer with dynamic resizing
- your platform requires atomic protection you cannot provide

## Facets
- artifact type: library
- maturity: stable
- function: caching, concurrency, developer-tools
- domain: embedded-systems, developer-tools
- platform: c, embedded, cross-platform, windows
- tags: ring-buffer, fifo, no-dynamic-allocation, dma, interrupt-safe, embedded-c, algorithms, linux, macos

## Member repositories
- MaJerle/lwrb (main) score 87

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:58.350568+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:31:35.672751+00:00, confidence not recorded.
  - readme: https://github.com/MaJerle/lwrb (fetched 2026-08-28T04:04:58.350568+00:00, sha d8b49b94f4ea)
- Data as of 2026-08-30T08:39:29.467469+00:00.
