https://github.com/loro-dev/iroh-loro
https://github.com/loro-dev/iroh-loro
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/loro-dev/iroh-loro
- Owner: loro-dev
- Created: 2024-12-05T08:21:42.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-09-10T02:14:41.000Z (9 months ago)
- Last Synced: 2025-10-13T03:34:35.055Z (8 months ago)
- Language: Rust
- Size: 99.6 KB
- Stars: 14
- Watchers: 6
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# iroh-loro demo
A peer-to-peer collaborative **plain text** editing demo that uses
[iroh](https://github.com/n0-computer/iroh) for p2p networking and
[loro](https://github.com/loro-dev/loro) for CRDT-based **plain text** synchronization.
> This demo only works for 2 peers and a single **plain text** file at the moment
## Usage
The demo supports two modes: serving a file (hosting) and joining an existing
session.
### Hosting a File
To start hosting a file for collaborative editing:
```bash
cargo run -r serve
```
This will:
1. Start watching the specified file for changes
2. Print your Node ID that others can use to connect
3. Automatically sync changes on the given text file with any peers that join
### Joining a Session
To join an existing collaborative editing session:
```bash
cargo run -r join
```
Where:
- `REMOTE_NODE_ID` is the Node ID printed by the host
- `LOCAL_FILE_PATH` is where you want to save the synchronized file locally