1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//! The Aranya runtime.
//!
//! # Overview
//!
//! The runtime crate is the starting point for integrating with Aranya.
//!
//! The runtime provides a higher level interface to:
//! 1. An [`PolicyStore`] responsible for storing [`Policy`]s evaluated on graph [`Command`]s.
//! 2. A [`StorageProvider`] responsible for providing a storage mechanism for graph commands.
//! 3. A [`sync`] interface responsible for syncing graph state between peers.
//!
//! # Usage
//!
//! Refer to provided demo/quickstart code for an example of how to use the runtime crate.
//! The `aranya-tcp-syncer` crate provides a good example of syncing via TCP.
//!
//! # Example
//!
//! Start by initializing a client with desired [`PolicyStore`] and [`StorageProvider`]
//! ```ignore
//! let client = ClientState::new(policy_store, storage)
//! ```
//!
//! Initialize graph for the client with:
//! ```ignore
//! client.new_graph(...)
//! ```
//!
//! Start listening for incoming sync requests with:
//! ```ignore
//! sync::run_syncer(...)
//! ```
//!
//! To initiate a sync with another peer, construct a [`SyncRequester`]
//! and send the sync request to the peer via the Aranya transport:
//! ```ignore
//! SyncRequester::new(...)
//! sync::sync(...)
//! ```
extern crate alloc;
pub
pub use crate::;