zig

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2026 License: GPL-3.0 Imports: 10 Imported by: ? 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 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

type Zig struct {
	sync.Mutex `json:"-"`
	// contains filtered or unexported fields
}

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.CompilersDir.

func (*Zig) GetVersions

func (zig *Zig) GetVersions(ctx context.Context) (versions []builders.Version, err error)

GetVersions fetches available Zig versions from the ziglang.org JSON index. The "master" branch is excluded. Results are cached for 1 hour.

Jump to

Keyboard shortcuts

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