https://github.com/zackradisic/learning-crdts-rust
Learning and implementing CRDTs in Rust
https://github.com/zackradisic/learning-crdts-rust
Last synced: 10 days ago
JSON representation
Learning and implementing CRDTs in Rust
- Host: GitHub
- URL: https://github.com/zackradisic/learning-crdts-rust
- Owner: zackradisic
- Created: 2022-12-05T00:07:15.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-01-22T13:05:41.000Z (over 3 years ago)
- Last Synced: 2025-01-12T15:14:44.153Z (over 1 year ago)
- Language: Rust
- Size: 852 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Learning CRDTs
Monorepo of CRDT implementations I write as I learn more about them
## Directory structure
### [sypytkowski-convergent/](/sypytkowski-convergent)
Following along and porting the code from convergent CRDT half of Bartosz Sypytkowski's [blog post series](https://bartoszsypytkowski.com/optimizing-state-based-crdts-1/) in F# to Rust
### convergent-experiment\*/
An experiment in building a simple app with convergent/state-based CRDTs taught in the first
half of Bartosz Sypytkowski's blog post series
It is a web app where users can create and move around squares on a canvas that gets synced between multiple users through a websocket server.
The CRDTs from the [sypytkowski-convergent](/sypytkowski-convergent) crate are compiled to Wasm and bindings for TS are generated with [fp-bindgen](https://github.com/fiberplane/fp-bindgen)
```bash
# Generate the bindings for wasm
cargo run --package convergent-experiment-protocol-gen --bin convergent-experiment-protocol-gen
# Build wasm
cargo build --package convergent-experiment --target wasm32-unknown-unknown --release
# Copy wasm to frontend public folder
cp target/wasm32-unknown-unknown/release/convergent_experiment.wasm convergent-experiment/frontend/public/ligma.wasm
# Run the WS server
cargo run --package convergent-experiment-ws
```
### [sypytkowski-commutative/](/sypytkowski-commutative)
This is the code for the operation-based half of Sypytkowski's article series.