Adding a Third-Party Module
Fetch and link an external package.
From Manifest to Code
A dependency listed in build.zig.zon is downloaded, but not yet usable. You must wire it into build.zig to reach it in code. 🔌
Step One: zig fetch
Start by adding the package. zig fetch with --save downloads it and records its url and hash in your manifest automatically.
zig fetch --save https://example.com/mylib-1.0.0.tar.gzAll lessons in this course
- Importing Files with @import
- Structuring a Multi-File Project
- build.zig.zon and the Package Manager
- Adding a Third-Party Module