Command-line Zig codebase initializer.
git clone https://codeberg.org/tensorush/liza.git
cd liza/
zig build exe -- -h
wget https://github.com/tensorush/liza/releases/latest/download/< archive>
tar -xf < archive> # Unix
unzip < archive> # Windows
./< binary> -h
Add liza
dependency to build.zig.zon
:
zig fetch --save git+https://codeberg.org/tensorush/liza.git
Use liza
dependency in build.zig
:
const liza_dep = b .dependency ("liza" , .{
.target = target ,
.optimize = optimize ,
});
const liza_mod = liza_dep .module ("liza" );
< std .Build .Step .Compile > .root_module .addImport ("liza" , liza_mod );
Public API module creation.
Dependency package usage.
Build steps :
install
(default): All-step execution, except for run
, check
, and release
.
exe
: Zig executable installation.
run
: Zig executable run.
doc
($d
): Documentation emission (--add-doc
).
test
: Test suite execution.
cov
($c
): Code coverage generation (--add-cov
).
fmt
: Formatting check execution.
check
($s
): Compilation check for ZLS Build-On-Save (--add-check
).
release
: Release binaries' installation and archiving.
Public root module creation.
Build steps :
install
(default): All-step execution, except for example-run
and check
.
lib
: Zig static library installation.
doc
($d
): Documentation emission (--add-doc
).
example
: Example suite installation.
example-run
: Example suite run.
test
: Test suite execution.
cov
($c
): Code coverage generation (--add-cov
).
fmt
: Formatting check execution.
check
($s
): Compilation check for ZLS Build-On-Save (--add-check
).
Public Translate-C module creation.
Lazy dependency package usage.
Configuration option usage.
Build steps :
install
(default): All-step execution.
lib
: C/C++ static library installation.
test
: Test suite execution.
fmt
: Formatting check execution.
WGSL shader usage.
Build steps :
install
(default): All-step execution, except for run
.
exe
: Mach executable installation.
run
: Mach executable run.
test
: Test suite execution.
fmt
: Formatting check execution.
run
/example
/lib
/exe
($s
): either exe
's executable run, lib
's example suite execution, bld
's library installation, or app
's executable installation.
test
: Test suite execution and either exe
's or lib
's GitHub-only code coverage publication to Codecov (--add-cov
).
fmt
: Formatting check execution.
emit
→deploy
: either exe
's or lib
's documentation emission and deployment to GitHub Pages or Codeberg Pages :
(Woodpecker-only) Generate Codeberg access token with repository:write
permission and add it as TOKEN
secret available on Push
event.
(Woodpecker-only) Add email as EMAIL
secret available on Push
event.
release
: exe
's release publication using minisign
:
Generate key pair without password: minisign -GW
.
Add ./minisign.pub
as MINISIGN_PUBLIC_KEY
secret (available on Tag
event in Woodpecker).
Add ~/.minisign/minisign.key
as MINISIGN_SECRET_KEY
secret (available on Tag
event in Woodpecker).
(Woodpecker-only) Generate Codeberg access token with misc:read
and repository:write
permissions and add it as TOKEN
secret available to woodpeckerci/plugin-release
on Tag
event.
$y
: Current year.
$n
: User name.
$c
: Code coverage artifacts.