# zig

> For the complete documentation index, see [llms.txt](https://docs.ringleader.dev/llms.txt).


> The Zig compiler toolchain, from the official release archives.


Installs the Zig compiler (`zig`) from the official release archive on ziglang.org. The
toolchain unpacks into `/usr/local/zig`, and `zig` is linked into `/usr/local/bin`, so it is
on the PATH of both root and the login user.

```yaml
devtools:
  - name: zig
```

## Version behavior

| `version` | Result |
|-----------|--------|
| omitted | a pinned default release, `0.17.0` |
| `0.15.2` | that exact release |
| `v0.15.2` | normalized to `0.15.2` |
| a development build, such as `0.18.0-dev.123+abcdef0` | that build, from ziglang.org's development builds |

Ringleader checks each download against the SHA-256 digest ziglang.org publishes for releases
0.13.0, 0.14.0, 0.14.1, 0.15.1, 0.15.2, 0.16.0 and 0.17.0. Any other version installs
without that check.

Changing `version` replaces the installed toolchain on the next setup pass: the recipe
removes `/usr/local/zig` and unpacks the new release in its place.

## Updates

With `updatePolicy: latest` and no `version`, Zig takes the
[Ringleader default route](https://docs.ringleader.dev/reference/tools/devtools/#update-routes). It moves when an update to
Ringleader raises the default release.

## Example

```yaml
devtools:
  - name: zig
    version: "0.16.0"
```

## Notes

- The download matches the workstation's architecture, `x86_64` or `aarch64`.
- Works on Debian, Ubuntu, and Alpine.

