#run-time #dag

no-std aranya-runtime

The Aranya core runtime

5 releases (breaking)

new 0.5.0 Mar 19, 2025
0.4.0 Mar 12, 2025
0.3.0 Dec 19, 2024
0.2.0 Dec 4, 2024
0.1.0 Oct 16, 2024

#954 in Magic Beans

Download history 219/week @ 2024-12-04 138/week @ 2024-12-11 158/week @ 2024-12-18 28/week @ 2024-12-25 309/week @ 2025-01-01 463/week @ 2025-01-08 199/week @ 2025-01-15 335/week @ 2025-01-22 424/week @ 2025-01-29 470/week @ 2025-02-05 144/week @ 2025-02-12 102/week @ 2025-02-19 99/week @ 2025-02-26 1070/week @ 2025-03-05 943/week @ 2025-03-12 1080/week @ 2025-03-19

3,196 downloads per month
Used in 2 crates

AGPL-3.0-only

770KB
18K 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

~18–31MB
~477K SLoC