commonware_runtime/tokio/mod.rs
1//! A production-focused runtime based on [Tokio](https://tokio.rs) with
2//! secure randomness and storage backed by the local filesystem.
3//!
4//! # Panics
5//!
6//! Unless configured otherwise, any task panic will lead to a runtime panic.
7//!
8//! # Example
9//!
10//! ```rust
11//! use commonware_runtime::{Spawner, Runner, tokio, Metrics};
12//!
13//! let executor = tokio::Runner::default();
14//! executor.start(|context| async move {
15//! println!("Parent started");
16//! let result = context.with_label("child").spawn(|_| async move {
17//! println!("Child started");
18//! "hello"
19//! });
20//! println!("Child result: {:?}", result.await);
21//! println!("Parent exited");
22//! });
23//! ```
24
25mod runtime;
26pub use runtime::*;
27pub mod telemetry;
28pub mod tracing;