#circular #circular-buffer #ring-buffer #sorting #data #heap-allocated #slice

kirkos

Lightweight no_std heap-allocated circular buffer implementation

1 unstable release

0.1.0 Sep 26, 2024

#997 in Algorithms

Download history 108/week @ 2024-09-21 40/week @ 2024-09-28 5/week @ 2024-10-05 7/week @ 2024-10-12 2/week @ 2024-10-19

81 downloads per month

MIT license

31KB
712 lines

A simple ring buffer tailored for maintaining sorted data. A typical usecase is when handling almost-chronological data that might be slightly off.

The name halo is already taken on crates.io, and kirkos is the Greek for circle, so here we are.


lib.rs:

A heap-allocated ring buffer targeted for sorted data using only core features.

The buffer can retrieve a contiguous slice on demand with no additional copies. It supports slicing and insertion for comparable elements. Insertion only discards older elements when necessary and moves the minimum number of elements. Sorting is also available.

No runtime deps