Skip to content

Commit 8813940

Browse files
committed
Update zig-for-c-devs.md
1 parent 3297c26 commit 8813940

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

content/posts/zig-for-c-devs.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,12 @@ var result = my_module.my_function();
377377

378378
All Zig files are modules, and you can import any ``.zig`` file directly. There are no header/implementation separation like C.
379379

380+
Zig does not have an official package manager like Cargo or NuGet. Dependencies are normally included as source in your repository, and `build.zig` is used to wire them into the build. That means Zig code dependencies are usually compiled together as source, so Zig projects are effectively static at the Zig-source level.
381+
382+
Many projects use vendoring or git submodules to manage external libraries, because keeping dependency source in the tree is the most common way to share Zig code. But git submodules are a workflow choice, not a Zig language feature.
383+
384+
Multiple files can safely `@import("same_module.zig")`; the compiler treats it as the same shared module and does not duplicate the code.
385+
380386
## Strings and Arrays
381387

382388
**String Literals:**

0 commit comments

Comments
 (0)