| Crates.io | jacques |
| lib.rs | jacques |
| version | 0.1.1 |
| created_at | 2025-10-13 02:14:14.335935+00 |
| updated_at | 2025-10-13 02:37:31.368984+00 |
| description | High-performance lock-free MPMC queues with horizontal scaling and zero-allocation operation |
| homepage | https://github.com/0xAeneas/jacques |
| repository | https://github.com/0xAeneas/jacques |
| max_upload_size | |
| id | 1879926 |
| size | 234,238 |
High-performance, lock-free Multi-Producer Multi-Consumer (MPMC) queue library designed for concurrent applications requiring maximum throughput and minimal latency. Based on the queue implementation of Erez Strauss.
MpmcQueue)The foundational lock-free queue for Copy types:
use jacques::{
owned::queue,
traits::{QueueConsumer, QueueProducer},
};
let (producer, consumer) = queue::<u64>().capacity(1024).channels()?;
producer.push(42)?;
assert_eq!(consumer.pop()?, 42);
PointerQueue)Store non-Copy types by wrapping them in Arc<T>:
use jacques::pointer::pointer_queue;
use std::sync::Arc;
#[derive(Debug, Clone, PartialEq)]
struct Message {
id: u64,
data: Vec<u8>,
}
use jacques::traits::{QueueConsumer, QueueProducer};
let (producer, consumer) = pointer_queue::<Message>().capacity(512).channels()?;
let msg = Arc::new(Message {
id: 1,
data: vec![1, 2, 3],
});
producer.push(msg.clone())?;
assert_eq!(consumer.pop()?, msg);
QueuePack)Horizontal scaling with multiple independent queues:
use jacques::pack::queue_pack;
use jacques::traits::{QueueConsumer, QueueProducer};
// 4 queues, scan every 16 operations
let (producer, consumer) = queue_pack::<u64, 4, 16>().queue_capacity(256).channels()?;
producer.push(100)?;
assert_eq!(consumer.pop()?, 100);
Send + SyncAdd this to your Cargo.toml:
[dependencies]
jacques = "0.1"
For full documentation, visit docs.rs/jacques.
Jacques requires Rust 1.88 or later.
Licensed under either of:
at your option.