Zig codebase initializer.
- Zig 100%
| .github/workflows | chore: update action versions | |
| src | chore: update action versions | |
| .gitattributes | style: improve comments | |
| .gitignore |
feat: run git init in new codebase by default
|
|
| build.zig | fix: release custom step | |
| build.zig.zon | chore: update Zig | |
| LICENSE | chore | |
| README.md | feat(exe/lib): custom build steps | |
liza
Zig codebase initializer.
Usage
Executable
- Build from source:
git clone https://codeberg.org/tensorush/liza.git
cd liza/
zig build run -- -h
- Download latest release:
wget https://github.com/tensorush/liza/releases/latest/download/<archive>
tar -xf <archive> # Unix
unzip <archive> # Windows
./<binary> -h
Features
-
Zig Executable Template (
exe):- Public API module creation.
- Dependency package usage.
- Build steps:
install(default):- Zig executable installation.
- Common build steps execution (see below).
run: Zig executable run.- Custom build steps (see below).
- Optional build steps (see below).
- Common build options exposure (see below).
-
Zig Library Template (
lib):- Public root module creation.
- Build steps:
install(default):- Zig static library installation.
- Common build steps execution (see below).
run: Example suite execution.- Custom build steps, except
release(see below). - Optional build steps (see below).
- Common build options exposure (see below).
-
Zig Build Template (
bld):- Public Translate-C module creation.
- Lazy dependency package usage.
- Configuration option usage.
- Build steps:
install(default):- C/C++ static library installation.
- Common build steps execution (see below).
-
Common Build Steps:
test: Test suite execution.fmt: Formatting check execution.
-
Custom Build Steps:
-
Optional Build Steps:
doc($d): Documentation emission (-d,doc).cov($c): Kcov source code coverage generation (-c,cov).lint($l): Vale markup prose linting check execution (-l,lint).spell($s): Typos source code spelling check execution (-s,spell).check($k): Build compilation check for ZLS Build-On-Save (-k,check).
-
Common Build Options:
-Ddebug: Test suite execution under LLDB debugger.-Dstrip: Compilation without stack trace printing code.-Dprofile: Compilation with Tracy profiler Zig bindings support.-Dno-bin -fincremental --watch: Incremental compilation without binary emission.
-
GitHub / Forgejo / Woodpecker CI Workflow Template Jobs:
install:- Main artifacts' installation.
test: Test suite execution.fmt: Formatting check execution.- (GitHub-only)
cov($c): Kcov source code coverage publication to Codecov (-c,cov).
-
GitHub / Forgejo / Woodpecker CD Workflow Template Jobs:
- (
exe-/lib-only)emit→deploy: Documentation emission and deployment to GitHub Pages or Codeberg Pages (-d,doc):- (Woodpecker-only) Generate Codeberg access token with
repository:writepermission and add it asTOKENsecret available onPushevent. - (Woodpecker-only) Add email as
EMAILsecret available onPushevent.
- (Woodpecker-only) Generate Codeberg access token with
- (
-
GitHub / Woodpecker Release Workflow Jobs:
- (
exe-only)release: Release publication using minisign:- Generate key pair without password:
minisign -GW. - Add
./minisign.pubasMINISIGN_PUBLIC_KEYsecret (available onTagevent in Woodpecker). - Add
~/.minisign/minisign.keyasMINISIGN_SECRET_KEYsecret (available onTagevent in Woodpecker). - (Woodpecker-only) Generate Codeberg access token with
misc:readandrepository:writepermissions and add it asTOKENsecret available towoodpeckerci/plugin-releaseonTagevent.
- Generate key pair without password:
- (
-
MIT License Template:
$y: Current year.$n: User name.
-
.gitignoreTemplate:$c: Kcov source code coverage artifacts (-c,cov).
-
.gitattributes.