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 ¶
- func Air(options AirOptions) (string, error)
- func EnsureHost(ctx context.Context, manifest sdk.Manifest, target string) (string, error)
- func Go(ctx context.Context, options GoOptions) (string, error)
- func Host(version, target string) (string, error)
- func InstallAir(ctx context.Context, options InstallAirOptions) (string, error)
- func InstallHost(ctx context.Context, version, target string, artifact sdk.ToolArtifact) (string, error)
- func InstallTinyGo(ctx context.Context, options InstallTinyGoOptions) (string, error)
- func InstallWasmTools(ctx context.Context, options InstallWasmToolsOptions) (string, error)
- func TinyGo(options TinyGoOptions) (string, error)
- func WasmTools(version string) (string, error)
- type AirOptions
- type EnsureOptions
- type EnsurePaths
- type GoOptions
- type InstallAirOptions
- type InstallTinyGoOptions
- type InstallWasmToolsOptions
- type TinyGoOptions
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 ¶
EnsureHost installs the host selected by the project SDK when that SDK publishes a checksum-pinned release 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.
Types ¶
type AirOptions ¶
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 ¶
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 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.