natives

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package natives ships the native libraries of the desktop UI inside the pando binary, so every distribution (CLI zip, Pando.app, .pkg) is one self-contained executable.

Today that is libghostty-vt, which MyGo's terminal plugin (plugins/terminal) loads with purego. `make natives-<goos>-<goarch>` (scripts/fetch-ghostty-vt) writes the build pinned by MyGo's mygo-plugin.json into <goos>-<goarch>/ before `go build`; on darwin it is signed there with the same Developer ID as the pando binary (hardened runtime, timestamp), so library validation accepts it without the disable-library-validation entitlement. The committed .keep placeholder keeps the embed pattern valid when the library was not fetched; such a binary falls back to MyGo's own lookup (Resources, executable dir, download into the user cache).

At start-up Install writes the embedded library, byte for byte, to <user cache>/pando/natives/<sha256 prefix>/<name> and points $MYGO_GHOSTTY_VT at it. MyGo reads that variable lazily, the first time the terminal loads, so Install must run before the terminal area is built.

Index

Constants

View Source
const EnvGhosttyVT = "MYGO_GHOSTTY_VT"

EnvGhosttyVT is the variable MyGo's terminal plugin reads for the path of libghostty-vt.

Variables

This section is empty.

Functions

func Embedded

func Embedded() bool

Embedded reports whether this binary carries libghostty-vt.

func Install

func Install() (string, error)

Install extracts the embedded libghostty-vt into the user cache and sets $MYGO_GHOSTTY_VT to it, returning the path. It does nothing and returns "" when the user set $MYGO_GHOSTTY_VT or the binary embeds no library (MyGo then finds or downloads one itself).

Types

This section is empty.

Jump to

Keyboard shortcuts

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