0Pricing
Zig Academy · Lesson

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.gz

All lessons in this course

  1. Importing Files with @import
  2. Structuring a Multi-File Project
  3. build.zig.zon and the Package Manager
  4. Adding a Third-Party Module
← Back to Zig Academy