Liza: Zig codebase initializer

Hi, everyone!

I’ve been reusing a few Zig project patterns when staring a new repo, so I decided to combine them into a “templated” alternative to zig init. Hope you find it useful!

You can initialize a Zig executable project with 4 positional arguments like this:
zig build exe -- codebase-name "Codebase description." username "User Name"

Or a Zig library project (with my default positional arguments):
zig build exe -- -l liza "Zig codebase initializer." tensorush "Jora Troosh"

Btw, you’ll see a panic if a directory of the same name already exists.

Any feedback and questions are welcome as always!

6 Likes

Great name - Liza, haha. I will definitely give this a star when I get signed in after work.

1 Like

I think it’s really cool, If I may give one suggestion, it would be to add to the .gitignore, also rules for everything related to C and C dependency, as Zig is meant to be used with C/C libraries.

1 Like

Thanks!

Well, the only C-related files that makes sense to put in a .gitignore are the compiled ones, like pre-compiled headers, static/shared libraries and executables. But I’ve never seen those in a .gitignore file belonging to a Zig codebase and for a good reason – every compiled C or Zig file is meant to end up in zig-out/. That’s why the current .gitignore is already exhaustive for a standard Zig project.

3 Likes