housekeeping: Cleaning up while you're away
housekeeping is a concurrent memory reclamation library for Rust; it helps
build complex concurrent data structures. It is inspired by seize and
crossbeam_epoch, but is simpler and offers lower-level interfaces.
With housekeeping, you can protect concurrent memory, allowing concurrent
objects to be deallocated at a safe time. This is more powerful than reference
counting with Arc, and is more efficient.
Usage
housekeeping has two components: Cleanups, which is global state for
synchronizing threads and pending deallocation operations; and Guard, a
per-thread handle to the Cleanups which protects concurrent memory access and
allows concurrent objects to be deallocated safely.
// Global state for deferring deallocations (i.e. cleanups).
let cleanups = new;
// An atomic variable, pointing to memory protected by 'cleanups'.
let data: ;
let data: = Defaultdefault;
let data_ptr = Boxinto_raw;
data = new;
scope;
// Drop the last instance of the data.
let _ = unsafe ;
Origin
housekeeping is being developed for krabby, an experimental Rust
compiler, with different goals and limitations compared to seize and
crossbeam_epoch. It is offered as a standalone crate in the hope that it may
prove useful for other concurrent data structure libraries.
License
Copyright (C) 2026 arya dradjica (hut1zulljl4lxd2h@bal-e.org)
housekeeping is available under the MIT or Apache-2.0 licenses,
at your option. Their terms are available in LICENSES/MIT.txt and
LICENSES/Apache-2.0.txt respectively.