This repository is a Rust workspace for Software Transactional Memory (STM) implementations.
STM provides a composable alternative to regular synchronization mechanisms for concurrent operations; It is based on two primitives: transactions and transactional variables.
Users who wish to familiarize themselves with the mechanism can skim through the following documents:
- Dedicated STM chapter of Real World Haskell for a quick intuitive introduction
- Software Transactional Memory, Shavit et al., 1997
- On the correctness of transactional memory, Guerraoui et al., 2008
fast-stm- performance-focused STM implementation forked from Marthog's originalstmcrate.sserp-stm- STM implementation using the SSER+ algorithm from Boosting transactional memory with stricter serializability.benches- internal Criterion benchmark harness used to compare STM implementations and synchronization primitives.
Each published crate has its own README:
Run the published crates' test suites:
cargo test -p fast-stm -p sserp-stmBuild package documentation:
cargo doc --workspace --no-depsRun benchmarks for one STM implementation at a time:
cargo bench --features fast-stm
cargo bench --features sserp-stmThe benchmark crate requires exactly one of the fast-stm or sserp-stm features.
Licensed under either of:
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contributions are welcome and accepted as pull requests on GitHub. Feel free to use issues to report bugs, missing documentation or suggest improvements of the project.