Expand description
A production-focused runtime based on Tokio with secure randomness and storage backed by the local filesystem.
§Panics
By default, the runtime will catch any panic and log the error. It is possible to override this behavior in the configuration.
§Example
use commonware_runtime::{Spawner, Runner, tokio::Executor};
let (executor, runtime) = Executor::default();
executor.start(async move {
println!("Parent started");
let result = runtime.spawn("child", async move {
println!("Child started");
"hello"
});
println!("Child result: {:?}", result.await);
println!("Parent exited");
});Structs§
- Blob
- Implementation of
crate::Blobfor thetokioruntime. - Config
- Configuration for the
tokioruntime. - Context
- Implementation of
crate::Spawner,crate::Clock,crate::Network, andcrate::Storagefor thetokioruntime. - Executor
- Runtime based on Tokio.
- Listener
- Implementation of
crate::Listenerfor thetokioruntime. - Runner
- Implementation of
crate::Runnerfor thetokioruntime. - Sink
- Implementation of
crate::Sinkfor thetokioruntime. - Stream
- Implementation of
crate::Streamfor thetokioruntime.