3 releases (breaking)

0.3.0 Dec 19, 2024
0.2.0 Dec 4, 2024
0.1.0 Oct 16, 2024

#18 in #aranya

Download history 40/week @ 2024-10-19 8/week @ 2024-10-26 24/week @ 2024-11-02 16/week @ 2024-11-09 72/week @ 2024-11-16 79/week @ 2024-11-23 152/week @ 2024-11-30 208/week @ 2024-12-07 150/week @ 2024-12-14 15/week @ 2024-12-21 129/week @ 2024-12-28 597/week @ 2025-01-04 247/week @ 2025-01-11 91/week @ 2025-01-18 365/week @ 2025-01-25 446/week @ 2025-02-01

1,173 downloads per month
Used in 3 crates (2 directly)

AGPL-3.0-only

2.5MB
26K SLoC

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 Engine responsible for enforcing a Policy on graph Commands.
  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 quic_syncer.rs module provides a good example of syncing via QUIC.

Example

Start by initializing a client with desired Engine and StorageProvider

let client = ClientState::new(engine, storage)

Initialize graph for the client with:

client.new_graph(...)

Start listening for incoming sync requests with:

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:

SyncRequester::new(...)
sync::sync(...)

Dependencies

~16–27MB
~446K SLoC