Documentation
¶
Index ¶
Constants ¶
const BundleDirName = "runtimes"
BundleDirName is the subdirectory next to the fairpeer executable where bundled runtimes live (e.g. fairpeer.exe/runtimes/uv.exe).
const UVVersion = "0.5.11"
UVVersion is the pinned uv release version to download.
Variables ¶
This section is empty.
Functions ¶
func Install ¶
Install downloads uv to the cache directory. Safe to call from a goroutine at startup. Idempotent: if the binary already exists in cache, returns nil.
func ResolveNode ¶
ResolveNode finds Node.js and npx on PATH. Returns absolute paths. Node is NOT bundled (too large); the caller should prompt the user to install if not found.
func ResolvePython ¶
ResolvePython finds Python. Priority: uv (`uv run python`) → python3/python/py on PATH. When uv is used, returns ("uv", ["run", "python"]) so the caller can prepend the prefix args. When a direct Python is found, returns ("/usr/bin/python3", nil).
Types ¶
type RuntimeEntry ¶
type RuntimeEntry struct {
Available bool `json:"available"`
Path string `json:"path,omitempty"`
Source string `json:"source,omitempty"` // "path" | "bundle" | "uv" | ""
}
RuntimeEntry describes one runtime's availability.
type RuntimeStatus ¶
type RuntimeStatus struct {
UV RuntimeEntry `json:"uv"`
Python RuntimeEntry `json:"python"`
Node RuntimeEntry `json:"node"`
NPX RuntimeEntry `json:"npx"`
}
RuntimeStatus is a snapshot of all runtime environments, for the doctor command and the settings UI.
func DetectAll ¶
func DetectAll() RuntimeStatus
DetectAll checks all runtimes and returns a status snapshot. Safe to call repeatedly (each sub-resolver caches its first result).