microsandbox_core/
lib.rs

1//! `microsandbox` is a secure MicroVM provisioning system for running untrusted code in isolated environments.
2//!
3//! # Overview
4//!
5//! microsandbox provides a robust foundation for running AI workloads in isolated microVMs. It handles:
6//! - VM lifecycle management
7//! - OCI image distribution and management
8//! - Service orchestration and coordination
9//! - Resource constraints and monitoring
10//! - Database persistence for system state
11//!
12//! # Key Features
13//!
14//! - **Secure Isolation**: True VM-level isolation through microVMs
15//! - **Container Experience**: Works with standard OCI/Docker images
16//! - **Fast Startup**: Millisecond-level VM provisioning
17//! - **Resource Control**: Fine-grained CPU, memory and network limits
18//! - **Simple API**: RESTful interface for service management
19//! - **Persistence**: Database-backed state management
20//!
21//! # Architecture
22//!
23//! microsandbox consists of several key components:
24//!
25//! - **VM**: Low-level microVM configuration and management
26//! - **OCI**: Image pulling, layer handling, and registry interactions
27//! - **Management**: Orchestration, sandbox lifecycle, and coordination
28//! - **Runtime**: Process supervision and monitoring
29//! - **Models**: Database and persistence schema
30//!
31//! # Modules
32//!
33//! - [`config`] - Configuration types and validation
34//! - [`management`] - Central management for sandboxes, images, and orchestration
35//! - [`models`] - Database models and persistence schema
36//! - [`oci`] - OCI image and registry operations
37//! - [`runtime`] - Process supervision and monitoring
38//! - [`utils`] - Common utilities and helpers
39//! - [`vm`] - MicroVM configuration and control
40
41#![warn(missing_docs)]
42
43mod error;
44
45//--------------------------------------------------------------------------------------------------
46// Exports
47//--------------------------------------------------------------------------------------------------
48
49pub mod config;
50pub mod management;
51pub mod models;
52pub mod oci;
53pub mod runtime;
54pub mod utils;
55pub mod vm;
56
57pub use error::*;