homestar_runtime/lib.rs
1#![cfg_attr(docsrs, feature(doc_cfg))]
2#![warn(missing_debug_implementations, missing_docs, rust_2018_idioms)]
3#![deny(unreachable_pub)]
4
5//! homestar-runtime is a determistic Wasm runtime and effectful workflow/job
6//! system intended to be embedded inside or run alongside IPFS or another
7//! content-addressable store.
8//!
9//! You can find a more complete description [here].
10//!
11//! ## Related crates/packages:
12//!
13//! - [homestar-invocation]
14//! - [homestar-wasm]
15//! - [homestar-workflow]
16//!
17//! ## Getting Started
18//!
19//! For getting started with Homestar in general, please check out our
20//! [README] and [Quickstart] guide.
21//!
22//! ## Feature flags
23//!
24//! - `default`: Enables the default set of features.
25//! - `dev`: Enables a dev-friendly, lighter set of features for development.
26//! - `ansi-logs`: Enables ANSI color codes in logs.
27//! - `console`: Enables [tokio console] debugging.
28//! - `ipfs`: Enables [IPFS]-related integration and settings.
29//! - `monitoring`: Enables node monitoring-related features and dependencies.
30//! - `profile`: Enables profiling-related features and dependencies.
31//! - `test-utils`: Enables utilities for unit testing and benchmarking.
32//! - `wasmtime-default`: Enables the default set of features for the embedded
33//! [Wasmtime] runtime.
34//! - `websocket-notify`: Enables websocket notifications.
35//!
36//! ## Examples
37//!
38//! Check out our [examples] directory to explore some Homestar
39//! scenarios and see the system in action.
40//!
41//! [examples]: https://github.com/ipvm-wg/homestar/tree/main/examples
42//! [here]: https://github.com/ipvm-wg/spec
43//! [homestar-invocation]: https://docs.rs/homestar-invocation
44//! [homestar-workflow]: https://docs.rs/homestar-workflow
45//! [homestar-wasm]: https://docs.rs/homestar-wasm
46//! [IPFS]: https://ipfs.tech
47//! [Quickstart]: https://github.com/ipvm-wg/homestar/blob/main/README.md#quickstart
48//! [README]: https://github.com/ipvm-wg/homestar/blob/main/README.md
49//! [tokio console]: https://github.com/tokio-rs/console/tree/main/tokio-console
50//! [Wasmtime]: https://github.com/bytecodealliance/wasmtime
51
52pub mod channel;
53pub mod cli;
54pub mod daemon;
55pub mod db;
56mod event_handler;
57mod ip;
58mod logger;
59pub mod network;
60mod receipt;
61pub mod runner;
62mod scheduler;
63mod settings;
64mod tasks;
65/// Test utilities.
66#[cfg(any(test, feature = "test-utils"))]
67#[cfg_attr(docsrs, doc(cfg(feature = "test-utils")))]
68pub mod test_utils;
69mod worker;
70pub mod workflow;
71
72pub use db::{utils::Health, Db};
73pub(crate) mod libp2p;
74pub use logger::*;
75pub(crate) mod metrics;
76#[cfg(feature = "websocket-notify")]
77pub use event_handler::notification::{network::NetworkNotification, receipt::ReceiptNotification};
78#[allow(unused_imports)]
79pub(crate) use event_handler::EventHandler;
80pub use network::webserver::PrometheusData;
81pub use receipt::{Receipt, RECEIPT_TAG, VERSION_KEY};
82pub use runner::{NodeInfo, Runner};
83pub(crate) use scheduler::TaskScheduler;
84#[cfg(feature = "ipfs")]
85pub use settings::IpfsBuilder;
86pub use settings::{
87 DatabaseBuilder, Dht, ExistingKeyPath, KeyType, Libp2p, Mdns, MetricsBuilder,
88 MonitoringBuilder, NetworkBuilder, NodeBuilder, PubkeyConfig, Pubsub, RNGSeed, Rendezvous,
89 RpcBuilder, Settings, SettingsBuilder, WebserverBuilder,
90};
91pub(crate) use worker::Worker;
92pub use workflow::WORKFLOW_TAG;