Skip to content

Latest commit

 

History

History
69 lines (41 loc) · 2.11 KB

File metadata and controls

69 lines (41 loc) · 2.11 KB

Extensions for bzlmod.

zig

zig = use_extension("@rules_zig//zig:extensions.bzl", "zig")
zig.toolchain(default, zig_version)
zig.index(file)
zig.mirrors(urls)

Installs a Zig toolchain.

Every module can define multiple toolchain versions. All these versions will be registered as toolchains and you can select the toolchain using the @zig_toolchains//:version build flag.

The latest version will be the default unless the root module explicitly declares one as the default.

TAG CLASSES

toolchain

Fetch and define toolchain targets for the given Zig SDK version.

Defaults to the latest known version.

Attributes

Name Description Type Mandatory Default
default Make this the default Zig SDK version. Can only be used once, and only in the root module. Boolean optional False
zig_version The Zig SDK version. String required

index

Extend the set of known Zig SDK versions based on a Zig version index.

The provided index must use a schema that is compatible with the upstream index.

Attributes

Name Description Type Mandatory Default
file The Zig version index JSON file. Label required

mirrors

Attributes

Name Description Type Mandatory Default
urls The mirrors base URLs. List of strings required