Skip to main content

Crate a3s_box_runtime

Crate a3s_box_runtime 

Source
Expand description

A3S Box Runtime - MicroVM runtime implementation.

This module provides the actual runtime implementation for A3S Box, including VM management, OCI image handling, rootfs building, and gRPC health checks.

§Feature Flags

  • pool — Warm VM pool with autoscaling (enabled by default)
  • scale — Multi-node scale manager and instance registry (enabled by default)
  • compose — Multi-container compose orchestration (enabled by default)
  • operator — Kubernetes CRD autoscaler controller (enabled by default)
  • build — Dockerfile/Containerfile build engine (enabled by default)

Re-exports§

pub use audit::read_audit_log;
pub use audit::AuditLog;
pub use audit::AuditQuery;
pub use box_record::BoxRecord;
pub use box_record::ManagedExecutionMetadata;
pub use box_record::ManagedExecutionOperation;
pub use box_record::ManagedExecutionState;
pub use box_record::ManagedRestartCompletion;
pub use box_record::ManagedRestartOutcome;
pub use box_state::BoxStateStore;
pub use local_execution::VmLocalExecutionBackend;
pub use local_execution::LocalExecutionBackend;
pub use local_execution::LocalExecutionHandle;
pub use local_execution::LocalExecutionManager;
pub use local_execution::LocalExecutionObservation;
pub use managed_execution_store::ManagedExecutionReservation;
pub use managed_execution_store::ManagedExecutionStore;
pub use managed_execution_store::ManagedExecutionStoreError;
pub use managed_execution_store::ManagedExecutionStoreResult;
pub use process::is_process_alive;
pub use process::is_process_alive_with_identity;
pub use process::pid_start_time;
pub use grpc::AttestationClient;
pub use grpc::ExecClient;
pub use grpc::PtyClient;
pub use grpc::RaTlsAttestationClient;
pub use grpc::StreamingExec;
pub use grpc::StreamingExecInput;
pub use grpc::StreamingPty;
pub use grpc::StreamingPtyInput;
pub use grpc::SealClient;
pub use grpc::SecretEntry;
pub use grpc::SecretInjector;
pub use host_check::check_virtualization_support;
pub use network::NetworkStore;
pub use oci::CredentialStore;
pub use oci::PushResult;
pub use oci::RegistryProtocol;
pub use oci::RegistryPusher;
pub use oci::ImagePuller;
pub use oci::ImageReference;
pub use oci::ImageStore;
pub use oci::RegistryAuth;
pub use oci::OciImage;
pub use oci::SignResult;
pub use oci::SignaturePolicy;
pub use prom::RuntimeMetrics;
pub use snapshot::SnapshotStore;
pub use tee::seal;
pub use tee::unseal;
pub use tee::verify_attestation;
pub use tee::verify_attestation_with_time;
pub use tee::AmdKdsClient;
pub use tee::AttestationPolicy;
pub use tee::MinTcbPolicy;
pub use tee::PolicyResult;
pub use tee::VerificationResult;
pub use tee::AttestationReport;
pub use tee::AttestationRequest;
pub use tee::PlatformInfo;
pub use vm::BoxState;
pub use vm::PullProgressFn;
pub use vm::VmManager;
pub use vmm::ShimHandler;
pub use vmm::VmController;
pub use resize::validate_update;
pub use resize::ResizeResult;
pub use resize::ResourceUpdate;
pub use volume::VolumeStore;
pub use oci::BuildConfig;
pub use oci::BuildRunPoolConfig;
pub use oci::Dockerfile;
pub use oci::Instruction;
pub use compose::ComposeProject;
pub use compose::HealthCheckSpec;
pub use operator::AutoscalerController;
pub use pool::WarmPool;
pub use scale::ScaleManager;

Modules§

audit
Persistent audit log writer.
box_record
Canonical persisted metadata schema for local box executions.
box_state
Durable local state store for box execution records.
cache
Cache module for cold start optimization.
compose
Compose orchestrator for multi-container workloads.
fs
Filesystem mount management for virtio-fs
grpc
Host-guest communication clients over Unix socket.
host_check
Host virtualization support detection.
local_execution
Durable implementation of the backend-neutral local execution lifecycle.
log
Log path helpers.
managed_execution_store
Durable generation-fenced transitions for managed local executions.
network
Network management for container-to-container communication.
oci
OCI image support for A3S Box.
operator
BoxAutoscaler controller — reconciliation logic for the K8s operator.
pool
Warm VM pool for cold start optimization.
process
Host process identity helpers shared by runtime consumers.
prom
Prometheus metrics for the A3S Box runtime.
resize
Live resource resize for running MicroVMs.
rootfs
Guest rootfs management module.
sandbox
Shared-kernel Sandbox backend support.
scale
Scale Manager — Tracks instances per service and processes scale requests.
snapshot
VM Snapshot Store — Save and restore VM configuration snapshots.
tee
TEE (Trusted Execution Environment) support.
vm
VM Manager - Lifecycle management for MicroVM instances.
vmm
VMM module - Virtual Machine Manager subsystem.
volume
Volume management for persistent named volumes.

Structs§

Entrypoint
Entrypoint configuration for the guest agent.
FsMount
A filesystem mount from host to guest via virtio-fs.
HealthCheck
Health-check behavior persisted with a local execution.
InstanceSpec
Complete configuration for a VM instance.
NetworkInstanceConfig
Network instance configuration for the network backend (passt on Linux, gvproxy on macOS).
StoredImage
Metadata for a stored OCI image.
TeeInstanceConfig
TEE instance configuration for the shim.
VmMetrics
VM resource metrics.

Constants§

ATTEST_VSOCK_PORT
Vsock port for the attestation server.
DEFAULT_IMAGE_CACHE_SIZE
Default maximum image cache size: 10 GB.
EXEC_VSOCK_PORT
Vsock port for the exec server.
PORT_FWD_VSOCK_PORT
Vsock port for the Windows host-port forward control channel.
PTY_VSOCK_PORT
Vsock port for the PTY server.
RESOLVED_IMAGE_CONFIG_FILE
Box-local artifact containing the resolved defaults from the source image.
VERSION
A3S Box Runtime version.

Traits§

VmHandler
Lifecycle operations on a running VM.
VmmProvider
Trait for VMM backend implementations.

Functions§

load_resolved_image_config
Load the resolved image defaults persisted for a box.