ourobuf

Crates.ioourobuf
lib.rsourobuf
version0.1.1
created_at2025-01-23 22:28:57.286479+00
updated_at2025-01-23 22:28:57.286479+00
descriptionA no_std circular buffer with constant-time operations
homepage
repositoryhttps://github.com/xvi-xv-xii-ix-xxii-ix-xiv/ourobuf
max_upload_size
id1528561
size15,008
Ingvar (xvi-xv-xii-ix-xxii-ix-xiv)

documentation

https://docs.rs/ourobuf

README

๐ŸŒ€ 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(())
}
Commit count: 4

cargo fmt