cuetoolchain

package
v0.2026331.808 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 14 Imported by: 2 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 cuetoolchain is THE single home for the pinned `cue` CLI (R3).

The schema→Go params pipeline no longer runs this CLI: `schemaparams` composes and generates in-process through the CUE Go API (opencharly/spec#271), so generation and composition share one offline resolution path and no binary is provisioned. The CLI remains the pinned tool for AUTHORING the schema as a module — `cue eval ./schema`, `cue vet`, a scratch `cue exp` — provisioned checksum-verified from a pinned release by the `bootstrap-cue` task and by the charly-side cache directory helper.

The pin AND the provisioning live here, once: `cuetoolchain.Ensure` is what every caller uses to obtain the toolchain (the `bootstrap-cue` task used to carry the same version, URL and checksum inline in shell — two declarations of one toolchain, which is exactly what this package removes). One pin, one home, one fetcher.

STANDALONE: stdlib only, so both callers can import it without pulling in the packages they generate.

Index

Constants

View Source
const Member = "cue"

Member is the path of the CLI inside the release tarball.

View Source
const Version = "v0.16.1"

Version is the pinned release tag of the `cue` CLI.

Variables

This section is empty.

Functions

func Ensure

func Ensure(dir string) (string, error)

Ensure returns a path to the pinned cue CLI, provisioning it into dir on first use and verifying it on every call. It is the ONE fetcher:

  • an existing binary is accepted only if it REPORTS the pinned version, so a stale cache is re-provisioned rather than served as success;
  • an unpinned arch fails before any download, naming the arch and the remedy;
  • the checksum is verified BEFORE extraction, so a mismatch leaves no half-written binary behind (the write is atomic: tmp + rename);
  • every failure names the pin, the URL and the destination.

func ExtractMember

func ExtractMember(tgz []byte, dest string) error

ExtractMember writes the release tarball's Member entry to dest atomically (tmp + rename), so an interrupted extraction cannot leave a partial binary at the destination path.

func Pin

func Pin() string

Pin names the pinned toolchain for the running host in one line, for a `--help` or a log line: what will be provisioned, and which arch rule applies. It is the ONE place a caller takes that sentence from.

func SHA256

func SHA256(goarch string) (string, bool)

SHA256 returns the pinned checksum for a GOARCH and whether that arch is pinned at all — the check a caller must make BEFORE fetching, so an unpinned arch fails with a remedy rather than an unverifiable download.

func Tarball

func Tarball(goarch string) string

Tarball returns the release tarball name for a GOARCH, or "" when that arch is not checksum-pinned.

func URL

func URL(goarch string) string

URL returns the pinned download URL for a GOARCH, or "" when that arch is not checksum-pinned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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