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//! * [`agents::bedrock::mint`]: a Bedrock bearer token from the caller's credentials;
14//! * [`provision`]: the verified `agentd` binary, fetched and cached;
15//! * [`clock::TokioClock`], [`entropy::OsEntropy`], and [`adapters::SystemAdapters`], which
16//!   hands out the pieces a use case builds partway through.
17//!
18//! It's the one library crate in the workspace that may depend on a crate doing network, AWS,
19//! filesystem, subprocess, clock or entropy I/O. `microvms-core` wires these into the use cases
20//! and re-exports every item here at its `microvms_core::` path, so a consumer never depends
21//! on this crate directly.
22
23// CLI-7: a print macro panics when its stream's reader has gone (#216). Every write goes
24// through a checked writer instead.
25#![deny(clippy::print_stdout, clippy::print_stderr)]
26
27pub mod adapters;
28pub mod agents;
29pub mod clock;
30pub mod control;
31pub mod entropy;
32pub mod env;
33pub mod identity;
34pub mod names;
35pub mod provision;
36#[cfg(test)]
37mod provision_fuzz;
38pub mod secret_input;
39pub mod session;
40pub mod workspace;
41
42/// The version of the daemon release `provision` fetches by default.
43///
44/// This crate's own, which is also `microvms_core::VERSION`: `tools/check-publishable.py`
45/// holds every published crate in the workspace at one version, so the client and the daemon it
46/// provisions come from the same release (BIND-17).
47pub const VERSION: &str = env!("CARGO_PKG_VERSION");