helper

package
v0.4.0-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package helper serves hack/hyperlight/PROTOCOL.md without a hypervisor, each fiber a goroutine and each park a JSON file. The fakehelper binary runs it as a process, and the backend's unit tests run it as a goroutine, so everything it starts ends when Serve returns. It logs every command as the Rust helper does, the seed and the payload by size alone. A sandbox reaches the grant's device engine only through its engine method, which puts the sandbox's own fence in every line, as the Rust helper's Engine host function does.

Index

Constants

View Source
const Facts = "fakehelper/4 none none none"

Facts mirrors the Rust helper's snapshot facts (helper, hyperlight_host, hypervisor, cpu). The fake has none of the last three.

View Source
const SeedBytes = 32

SeedBytes is the seed every CLONE and RESUME carries, as hex.

View Source
const Version = Facts + "\ntemplate-dir"

Version is what `fakehelper --version` prints: the facts, then the line that advertises it restores a template's snapshot given as --template-dir (hack/hyperlight/PROTOCOL.md).

Variables

This section is empty.

Functions

func Serve

func Serve(ctl net.Conn, log io.Writer, engine string) error

Serve says READY on ctl and answers commands until ctl's read side ends, logging each one on log (the helper's stderr, which fiberd points at the grant's zygote.log). engine is the grant's engine socket, "" when it has none. Every sandbox, endpoint and goroutine is gone when it returns.

func ServeTemplate

func ServeTemplate(ctl net.Conn, log io.Writer, engine, template string) error

ServeTemplate is Serve for a template whose snapshot holds template as its metadata.json (--template-dir).

Types

type Helper

type Helper struct {
	// contains filtered or unexported fields
}

Helper is one run of the protocol over a control connection.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL