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
//! Choreographr Coordination Platform tools.
//!
//! This crate implements the read/write tooling for the Choreographr
//! Coordination Platform: a Substrate runtime (`choreo-runtime`) running
//! `pallet-content` and its companion pallets, with content payloads stored on
//! a local IPFS node and indexed by `acuity-index`.
//!
//! ## Threading model
//!
//! The daemon stays thread-only. This crate owns a [tokio sidecar runtime]
//! (`runtime`) used **only** to drive `subxt` (node RPC + tx submission). IPFS
//! (`ipfs`, via `ureq`) and the indexer (`indexer`, via `tungstenite` in
//! synchronous mode) make no use of the sidecar, so only signed chain writes
//! and on-chain state reads go through it.
//!
//! ## Public surface
//!
//! All four modules expose [`ContentError`]-returning, blocking `execute_*`
//! functions. The daemon registers thin `Tool` wrappers over them under the
//! `coord` tool group.
//!
//! [tokio sidecar runtime]: runtime
pub use ContentError;
/// Convenience: every module re-exports its central public types under a
/// single `choreo_content::` path for the daemon's thin tool wrappers.
/// Uniffi-style init hook: build the sidecar runtime. The daemon calls this
/// from `main()`. Idempotent.
///
/// # Errors
///
/// Fails with an opaque boxed error if the OS refuses to spawn the tokio
/// worker threads while building the sidecar runtime (see
/// [`runtime::init`]); subsequent calls after a successful init never fail.