# `zig_package_probe`

Acquires one specified Zig source and emits a native URL/hash receipt in `fetch/build.zig.zon`. Normally generated by [`zig_dependency_update`](/reference/prelude/zig_dependency_update).

| Attribute | Type | Required | Meaning |
| --- | --- | --- | --- |
| `url` | string | yes | Selected source URL or local archive/directory path |
| `zig` | string | no | Native compiler; defaults to `zig` on `PATH` |

Declare local source bytes in `srcs`. Struo runs `zig fetch --save=source` in a dependency-free scratch project with copied inputs and private native caches. Zig records this one source under the scratch manifest's `source` alias, including the immutable commit URL for Git references. The action does not follow the source's dependency declarations or change workspace sources. It clears private caches and the scratch manifest, and bypasses action caching because the source has no authenticated pin yet.

The `artifact` provider exposes the scratch `build.zig.zon` receipt. The probe does not publish a reusable package tree. A later pinned build acquires and verifies its own source through [`zig_package_source`](/reference/prelude/zig_package_source).

Workspace-local archive inputs are first copied to immutable declared outputs. Update proposals hash those snapshots rather than rereading a potentially changed origin. Directory inputs remain useful for explicit low-level native hash probes, but a native manifest URL must name an archive; use a path dependency for a directory.
