Skip to content

hyperlight-dev/hyperlight-kubeconNA2024-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hyperlight KubeCon NA 2024 Demo

This repo houses the code for the demo we will be presenting during our keynote at KubeCon NA 2024.

Project Structure

.
├── Cargo.lock
├── Cargo.toml
├── README.md
├── demo-guest
├── demo-main
├── puml
└── target
  • demo-guest: x86_64-unknown-none native Hyperlight guest application.
  • demo-main: HTTP server using Hyperlight's host SDK.

demo-guest

Hyperlight executes arbitrary code safely and quickly. It does that by booting up an OS-less VM that executes functions.

  • demo-guest exports two guest functions:
    • PrintOutput, and
    • DereferenceRawNullPointer.

Note: OS-less VMs cannot make any syscalls, so we escape the VM to make host function calls to, say, print to standard output.

demo-main

Architecture

How to run?

cd demo-main
cargo run

How to debug?

To spawn a Hyperlight VM and attach a debugger to it, you:

  1. Start a devcontainer
  2. Run the demo with the gdb feature:
cd demo-main
cargo run --features gdb
  1. Open a separate terminal and send an HTTP request to the demo server to spawn a cold Hyperlight VM:
curl http://localhost:3030/hyperlight/hello-world/cold
  1. Attach a debugger to the spawned VM by using one of the Run and Debug configurations in your VSCode editor:
  • Remote LLDB attach
  • Remote GDB attach
  1. Enjoy debugging!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •