A repository containing some CRDTs implementations in Rust.
| CRDT | Type | Tests | | --- | --- | --- | | [Aworset] Add-Wins Observed Remove Set| State-Based | aworset.rs | | [Aworset Optimized] Add-Wins Observed Remove Set | State-Based | --- | | [GCounter] Grow-Only Counter| State-Based | -- | | [PnCounter] Positive-Negative Counter| State-Based | -- | | [MvReg] Multi-Value Register [on progress]| State-Based | --- | --- |
Some auxiliary structures were built to create some CRDTs:
| Name | Tests | Explanation | Reference | | --- | --- | --- | --- | | DotContext | dotcontext.rs | Bartosz Sypytkowski Blog | delta-enabled-crdts |
The cargo package is available at: - https://crates.io/crates/crdt-sample
Add the following piece of code to your Cargo.toml
:
toml
[dependencies]
crdt-sample = "0.1.0"
```rust
use crdtsample::{AworsetOpt, NodeId};
fn main() {
let nodeid = NodeId::new(1, "addr".tostring());
let mut aworset: AworsetOpt
```