2 releases

0.1.1 Dec 23, 2022
0.1.0 Dec 22, 2022

#2158 in Data structures

43 downloads per month

Apache-2.0

1.5MB
318 lines

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.


lib.rs:

Fremkit is simple broadcast log.

It provides Log, a simple, fast, and thread-safe 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.

Dependencies

~0.6–25MB
~358K SLoC