Skip to main content

microvms_edges/
lib.rs

1// SPDX-License-Identifier: Apache-2.0
2//! The MicroVMs client's production port implementations (ARCH-7).
3//!
4//! `microvms-app` declares the ports its use cases reach the outside through; this crate
5//! implements them over the real thing:
6//!
7//! * [`control::SignedTransport`] and [`control::SignedBuildServices`]: the default credential
8//!   chain, SigV4, and reqwest, for the control plane and for STS and S3;
9//! * [`session::http::ReqwestBackend`]: the daemon's HTTP API, one pooled client;
10//! * [`session::forward`], [`session::tunnel`] and [`session::shell`]: the sockets, from the
11//!   port forwarder's listener to the WebSocket tunnel and its Noise identity proof;
12//! * [`names::FileNameStore`]: the CLI's name registry on disk;
13//! * [`run_store::FileRunStore`]: run ledgers and append-only VM history on disk;
14//! * [`agents::bedrock::mint`]: a Bedrock bearer token from the caller's credentials;
15//! * [`provision`]: the verified `agentd` binary, fetched and cached;
16//! * [`clock::TokioClock`], [`entropy::OsEntropy`], and [`adapters::SystemAdapters`], which
17//!   hands out the pieces a use case builds partway through.
18//!
19//! It's the one library crate in the workspace that may depend on a crate doing network, AWS,
20//! filesystem, subprocess, clock or entropy I/O. `microvms-core` wires these into the use cases
21//! and re-exports every item here at its `microvms_core::` path, so a consumer never depends
22//! on this crate directly.
23
24// CLI-7: a print macro panics when its stream's reader has gone (#216). Every write goes
25// through a checked writer instead.
26#![deny(clippy::print_stdout, clippy::print_stderr)]
27
28pub mod adapters;
29pub mod agents;
30pub mod clock;
31pub mod control;
32pub mod entropy;
33pub mod env;
34pub mod identity;
35pub mod names;
36pub mod provision;
37#[cfg(test)]
38mod provision_fuzz;
39pub mod secret_input;
40pub mod session;
41pub mod workspace;
42
43/// The version of the daemon release `provision` fetches by default.
44///
45/// This crate's own, which is also `microvms_core::VERSION`: `tools/check-publishable.py`
46/// holds every published crate in the workspace at one version, so the client and the daemon it
47/// provisions come from the same release (BIND-17).
48pub const VERSION: &str = env!("CARGO_PKG_VERSION");
49
50pub mod run_store;