# `Barnacle.Zig`
[🔗](https://github.com/physarella/barnacle/blob/v0.1.0/lib/barnacle/zig.ex#L1)

Locates a `zig` executable or optionally downloads a standalone Zig toolchain
into the project-local `.barnacle/` directory (never into `$HOME`).

# `install_local!`

```elixir
@spec install_local!(String.t()) :: String.t()
```

Downloads and extracts a standalone Zig toolchain into `.barnacle/` in the current project.

# `resolve!`

```elixir
@spec resolve!(keyword()) :: String.t()
```

Resolves the `zig` executable path in order:

1. Explicit `opts[:zig]`
2. `ZIG_EXECUTABLE_PATH` environment variable
3. System `zig` on `PATH`
4. Project-local `.barnacle/zig-*/zig(.exe)`
5. Prompts to download standalone Zig into `.barnacle/`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
