#ring-buffer #lock-free #byte #linux #sender-receiver #first-byte #kfifo

nightly fifo

First-in-first-out lock-free ring-buffer like kfifo in Linux

5 releases

Uses old Rust 2015

0.2.0 Apr 12, 2017
0.1.5 Apr 7, 2017
0.1.4 Apr 2, 2017
0.1.3 Mar 30, 2017
0.1.2 Mar 28, 2017

#62 in #ring-buffer

MIT license

14KB
287 lines

fifo

Fifo is a first-in-first-out bytes ring-buffer, like kfifo in Linux.

Build Status

API documentation

Features

  • Sender and Receiver implements Write and Read, like mpsc::channel.
  • splice style zero-copy when write into and read from the ring-buffer.
  • lock-free concurrent access between one producer and one consumer.

Usage

To use fifo, first add this to your Cargo.toml:

fifo = "0.1.*"

Then, add this to your crate root:

extern crate fifo;

Examples

Here is an example.

Contributing

For simple bug fixes, just submit a PR with the fix and we can discuss the fix directly in the PR. If the fix is more complex, start with an issue.

If you want to propose an API change, create an issue to start a discussion with the community. Also, feel free to talk with us in the IRC channel.

No runtime deps