Cargo Features

[dependencies]
ringbuf = { version = "0.4.8", default-features = false, features = ["std", "alloc", "portable-atomic", "bench"] }
default = std

The std feature is set by default whenever ringbuf is added without default-features = false somewhere in the dependency tree.

std default = alloc

Enables std of optional portable-atomic and optional portable-atomic-util

portable-atomic:

Use std.

Affects consumer::Consumer.write_into, producer::Producer.read_from

alloc std

Enables alloc of optional portable-atomic-util

portable-atomic-util:

Use alloc.

Note:

  • The MSRV when this feature is enabled and the std feature is not enabled is Rust 1.36 that alloc crate stabilized.

Affects alias::HeapRb, alias::HeapProd, alias::HeapCons, storage::Heap, utils::vec_to_uninit, utils::boxed_slice_to_uninit

portable-atomic

Enables portable-atomic and portable-atomic-util

test_local bench