How virt-do/cloudlet works
Project type and purpose
• This is a distributed FaaS (Function-as-a-Service) system written in Rust.
• It comprises a CLI client, an HTTP/gRPC API server, a Virtual Machine Monitor (VMM), and an in-VM agent.
• Supporting crates generate boot artifacts (kernel + initramfs) and share protobuf models.
File structure
• Top-level Cargo.toml defines a workspace of multiple Rust crates under src/:
• cli – command-line client that reads a TOML config and issues HTTP requests.
• api – HTTP server exposing a /run endpoint; uses gRPC proto in proto/ to talk to VMM.
• vmm – Virtual Machine Monitor: boots VMs, exposes a gRPC server, implements devices, networking, epoll.
• agent – runs inside each guest VM; hosts a gRPC server to build and execute user code.
• fs-gen – filesystem and initramfs image builder (invoked at first run).
• shared-models – common protobuf-generated types.
• proto/ holds .proto definitions for inter-service gRPC (agent.proto, vmm.proto).
• tools/ contains shell scripts and kernel config for building a custom Linux binary and root filesystem.
• CI workflows lint Rust code and test on push/pull requests.
README for architectural insights
CLI → HTTP → API → gRPC → VMM → gRPC → Agent → (build & run) → stream results back.
• Describes prerequisites, how to start each service, and configuration file schema.
Elements
• A third for build artifacts and shared models.