ff_buffer

Crates.ioff_buffer
lib.rsff_buffer
version0.1.0
sourcesrc
created_at2023-09-30 14:43:48.714253
updated_at2023-09-30 14:43:48.714253
descriptionA fork of ff_buffer that provides FastFlow channels on Rust.
homepagehttps://github.com/valebes/ppl-ff-buffer
repositoryhttps://github.com/valebes/ppl-ff-buffer
max_upload_size
id988675
size37,028
Valerio Besozzi (valebes)

documentation

README

FF Buffer

Fork of the FF Buffer by Luca Rinaldi. This fork is used in PPL for the channel backend based on FastFlow.

FF Buffer

An ongoing porting of the C++ FastFlow lock-free queue to Rust.

The library is a simple interface that mimics the mpsc queue of standard Rust and internally uses the C++ implementation of the FastFlow unbounded lock-free buffer.

Build

The library relies on the quite new cross language linking time optimization of LLVM (more), thus the building is not straightforward, for now.

The building process requires that the LLVM version of clang and lld match the one of rustc. I currently use clang version 8.0.0 with rustc version 1.37.0 that both have the LLVM 8. For the complete compatibility list see the table here.

Dependency

Ubuntu 19 comes with LLVM 8 on the main repository, thus just:

sudo apt install clang-8 lld-8

In other Ubuntu/Debian version use this external repository.

Build guide

Download the FastFlow library in the home directory

cd ~
git clone https://github.com/fastflow/fastflow.git

Download the ff_buffer repository and cd inside

git clone https://github.com/lucarin91/ff_buffer.git
cd ff_buffer

Than, using cargo it is possible to build the library, run the example or execute the benchmarks.

cargo build --release
cargo run --example simple
cargo bench

License

MIT license

Commit count: 39

cargo fmt