Well optimized ring buffer library in rust

Hello everyone,

I am looking for a ring buffer library in rust with the following specs:

  1. Highly efficient with enqueue and dequeue operations, it would be nice to have bulk enqueue and dequeue support
  2. Support for MPMC
  3. Producers and consumers could be on different threads
  4. The size should be fixed so that it could be allocated on the heap

Any suggestions on good options available?

I don't get this criterion; the heap is perfectly suited for allocating dynamically-sized values.

Anyway, there is VecDeque in std, which you can wrap in an Arc<Mutex<_>>. Wouldn't that work for you?

1 Like

Two popular options are:

3 Likes

While it's been quite a while since last development, I have never been able to find a faster and more versatile one than multiqueue

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.