limaembed

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 35 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package limaembed runs what Lima's libraries expect of limactl: they start the current executable again for some commands (`hostagent`, from instance.Start), and look for the guest agent and the templates next to it.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoAssets = errors.New("this agent-vm was built without Lima's guest agent: build it with make")

ErrNoAssets is returned by WriteShare when agent-vm was built without the guest agent (`go build` instead of `make`).

Functions

func Run

func Run(args []string) bool

Run runs args (os.Args[1:]) when they are a command Lima's libraries start this executable for, as limactl would, and reports whether they were. Such a command never returns: it exits.

Types

type Share

type Share struct {
	// Dir holds templates/ and the guest agent.
	Dir string
	// GuestAgent is the guest agent for Linux guests of this host's
	// architecture, gzipped: Lima decompresses it.
	GuestAgent string
}

Share is Lima's share/lima, written out of the binary.

func WriteShare

func WriteShare(dir string) (*Share, error)

WriteShare writes the embedded files into dir/share/lima, each one that is missing or differs from the embedded copy, and returns where they are. The files are checked on every call: a damaged guest agent never reaches a VM.

func (*Share) Templates

func (s *Share) Templates() string

Templates is where Lima reads templates from (LIMA_TEMPLATES_PATH).

Jump to

Keyboard shortcuts

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