microsoft/bf-treePublic

Bf-Tree is a modern read-write-optimized concurrent larger-than-memory range index in Rust from MS Research.

AI summary: A read-write-optimized, concurrent, larger-than-memory range index written in Rust.

Stars
1.1K
+2 today
Forks
52
Watchers
5
Open issues
5
Open PRs
2
Contributors
~12
Commits
37
Branches
7

RustMITCreated Dec 19, 2025Last push 2d ago+2 stars this week+14 this month

Quick answers

What is bf-tree?
A read-write-optimized, concurrent, larger-than-memory range index written in Rust.
What does bf-tree do?
Bf-Tree is a highly advanced, read-write-optimized range index data structure developed by Microsoft Research and implemented entirely in modern Rust. It is specifically engineered to manage massive, larger-than-memory datasets efficiently by utilizing a highly concurrent, tree-based architecture. The system minimizes expensive disk I/O operations by tightly optimizing its internal node layouts to align with modern CPU caches, drastically reducing latency during complex search operations. It employs sophisticated lock-free techniques to allow thousands of threads to query and mutate the index simultaneously without experiencing performance-degrading contention. As an open-source crate, it serves as a foundational building block for developers creating high-throughput database engines and specialized storage systems.
Who is bf-tree for?
This library is designed for systems programmers, database engineers, and researchers building high-performance storage infrastructure. It requires a strong understanding of concurrent programming and Rust.
How do I get started with bf-tree?
cargo add bf_tree
How popular is bf-tree on GitHub?
microsoft/bf-tree has 1,091 stars and 52 forks on GitHub, and gained 2 stars in the last 7 days.
What license does bf-tree use?
microsoft/bf-tree is released under the MIT license.

Star history

since Jul 29, 2026
05001KJul 2026Sep 2026Oct 2026Nov 2026
1.1K stars as of Nov 19, 2026. Measured daily since Jul 29, 2026; GitHub no longer exposes earlier star timestamps.

Contribution activity

commits per day, last 52 weeks
NovDecJanFebMarAprMayJunJulAugSepOctNovMonWedFri2025-11-23: 0 commits2025-11-24: 0 commits2025-11-25: 0 commits2025-11-26: 0 commits2025-11-27: 0 commits2025-11-28: 0 commits2025-11-29: 0 commits2025-11-30: 0 commits2025-12-01: 0 commits2025-12-02: 0 commits2025-12-03: 0 commits2025-12-04: 0 commits2025-12-05: 0 commits2025-12-06: 0 commits2025-12-07: 0 commits2025-12-08: 0 commits2025-12-09: 0 commits2025-12-10: 0 commits2025-12-11: 0 commits2025-12-12: 0 commits2025-12-13: 0 commits2025-12-14: 0 commits2025-12-15: 0 commits2025-12-16: 0 commits2025-12-17: 0 commits2025-12-18: 0 commits2025-12-19: 1 commit2025-12-20: 0 commits2025-12-21: 0 commits2025-12-22: 0 commits2025-12-23: 0 commits2025-12-24: 0 commits2025-12-25: 0 commits2025-12-26: 0 commits2025-12-27: 0 commits2025-12-28: 0 commits2025-12-29: 0 commits2025-12-30: 0 commits2025-12-31: 0 commits2026-01-01: 0 commits2026-01-02: 0 commits2026-01-03: 0 commits2026-01-04: 0 commits2026-01-05: 0 commits2026-01-06: 1 commit2026-01-07: 0 commits2026-01-08: 0 commits2026-01-09: 0 commits2026-01-10: 0 commits2026-01-11: 0 commits2026-01-12: 1 commit2026-01-13: 0 commits2026-01-14: 0 commits2026-01-15: 0 commits2026-01-16: 0 commits2026-01-17: 0 commits2026-01-18: 0 commits2026-01-19: 0 commits2026-01-20: 0 commits2026-01-21: 0 commits2026-01-22: 0 commits2026-01-23: 1 commit2026-01-24: 0 commits2026-01-25: 0 commits2026-01-26: 0 commits2026-01-27: 0 commits2026-01-28: 0 commits2026-01-29: 0 commits2026-01-30: 0 commits2026-01-31: 0 commits2026-02-01: 0 commits2026-02-02: 0 commits2026-02-03: 0 commits2026-02-04: 0 commits2026-02-05: 0 commits2026-02-06: 0 commits2026-02-07: 0 commits2026-02-08: 0 commits2026-02-09: 0 commits2026-02-10: 2 commits2026-02-11: 0 commits2026-02-12: 0 commits2026-02-13: 0 commits2026-02-14: 0 commits2026-02-15: 0 commits2026-02-16: 0 commits2026-02-17: 0 commits2026-02-18: 0 commits2026-02-19: 0 commits2026-02-20: 0 commits2026-02-21: 0 commits2026-02-22: 0 commits2026-02-23: 0 commits2026-02-24: 0 commits2026-02-25: 0 commits2026-02-26: 0 commits2026-02-27: 0 commits2026-02-28: 0 commits2026-03-01: 0 commits2026-03-02: 0 commits2026-03-03: 0 commits2026-03-04: 0 commits2026-03-05: 0 commits2026-03-06: 1 commit2026-03-07: 0 commits2026-03-08: 0 commits2026-03-09: 2 commits2026-03-10: 0 commits2026-03-11: 0 commits2026-03-12: 0 commits2026-03-13: 0 commits2026-03-14: 0 commits2026-03-15: 0 commits2026-03-16: 0 commits2026-03-17: 0 commits2026-03-18: 0 commits2026-03-19: 0 commits2026-03-20: 0 commits2026-03-21: 0 commits2026-03-22: 0 commits2026-03-23: 0 commits2026-03-24: 0 commits2026-03-25: 0 commits2026-03-26: 0 commits2026-03-27: 0 commits2026-03-28: 0 commits2026-03-29: 0 commits2026-03-30: 0 commits2026-03-31: 0 commits2026-04-01: 0 commits2026-04-02: 0 commits2026-04-03: 0 commits2026-04-04: 0 commits2026-04-05: 0 commits2026-04-06: 0 commits2026-04-07: 0 commits2026-04-08: 0 commits2026-04-09: 1 commit2026-04-10: 0 commits2026-04-11: 0 commits2026-04-12: 0 commits2026-04-13: 0 commits2026-04-14: 0 commits2026-04-15: 0 commits2026-04-16: 0 commits2026-04-17: 0 commits2026-04-18: 0 commits2026-04-19: 0 commits2026-04-20: 0 commits2026-04-21: 0 commits2026-04-22: 0 commits2026-04-23: 0 commits2026-04-24: 0 commits2026-04-25: 0 commits2026-04-26: 0 commits2026-04-27: 0 commits2026-04-28: 0 commits2026-04-29: 0 commits2026-04-30: 0 commits2026-05-01: 0 commits2026-05-02: 0 commits2026-05-03: 0 commits2026-05-04: 0 commits2026-05-05: 0 commits2026-05-06: 0 commits2026-05-07: 0 commits2026-05-08: 0 commits2026-05-09: 0 commits2026-05-10: 0 commits2026-05-11: 1 commit2026-05-12: 0 commits2026-05-13: 0 commits2026-05-14: 0 commits2026-05-15: 0 commits2026-05-16: 0 commits2026-05-17: 0 commits2026-05-18: 0 commits2026-05-19: 4 commits2026-05-20: 0 commits2026-05-21: 0 commits2026-05-22: 0 commits2026-05-23: 0 commits2026-05-24: 0 commits2026-05-25: 0 commits2026-05-26: 0 commits2026-05-27: 0 commits2026-05-28: 2 commits2026-05-29: 1 commit2026-05-30: 0 commits2026-05-31: 0 commits2026-06-01: 0 commits2026-06-02: 0 commits2026-06-03: 0 commits2026-06-04: 0 commits2026-06-05: 0 commits2026-06-06: 0 commits2026-06-07: 0 commits2026-06-08: 0 commits2026-06-09: 0 commits2026-06-10: 0 commits2026-06-11: 0 commits2026-06-12: 0 commits2026-06-13: 0 commits2026-06-14: 0 commits2026-06-15: 0 commits2026-06-16: 0 commits2026-06-17: 0 commits2026-06-18: 0 commits2026-06-19: 0 commits2026-06-20: 0 commits2026-06-21: 0 commits2026-06-22: 0 commits2026-06-23: 1 commit2026-06-24: 0 commits2026-06-25: 0 commits2026-06-26: 0 commits2026-06-27: 0 commits2026-06-28: 0 commits2026-06-29: 1 commit2026-06-30: 0 commits2026-07-01: 0 commits2026-07-02: 0 commits2026-07-03: 0 commits2026-07-04: 0 commits2026-07-05: 0 commits2026-07-06: 0 commits2026-07-07: 0 commits2026-07-08: 0 commits2026-07-09: 0 commits2026-07-10: 0 commits2026-07-11: 0 commits2026-07-12: 0 commits2026-07-13: 0 commits2026-07-14: 0 commits2026-07-15: 0 commits2026-07-16: 0 commits2026-07-17: 0 commits2026-07-18: 0 commits2026-07-19: 0 commits2026-07-20: 0 commits2026-07-21: 0 commits2026-07-22: 0 commits2026-07-23: 0 commits2026-07-24: 0 commits2026-07-25: 0 commits2026-07-26: 0 commits2026-07-27: 0 commits2026-07-28: 1 commit2026-07-29: 0 commits2026-07-30: 0 commits2026-07-31: 0 commits2026-08-01: 0 commits2026-08-02: 0 commits2026-08-03: 0 commits2026-08-04: 0 commits2026-08-05: 0 commits2026-08-06: 0 commits2026-08-07: 0 commits2026-08-08: 0 commits2026-08-09: 0 commits2026-08-10: 0 commits2026-08-11: 0 commits2026-08-12: 0 commits2026-08-13: 0 commits2026-08-14: 0 commits2026-08-15: 0 commits2026-08-16: 0 commits2026-08-17: 0 commits2026-08-18: 0 commits2026-08-19: 1 commit2026-08-20: 0 commits2026-08-21: 0 commits2026-08-22: 0 commits2026-08-23: 0 commits2026-08-24: 0 commits2026-08-25: 0 commits2026-08-26: 0 commits2026-08-27: 0 commits2026-08-28: 0 commits2026-08-29: 0 commits2026-08-30: 0 commits2026-08-31: 0 commits2026-09-01: 0 commits2026-09-02: 0 commits2026-09-03: 0 commits2026-09-04: 0 commits2026-09-05: 0 commits2026-09-06: 0 commits2026-09-07: 0 commits2026-09-08: 0 commits2026-09-09: 0 commits2026-09-10: 0 commits2026-09-11: 0 commits2026-09-12: 0 commits2026-09-13: 0 commits2026-09-14: 0 commits2026-09-15: 0 commits2026-09-16: 0 commits2026-09-17: 0 commits2026-09-18: 0 commits2026-09-19: 0 commits2026-09-20: 0 commits2026-09-21: 0 commits2026-09-22: 0 commits2026-09-23: 0 commits2026-09-24: 0 commits2026-09-25: 0 commits2026-09-26: 0 commits2026-09-27: 0 commits2026-09-28: 0 commits2026-09-29: 0 commits2026-09-30: 0 commits2026-10-01: 0 commits2026-10-02: 0 commits2026-10-03: 0 commits2026-10-04: 0 commits2026-10-05: 0 commits2026-10-06: 0 commits2026-10-07: 1 commit2026-10-08: 0 commits2026-10-09: 0 commits2026-10-10: 0 commits2026-10-11: 0 commits2026-10-12: 1 commit2026-10-13: 0 commits2026-10-14: 1 commit2026-10-15: 0 commits2026-10-16: 0 commits2026-10-17: 0 commits2026-10-18: 0 commits2026-10-19: 0 commits2026-10-20: 0 commits2026-10-21: 0 commits2026-10-22: 0 commits2026-10-23: 0 commits2026-10-24: 0 commits2026-10-25: 0 commits2026-10-26: 0 commits2026-10-27: 1 commit2026-10-28: 3 commits2026-10-29: 1 commit2026-10-30: 1 commit2026-10-31: 0 commits2026-11-01: 0 commits2026-11-02: 2 commits2026-11-03: 0 commits2026-11-04: 0 commits2026-11-05: 0 commits2026-11-06: 0 commits2026-11-07: 0 commits2026-11-08: 0 commits2026-11-09: 0 commits2026-11-10: 0 commits2026-11-11: 0 commits2026-11-12: 0 commits2026-11-13: 0 commits2026-11-14: 0 commits2026-11-15: 0 commits2026-11-16: 2 commits2026-11-17: 0 commits2026-11-18: 2 commits2026-11-19: 0 commits2026-11-20: 0 commits2026-11-21: 0 commits
37 commits in the last yearLessMore

Signals and awards

derived from tracked data
  • Permissive license

    MIT

  • Continuous integration

    Automated checks passing

What bf-tree does

Bf-Tree is a highly advanced, read-write-optimized range index data structure developed by Microsoft Research and implemented entirely in modern Rust. It is specifically engineered to manage massive, larger-than-memory datasets efficiently by utilizing a highly concurrent, tree-based architecture. The system minimizes expensive disk I/O operations by tightly optimizing its internal node layouts to align with modern CPU caches, drastically reducing latency during complex search operations. It employs sophisticated lock-free techniques to allow thousands of threads to query and mutate the index simultaneously without experiencing performance-degrading contention. As an open-source crate, it serves as a foundational building block for developers creating high-throughput database engines and specialized storage systems.

This library is designed for systems programmers, database engineers, and researchers building high-performance storage infrastructure. It requires a strong understanding of concurrent programming and Rust.

  • Larger-Than-Memory Indexing: Efficiently manages and queries massive datasets that far exceed the available RAM by intelligently paging data to disk.
  • Read-Write Optimized Architecture: Balances the structural design to ensure that heavy data insertion workloads do not significantly degrade query read speeds.
  • Highly Concurrent Operations: Implements advanced lock-free algorithms to allow massive multi-threaded access without traditional locking bottlenecks.
  • Native Rust Implementation: Written entirely in safe, modern Rust, guaranteeing memory safety and high performance across various computing platforms.
  • CPU Cache Alignment: Carefully structures internal B-tree nodes to maximize cache locality, significantly reducing expensive main memory fetches.
  • Modular Crate Distribution: Packaged standardly via Cargo, allowing developers to easily integrate the advanced indexing engine into their existing Rust projects.

Where teams use it

Building Next-Gen Database Engines

Database architects can replace their legacy indexing structures with Bf-Tree to instantly increase the transactional throughput of their custom storage engines.

High-Performance File Systems

OS developers can implement this data structure to manage vast directory hierarchies and metadata indexing efficiently on modern NVMe storage arrays.

Large-Scale Telemetry Processing

Engineers can index millions of incoming IoT sensor events per second concurrently without experiencing thread contention bottlenecks.

Real-Time Financial Trading Systems

Quantitative developers can utilize the concurrent data structure to manage massive, high-frequency order books with absolute minimal latency.

In-Memory Caching Layers

Backend teams can build incredibly fast key-value stores that gracefully handle massive datasets by spilling over to disk intelligently.

Getting started: cargo add bf_tree

README

main branch

Bf-Tree

Bf-Tree is a modern read-write-optimized concurrent larger-than-memory range index in Rust from MSR.

Design Details

You can find the Bf-Tree research paper here. You can find more design docs here.

User Guide

Rust

Bf-Tree is written in Rust, and is available as a Rust crate. You can add Bf-Tree to your Cargo.toml like this:

$ cargo add bf_tree

Which will add bf_tree as a dependency to your Cargo.toml

[dependencies]
bf-tree = "0.5.7"

An example use of Bf-Tree:

use bf_tree::BfTree;
use bf_tree::LeafReadResult;

let mut config = bf_tree::Config::default();
config.cb_min_record_size(4);
let tree = BfTree::with_config(config, None).unwrap();
tree.insert(b"key", b"value");

let mut buffer = [0u8; 1024];
let read_size = tree.read(b"key", &mut buffer);

assert_eq!(read_size, LeafReadResult::Found(5));
assert_eq!(&buffer[..5], b"value");

Configuration

Start with Config::default(), customize it with builder-style setters such as config.cb_size_byte(64 * 1024 * 1024). Validate the configuration with config.validate()? before passing it to BfTree::with_config(config, None). BfTree::with_config also validates it internally and returns a ConfigError if it is invalid. Defaults below refer to Config::default(). Record sizes are the combined key and value lengths in bytes, excluding metadata.

Buffer Pool

The circular buffer holds cached mini pages and full pages. Its size is not a limit on total process memory: inner nodes, page mappings, and any in-memory backing storage require additional memory.

Parameter Default Description
cb_size_byte 32 MiB Circular-buffer capacity in bytes; must be a power of two.
cb_min_record_size 4 Minimum record size in bytes; must be at least 2. Inserts with smaller records are rejected.
cb_max_record_size 1952 Maximum record size in bytes. Inserts with larger records are rejected; increasing this limit must also satisfy page-layout constraints.
cb_max_key_len 16 Maximum key length in bytes. Set this to accommodate the longest key in your workload.
read_promotion_rate 30% (50% in debug builds) Probability of promoting a record into the buffer during a point read.
scan_promotion_rate 30% (50% in debug builds) Probability of promoting a page into the buffer during a range scan. Lower values help avoid displacing hot data with scan results.

Promotion rates are percentages from 0 to 100: 0 disables the corresponding promotion, while 100 always attempts it when eligible.

Persistent Storage

These settings control the backing store and how reads populate its cache. The promotion rates are listed again here because they also affect storage I/O.

Parameter Default Description
read_promotion_rate 30% (50% in debug builds) Controls caching on point reads; higher rates can reduce repeated backing-store reads at the cost of more cache churn.
scan_promotion_rate 30% (50% in debug builds) Controls page caching during scans; lower rates reduce cache pollution from one-pass scans.
storage_backend StorageBackend::Memory Backing-store implementation. Memory keeps backing pages in RAM; Std uses standard file I/O. Linux additionally supports StdDirect, IoUringPolling, and IoUringBlocking; Spdk requires Linux and the spdk feature.
file_path Empty path Index-file path for file-backed storage. Set this together with a file-backed storage_backend; changing the path alone does not change the backend.
cache_only false Keeps all leaf data in the circular buffer, without a backing storage layer. The entire dataset must fit in the buffer. This differs from StorageBackend::Memory, which normally keeps backing pages in separately allocated RAM.

As a convenience, Config::new(path, buffer_size) selects Std for a normal file path, Memory for a path starting with :memory:, or cache-only mode for a path starting with :cache:. File-backed storage alone does not provide snapshot recovery; see the snapshot options below.

Snapshot & Recovery
Parameter Default Description
snapshot_backend StorageBackend::Std I/O backend used to write snapshots, separate from the index's storage_backend. This is currently crate-internal and has no public setter.
use_snapshot false Enables concurrent consistent snapshots. Call BfTree::cpr_snapshot explicitly to take one; enabling this does not schedule automatic snapshots.
snapshot_version 0 Initial snapshot version for a new tree. Normally leave this unchanged; recovery automatically starts at the saved version plus one.

C and C++ interface

The unreleased C ABI package wraps the existing Rust operations with caller-owned buffers, explicit statuses, bounded scans, and panic fencing. It preserves ABI-v1 layouts and signatures. The native read, scan, mutation, and snapshot implementations remain unchanged. Recovery validation uses two additional read-only Config getters.

Snapshots and Recovery

Bf-Tree supports CPR-style consistent snapshots. A snapshot captures a consistent prefix of all in-flight transactions to a file, and a tree can later be reconstructed from such a snapshot file.

To enable snapshots, set use_snapshot(true) on the Config before creating the tree. Once enabled, call [BfTree::cpr_snapshot] with the destination path to take a snapshot at any point. Snapshots can be taken concurrently with ongoing reads and writes; only one snapshot may be in progress at a time.

To recover a tree from a snapshot file, use [BfTree::new_from_cpr_snapshot]. The snapshot file embeds most configuration fields (record sizes, leaf page size, cache-only flag, etc.), so the caller only needs to specify the recovery-time options:

  • recovery_snapshot_file_path: path of the snapshot file to recover from.
  • use_snapshot: whether the recovered tree should itself support taking new snapshots.
  • buffer_ptr: optional pointer to a pre-allocated cache buffer; pass None to let Bf-Tree allocate one.
  • buffer_size: optional override of the cache size stored in the snapshot. If smaller than the original, recovery may fail because cached pages from the snapshot must fit in memory.
  • wal: optional write-ahead log configuration for the recovered tree.
use bf_tree::{BfTree, Config};
use std::path::PathBuf;

let mut config = Config::default();
config.use_snapshot(true);
let tree = BfTree::with_config(config, None).unwrap();

tree.insert(b"key", b"value");

// Take a CPR snapshot of the current tree state.
tree.cpr_snapshot("snapshot.bftree");

// Recover a bf-tree from a CPR snapshot
let tree = BfTree::new_from_cpr_snapshot(
    "snapshot.bftree",
    /* use_snapshot */ true,
    /* buffer_ptr */ None,
    /* buffer_size */ None,
    /* wal */ None,
).unwrap();
std::fs::remove_file("snapshot.bftree");

You can check whether all active threads have transitioned to the next snapshot version during a snapshot (i.e., all threads are operating in v + 1) with:

let ready = tree.are_all_threads_in_next_snapshot_version();

This is useful for coordinating external systems that need to wait until a snapshot's data is fully consistent but not the whole snapshot to finish before proceeding. Note that, this function returns false if no ongoing snapshot.

Notes:

  • The snapshot file path passed to cpr_snapshot must be different from the path used by any concurrent recovery.
  • For more on the snapshot/recovery design, see doc/snapshot-recovery.md.

PRs are accepted and preferred over feature requests. Feel free to reach out if you have any design questions.

Developer Guide

Building

Prerequisite

Bf-Tree supports Linux, Windows, and macOS, although only a recently version of Linux is rigorously tested. Bf-Tree is written in Rust, which you can install here.

Please install pre-commit hooks to ensure that your code is formatted and linted in the same way as the rest of the project; the coding style will be enforced in CI, these hooks act as a pre-filter.

# If on Ubuntu
sudo apt update && sudo apt install pre-commit
pre-commit install
Build
cargo build --release

Testing

Unit Tests
cargo test

Circular-buffer free-list reuse has a deterministic spurious-CAS regression. It exercises the production allocator with a test-only atomic wrapper and checks reuse and eviction without relying on hardware producing a spurious failure. Separate integration tests use native atomics for repeated reuse and capacity-pressure/wraparound coverage:

cargo test --lib circular_buffer
cargo test --test circular_buffer_reuse

The injector is disabled with shuttle; Shuttle tests continue to use Shuttle's atomics. Free-list allocation must not abandon an unlinked entry on a spurious CAS failure, since eviction cannot remove that orphan from the list.

Reliability Tests

The native suite also covers stateful operations against an ordered-map model, bounded linearizability checking, scans overlapping mutations and splits, resource lifecycle accounting, process-crash snapshot recovery, malformed snapshots, and WAL write failures. These complement the allocator and traversal regressions rather than replacing them.

cargo test --release --lib -- stateful_tree linearizability concurrent_scans
# Linux: run exact file-descriptor/thread accounting without parallel tests.
env BFTREE_RESOURCE_CHECK=1 cargo test --release --lib resource_lifecycle -- --test-threads=1

CI additionally runs deterministic fuzz regressions, AddressSanitizer with leak detection, selected Shuttle schedules, and focused Miri checks.

Shuttle Tests

Concurrent systems are nondeterministic, and subject to exponential amount of different thread interleaving. We use shuttle to deterministically and systematically explore different thread interleaving to uncover the bugs caused by subtle multithread interactions.

# Core Bf-tree concurrent operations (~5 minutes)
cargo test --features "shuttle" --release shuttle_bf_tree_concurrent_operations

# CPR snapshot with disk-backed storage (fast, < 1s)
cargo test --features "shuttle" --release shuttle_cpr_snapshot_disk

# CPR snapshot with cache-only (in-memory) storage
cargo test --features "shuttle" --release shuttle_cpr_snapshot_cache_only

To replay a specific failing schedule (generated automatically on failure into target/schedule000.txt):

cargo test --features "shuttle" --release shuttle_replay -- --nocapture
Fuzz Tests

Fuzz testing is a bug finding technique that generates random inputs to the system and test for crash. Bf-Tree employs fuzzing to generate random operation sequences (e.g., insert, read, scan) to the system and check that none of the operation sequence will crash the system or lead to inconsistent state. Check the fuzz folder for more details.

Production Stress Matrix

On November 1, 2026, a production-stress campaign completed 2,744 cases with zero failures. It included 56 warmup cases and four rounds of 672 cases, using both release builds and release builds with debug assertions and overflow checks.

Each full round covered three value-size profiles, four memory-budget labels (minimum, double-minimum, quarter-data, and data), seven read/write/scan mixes, and eight worker counts: 1, 2, 4, 8, 16, 36, 72, and 144. Full cases used 262,144 records and a 30-second workload; warmups used 65,536 records and 15 seconds. Preload, verification, drain, and teardown time were additional.

Seeds, scan lengths, contention, full-page caching, build profiles, and storage backends (io_uring polling/blocking, direct I/O, and standard file I/O) rotated across groups and rounds. This was production-stress coverage, not an exhaustive Cartesian product of every setting or a platform/feature compatibility matrix. Each passing case checked final point reads, a full scan, draining, and a second full scan, and completed tree teardown.

The regular suite retains fast parameterized stress cases. A separate ignored test accepts a JSON configuration for longer runs:

cargo test --release --lib production_mixed_record_stress
# Bash: run one standalone timed case, not the full supervised campaign.
env BF_PRODUCTION_CASE='{"seed":42,"records":262144,"threads":8,"seconds":30,"backend":"std","memory_bytes":1048576}' \
    cargo test --release --lib tests::production_stress::production_matrix_case -- --exact --ignored --nocapture

Omitted JSON fields use the defaults in src/tests/production_stress.rs. The campaign's external supervisor was configured to capture three GDB full-thread backtraces, process snapshots, and a core dump on stalls, then hold the original process for diagnosis. It used a 60-second workload no-progress trigger and 660-720-second whole-case diagnostic deadlines, with no overall campaign timeout. Timeouts, missing results, and zero-test runs were not counted as passes. The standalone command above does not provide that supervision.

Benchmarking

Check the benchmark folder for more details.

cd benchmark
env SHUMAI_FILTER="inmemory" MIMALLOC_LARGE_OS_PAGES=1 cargo run --bin bftree --release

More advanced benchmarking, with metrics collecting, numa-node binding, huge page, etc:

env MIMALLOC_SHOW_STATS=1 MIMALLOC_LARGE_OS_PAGES=1 MIMALLOC_RESERVE_HUGE_OS_PAGES_AT=0 numactl --membind=0 --cpunodebind=0 cargo bench --features "metrics-rt" micro

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Contributing

Please see CONTRIBUTING.md.

Security

See SECURITY.md for security reporting details.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft’s Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party’s policies.

Contact

View on GitHub

Recent activity

commits and pull requests

Recent open issues

view all

Code frequency

additions and deletions
+20.2K-20.2KWeek of 2025-12-14: +20,229 linesWeek of 2025-12-14: -0 linesWeek of 2025-12-21: +0 linesWeek of 2025-12-21: -0 linesWeek of 2025-12-28: +0 linesWeek of 2025-12-28: -0 linesWeek of 2026-01-04: +224 linesWeek of 2026-01-04: -0 linesWeek of 2026-01-11: +2 linesWeek of 2026-01-11: -0 linesWeek of 2026-01-18: +19 linesWeek of 2026-01-18: -29 linesWeek of 2026-01-25: +0 linesWeek of 2026-01-25: -0 linesWeek of 2026-02-01: +0 linesWeek of 2026-02-01: -0 linesWeek of 2026-02-08: +9 linesWeek of 2026-02-08: -1 linesWeek of 2026-02-15: +0 linesWeek of 2026-02-15: -0 linesWeek of 2026-02-22: +0 linesWeek of 2026-02-22: -0 linesWeek of 2026-03-01: +3 linesWeek of 2026-03-01: -3 linesWeek of 2026-03-08: +247 linesWeek of 2026-03-08: -4 linesWeek of 2026-03-15: +0 linesWeek of 2026-03-15: -0 linesWeek of 2026-03-22: +0 linesWeek of 2026-03-22: -0 linesWeek of 2026-03-29: +0 linesWeek of 2026-03-29: -0 linesWeek of 2026-04-05: +39 linesWeek of 2026-04-05: -6 linesWeek of 2026-04-12: +0 linesWeek of 2026-04-12: -0 linesWeek of 2026-04-19: +0 linesWeek of 2026-04-19: -0 linesWeek of 2026-04-26: +0 linesWeek of 2026-04-26: -0 linesWeek of 2026-05-03: +0 linesWeek of 2026-05-03: -0 linesWeek of 2026-05-10: +2,521 linesWeek of 2026-05-10: -827 linesWeek of 2026-05-17: +907 linesWeek of 2026-05-17: -376 linesWeek of 2026-05-24: +1,142 linesWeek of 2026-05-24: -558 linesWeek of 2026-05-31: +0 linesWeek of 2026-05-31: -0 linesWeek of 2026-06-07: +0 linesWeek of 2026-06-07: -0 linesWeek of 2026-06-14: +0 linesWeek of 2026-06-14: -0 linesWeek of 2026-06-21: +93 linesWeek of 2026-06-21: -24 linesWeek of 2026-06-28: +1 linesWeek of 2026-06-28: -1 linesWeek of 2026-07-05: +0 linesWeek of 2026-07-05: -0 linesWeek of 2026-07-12: +0 linesWeek of 2026-07-12: -0 linesWeek of 2026-07-19: +0 linesWeek of 2026-07-19: -0 linesWeek of 2026-07-26: +226 linesWeek of 2026-07-26: -49 linesWeek of 2026-08-02: +0 linesWeek of 2026-08-02: -0 linesWeek of 2026-08-09: +0 linesWeek of 2026-08-09: -0 linesWeek of 2026-08-16: +14 linesWeek of 2026-08-16: -3 linesWeek of 2026-08-23: +0 linesWeek of 2026-08-23: -0 linesWeek of 2026-08-30: +0 linesWeek of 2026-08-30: -0 linesWeek of 2026-09-06: +0 linesWeek of 2026-09-06: -0 linesWeek of 2026-09-13: +0 linesWeek of 2026-09-13: -0 linesWeek of 2026-09-20: +0 linesWeek of 2026-09-20: -0 linesWeek of 2026-09-27: +0 linesWeek of 2026-09-27: -0 linesWeek of 2026-10-04: +140 linesWeek of 2026-10-04: -5 linesWeek of 2026-10-11: +448 linesWeek of 2026-10-11: -4 linesWeek of 2026-10-18: +0 linesWeek of 2026-10-18: -0 linesWeek of 2026-10-25: +3,196 linesWeek of 2026-10-25: -590 linesWeek of 2026-11-01: +1,874 linesWeek of 2026-11-01: -309 linesWeek of 2026-11-08: +0 linesWeek of 2026-11-08: -0 linesWeek of 2026-11-15: +3,258 linesWeek of 2026-11-15: -4 linesDec 14, 2025Nov 15, 2026
+34.6K lines added, -2.8K removed over the last year.

Commits per week

last 52 weeks
60Week of 2025-11-23: 0 commitsWeek of 2025-11-30: 0 commitsWeek of 2025-12-07: 0 commitsWeek of 2025-12-14: 1 commitsWeek of 2025-12-21: 0 commitsWeek of 2025-12-28: 0 commitsWeek of 2026-01-04: 1 commitsWeek of 2026-01-11: 1 commitsWeek of 2026-01-18: 1 commitsWeek of 2026-01-25: 0 commitsWeek of 2026-02-01: 0 commitsWeek of 2026-02-08: 2 commitsWeek of 2026-02-15: 0 commitsWeek of 2026-02-22: 0 commitsWeek of 2026-03-01: 1 commitsWeek of 2026-03-08: 2 commitsWeek of 2026-03-15: 0 commitsWeek of 2026-03-22: 0 commitsWeek of 2026-03-29: 0 commitsWeek of 2026-04-05: 1 commitsWeek of 2026-04-12: 0 commitsWeek of 2026-04-19: 0 commitsWeek of 2026-04-26: 0 commitsWeek of 2026-05-03: 0 commitsWeek of 2026-05-10: 1 commitsWeek of 2026-05-17: 4 commitsWeek of 2026-05-24: 3 commitsWeek of 2026-05-31: 0 commitsWeek of 2026-06-07: 0 commitsWeek of 2026-06-14: 0 commitsWeek of 2026-06-21: 1 commitsWeek of 2026-06-28: 1 commitsWeek of 2026-07-05: 0 commitsWeek of 2026-07-12: 0 commitsWeek of 2026-07-19: 0 commitsWeek of 2026-07-26: 1 commitsWeek of 2026-08-02: 0 commitsWeek of 2026-08-09: 0 commitsWeek of 2026-08-16: 1 commitsWeek of 2026-08-23: 0 commitsWeek of 2026-08-30: 0 commitsWeek of 2026-09-06: 0 commitsWeek of 2026-09-13: 0 commitsWeek of 2026-09-20: 0 commitsWeek of 2026-09-27: 0 commitsWeek of 2026-10-04: 1 commitsWeek of 2026-10-11: 2 commitsWeek of 2026-10-18: 0 commitsWeek of 2026-10-25: 6 commitsWeek of 2026-11-01: 2 commitsWeek of 2026-11-08: 0 commitsWeek of 2026-11-15: 4 commitsNov 23, 2025Nov 15, 2026
37 commits in the last 52 weeks.

When work happens

weekday and hour
SunMonTueWedThuFriSat036912151821Sun 0:00 — 0 commitsSun 1:00 — 0 commitsSun 2:00 — 0 commitsSun 3:00 — 0 commitsSun 4:00 — 0 commitsSun 5:00 — 0 commitsSun 6:00 — 0 commitsSun 7:00 — 0 commitsSun 8:00 — 0 commitsSun 9:00 — 0 commitsSun 10:00 — 0 commitsSun 11:00 — 0 commitsSun 12:00 — 0 commitsSun 13:00 — 0 commitsSun 14:00 — 0 commitsSun 15:00 — 0 commitsSun 16:00 — 0 commitsSun 17:00 — 0 commitsSun 18:00 — 0 commitsSun 19:00 — 0 commitsSun 20:00 — 0 commitsSun 21:00 — 0 commitsSun 22:00 — 0 commitsSun 23:00 — 0 commitsMon 0:00 — 0 commitsMon 1:00 — 0 commitsMon 2:00 — 0 commitsMon 3:00 — 0 commitsMon 4:00 — 0 commitsMon 5:00 — 0 commitsMon 6:00 — 0 commitsMon 7:00 — 0 commitsMon 8:00 — 0 commitsMon 9:00 — 0 commitsMon 10:00 — 4 commitsMon 11:00 — 1 commitsMon 12:00 — 1 commitsMon 13:00 — 2 commitsMon 14:00 — 1 commitsMon 15:00 — 0 commitsMon 16:00 — 0 commitsMon 17:00 — 0 commitsMon 18:00 — 0 commitsMon 19:00 — 0 commitsMon 20:00 — 1 commitsMon 21:00 — 0 commitsMon 22:00 — 0 commitsMon 23:00 — 0 commitsTue 0:00 — 1 commitsTue 1:00 — 0 commitsTue 2:00 — 0 commitsTue 3:00 — 0 commitsTue 4:00 — 0 commitsTue 5:00 — 0 commitsTue 6:00 — 0 commitsTue 7:00 — 0 commitsTue 8:00 — 0 commitsTue 9:00 — 0 commitsTue 10:00 — 0 commitsTue 11:00 — 1 commitsTue 12:00 — 1 commitsTue 13:00 — 0 commitsTue 14:00 — 0 commitsTue 15:00 — 2 commitsTue 16:00 — 2 commitsTue 17:00 — 3 commitsTue 18:00 — 0 commitsTue 19:00 — 0 commitsTue 20:00 — 0 commitsTue 21:00 — 0 commitsTue 22:00 — 0 commitsTue 23:00 — 0 commitsWed 0:00 — 0 commitsWed 1:00 — 0 commitsWed 2:00 — 0 commitsWed 3:00 — 0 commitsWed 4:00 — 0 commitsWed 5:00 — 0 commitsWed 6:00 — 0 commitsWed 7:00 — 0 commitsWed 8:00 — 0 commitsWed 9:00 — 0 commitsWed 10:00 — 2 commitsWed 11:00 — 0 commitsWed 12:00 — 0 commitsWed 13:00 — 0 commitsWed 14:00 — 0 commitsWed 15:00 — 4 commitsWed 16:00 — 1 commitsWed 17:00 — 0 commitsWed 18:00 — 0 commitsWed 19:00 — 1 commitsWed 20:00 — 0 commitsWed 21:00 — 0 commitsWed 22:00 — 0 commitsWed 23:00 — 0 commitsThu 0:00 — 0 commitsThu 1:00 — 0 commitsThu 2:00 — 0 commitsThu 3:00 — 0 commitsThu 4:00 — 0 commitsThu 5:00 — 0 commitsThu 6:00 — 0 commitsThu 7:00 — 0 commitsThu 8:00 — 0 commitsThu 9:00 — 0 commitsThu 10:00 — 0 commitsThu 11:00 — 0 commitsThu 12:00 — 1 commitsThu 13:00 — 0 commitsThu 14:00 — 1 commitsThu 15:00 — 2 commitsThu 16:00 — 0 commitsThu 17:00 — 0 commitsThu 18:00 — 0 commitsThu 19:00 — 0 commitsThu 20:00 — 0 commitsThu 21:00 — 0 commitsThu 22:00 — 0 commitsThu 23:00 — 0 commitsFri 0:00 — 0 commitsFri 1:00 — 0 commitsFri 2:00 — 0 commitsFri 3:00 — 0 commitsFri 4:00 — 0 commitsFri 5:00 — 0 commitsFri 6:00 — 0 commitsFri 7:00 — 0 commitsFri 8:00 — 0 commitsFri 9:00 — 0 commitsFri 10:00 — 0 commitsFri 11:00 — 0 commitsFri 12:00 — 0 commitsFri 13:00 — 1 commitsFri 14:00 — 0 commitsFri 15:00 — 2 commitsFri 16:00 — 1 commitsFri 17:00 — 0 commitsFri 18:00 — 1 commitsFri 19:00 — 0 commitsFri 20:00 — 0 commitsFri 21:00 — 0 commitsFri 22:00 — 0 commitsFri 23:00 — 0 commitsSat 0:00 — 0 commitsSat 1:00 — 0 commitsSat 2:00 — 0 commitsSat 3:00 — 0 commitsSat 4:00 — 0 commitsSat 5:00 — 0 commitsSat 6:00 — 0 commitsSat 7:00 — 0 commitsSat 8:00 — 0 commitsSat 9:00 — 0 commitsSat 10:00 — 0 commitsSat 11:00 — 0 commitsSat 12:00 — 0 commitsSat 13:00 — 0 commitsSat 14:00 — 0 commitsSat 15:00 — 0 commitsSat 16:00 — 0 commitsSat 17:00 — 0 commitsSat 18:00 — 0 commitsSat 19:00 — 0 commitsSat 20:00 — 0 commitsSat 21:00 — 0 commitsSat 22:00 — 0 commitsSat 23:00 — 0 commits
Commit volume by weekday and hour (UTC). Larger dots mean more commits.
DateListRankStars gained
Jan 29, 2026daily#17+144
  • ultraworkers/claw-code

    An agent-managed museum exhibit, built in Rust with Gajae-Code / LazyCodex — developed and maintained with no human intervention.

    194.8K stars · Rust

  • farion1231/cc-switch

    A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode,DeepSeek Harness and more. Only official website: ccswitch.io

    156K stars · Rust

  • openai/codex

    Lightweight coding agent that runs in your terminal

    136K stars · Rust

  • rust-lang/rust

    Empowering everyone to build reliable and efficient software.

    122.3K stars · Rust

  • pbakaus/impeccable

    The design vocabulary for your coding agent. Steer with polish and bolder, review with critique and audit, catch AI slop before it ships.

    114.1K stars · Rust

  • denoland/deno

    A modern runtime for JavaScript and TypeScript.

    109.1K stars · Rust