jedisct1/rust-bloom-filter

A fast Bloom filter implementation in Rust

Rust

277

181 commits

updated Sep 25, 2026

See the code

README

bloomfilter

Crates.io docs.rs License: ISC

A simple but fast implementation of the Bloom filter in Rust. The Bloom filter is a a space-efficient probabilistic data structure supporting dynamic set membership queries with false positives. It was introduced by Burton H. Bloom in 1970 (Bloom, 1970) and have since been increasingly used in computing applications and bioinformatics.

Documentation

Library documentation is available on docs.rs.

Usage

Add this to your Cargo.toml:

[dependencies]
bloomfilter = "3"

Here is a simple example for creating a bloom filter with a false positive rate of 0.001 and query for presence of some numbers.

use bloomfilter::Bloom;

let num_items = 100000;
let fp_rate = 0.001;

let mut bloom = Bloom::new_for_fp_rate(num_items, fp_rate).unwrap();
bloom.set(&10);   // insert 10 in the bloom filter
bloom.check(&10); // return true
bloom.check(&20); // return false

License

This project is licensed under the ISC license (LICENSE or https://opensource.org/licenses/ISC).

jedisct1/rust-bloom-filter

A fast Bloom filter implementation in Rust

Rust

277

181 commits

updated Sep 25, 2026

See the code

README

bloomfilter

Crates.io docs.rs License: ISC

A simple but fast implementation of the Bloom filter in Rust. The Bloom filter is a a space-efficient probabilistic data structure supporting dynamic set membership queries with false positives. It was introduced by Burton H. Bloom in 1970 (Bloom, 1970) and have since been increasingly used in computing applications and bioinformatics.

Documentation

Library documentation is available on docs.rs.

Usage

Add this to your Cargo.toml:

[dependencies]
bloomfilter = "3"

Here is a simple example for creating a bloom filter with a false positive rate of 0.001 and query for presence of some numbers.

use bloomfilter::Bloom;

let num_items = 100000;
let fp_rate = 0.001;

let mut bloom = Bloom::new_for_fp_rate(num_items, fp_rate).unwrap();
bloom.set(&10);   // insert 10 in the bloom filter
bloom.check(&10); // return true
bloom.check(&20); // return false

License

This project is licensed under the ISC license (LICENSE or https://opensource.org/licenses/ISC).

Project health

Overall

3.3/10

Maintained

1/10

Code review

1/10
OpenSSF Scorecard

Significant stargazers

Tobias Nießen

360 followers · starred Feb 2024

Sander Mathijs van Veen

35 followers · starred Mar 2025

Chris Goller

63 followers · starred Sep 2024

Daniel Meyer

961 followers · starred Jun 2023