fremkit

Crates.iofremkit
lib.rsfremkit
version0.1.1
sourcesrc
created_at2022-12-22 22:39:08.500057
updated_at2022-12-23 14:49:37.518429
descriptionA simple broadcast log
homepagehttps://github.com/fiahil/Fremkit
repositoryhttps://github.com/fiahil/Fremkit
max_upload_size
id744145
size10,277,936
Quentin Leffray (fiahil)

documentation

README

Fremkit

Crates.io docs.rs

Fremkit is a simple broadcast log.

A Log's primary use case is to store an immutable sequence of messages, events, or other data, and to allow multiple readers to access the data concurrently.

Features

  • Bounded log structure with fixed size.
  • Fast and efficient, with performances comparable to a Mutex<Vec<_>>. (See benchmarks)
  • Lock-free, and thread-safe design.

Usage

Add this to your Cargo.toml:

[dependencies]
fremkit = "^0.1"

Example

use fremkit::bounded::Log;

let log: Log<u64> = Log::new(100);
log.push(1).unwrap();
log.push(2).unwrap();

assert_eq!(log.get(0), Some(&1));
assert_eq!(log.get(1), Some(&2));

License

This crate is under the Apache-2.0 License.

Commit count: 9

cargo fmt