toolchain

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package toolchain resolves and installs tools selected by a project's pinned SDK.

Package toolchain resolves tools selected by a project's pinned SDK.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Air

func Air(options AirOptions) (string, error)

Air resolves Air from an explicit override or the Karty tool cache.

func EnsureHost

func EnsureHost(ctx context.Context, manifest sdk.Manifest, target string) (string, error)

EnsureHost installs the host selected by the project SDK when that SDK publishes a checksum-pinned release artifact.

func Go

func Go(ctx context.Context, options GoOptions) (string, error)

Go resolves the Go compiler from an explicit override, environment, or PATH.

func Host

func Host(version, target string) (string, error)

Host returns a cached SDK-pinned native or web host artifact.

func InstallAir

func InstallAir(ctx context.Context, options InstallAirOptions) (string, error)

InstallAir downloads, verifies, and atomically installs Air.

func InstallHost

func InstallHost(ctx context.Context, version, target string, artifact sdk.ToolArtifact) (string, error)

InstallHost downloads, verifies, and atomically installs a raw host artifact.

func InstallTinyGo

func InstallTinyGo(ctx context.Context, options InstallTinyGoOptions) (string, error)

InstallTinyGo downloads, verifies, and atomically installs TinyGo.

func InstallWasmTools

func InstallWasmTools(ctx context.Context, options InstallWasmToolsOptions) (string, error)

InstallWasmTools downloads, verifies, and atomically installs wasm-tools.

func TinyGo

func TinyGo(options TinyGoOptions) (string, error)

TinyGo returns the selected TinyGo executable. Selection order is explicit override, KARTY_TINYGO, then the CLI-managed user cache.

func WasmTools

func WasmTools(version string) (string, error)

WasmTools returns the SDK-pinned wasm-tools executable from the Karty cache.

Types

type AirOptions

type AirOptions struct {
	Override string
	Version  string
	CacheDir string
}

AirOptions identifies a managed Air executable or an explicit override.

type EnsureOptions

type EnsureOptions struct {
	GoOverride        string
	TinyGoOverride    string
	WasmToolsOverride string
	AirOverride       string
	NeedGo            bool
	NeedTinyGo        bool
	NeedWasmTools     bool
	NeedAir           bool
}

EnsureOptions selects the SDK tools needed by a command. An explicit tool path is deliberately never downloaded or replaced.

type EnsurePaths

type EnsurePaths struct {
	Go        string
	TinyGo    string
	WasmTools string
	Air       string
}

EnsurePaths reports the resolved locations of tools that Ensure checked.

func Ensure

func Ensure(ctx context.Context, manifest sdk.Manifest, options EnsureOptions) (EnsurePaths, error)

Ensure verifies that the selected SDK tools are ready to run, downloading missing managed tools into the checksum-verified Karty cache. It does not download tools supplied through explicit command-line overrides.

type GoOptions

type GoOptions struct {
	Override string
	Version  string
	Getenv   func(string) string
}

GoOptions configures the Go compiler selection.

type InstallAirOptions

type InstallAirOptions struct {
	Version  string
	Artifact sdk.ToolArtifact
	CacheDir string
	Platform string
	Download func(context.Context, string) (io.ReadCloser, error)
}

InstallAirOptions describes a verified Air release artifact.

type InstallTinyGoOptions

type InstallTinyGoOptions struct {
	Version  string
	Artifact sdk.ToolArtifact
	CacheDir string
	Platform string
	Download func(context.Context, string) (io.ReadCloser, error)
}

InstallTinyGoOptions identifies a TinyGo release and where to install it.

type InstallWasmToolsOptions

type InstallWasmToolsOptions struct {
	Version  string
	Artifact sdk.ToolArtifact
	CacheDir string
	Platform string
	Download func(context.Context, string) (io.ReadCloser, error)
}

InstallWasmToolsOptions identifies a wasm-tools release and where to install it.

type TinyGoOptions

type TinyGoOptions struct {
	Override string
	Version  string
	CacheDir string
	Getenv   func(string) string
}

TinyGoOptions supplies the supported TinyGo selection inputs.

Jump to

Keyboard shortcuts

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