1 unstable release

new 0.1.1 Jan 23, 2025

#350 in Embedded development

Download history 103/week @ 2025-01-21

103 downloads per month

MIT license

14KB
171 lines

๐ŸŒ€ Ourobuf

Crates.io Docs.rs License

Thread-safe circular buffer for embedded systems and high-performance applications

Features โœจ

  • ๐Ÿ›ก๏ธ 100% Safe Rust with no_std support
  • โšก Constant-time O(1) operations
  • ๐Ÿ”’ Spinlock-based thread safety
  • ๐Ÿ“ Configurable size via const generics
  • ๐Ÿ”„ Heapless Vec integration
  • ๐Ÿ”‹ Zero allocations
  • ๐Ÿงผ Memory zeroization

Designed For ๐ŸŽฏ

  • Real-time data streaming (sensors, network packets)
  • Interrupt-safe logging
  • Lock-free inter-thread communication
  • Embedded systems (no_std)
  • High-throughput data pipelines

Quick Start ๐Ÿš€

use ourobuf::OuroBuffer;

fn main() -> Result<(), ourobuf::OuroBufferError> {
    // Create 256-byte buffer
    let buf = OuroBuffer::<256>::new();

    // Write data
    buf.push(b"Hello")?;

    // Read data
    let mut output = [0u8; 5];
    let read = buf.pop(&mut output);

    assert_eq!(&output[..read], b"Hello");
    Ok(())
}

Dependencies

~250KB