Documentation
¶
Overview ¶
Package zig provides a Zig builder that downloads toolchains from ziglang.org.
Import this package for its side effects to register the builder:
import _ "github.com/Highload-fun/builders/zig"
Index ¶
Constants ¶
View Source
const BuilderId = "zig"
BuilderId is the identifier used to register and look up this builder.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Branch ¶
type Branch struct {
sync.Mutex `json:"-"`
Version string `json:"version"`
Date string `json:"date"`
AMD64 *Download `json:"x86_64-linux"`
}
Branch represents a Zig release branch from the ziglang.org JSON index.
type Download ¶
type Download struct {
Tarball string `json:"tarball"`
SHASum string `json:"shasum"`
Size string `json:"size"`
}
Download holds the tarball URL and metadata for a platform-specific Zig release.
type Zig ¶
Zig implements builders.Builder for the Zig programming language.
func (*Zig) Build ¶
func (zig *Zig) Build(ctx context.Context, sb *sandbox.Sandbox, version string, flags []string) error
Build compiles Zig source code inside the sandbox using "zig build-exe". If version is empty, "0.13.0" is used. The toolchain is downloaded on demand and cached in builders.CompilersHostDir.
Click to show internal directories.
Click to hide internal directories.