# `zig_package`

Represents one locked Zig package as a normal Zig module provider. These
targets are normally generated by
[`zig_dependencies`](/reference/prelude/zig_dependencies), but remain visible
through target and dependency queries.

## Attributes

| Attribute | Type | Required | Meaning |
| --- | --- | --- | --- |
| `main` | string | yes | Public root Zig module |
| `import_name` | string | no | Edge-local name used by dependants |
| `import_names` | map of strings | no | Import-name overrides for transitive packages |
| `package_name` | string | yes | Name declared by the package, or its dependency alias |
| `package_version` | string | no | Semantic version declared by the package |
| `package_fingerprint` | string | no | Stable fingerprint declared by modern Zig package manifests |
| `source_root` | string | yes | Materialized package source directory |
| `source_url` | string | no | Source location recorded by the parent manifest |
| `source_hash` | string | no | Zig content multihash recorded by the declaring manifest. Once preserves it but does not reimplement Zig's source verification |
| `source_path` | string | no | Local package path recorded by the parent manifest |
| `lazy` | boolean | no | Whether the package is marked for lazy fetching |

## Providers

- `zig_module`

The provider carries the same direct and transitive module contexts as
`zig_library`, plus locked package identity and source metadata. It performs no
network operation and is compiled at the use site by a consuming Zig artifact
target.
