Skip to content

Latest commit

 

History

History
43 lines (30 loc) · 2.61 KB

README.md

File metadata and controls

43 lines (30 loc) · 2.61 KB

Hyperlight Project Documentation

Hyperlight is a library for running hypervisor-isolated workloads without the overhead of booting a full guest operating system inside the virtual machine.

By eliminating this overhead, Hyperlight can execute arbitrary code more efficiently. It's primarily aimed at supporting functions-as-a-service workloads, where a user's code must be loaded into memory and executed very quickly with high density.

Basics: Hyperlight internals

Hyperlight achieves these efficiencies by removing all operating system functionality from inside the virtual machine, and instead requiring all guest binaries be run directly on the virtual CPU (vCPU). This key requirement means all Hyperlight guest binaries must not only be compiled to run on the vCPU's architecture, but also must be statically linked to specialized libraries to support their functionality (e.g. there are no syscalls whatsoever available). Roughly similar to Unikernel technologies, we provide a guest library (in Rust, and a C compatible wrapper for it) to which guest binaries can be statically linked.

Given a guest, then, Hyperlight takes some simple steps prior to executing it, including the following:

  • Provisioning memory
  • Configuring specialized regions of memory
  • Provisioning a virtual machine (VM) and CPU with the platform-appropriate hypervisor API, and mapping memory into the VM
  • Configuring virtual registers for the vCPU
  • Executing the vCPU at a specified instruction pointer

Basics: Hyperlight architecture

This project is composed internally of several internal components, depicted in the below diagram:

Hyperlight architecture

Further reading

For developers