Crates.io | rod |
lib.rs | rod |
version | 0.2.4 |
source | src |
created_at | 2019-02-14 21:27:55.235889 |
updated_at | 2022-12-02 13:08:59.256677 |
description | Distributed graph database that syncs over websockets and multicast |
homepage | |
repository | https://github.com/mmalmi/rod |
max_upload_size | |
id | 114822 |
size | 25,238,919 |
Rust Object Database.
The decentralized social networking application Iris-messenger syncs over Rod peers by default.
Install Rust first.
cargo install rod
rod start
use rod::{Node, Config, Value};
let mut db = Node::new_with_config(Config {
outgoing_websocket_peers: vec!["wss://some-server-to-sync.with/ws".to_string()],
..Config::default()
});
let mut sub = db.get("greeting").on();
db.get("greeting").put("Hello World!".into());
if let Value::Text(str) = sub.recv().await.unwrap() {
assert_eq!(&str, "Hello World!");
}
15/5/2022:
db.get('#').get(data_hash).put(data)
)db.get('~' + pubkey).get('profile') ...
)cargo install cargo-watch
RUST_LOG=debug cargo watch -x 'run -- start'
cargo test
Watch for code changes and re-run tests that contain the word "stats":
RUST_LOG=debug cargo watch -x 'test stats'
cargo bench
heroku create --buildpack emk/rust
git push heroku master
or: