-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Learning Zig
By :
Since we’ve got plenty of ground to cover, let’s start with the very first entry point to create your next Zig masterpieces. Enter zig init—Zig’s way of saying, “Here’s a flashlight, now get out of the boilerplate mines.” You’ll initialize projects, dissect build.zig, and bend the build system to your will. No incantations required.
Let’s cut to the chase (and the anxiety). Just type zig init in a new directory in your terminal and hit Enter. Boom! Now, you’re officially initiated.
So you ran zig init and got a build.zig file, a build.zig.zon file, and two Zig files you didn’t ask for. Congratulations — you’ve just adopted a robot butler that insists on folding your code into origami. Spoiler: Zig assumes you’ll write a library, even if you’re just...