avatar_url stringlengths 47 116 ⌀ | name stringlengths 1 46 | full_name stringlengths 7 60 | created_at stringdate 2016-04-01 08:17:56 2025-05-20 11:38:17 | description stringlengths 0 387 ⌀ | default_branch stringclasses 44
values | open_issues int64 0 4.93k | stargazers_count int64 0 78.2k | forks_count int64 0 3.09k | watchers_count int64 0 78.2k | tags_url stringlengths 0 94 | license stringclasses 27
values | topics listlengths 1 20 | size int64 0 4.82M | fork bool 2
classes | updated_at stringdate 2018-11-13 14:41:18 2025-05-22 08:23:54 | has_build_zig bool 2
classes | has_build_zig_zon bool 2
classes | zig_minimum_version stringclasses 50
values | repo_from stringclasses 3
values | dependencies listlengths 0 38 | readme_content stringlengths 0 437k | dependents listlengths 0 21 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
https://avatars.githubusercontent.com/u/1950733?v=4 | setup-zine | kristoff-it/setup-zine | 2025-04-01T17:12:05Z | GitHub Action to get the Zine static site generator | main | 0 | 1 | 0 | 1 | https://api.github.com/repos/kristoff-it/setup-zine/tags | MIT | [
"blog",
"ssg",
"zig"
] | 9 | false | 2025-04-21T19:07:32Z | false | false | unknown | github | [] | setup-zine
GitHub Action to get the <a>Zine static site generator</a>.
Usage
In your GitHub Actions workflow file add a step like this:
<code>yaml
- name: Setup Zine
uses: kristoff-it/setup-zine@v1
with:
version: v0.10.0</code>
The <code>version</code> field is mandatory and must be <code>v0.10.0</code> or higher (previous
versions of Zine have no artifacts associated).
The action will make <code>zine</code> available in PATH, after that it's up to you to run <code>zine release</code>.
If you are using Zine in conjunction with Zig (i.e. you integrate Zine in your
<code>build.zig</code>) then using this action will allow you to avoid building Zine from
source by setting <code>.zine = .system</code> in <code>build.zig</code>.
That said, be aware that <code>mlugg/setup-zig</code> will save your Zig cache dir and so
building Zine will also be cached. The upside of using this action anyway is
that it will save you from "slow startups" when your cache expires.
Full GitHub Pages workflow example.
```yaml
name: Deploy the website to Github Pages
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Change if you need git info
<code> - name: Setup Zine
uses: kristoff-it/setup-zine@v1
with:
version: v0.10.0-preview
- name: Release
run: zine release
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'public'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
</code>
```
This last example workflow will only work if you have setup GitHub Pages to deploy from GitHub Actions in your repo's settings section. | [] |
https://avatars.githubusercontent.com/u/199244440?v=4 | manalith-old | manalith-org/manalith-old | 2025-02-14T13:10:35Z | Modern operating system. | main | 0 | 1 | 0 | 1 | https://api.github.com/repos/manalith-org/manalith-old/tags | MPL-2.0 | [
"kernel",
"modern",
"osdev",
"zig"
] | 11 | false | 2025-02-15T14:50:14Z | true | true | unknown | github | [
{
"commit": "69235d363c077a090a9b7a313ed8c6f73e4a4807.zip",
"name": "ultra",
"tar_url": "https://github.com/UltraOS/UltraProtocol/archive/69235d363c077a090a9b7a313ed8c6f73e4a4807.zip.tar.gz",
"type": "remote",
"url": "https://github.com/UltraOS/UltraProtocol"
},
{
"commit": "201100c968ad... |
About
Mannalith is a highly exprimental operating system that tries to be modern, It is written in zig and some C. It tries to be unix-like but with some changes. | [] |
https://avatars.githubusercontent.com/u/78318848?v=4 | zig-wasm | Supakornn/zig-wasm | 2025-04-12T21:17:37Z | WebAssembly with Zig (Demo) | main | 0 | 1 | 0 | 1 | https://api.github.com/repos/Supakornn/zig-wasm/tags | - | [
"wasm",
"webassembly",
"zig",
"ziglang"
] | 223 | false | 2025-04-12T21:43:58Z | true | false | unknown | github | [] | WebAssembly with Zig
Build
```bash
Build the project
zig build
```
<code>py
python3 server.py</code>
Visit the website
<code>bash
http://localhost:8000</code> | [] |
https://avatars.githubusercontent.com/u/151967?v=4 | bfstree.zig | mrusme/bfstree.zig | 2025-03-18T21:40:49Z | Breadth-first search implementation in Zig | master | 0 | 1 | 0 | 1 | https://api.github.com/repos/mrusme/bfstree.zig/tags | LGPL-3.0 | [
"bfs",
"bfs-algorithm",
"bfs-tree",
"zig",
"zig-library"
] | 12 | false | 2025-05-14T16:21:41Z | true | true | 0.14.0 | github | [] | bsftree
<a></a>
Breadth-first search implementation in Zig that uses Zig <code>0.14</code>.
Usage
Refer to the <code>test "BFS Path Finding"</code> case in <code>src/root.zig</code>. :-)
Contributing
Contributions are welcome, please submit a PR on GitHub. | [] |
https://avatars.githubusercontent.com/u/565124?v=4 | adr | peterhellberg/adr | 2025-03-04T00:04:46Z | A tool for managing ADRs (Architecture Decision Records) in a directory. | main | 0 | 1 | 0 | 1 | https://api.github.com/repos/peterhellberg/adr/tags | MIT | [
"adr",
"cli",
"zig"
] | 30 | false | 2025-03-04T15:01:24Z | true | true | 0.14.0-dev.3451+d8d2aa9af | github | [
{
"commit": "d9142c73aedc5698beba58b3fbf2bcfe69864778.zip",
"name": "zul",
"tar_url": "https://github.com/karlseguin/zul/archive/d9142c73aedc5698beba58b3fbf2bcfe69864778.zip.tar.gz",
"type": "remote",
"url": "https://github.com/karlseguin/zul"
}
] | adr
A tool for managing ADRs <em>(Architecture Decision Records)</em> in a directory <em>(ideally inside of a repo)</em>.
<blockquote>
[!Note]
Initially based on <a>https://github.com/bradcypert/adl/</a>
Adjusted to be built as a <code>.wasm</code> as well as depending on <a>https://github.com/karlseguin/zul/</a> for <code>DateTime</code>
formatting instead of depending on <a>https://github.com/frmdstryr/zig-datetime</a>.
</blockquote>
Background
I wondered how much smaller a <code>.wasm</code> version of this CLI would be in comparison to a native executable.
As it turns out… pretty small (<code>33K</code>)
That said, a native ELF binary compiled with <code>ReleaseSmall</code> is just 10 K bigger than the <code>.wasm</code> binary.
<em>(A WebAssembly runtime is many orders of magnitude larger than that)</em>
Requirements
<ul>
<li><a>Git</a></li>
<li><a>Wasmtime</a> (<code>curl https://wasmtime.dev/install.sh -sSf | bash</code>)</li>
<li><a>Zig</a> (recent master)</li>
</ul>
Installation
<code>.wasm</code> binary
<ol>
<li>Clone the <code>adr</code> repo somewhere, or download <a>adr.wasm</a> on its own.</li>
<li><em>OPTIONALLY:</em> Rebuild the <code>adr.wasm</code> using <code>zig build</code></li>
<li>Add an <code>adr</code> alias to your shell, something like:
<code>shell
alias adr='wasmtime run --dir . ~/Code/GitHub/peterhellberg/adr/zig-out/bin/adr.wasm'</code></li>
</ol>
<blockquote>
[!Tip]
You can also run the CLI via <code>zig build run -- create Your new adr</code>
</blockquote>
Native binary
<ol>
<li>Clone the <code>adr</code> repo somewhere</li>
<li>Build the native <code>adr</code> binary using <code>zig build native</code></li>
<li>Copy <code>zig-out/bin/adr</code> to somewhere in your path</li>
</ol>
Usage
Generating a new ADR
<code>adr create WebAssembly runtime for adr</code>
This will create <em>(or update)</em> a <code>README.md</code> in your <code>adr/</code> directory <em>(creating that directory if necessary)</em>.
If this was your first ADR, it would create the file <a>00000-WebAssembly-runtime-for-adr.md</a>.
It would then update the <a>README</a> in the same directory with a link to the newly created ADR document.
Regenerating the README
<code>sh
adr regen</code>
✨ | [] |
https://avatars.githubusercontent.com/u/280505?v=4 | zmpl-grammar | uzyn/zmpl-grammar | 2025-03-20T09:18:00Z | Code editor grammar for Zmpl | main | 0 | 1 | 0 | 1 | https://api.github.com/repos/uzyn/zmpl-grammar/tags | MIT | [
"grammar",
"sublime-text",
"sublime-text-plugin",
"tmlanguage",
"vscode",
"zig",
"zmpl"
] | 110 | false | 2025-04-27T07:53:48Z | false | false | unknown | github | [] | Zmpl grammar extension
<a>Zmpl</a> is a templating language for Zig.
Learn more about Zmpl at the <a>documentation</a>.
Install
<ul>
<li>Visual Studio Code: install from <a>Visual Studio Code Marketplace</a>.</li>
<li>Sublime Text: install through Package Control (search for "Zmpl").</li>
</ul>
Features
This extension provides syntax highlighting for Zmpl files in both Visual Studio Code and Sublime Text.
Preview in Monokai theme:
Credits
<ul>
<li><a>Zmpl</a> and its icon is copyright of Robert Farrell.</li>
<li><a>Zackary Housen's extension</a> for the inspiration and reference.</li>
</ul>
License
MIT License. Copyright (c) 2025 <a>U-Zyn Chua</a>. | [] |
https://avatars.githubusercontent.com/u/192961174?v=4 | ziro | dacheng-zig/ziro | 2025-03-30T14:53:02Z | ziro - a coroutine and async io library for zig, forked from zigcoro | dev | 1 | 1 | 0 | 1 | https://api.github.com/repos/dacheng-zig/ziro/tags | 0BSD | [
"async",
"coroutine",
"zig"
] | 201 | false | 2025-05-10T15:08:57Z | true | true | unknown | github | [
{
"commit": "94ed6af7b2aaaeab987fbf87fcee410063df715b",
"name": "libxev",
"tar_url": "https://github.com/mitchellh/libxev/archive/94ed6af7b2aaaeab987fbf87fcee410063df715b.tar.gz",
"type": "remote",
"url": "https://github.com/mitchellh/libxev"
}
] | ziro
A Zig Coroutine library using stackful asymmetric coroutines.
Supports async IO via <a><code>libxev</code></a>.
<a></a>
CI tests against zig 0.14.0
Coroutines supported on Windows <code>x86_64</code>, Linux {<code>x86_64</code>, <code>aarch64</code>, <code>riscv64</code>}, and Mac {<code>x86_64</code>, <code>aarch64</code>}.
Async IO supported on Linux {<code>x86_64</code>, <code>aarch64</code>}, and Mac {<code>x86_64</code>, <code>aarch64</code>}.
Depend
<code>build.zig.zon</code>
<code>zig
.ziro = .{
.url = "git+https://github.com/dacheng-zig/ziro#<commit hash>",
.hash = "<hash>",
},</code>
<code>build.zig</code>
<code>zig
const ziro = b.dependency("ziro", .{}).module("ziro");
my_lib.addImport("ziro", ziro);</code>
Current status
<em>Updated 2024/04/23</em>
Alpha.
async/await, suspend/resume, Channel, WaitGroup, and async IO are all functional and (CI) tested.
See <a>future work</a> for more.
Coroutine API
```
// High-level API
xasync(func, args, stack)->FrameT
xawait(FrameT)->T
xframe()->Frame
xresume(frame)
xsuspend()
xsuspendBlock(func, ptr)
Condition
init(Executor)
broadcast()
signal()
wait()
Channel(T, .{.capacity = n})
init(Executor)
send(T)
recv->?T
close()
WaitGroup
init(Executor)
inc()
add(usize)
done()
wait()
Executor
init()
runSoon(Func)
runAllSoon(Func)
tick()->bool
// Optional thread-local environment
initEnv
// Low-level API
// Note: Frame = <em>Coro, FrameT = CoroT
Coro
getStorage(T)-></em>T
CoroT(func, opts)
frame()->Frame
xnextStart(frame)->YieldT
xnext(frame, inject)->YieldT
xnextEnd(frame, inject)->ReturnT
xyield(yield)->InjectT
xreturned(frame)->ReturnT
// Stack utilities
stackAlloc(allocator, size)->[]u8
remainingStackSize()->usize
```
Async IO API
<a><code>ziro.asyncio</code></a> provides coroutine-based async IO functionality
building upon the event loop from <a><code>libxev</code></a>,
providing coroutine-friendly wrappers to all the <a>high-level
async APIs</a>.
See <a><code>test_aio.zig</code></a> for usage examples.
```
// Executor
Executor
init(loop)
// Top-level coroutine execution
run
// Optional thread-local environment
initEnv
// IO
sleep
TCP
accept
connect
read
write
close
shutdown
UDP
read
write
close
Process
wait
File
read
pread
write
pwrite
close
AsyncNotification
wait
```
Switching to Zig's async/await
It's trivial to switch to Zig's async/await whenever it's ready.
Translation (ziro then Zig):
```zig
// async
var frame = try xasync(func, args, stack);
var frame = async func(args);
// await
const res = xawait(frame);
const res = await frame;
// @frame
var frame = xframe();
var frame = @frame();
// suspend
xsuspend();
suspend {}
// suspend block
xsuspendBlock(func, args);
suspend { func(args); }
// resume
xresume(frame);
resume frame;
// nosuspend
asyncio.run(loop, func, args, stack)
nosuspend asyncio.run(loop, func, args, null)
// xev IO
// No changes needed to the calls
try asyncio.sleep(loop, 10);
```
The above assumes the Zig async API that was available in <a>Zig
0.10.1</a>, which I expect (but do not know) to be similar in 0.12.0.
Performance
I've done some simple benchmarking on the cost of context
switching and on pushing the number of coroutines. Further
investigations on performance would be most welcome, as well
as more realistic benchmarks.
Context switching
This benchmark measures the cost of a context switch from
one coroutine to another by bouncing back and forth between
2 coroutines millions of times.
From a run on an AMD Ryzen Threadripper PRO 5995WX:
```
<blockquote>
zig env | grep target
"target": "x86_64-linux.5.19...5.19-gnu.2.19"
zig build benchmark -- --context_switch
ns/ctxswitch: 7
```
</blockquote>
From a run on an M1 Mac Mini:
```
<blockquote>
zig env | grep target
"target": "aarch64-macos.13.5...13.5-none"
zig build benchmark -- --context_switch
ns/ctxswitch: 17
```
</blockquote>
Coroutine count
This benchmark spawns a number of coroutines and iterates
through them bouncing control back and forth, periodically
logging the cost of context switching. As you increase the
number of coroutines, you'll notice a cliff in performance
or OOM. This will be highly dependent on the amount of free
memory on the system.
Note also that ziro's default stack size is 4096B, which
is the typical size of a single page on many systems.
From a run on an AMD Ryzen Threadripper PRO 5995WX:
```
<blockquote>
zig env | grep target
"target": "x86_64-linux.5.19...5.19-gnu.2.19"
cat /proc/meminfo | head -n3
MemTotal: 527970488 kB
MemFree: 462149848 kB
MemAvailable: 515031792 kB
zig build benchmark -- --ncoros 1_000_000
Running benchmark ncoros
Running 1000000 coroutines for 1000 rounds
ns/ctxswitch: 57
...
zig build benchmark -- --ncoros 100_000_000
Running benchmark ncoros
Running 100000000 coroutines for 1000 rounds
ns/ctxswitch: 57
...
zig build benchmark -- --ncoros 200_000_000
Running benchmark ncoros
Running 200000000 coroutines for 1000 rounds
error: OutOfMemory
```
</blockquote>
From a run on an M1 Mac Mini:
```
<blockquote>
zig env | grep target
"target": "aarch64-macos.13.5...13.5-none"
system_profiler SPHardwareDataType | grep Memory
Memory: 8 GB
zig build benchmark -- --ncoros 800_000
Running benchmark ncoros
Running 800000 coroutines for 1000 rounds
ns/ctxswitch: 26
...
zig build benchmark -- --ncoros 900_000
Running benchmark ncoros
Running 900000 coroutines for 1000 rounds
ns/ctxswitch: 233
...
```
</blockquote>
Stackful asymmetric coroutines
<ul>
<li>Stackful: each coroutine has an explicitly allocated stack and
suspends/yields preserve the entire call stack of the coroutine. An
ergonomic "stackless" implementation would require language support and
that's what we expect to see with Zig's async functionality.</li>
<li>Asymmetric: coroutines are nested such that there is a "caller"/"callee"
relationship, starting with a root coroutine per thread. The caller coroutine
is the parent such that upon completion of the callee (the child coroutine),
control will transfer to the caller. Intermediate yields/suspends transfer
control to the last resuming coroutine.</li>
</ul>
The wonderful 2009 paper <a>"Revisiting Coroutines"</a> describes the
power of stackful asymmetric coroutines in particular and their various
applications, including nonblocking IO.
Future work
Contributions welcome.
<ul>
<li>Documentation, code comments, examples</li>
<li>Improve/add allocators for reusable stacks (e.g. Buddy allocator)</li>
<li>Concurrent execution helpers (e.g. xawaitAsReady)</li>
<li>Add support for cancellation and timeouts</li>
<li>More aggressive stack reclamation</li>
<li>Libraries</li>
<li>TLS, HTTP, WebSocket</li>
<li>Actors</li>
<li>Recursive data structure iterators</li>
<li>Parsers</li>
<li>Multi-threading support</li>
<li>Alternative async IO loops (e.g. <a>libuv</a>)</li>
<li>Debugging<ul>
<li>Coro names</li>
<li>Tracing tools</li>
<li>Verbose logging</li>
<li>Dependency graphs</li>
<li>Detect incomplete coroutines</li>
<li>ASAN, TSAN, Valgrind support</li>
</ul>
</li>
<li>C API</li>
<li>Broader architecture support</li>
<li>risc-v</li>
<li>32-bit</li>
<li>WASM (Asyncify?)</li>
<li>comptime?</li>
</ul>
Inspirations
<ul>
<li><a>"Revisiting Coroutines"</a> by de Moura & Ierusalimschy</li>
<li><a>Lua coroutines</a></li>
<li><a>"Structured Concurrency"</a> by Eric Niebler</li>
<li>https://github.com/edubart/minicoro</li>
<li>https://github.com/kurocha/coroutine</li>
<li>https://github.com/kprotty/zefi</li>
</ul> | [
"https://github.com/dacheng-zig/ziro-sleep"
] |
https://avatars.githubusercontent.com/u/112902041?v=4 | ZagOS | artehe/ZagOS | 2025-04-25T20:36:42Z | An operating system written in Zig | main | 0 | 1 | 0 | 1 | https://api.github.com/repos/artehe/ZagOS/tags | Unlicense | [
"64-bit",
"kernel",
"operating-system",
"operating-systems",
"os",
"osdev",
"x86",
"x86-64",
"x86-kernel",
"zig"
] | 159 | false | 2025-05-21T21:50:52Z | false | false | unknown | github | [] | ZagOS
<a></a>
An experimental toy kernel/OS written using <a>Zig</a> as much as possible. Assembly will be used where required for funtionality (e.g loading the GDT in x86/x64), however this ideally will be done using inline assembly rather than seperate assembly files.
Currently the only supported architecture is x86_64 (x64). However the project should hopefully be setup and configured in such a way that if I (or maybe someone else) decides they want to learn and support another architecture then this could be relatively easily implemented.
Contents
<ul>
<li><a>Features & Roadmap</a></li>
<li><a>Development</a></li>
<li><a>Requirements</a></li>
<li><a>Build</a><ul>
<li><a>Options</a></li>
</ul>
</li>
<li><a>Run</a></li>
<li><a>Debug</a></li>
<li><a>License</a></li>
<li><a>3rd Party Acknowledgments</a></li>
<li><a>Contributing</a></li>
<li><a>Light reading</a></li>
</ul>
Features & Roadmap
All the features currently implemented and also the implementation progress of planned future features.
<ul>
<li>Boot</li>
<li>[X] Boot with <a>Limine</a> straight into 64-bit (long mode)</li>
<li>Kernel</li>
<li>[X] Internal logging system</li>
<li>[X] Kernel stack</li>
<li>Panic
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Print stack trace (and possibly other useful information) from panic
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Expand Panic to output full stack traces and other useful information</li>
<li>Architecture<ul>
<li>x86_64</li>
<li>[X] Serial port I/O</li>
<li>[X] GDT and TSS</li>
<li>Interrupts
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Create IDT
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Create ISR handlers
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Create IRQ handlers
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Load ISR and IRQs into IDT
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Load IDT into CPU
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Enable Interrupts
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Configure PIC
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Configure APIC (then disable PIC)
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Enable Interrupts</li>
<li>Memory Management
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Get the Memory Map from Limine
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Physical Memory Manager
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Virtual Memory Manager
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Allocator<ul>
<li>Paging
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Higher Half, while already there we might want to work out if we ware in the right location or do we want to move
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Ensure the permissions of the different kernel ELF sections are correctly applied, for example .text should be read-only, .data should be read-write, .rodata should be read-only, and .bss should be read-write.</li>
</ul>
</li>
</ul>
</li>
<li>Terminal<ul>
<li>Framebuffer</li>
<li>[X] Request from limine</li>
<li>[X] Clear screen</li>
<li>[X] Draw pixels to screen.</li>
<li>Fonts</li>
<li>[X] Bundle font into kernel</li>
<li>[X] Load PSF fonts</li>
<li>[X] Draw fonts / characters
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Parse Unicode table if there is one and use it.
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Save font(s) to disk and then load dynamically as/if they are needed.
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Write text to screen
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Add color support
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Add ANSI support: ANSI (American National Standards Institute) a standardised system of escape codes that modern computer terminals should understand. These escape codes allow a computer program to manipulate terminal color, text effects, clear the screen and move the text cursor around. <a>ANSI Escape Codes - Wikipedia</a>.
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Add Scrolling
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Keyboard Input
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Add cursor?
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Filesystem(s) & Storage drivers (HDD, CD, FLP, Ramdisk)
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Internal Debugger</li>
</ul>
</li>
<li>Testing
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Add testing into GitHub actions.
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Setup test framework for OS (custom runner?)
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Add first unit tests
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Add first integration/runtime test
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Run tests on build?</li>
<li>Long Term (probably the far far far far farrrrrrr future)</li>
<li>User Space
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Switch to (Ring-3)
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> System Call(s)
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Program Loading (ELF executables?)
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> ACPI parsing
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Time / Timers
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> CMOS
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> PIT
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> HPET
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Multithreading / Multiprocessing
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Threads
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Thread Local Storage
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Thread Lists for different priority levels
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Scheduler
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> A scheduler not ready for multiprocessing will probably be fully rewritten.
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Priority Levels: Design in such a way, so threads/processes can have different priority levels.
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Multiprocessing
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Symmetric Multiprocessing
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Graphics / User Interface
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Networking
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Sound
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> USB (Universal Serial Bus)
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Porting Software (e.g compiler)?</li>
</ul>
Development
This section contains all of the information you need to be able to build, run, debug, or test ZagOS.
Requirements
There's a few tools required to build and/or run the OS. If you're on Ubuntu with snap installed (or similar) then you can just run the following commands and it will install everything you should need:
<code>shell
snap install zig --classic --beta
sudo apt update
sudo apt install build-essential gdb grub-common qemu-system-x86 xorriso</code>
However if not then you'll need to install <a>Zig</a> 0.14.0 as well as ensure you have the following tools available on your system:
<ul>
<li>grub-mkrescue</li>
<li>make</li>
<li>xorriso</li>
</ul>
If you want to do any debugging, testing, or running you'll probably want these as well:
<ul>
<li>gdb</li>
<li>qemu</li>
</ul>
Build
You can build the OS by running:
<code>shell
make build</code>
This will download the bootloader (<a>Limine</a>) and build it, before compiling the kernel and assembling everything together into a single bootable ISO image (<code>ZagOS.iso</code>).
Options
There's a couple of different options you can change in the <code>Makefile</code> to configure the OS. The available options are at the top of the file and all of the possible values are listed, you can also see the value below.
``` shell
Available architecture targets: x86_64
ARCH := x86_64
Available optimization levels = Debug, ReleaseSafe, ReleaseFast, ReleaseSmall
OPTIMIZATION_LEVEL := Debug
```
Run
To generate and run an ISO image of ZagOS with Qemu you can run:
<code>shell
make run</code>
This will launch the latest generated ISO image in Qemu with all the standard configured flags. These flags can be edited within the <code>Makefile</code> in case you wish to use a slightly different configuration for Qemu.
Debug
You can run the ZagOS in debug mode which will then launch Qemu and then wait you to connect with gdb by using the command:
<code>shell
make run-debug</code>
Alternatively if you use VS Code then this can be done from within the editor by using the inbuild tasks (or just press F5), this will then automatically connect with GDB for you.
License
This project is licensed under the Unlicense (<a>LICENSE</a> or <a>https://opensource.org/license/Unlicense</a>), with the exceptions of the 3rd party software/assets which are noted below
3rd Party Acknowledgments
ZagOS depends on several other projects for assets and/or software. These dependencies are NOT covered by the for ZagOS License. These are instead licensed as described by each individual project's documentation, and with the licenses used by said projects linked in the list below:
<ul>
<li><a>Limine Bootloader</a> (<a>LICENSE</a>)</li>
<li><a>Tamsyn Font</a> (<a>LICENSE</a>)</li>
</ul>
Contributing
All contributions are welcome in whatever form, from bug reports to feature suggestions, or best of all pull requests.
Light reading
Some very helpful documents which can be useful for developing this OS:
<ul>
<li><a>Limine Boot Protocol</a></li>
</ul> | [] |
https://avatars.githubusercontent.com/u/146390816?v=4 | argp-standalone | allyourcodebase/argp-standalone | 2025-04-11T04:01:10Z | argp-standalone ported to the zig build system | master | 0 | 1 | 0 | 1 | https://api.github.com/repos/allyourcodebase/argp-standalone/tags | LGPL-2.1 | [
"zig",
"zig-package"
] | 12 | false | 2025-04-13T16:23:47Z | true | true | 0.14.0 | github | [] | <a></a>
argp-standalone
This is <a>argp-standalone</a>, packaged for <a>Zig</a>.
Installation
First, update your <code>build.zig.zon</code>:
```
Initialize a <code>zig build</code> project if you haven't already
zig init
zig fetch --save git+https://github.com/allyourcodebase/argp-standalone.git
```
You can then import <code>argp_standalone</code> in your <code>build.zig</code> with:
<code>zig
const argp_dependency = b.dependency("argp_standalone", .{
.target = target,
.optimize = optimize,
});
your_exe.root_module.linkLibrary(argp_dependency.artifact("argp"));</code> | [] |
https://avatars.githubusercontent.com/u/60631511?v=4 | wardrobe | edqx/wardrobe | 2025-05-18T21:51:14Z | Zig Multipart Form Data library | master | 0 | 1 | 0 | 1 | https://api.github.com/repos/edqx/wardrobe/tags | MIT | [
"form-data",
"household-appliance",
"http",
"zig",
"zig-package"
] | 27 | false | 2025-05-20T17:53:03Z | true | true | unknown | github | [] | Wardrobe
A lightweight, simple <a>HTTP <code>multipart/form-data</code></a> library for Zig.
Supports both reading and writing form data payloads.
Writing Usage
Boundary
To start writing form data, you need to create a boundary string for your application. The spec requires
a certain number of bytes of entropy, so Wardrobe helps by giving you a helper struct for creating
boundaries:
<code>zig
const boundary: wardrobe.Boundary = .entropy("MyApplicationBoundary", random);</code>
<code>random</code> is an interface instance of <code>std.Random</code>, for example:
```zig
var prng = std.Random.DefaultPrng.init(@intCast(std.time.microTimestamp()));
const boundary: wardrobe.Boundary = .entropy("MyApplicationBoundary", prng.random());
```
If you want to pass in a boundary, you can also use <code>wardrobe.Boundary.buffer</code>:
<code>zig
const boundary: wardrobe.Boundary = .buffer("----MyApplicationBoundaryRANDOMBYTES");</code>
To access the generated boundary, use <code>boundary.slice()</code>.
Content-Type
For the HTTP Content-Type header value for a boundary, use <code>boundary.contentType()</code>. This returns a slice in the format
<code>multipart/form-data; boundary=<boundary></code>
Write Stream
Creating a write stream just needs an underlying writer to write to:
<code>zig
const write_stream = wardrobe.writeStream(boundary, http_request.writer());</code>
Using decl literals, you can write this in one line:
<code>zig
const write_stream = wardrobe.writeStream(.entropy("MyApplicationBoundary", prng.random()), http_request.writer());</code>
Given a write stream, you have the following functions to write form data sections:
```zig
pub fn writer(self: *WriteStream) Writer;
pub fn beginTextEntry(self: <em>WriteStream, name: []const u8) !void;
pub fn beginFileEntry(self: </em>WriteStream, name: []const u8, content_type: []const u8, file_name: []const u8) !void;
pub fn endEntry(self: <em>WriteStream) !void;
pub fn endEntries(self: </em>WriteStream) !void;
```
There are runtime assertions to make sure you call functions in the right order. You can follow
this pseudocode to know which functions to call:
```
for each entry:
write_stream.beginTextEntry() or write_stream.beginFileEntry()
write entry data with write_stream.writer()
write_stream.endEntry()
write_stream.endEntries();
```
Reading Usage
Boundary
Given a 'Content-Type' header, you can use <code>Boundary.parseContentType</code> to get a boundary object:
<code>zig
const boundary = try wardrobe.Boundary.parseContentType("multipart/form-data; boundary=------Boundary");</code>
The function returns <code>error.Invalid</code> if the header is not valid for <code>multipart/form-data</code>, or if the boundary
is too long.
Scanner
Given a reader, you can iterate through the form data entries of a body. Note that there's no guarantee that the reader
only reads what is necessary, it may overflow.
The Scanner API takes an allocator, but the allocations are only temporary.
```zig
var scanner = try scanner(allocator, boundary, reader);
defer scanner.deinit();
while (try scanner.nextEntry()) |entry| {
const data = scanner.reader().readAllAlloc(allocator, std.math.maxInt(usize));
defer std.testing.allocator.free(data);
}
```
<code>scanner.reader()</code> returns a reader that gives EOF upon the end of the current active entry's data.
The returned entry has the following signature:
<code>zig
pub const Scanner.Entry = struct {
name: []const u8,
file_name: ?[]const u8,
content_type: ?[]const u8,
};</code>
Parser
Sometimes, it may be useful to parse an entire response body or slice at once. Wardrobe provides utility functions
in <code>wardrobe.parse</code>:
<code>zig
const entries = try wardrobe.parse.fromSlice(allocator, boundary, slice);
// or try wardrobe.parse.fromReader(allocator, boundary, reader);
// or try wardrobe.parse.fromScanner(allocator, boundary, scanner);
defer wardrobe.parse.deinitEntries(entries);</code>
The entries returned is the same entry struct as in <a>Scanner.Entry</a>, but also has a <code>data: []const u8</code> field
for accessing the whole parsed data.
Since you own all of the data and entries returned, you can use <code>wardrobe.parse.deinitEntries</code>
(or <code>parse.Entry.deinit</code> for individual entries) to clean-up.
License
All Wardrobe code is under the MIT license. | [] |
https://avatars.githubusercontent.com/u/2007894?v=4 | pugixml | awesomo4000/pugixml | 2025-04-04T16:12:37Z | Zig wrapper interface to pugixml C++ library | main | 0 | 1 | 0 | 1 | https://api.github.com/repos/awesomo4000/pugixml/tags | NOASSERTION | [
"xml",
"zig"
] | 103 | false | 2025-04-04T17:13:24Z | true | true | 0.14.0 | github | [] | Zig wrapper for pugixml (C++ xml parser)
This is a set of wrappers with a nice zig interface to the pugixml C++ xml library.
Pugixml C++ (https://pugixml.org/) is a high-speed in-situ XML parser. It parses XML to a DOM structure without doing much copying of the data (using pointers). It is one of the fastest XML parsers available. XML files must fit in memory with an overhead of about 25%.
The code for pugixml C++ (currently v1.15) is included in this repo in the <code>src/c/pugi*.[ch]pp</code> files. The zig c->cpp interface to the library files are in <code>src/c/zig-pugixml.cpp</code> and <code>src/c/zig-pugixml.h</code>.
Using:
In your zig project, run:
<code>zig fetch --save=pugixml https://github.com/awesomo4000/pugixml/archive/refs/tag/v0.2.1.tar.gz</code>
In build.zig:
```zig
<code>// Define the dependency
const pugixml_dep = b.dependency("pugixml", .{
.target = target,
.optimize = optimize,
});
// Use it with a module
const exe_mod = b.createModule(.{
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
exe_mod.addImport("pugixml", pugixml_dep.module("pugixml"));
</code>
```
After modifying build.zig, you may import "pugixml" in your zig source:
```zig
const pugixml = @import("pugixml");
```
Refer to <code>src/tests.zig</code> to see examples of usage.
C++ and Zig
Using C++ code from Zig requires a translation layer using the C++ code from C, then exporting the C functions via <code>extern C</code> in the C header file. Zig code then imports the C header file to reference its definitions. This code is linked into the final binary (staticly for this binding).
Look in <code>src/c/zig-pugixml.h</code> to see how zig does C imports.
Check out <code>build.zig</code> to see how the build system compiles the C++ library and links it to the Zig module.
Sample program: <code>parse-xml</code>
There is a sample program <code>parse-xml</code> included in the build that shows how to use the zig module. It times how long it takes to parse an XML file. Example:
```
$ ./zig-out/bin/parse-xml
Usage: parse-xml filename
$ ls -lh ./big-testfile.xml
-rw-r--r-- 434M Jan 15 03:12 ./big-testfile.xml
$ ./zig-out/bin/parse-xml ./big-testfile.xml
./big-testfile.xml: No error.
Elapsed time: 224.362ms.
```
<code>parse-xml</code> should run fine against malformed data, e.g.:
<code>$ ./zig-out/bin/parse-xml /dev/random
/dev/random: Error reading from file/stream.
Elapsed time: 0.059ms.</code>
Building:
Use version 0.14.0 of Zig to build.
Cross-compiled builds produced working versions for the following platforms:
<ul>
<li>x86_64-windows</li>
<li>aarch64-windows</li>
<li>aarch64-linux</li>
<li>aarch64-macos</li>
</ul>
For production builds:
```
zig build --release=fast
zig build --release=small
```
For debug build (the default):
<code>zig build</code>
Building for other OSes
By default, Zig builds for the OS running the compiler. To cross compile for a different system, use commands like these:
<code>zig build -Dtarget=x86-64-winodws --release=small</code>
<code>zig build -Dtarget=aarch64-windows --release=fast</code>
<code>zig build -Dtarget=x86-64-linux --release=fast</code>
<code>zig build -Dtarget=aarch64-linux --release=fast</code>
Tests
For tests in debug mode:
<code>zig build test</code>
For tests in release mode:
<code>zig build test --release=fast</code>
A clean test run will return no output, which means all tests passed. The exit code should be 0 for a good test run.
Build Artifacts
Output from build is in <code>./zig-out</code>, with sample binary <code>parse-xml</code> in <code>./zig-out/bin/parse-xml</code>.
Include files and C code is in <code>./zig-out/include</code>.
The static library for pugixml C++ created during the build is in <code>./zig-out/lib/libpugixml_cpp.a</code> .
Build options
Use <code>zig build -h</code> to see other options and build commands:
```
$ zig build -h
Usage: zig build [steps] [options]
Steps:
install (default) Copy build artifacts to prefix path
uninstall Remove build artifacts from prefix path
run run parse-xml
test run tests
clean Clean up
tarball Make tarball from sources
...
``` | [] |
https://avatars.githubusercontent.com/u/95163444?v=4 | texzel | AsgardXIV/texzel | 2025-04-17T18:38:07Z | A pure Zig library for BCn texture encoding/decoding. | main | 1 | 1 | 0 | 1 | https://api.github.com/repos/AsgardXIV/texzel/tags | MIT | [
"bc1",
"bc6h",
"bc7",
"bcn",
"compression",
"dxt",
"dxt1",
"dxt3",
"dxt5",
"encoding",
"rgtc",
"s3tc",
"texture",
"zig",
"zig-package",
"ziglang"
] | 6,276 | false | 2025-04-29T03:46:09Z | true | true | 0.14.0 | github | [] | Texzel
Texzel is a pure Zig library for texture encoding/decoding (compression/decompression) with no dependencies.
It is currently focused on the BCn codecs as well as converting between different raw pixel formats.
Supported Formats
| Format | Decode | Encode | Notes |
|---|---|---|---|
| Raw | ✅ | ✅ | Supports any arbitrary pixel layout and can swizzle when converting. Some common ones are defined for convenience. |
| BC1 (S3TC DXT1) | ✅ | ✅ | BC1a is supported, any texel with alpha < 255 will be treated as fully transparent |
| BC2 (S3TC DXT3) | ✅ | ✅ | |
| BC3 (S3TC DXT5) | ✅ | ✅ | |
| BC4 (RGTC1) | ✅ | ✅ | |
| BC5 (RGTC2) | ✅ | ✅ | |
| BC6 (BPTC_FLOAT) | ✅ | ✅ | |
| BC7 (BPTC) | ✅ | ✅ | |
Current State
Texzel is still very early in development and the API is not stable, the code is not particularly clean or efficient.
It works with textures I've tested but it's possible there are bugs in speciifc modes of specific codecs. Please open an issue if you find one!
Texzel does not currently support file formats, as such you must provide raw buffers to compress/decompress. I'm still uncertain if adding support for DDS/KTX2 etc should be in scope for this project or not.
Contributions are very welcome!
Adding to your project
<ol>
<li>
Add texzel to your build.zig.zon
<code>zig fetch --save git+https://github.com/AsgardXIV/texzel</code>
</li>
<li>
Add the dependency to your project, for example:
```zig
const texzel_dependency = b.dependency("texzel", .{
.target = target,
.optimize = optimize,
});
</li>
</ol>
exe_mod.addImport("texzel", texzel_dependency.module("texzel"));
```
Usage Example
```zig
const allocator = ...;
// Import Texzel
const texzel = @import("texzel");
// Load a raw rgba image
const file = try std.fs.cwd().openFile("resources/ziggy.rgba", .{ .mode = .read_only });
defer file.close();
const raw_buffer = try file.readToEndAlloc(std.testing.allocator, 2 << 20);
defer allocator.free(raw_buffer);
// Image dimensions
const dimensions = texzel.core.Dimensions{
.width = 512,
.height = 512,
};
// Create a raw image data instance from the buffer
const raw_image = try texzel.rawImageFromBuffer(
allocator,
texzel.pixel_formats.RGBA8U,
dimensions,
raw_buffer,
);
defer raw_image.deinit();
// Compress to BC1
const compressed_buffer = try texzel.encode(
allocator,
.bc1,
texzel.pixel_formats.RGBA8U,
raw_image,
.{},
);
defer allocator.free(compressed_buffer);
// Decompress to RawImage but in BGRA8U this time
const new_raw_image = try texzel.decode(
allocator,
.bc1,
texzel.pixel_formats.BGRA8U,
dimensions,
compressed_buffer,
.{},
);
defer new_raw_image.deinit();
// Access the new raw buffer
const new_raw_buffer = new_raw_image.asBuffer();
_ = new_raw_buffer; // Do something
```
License
Texzel is licensed under the <a>MIT License</a>.
Licenses for third-party software and assets can be found <a>here</a>. | [] |
https://avatars.githubusercontent.com/u/202800752?v=4 | mach-codebase-tutorial | mnbnkr/mach-codebase-tutorial | 2025-04-22T15:59:42Z | (AI generated tutorial) Mach codebase tutorial made with "Tutorial-Codebase-Knowledge" (Pocket Flow) | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/mnbnkr/mach-codebase-tutorial/tags | MIT | [
"documentation",
"mach",
"zig"
] | 212 | false | 2025-04-24T22:37:26Z | false | false | unknown | github | [] | <blockquote>
<em>Mach Engine version 0.4</em>
<strong><em>CAUTION</em><em>:</em> *THIS TUTORIAL WAS AI-GENERATED AND MAY CONTAIN ERRORS. IT IS </strong>NOT*<em> AFFILIATED WITH OR ENDORSED BY HEXOPS/MACH.</em>
</blockquote> | [] |
https://avatars.githubusercontent.com/u/533091?v=4 | box2d | martindrlik/box2d | 2025-04-16T09:57:44Z | Box2D is a 2D physics engine for games | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/martindrlik/box2d/tags | MIT | [
"box2d",
"zig",
"zig-build",
"ziglang"
] | 15,806 | true | 2025-04-16T10:52:31Z | true | true | 0.14.0 | github | [] |
Build Status
<a></a>
Box2D
Box2D is a 2D physics engine for games.
<a></a>
Features
Collision
<ul>
<li>Continuous collision detection</li>
<li>Contact events and sensors</li>
<li>Convex polygons, capsules, circles, rounded polygons, segments, and chains</li>
<li>Multiple shapes per body</li>
<li>Collision filtering</li>
<li>Ray casts, shape casts, and overlap queries</li>
</ul>
Physics
<ul>
<li>Robust <em>Soft Step</em> rigid body solver</li>
<li>Continuous physics for fast translations and rotations</li>
<li>Island based sleep</li>
<li>Revolute, prismatic, distance, mouse joint, weld, and wheel joints</li>
<li>Joint limits, motors, springs, and friction</li>
<li>Joint and contact forces</li>
<li>Body movement events and sleep notification</li>
</ul>
System
<ul>
<li>Data-oriented design</li>
<li>Written in portable C17</li>
<li>Extensive multithreading and SIMD</li>
</ul>
Samples
<ul>
<li>OpenGL with GLFW and enkiTS</li>
<li>Graphical user interface with imgui</li>
<li>Many samples to demonstrate features and performance</li>
</ul>
Building
<ul>
<li>Install <a>CMake</a></li>
<li>Ensure CMake is in the user <code>PATH</code></li>
<li>Visual Studio: run <code>build.bat</code> from the command prompt</li>
<li>Otherwise: run <code>build.sh</code> from a bash shell</li>
<li>Results are in the build sub-folder</li>
<li>On Windows you can open box2d.sln</li>
</ul>
Building for Xcode
<ul>
<li>Install <a>CMake</a></li>
<li>Add Cmake to the path in .zprofile (the default Terminal shell is zsh)<ul>
<li>export PATH="/Applications/CMake.app/Contents/bin:$PATH"</li>
</ul>
</li>
<li>mkdir build</li>
<li>cd build</li>
<li>cmake -G Xcode ..</li>
<li>open box2d.xcodeproj</li>
<li>Select the samples scheme</li>
<li>Edit the scheme to set a custom working directory to the box2d directory</li>
<li>You can now build and run the samples</li>
</ul>
Compatibility
The Box2D library and samples build and run on Windows, Linux, and Mac.
Box2D should be built on recent versions of clang and gcc. You will need the latest Visual Studio version for C11 atomics to compile (17.8.3+).
Documentation
<ul>
<li><a>Manual</a></li>
<li><a>Migration Guide</a></li>
</ul>
Community
<ul>
<li><a>Discord</a></li>
</ul>
Contributing
Please do not submit pull requests. Instead, please file an issue for bugs or feature requests. For support, please visit the Discord server.
Giving Feedback
Please file an issue or start a chat on discord.
License
Box2D is developed by Erin Catto and uses the <a>MIT license</a>.
Sponsorship
Support development of Box2D through <a>Github Sponsors</a>.
Please consider starring this repository and subscribing to my <a>YouTube channel</a>.
Ports, wrappers, and bindings
<ul>
<li>Beef bindings - https://github.com/EnokViking/Box2DBeef</li>
<li>C++ bindings - https://github.com/HolyBlackCat/box2cpp</li>
<li>WASM - https://github.com/Birch-san/box2d3-wasm</li>
</ul> | [] |
https://avatars.githubusercontent.com/u/126519037?v=4 | zig_wayland_client | JNetherwood-Imig/zig_wayland_client | 2025-03-30T01:07:39Z | A purely zig implementation of the client side of the wayland protocol. | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/JNetherwood-Imig/zig_wayland_client/tags | - | [
"wayland",
"wayland-client",
"wayland-protocols",
"zig"
] | 12,989 | false | 2025-05-19T15:33:51Z | true | true | 0.14.0 | github | [
{
"commit": null,
"name": "scanner",
"tar_url": null,
"type": "relative",
"url": "./scanner"
}
] | zig_wayland_client
A purely zig implementation of the client side of the wayland protocol.
All types and functions are generated from xml protocol files at compile time, making this API completely extensible. | [] |
https://avatars.githubusercontent.com/u/23142073?v=4 | tunnel | jrachele/tunnel | 2025-02-22T17:37:20Z | Fly through a tunnel and don't hit the wall | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/jrachele/tunnel/tags | - | [
"raylib",
"zig"
] | 772 | false | 2025-03-01T03:21:04Z | true | true | unknown | github | [
{
"commit": "refs",
"name": "raylib-zig",
"tar_url": "https://github.com/Not-Nik/raylib-zig/archive/refs.tar.gz",
"type": "remote",
"url": "https://github.com/Not-Nik/raylib-zig"
}
] | Tunnel
A simple game written in Zig using Raylib.
The goal is to avoid the walls of the tunnel as you speed faster and faster.
The game was written using Zig version <code>0.14.0-dev.2577+271452d22</code>.
To play the game, clone this repository and run:
<code>bash
zig build -Doptimize=ReleaseFast run</code> | [] |
https://avatars.githubusercontent.com/u/136936221?v=4 | jumpcut | DanielTowerz/jumpcut | 2025-02-19T21:47:18Z | Zig-powered tool for jumpcutting silence from media | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/DanielTowerz/jumpcut/tags | - | [
"edl",
"fcpxml",
"ffmpeg",
"jumpcut",
"video-editing",
"zig",
"ziglang"
] | 67 | false | 2025-03-18T02:36:58Z | true | true | 0.14.0 | github | [] | 🎬 JumpCut – Smart Vlog Editing
<strong>JumpCut</strong> is a <strong>Zig</strong>-powered tool that analyzes video or audio files, detects silence, and automatically generates a seamless timeline (EDL) by keeping only the spoken sections. This helps vloggers and content creators streamline their editing process by removing silent gaps, optimizing video flow.
It uses ffmpeg libraries dynamically linked, so you need to have ffmpeg installed on your system.
✨ Features
✅ <strong>Automatic silence detection</strong> in video and audio files.
✅ <strong>Exports to editing formats</strong> like <strong>EDL</strong> (DaVinci Resolve, Premiere Pro).
✅ <strong>Efficient processing</strong> powered by Zig’s speed and safety.
✅ <strong>Supports multiple input formats</strong> (Currently MP4, with PCM 16-bit 48kHz audio).
✅ <strong>Enhances the narrative flow</strong> of vlogs and spoken content.
🎯 Use Cases
<ul>
<li><strong>Vloggers and content creators</strong> looking to speed up video editing. </li>
<li><strong>Podcasters</strong> who want to remove pauses without manual editing. </li>
<li><strong>Interview and conference editing</strong>, keeping only relevant speech. </li>
</ul>
🚀 Installation
<ol>
<li>
<strong>Clone the repository</strong>:
<code>bash
git clone https://github.com/DanielTowerz/jumpcut.git</code>
</li>
<li>
<strong>Build the project</strong>:
<code>bash
zig build --release=fast, safe or small</code>
</li>
</ol>
🛠️ Usage
```bash
jumpcut -i [inputfile] -o [outputfile] -d [decibel] -s [silence duration] -a [adjustment]
-i: Input file path. [REQUIRED]
-o: Output file path. If not provided, the output will be saved in the same directory as the input file as <code>[inputfile name].edl</code>.
-d: A negative number as decibel threshold for silence detection. Default is '-25'.
-s: A positive float number as the minimum duration of silence to be detected. Default is '1.0' seconds.
-a: A positive float number as adjustment for the start and end of the detected silence. Default is '0.3' seconds.
```
📌 Roadmap
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Export to <strong>FCPXML</strong>.
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> CLI interface with adjustable sensitivity settings.
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Support for other video and audio formats.
| [] |
https://avatars.githubusercontent.com/u/54503497?v=4 | comptime_suffix_automaton | RetroDev256/comptime_suffix_automaton | 2025-04-08T01:28:44Z | Compile-time suffix automaton construction for optimal substring/suffix string lookup codegen in zig | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/RetroDev256/comptime_suffix_automaton/tags | MIT | [
"zig",
"zig-lib",
"zig-library",
"zig-package"
] | 30 | false | 2025-04-08T03:34:38Z | true | true | 0.15.0-dev.208+8acedfd5b | github | [] | comptime suffix automaton
What is it?
It is a substring and suffix string lookup function set using <a>this algorithm</a>, but it traverses the suffix automaton graph for all possible inputs at compile-time for optimal machine code.
How do I use it?
See the root.zig tests for usage
What does the generated code look like?
<a>Godbolt - Generated Code</a> | [] |
https://avatars.githubusercontent.com/u/2198200?v=4 | hsminer | Lajule/hsminer | 2025-03-18T21:11:09Z | PKCS#11 in Zig | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/Lajule/hsminer/tags | - | [
"hsm",
"pkcs11",
"zig"
] | 110 | false | 2025-05-06T08:55:41Z | true | true | 0.14.0 | github | [
{
"commit": "3b06a336ef27e5ffe04075109d67e309b83a337a",
"name": "zap",
"tar_url": "https://github.com/zigzap/zap/archive/3b06a336ef27e5ffe04075109d67e309b83a337a.tar.gz",
"type": "remote",
"url": "https://github.com/zigzap/zap"
},
{
"commit": "a4e784da8399c51d5eeb5783e6a485b960d5c1f9",
... | hsminer
<strong>hsminer</strong> is a Zig-based project designed to interact with a Hardware Security Module (HSM) using the PKCS#11 standard. It allows you to encrypt or decrypt text using cryptographic keys.
Building hsminer
Use Zig to build the project:
<code>sh
zig build</code>
Running hsminer
Use Zig to build and run the project:
<code>sh
zig build run -- -c cert.pem -k key.pem /usr/lib/softhsm/libsofthsm2.so "${SLOT_ID}" "${PIN}"</code>
or HSMiner binary directly:
<code>sh
./hsminer -c cert.pem -k key.pem /usr/lib/softhsm/libsofthsm2.so "${SLOT_ID}" "${PIN}"</code>
Command Arguments:
<ul>
<li>-h, --help Display this help and exit.</li>
<li>-c, --cert Path to certificat file.</li>
<li>-k, --key Path to key file.</li>
<li>-p, --port Listening port.</li>
<li> Path to PKCS11 module.</li>
<li> Slot identifier.</li>
<li> Pin (4-255).</li>
</ul>
Enviroment
Make sure the following tools are installed on your system:
<ul>
<li><strong>OpenSSL</strong> – for generating self-signed certificates.</li>
<li><strong>SoftHSM</strong> – a software-based HSM that supports PKCS#11.</li>
<li><strong>pkcs11-tool</strong> – a command-line utility to interact with PKCS#11 modules.</li>
<li><strong>Zig</strong> – the programming language used to build and run this project.</li>
</ul>
Or build a docker image with:
<code>sh
docker build -t hsminer .</code>
And run it with:
<code>sh
docker run -it --rm -p 3000:3000 -v "${PWD}":/hsminer -v "${PWD}"/tokens:/var/lib/softhsm/tokens -w /hsminer hsminer bash</code>
Generating Certificate and Key
Before running <code>hsminer</code>, generate a self-signed certificate and a private key:
<code>sh
openssl req -x509 -nodes -days 365 -sha256 -newkey rsa:2048 -keyout key.pem -out cert.pem</code>
This creates:
<ul>
<li><code>key.pem</code>: the private key.</li>
<li><code>cert.pem</code>: the matching self-signed certificate.</li>
</ul>
Initialize the Token
<code>sh
softhsm2-util --init-token --free --label "HSMiner" --so-pin "${PIN}" --pin "${PIN}"</code>
Generate a Key
<code>bash
pkcs11-tool --module /usr/lib/softhsm/libsofthsm2.so --slot "${SLOT_ID}" --login --pin "${PIN}" --keygen --key-type aes:32 --label "key 1"</code>
This command creates a 256-bit AES key with the label <code>key 1</code> in the initialized slot.
Resources
<ul>
<li><a>SoftHSM Documentation</a></li>
<li><a>PKCS#11 Specification</a></li>
<li><a>Zig Programming Language</a></li>
</ul> | [] |
https://avatars.githubusercontent.com/u/6601628?v=4 | gbzig | CarlOlson/gbzig | 2025-04-27T08:23:28Z | Gameboy emulator in Zig | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/CarlOlson/gbzig/tags | - | [
"emulator",
"gameboy",
"zig"
] | 13 | false | 2025-04-29T09:34:37Z | true | true | 0.14.0 | github | [
{
"commit": "master",
"name": "raylib_zig",
"tar_url": "https://github.com/Not-Nik/raylib-zig/archive/master.tar.gz",
"type": "remote",
"url": "https://github.com/Not-Nik/raylib-zig"
}
] | gbzig
Gameboy emulator in Zig
Resources
You Should Make a GameBoy Emulator (motivation):
<a></a>
Good resources to get started quickly: <a>DMG-01: How to Emulate a Game Boy</a>
<a>Game Boy Development community</a>
<a>Pan Docs</a>
<a>Opcode chart</a> | [] |
https://avatars.githubusercontent.com/u/22438427?v=4 | imagination | bernardassan/imagination | 2025-04-21T11:14:33Z | Fast and secure image optimization server in Zig | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/bernardassan/imagination/tags | BSD-3-Clause | [
"avif",
"image",
"image-processing",
"image-server",
"jpeg-xl",
"jxl",
"libvips",
"server",
"webp",
"zig"
] | 34 | false | 2025-05-17T10:33:25Z | true | true | 0.14.0 | github | [
{
"commit": "18ec7f1129ce4d0573b7c67f011b4d05c7b195d4.tar.gz",
"name": "zzz",
"tar_url": "https://github.com/tardy-org/zzz/archive/18ec7f1129ce4d0573b7c67f011b4d05c7b195d4.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/tardy-org/zzz"
}
] | imagination | [] |
https://avatars.githubusercontent.com/u/6529548?v=4 | zig-umka | TheOnlySilverClaw/zig-umka | 2025-03-12T18:28:26Z | Zig bindings for the Umka scripting language | develop | 0 | 0 | 0 | 0 | https://api.github.com/repos/TheOnlySilverClaw/zig-umka/tags | BSD-3-Clause | [
"bindings",
"scripting-language",
"umka",
"umka-lang",
"zig",
"zig-binding",
"zig-library",
"zig-package"
] | 35 | false | 2025-05-21T18:58:41Z | true | true | 0.14.0 | github | [] | Zig bindings for the <a>Umka</a> scripting language.
Tested against a build from Commit 127e678.
Usage
There are two modules avaiable:
- "binding" is as close to the C API as possible
- "wrapper" is a more opinionated API on top which should be easier for Zig users
You can add either one as an import like this:
<code>zig
const umka_dependency = b.dependency("umka", .{});
exe_module.addImport("umka", umka_dependency.module("binding"));
// or
exe_module.addImport("umka", umka_dependency.module("wrapper"));</code>
This project only provides the bindings!
You have to build and link Umka as a static libary.
Build configuration and further examples can be found under <a>examples</a>.
What works so far
<ul>
<li>call a script with a main function</li>
<li>call an Umka function from Zig</li>
<li>pass parameters to Umka functions</li>
<li>get results from a funtion call</li>
<li>call Zig functions from Umka</li>
<li>add Umka modules to current instance</li>
</ul>
To run the examples
<ul>
<li>install Zig, at least version 0.14.0</li>
<li>get an Umka libary build via make (the downloaded release currently does not work)</li>
<li>drop it into example/libumka.a</li>
<li>run <code>zig build run</code></li>
</ul> | [] |
https://avatars.githubusercontent.com/u/12383260?v=4 | nanopb-zig | notfilippo/nanopb-zig | 2025-03-11T21:00:54Z | The nanopb runtime library ported to the zig build system | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/notfilippo/nanopb-zig/tags | - | [
"nanopb",
"protobuf",
"protocol-buffers",
"zig"
] | 3 | false | 2025-03-11T22:28:45Z | true | true | 0.14.0 | github | [
{
"commit": "master",
"name": "nanopb",
"tar_url": "https://github.com/nanopb/nanopb/archive/master.tar.gz",
"type": "remote",
"url": "https://github.com/nanopb/nanopb"
}
] | <code>nanopb</code> Runtime
This is the <a>nanopb runtime</a>, packaged for <a>Zig</a>.
Status
This project only builds the <code>nanopb</code> runtime library. It does not build the <code>nanopb</code>
code <a>generator</a>.
Linux, macOS and Windows are tested by CI.
Usage
First, update your <code>build.zig.zon</code>:
```sh
Initialize a <code>zig build</code> project if you haven't already
zig init
replace with the version you want to use, e.g. 0.4.9.1+0.14.0
zig fetch --save git+https://github.com/notfilippo/nanopb#
```
You can then use <code>nanopb</code> in your <code>build.zig</code> with:
<code>zig
const nanopb_dep = b.dependency("nanopb", .{
.target = target,
.optimize = optimize,
});
your_exe.linkLibrary(nanopb_dep.artifact("nanopb"));</code> | [] |
https://avatars.githubusercontent.com/u/20770505?v=4 | zinalg | Jafagervik/zinalg | 2025-03-08T12:53:32Z | Linear algebra datatypes in zig | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/Jafagervik/zinalg/tags | - | [
"linalg",
"zig",
"zig-library",
"ziglang"
] | 5 | false | 2025-03-08T13:39:48Z | true | true | 0.14.0 | github | [] | Zinalg
Vector and (soon) Matrix datatypes in zig
Datatypes
<ul>
<li>Vec2, Vec3, Vec4</li>
<li>Point2, Point3, Point4</li>
</ul> | [] |
https://avatars.githubusercontent.com/u/24283234?v=4 | pong | h2cone/pong | 2025-02-16T14:47:31Z | Lonely pong game. | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/h2cone/pong/tags | Apache-2.0 | [
"gamedev",
"pong-game",
"raylib",
"zig"
] | 616 | false | 2025-03-08T08:48:47Z | true | true | unknown | github | [
{
"commit": "master",
"name": "raylib-zig",
"tar_url": "https://github.com/Not-Nik/raylib-zig/archive/master.tar.gz",
"type": "remote",
"url": "https://github.com/Not-Nik/raylib-zig"
}
] | pong
| [] |
https://avatars.githubusercontent.com/u/115399684?v=4 | binarystream | brianvar/binarystream | 2025-04-30T22:03:37Z | binary stream implementation written in Zig | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/brianvar/binarystream/tags | GPL-3.0 | [
"binary-stream",
"zig"
] | 23 | false | 2025-05-06T17:39:46Z | true | true | 0.14.0 | github | [] | 404 | [] |
https://avatars.githubusercontent.com/u/96550850?v=4 | zilo | nicklatch/zilo | 2025-02-12T18:10:17Z | Bare bones, fast, terminal text editor | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/nicklatch/zilo/tags | - | [
"text-editor",
"zig"
] | 19 | false | 2025-02-24T17:04:11Z | true | true | unknown | github | [] | Zilo
Zilo is a bare bones, simple, and blazingly fast text editor written in pure Zig!
<blockquote>
<span class="bg-blue-100 text-blue-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-blue-900 dark:text-blue-300">NOTE</span>
Zilo is under heavy development and not ready for use at this time.
</blockquote> | [] |
https://avatars.githubusercontent.com/u/7476160?v=4 | hapgent | epicfilemcnulty/hapgent | 2025-04-12T22:14:01Z | Hapgent -- an HAProxy agent | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/epicfilemcnulty/hapgent/tags | GPL-3.0 | [
"haproxy",
"haproxy-agent",
"load-balancer",
"zig"
] | 39 | false | 2025-04-14T15:54:57Z | true | true | 0.14.0 | github | [] | HAProxy Agent
Introduction
<em>Hapgent</em> is a companion tool for the <a>HAProxy</a> load balancer.
When you have a bunch of upstream servers defined for an HAProxy backend,
HAProxy has <a>several</a> types of
health checks to determine the availability of an upstream server:
<ol>
<li>TCP health checks</li>
<li>HTTP health checks</li>
<li>Passive health checks</li>
<li>Agent checks</li>
</ol>
While the first three types are internal to HAProxy, i.e.
you don't need any external tools to use them, the agent checks are different:
you need to have an actual agent running on the upstream servers to use agent checks.
<em>Hapgent</em> is an implementation of such an agent.
Agent protocol
The protocol of HAProxy agent is described in the <a>agent checks</a> section of the official documentation, but in a nutshell it works
like this:
<ul>
<li>You define <em>address</em>, <em>port</em>, <em>payload</em> and <em>interval</em> for the agent in the upstream server configuration.</li>
<li>Every <em>interval</em> seconds HAProxy makes a TCP connection to the defined address
and port, sends the payload and reads an answer.</li>
<li>Agent answers with the server's status, and, optionally, weight.</li>
<li>Depending on the answer HAProxy may change the current status or weight of the server.</li>
</ul>
HAProxy backend configuration sample
<code>backend sample
mode http
balance roundrobin
option forwardfor if-none
option httpchk
default-server check agent-check agent-port 9777 agent-inter 5s
http-check send meth GET uri /health ver HTTP/1.1 hdr Host my.service.com
server srv1 10.42.42.10:8080 weight 100
server srv2 10.42.42.11:8080 weight 50</code>
We define two health checks here:
<ol>
<li>HTTP health check using <code>GET</code> HTTP method to the <code>/health</code> uri,
with <code>Host</code> header set to <code>my.service.com</code></li>
<li>Agent check, port 9777, every 5 seconds, no payload. Since the <code>agent-addr</code> option is absent,
HAProxy will use server's IP as the agent IP address.</li>
</ol>
Pay attention to the fact that the weight reported by the agent is interpreted as
a percent of the original weight defined in the backend configuration.
For example, using the configuration above, if we set the weight of
the agent on <code>srv2</code> to <code>50</code>, the effective weight for the <code>srv2</code> will be <code>25</code>.
Note that the protocol allows sending arbitrary payload to the agents with
the <code>agent-send</code> option. The agents could use this to implement multiple states support.
<em>Hapgent</em> itself, however, just ignores the payload in the incoming requests.
If you need multiple states, i.e. you have multiple services on the same backend
server, just run an instance of <em>hapgent</em> per service, using different ports.
Configuration
<em>Hapgent</em> is configured via the environment variables:
| Variable Name | Default |
|--------------------------------|-----------|
| <code>HAPGENT_IP</code> | <em>0.0.0.0</em> |
| <code>HAPGENT_PORT</code> | <em>9777</em> |
| <code>HAPGENT_STATE_FILE</code> | <em>/etc/hapgent/state.json</em> |
State file format
Upon initialisation <em>hapgent</em> reads the state file at the path defined
in the <code>HAPGENT_STATE_FILE</code> environment variable.
The state file must be a valid JSON object with the required field <code>status</code>,
and optional fields <code>weight</code> and <code>maxconn</code>.
<ul>
<li>Valid values for the <code>status</code> field are <code>UP</code>,<code>DOWN</code>,<code>READY</code>,<code>DRAIN</code>,<code>FAIL</code>,<code>MAINT</code>,<code>STOPPED</code>.</li>
<li>The <code>weight</code> field, if set, should be a number in the range <code>0-255</code>.</li>
<li>The <code>maxconn</code> field, if set, should be a number in the range <code>0-65535</code>.</li>
</ul>
For example:
```json
{"status":"UP"}
{"status":"READY","weight":100}
{"status":"DOWN","maxconn":10}
{"status":"UP","maxconn":300,"weight":77}
```
If <em>hapgent</em> fails to read or parse the state file during the initial startup,
or upon receiving a HUP signal, it resets its state to the default value <code>{"status":"FAIL"}</code>.
Previous state value is <strong>discarded</strong> in this case.
Usage
<em>hapgent</em> typically should be run as a systemd/SysV service on the same instance
where your service is deployed. See the deployment section below for details.
You can dynamically change <em>hapgent's</em> state with signals:
<ul>
<li>On a <code>USR2</code> signal, hapgent sets the status to <code>DOWN</code>, and saves its state in the state file. </li>
<li>On a <code>USR1</code> signal, hapgent sets the status to <code>UP</code>, and saves its state in the state file.</li>
<li>On a <code>HUP</code> signal, hapgent tries to read the state from the state file. If it succeeds,
it sets its current state to the one read from the state file. If it fails to read or
parse the state file, it sets its state to the default value <code>{"status":"FAIL"}</code>.</li>
</ul>
Putting an instance <strong>in</strong> or <strong>out</strong> of load balancing
This can be done in a deployment script, e.g.:
```bash
!/bin/bash
a sample deployment script for a service
echo "Removing the instance from LB"
pkill -USR2 hapgent # assuming that we have only one hapgent per instance
stop_service ${SERVICE_NAME}
deploy_new_version ${SERVICE_NAME}
start_service ${SERVICE_NAME}
echo "Putting the instance back to LB"
pkill -USR1 hapgent
```
Dynamic weight adjustment
While it's tempting to have a dynamic weight calculation
feature as a builtin in a HAProxy agent, it's not always
a good idea.
<em>Hapgent</em> is intentionally designed to be as simple as possible,
so it does not change anything in its current state on its own.
It simply reports its state upon receiving a TCP connection.
But <em>hapgent</em> can be operated with the help of Unix signals,
as described above. Particularly, on the <code>SIGHUP</code> signal <em>hapgent</em>
tries to re-read the state from the state file. This can be used
to implement a generic weight / maxconn adjustment system:
<ol>
<li>Create a script/app that calculates the weight for the instance based on the criteria you want.</li>
<li>Create a cron task to periodically run said script, update the weight in the <em>hapgent's</em> state
file, and send the <code>SIGHUP</code> signal to <em>hapgent</em>.</li>
</ol>
Installation
Binary releases for Linux x86_64 systems
Grab the <code>hapgent</code> binary, <code>hapgent.sha256</code> SHA256 checksum and <code>hapgent.sig</code> signature files
from the latest release <a>binary</a>
Make sure that SHA256 checksum of the binary matches the one in the <code>hapgent.sha256</code> file.
The binary is signed with my SSH key, to verify the signature you need to
<ol>
<li>Add my public key to the allowed signers file:</li>
</ol>
<code>echo "vladimir@deviant.guru ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICEWU0xshVgOIyjzQEOKtjG8sU8sWJPh25CP/ISfJRey" >> ~/.ssh/allowed_signers</code>
2. Verify the signature:
<code>$ ssh-keygen -Y verify -f ~/.ssh/allowed_signers -n file -I vladimir@deviant.guru -s hapgent.sig < hapgent
Good "file" signature for vladimir@deviant.guru with ED25519 key SHA256:K0hZF19Go+RKQPczS905IFVhRL8NiZTvZyi+4PkV/g8</code>
Building from source
You need <a>zig</a> version <code>0.14.0</code> to build from source.
Having zig installed and in the path, clone the repo and do the build:
<code>git clone https://github.com/epicfilemcnulty/hapgent.git
cd hapgent
zig build</code>
The binary is saved in the <code>zig-out/bin/hapgent</code> file.
Resource usage
<em>Hapgent</em> is a very lightweight application, the binary is <strong>75Kb</strong> and memory usage during
the runtime is about <strong>200Kb</strong>.
I've written a couple of HAProxy agent implementations in Go for different projects, and, for
comparison, the binary of my last Go implementation (same functionality as this one) is <strong>3.8Mb</strong>,
memory usage is around <strong>4.6Mb</strong> during runtime.
Deployment
There is an ansible <a>role</a> to install,
configure and run <code>hapgent</code> as a systemd service under an unprivileged user on a Debian system.
It's configurable with the following ansible variables:
| Variable Name | Default |
|--------------------------------|-----------------------------------------------------------------------|
| <code>hapgent_version</code> | <em>0.3.2</em> |
| <code>hapgent_user</code> | <em>nobody</em> |
| <code>hapgent_group</code> | <em>group</em> |
| <code>hapgent_checksum</code> | <em>38b9b2f80fbdf046311127b22943efb464081812bf53de7ce0452968c916b434</em> |
| <code>hapgent_ip</code> | <em>0.0.0.0</em> |
| <code>hapgent_port</code> | <em>9777</em> |
| <code>hapgent_state_file</code> | <em>/etc/hapgent/state.json</em> |
| <code>hapgent_status</code> | <em>FAIL</em> | | [] |
https://avatars.githubusercontent.com/u/155085495?v=4 | space-game | AkitooSama/space-game | 2025-04-14T13:24:03Z | trying to learn zig by making this game? | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/AkitooSama/space-game/tags | MIT | [
"ascii",
"game-development",
"game-engine",
"raylib-c",
"zig"
] | 19 | false | 2025-04-14T17:12:43Z | true | true | unknown | github | [
{
"commit": "master",
"name": "raylib",
"tar_url": "https://github.com/raysan5/raylib/releases/download/5.0/raylib-5.0_linux_amd64.tar.gz/archive/master.tar.gz",
"type": "remote",
"url": "https://github.com/raysan5/raylib/releases/download/5.0/raylib-5.0_linux_amd64.tar.gz"
}
] | A minimalistic Zig experiment using game mechanics and Raylib.
SETUP & QUICK START
Requirements:
* Zig (latest) - https://ziglang.org/download/
* Raylib auto-fetched via build.zig.zon
Run:
<code>git clone https://github.com/AkitooSama/space-game.git
cd space-game
zig build run</code>
PROJECT STRUCTURE
<code>src/
|-- main.zig : Core logic entry
|-- player.zig : Player logic
|-- json.zig : Config loader
|-- settings.json : Game parameters</code>
* Note: Scratch files <code>root.zig</code> and <code>test.zig</code> excluded - experimental use only.
LICENSE
MIT Licensed. Clone, modify, learn - no strings.
Full terms in <a>MIT License</a>. | [] |
https://avatars.githubusercontent.com/u/24628428?v=4 | zfetch | santosr2/zfetch | 2025-04-25T22:11:57Z | Neofetch-like tool made in Zig | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/santosr2/zfetch/tags | MIT | [
"command-line",
"fetch",
"neofetch",
"terminal",
"zfetch",
"zig"
] | 10 | false | 2025-04-30T23:35:05Z | true | true | 0.14.0 | github | [] | Zfetch
A fast and modern <a>Neofetch</a>-like tool made in Zig.
<blockquote>
<span class="bg-red-100 text-red-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-red-900 dark:text-red-300">CAUTION</span>
<strong>Important</strong>: This is an early stage project and may not have undergone
extensive testing. Please be aware that Zig is still in its early
phases, and breaking changes may occur between minor versions.
</blockquote>
Build
To build Zfetch, ensure you're using Zig 0.14.0.
<code>bash
zig build -Doptimize=ReleaseFast</code>
For the best performance, we recommend building with optimizations enabled.
Contribution
While we're excited about the future of Zfetch, we're not yet open to contributions.
However, your feedback is invaluable! Please feel free to submit issues if you
encounter any errors or if you have feature requests. Your input will help
guide future development.
Thank you for your insterest in Zfetch! We appreciate your understanding as we navigate the early stages of development. | [
"https://github.com/qompassai/Zig"
] |
https://avatars.githubusercontent.com/u/48328872?v=4 | luaz | eshom/luaz | 2025-04-22T18:17:20Z | lua rewrite in zig | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/eshom/luaz/tags | MIT | [
"lua",
"zig"
] | 636 | false | 2025-05-10T17:03:06Z | true | true | unknown | github | [] | This is Lua 5.4.7, released on 13 Jun 2024.
For installation instructions, license details, and
further information about Lua, see doc/readme.html. | [] |
https://avatars.githubusercontent.com/u/85001747?v=4 | ambit | voidwyrm-2/ambit | 2025-04-08T10:43:37Z | A scope-oriented virtual machine with a little inspiration from Exapunks | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/voidwyrm-2/ambit/tags | Apache-2.0 | [
"bytecode",
"bytecode-virtual-machine",
"virtual-machine",
"vm",
"zig"
] | 10 | false | 2025-05-09T07:01:55Z | true | true | 0.14.0 | github | [] | Ambit
Notice
I am no longer maintaining or working on Ambit whatsoever | [] |
https://avatars.githubusercontent.com/u/20910059?v=4 | zig_decimal | AS400JPLPC/zig_decimal | 2025-03-01T14:29:42Z | decimal 34 digit ex dcml(8,2) processing decimal numbers | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/AS400JPLPC/zig_decimal/tags | MIT | [
"decimals",
"zig"
] | 6,490 | false | 2025-03-13T11:18:10Z | false | false | unknown | github | [] | ZIG_REGEX
PCRE2-POSIX
Using "regex" from the new PCRE2-Posix standard
https://github.com/mnemnion/mvzr new regex form ZIG
example:
Pay attention to the flag that is incumbent on you.
/i ignore case
/g global
/m multiline
```
const std = @import("std");
// tools regex
const reg = @import("match");
const allocatorPrint = std.heap.page_allocator;
pub fn main() !void {
const stdin = std.io.getStdIn().reader();
var buf : [3]u8 = undefined;
buf = [_]u8{0} ** 3;
std.debug.print("Macth abc {} \r\n",.{reg.isMatch("p1","^[A-Z]{1,1}[a-zA-Z0-9]{0,}$/g")}) ;
std.debug.print("Macth abc {} \r\n",.{reg.isMatch("p1","^[a-zA-Z]{1,1}[a-zA-Z0-9]{0,}$")}) ;
std.debug.print("Macth digit {} \r\n",.{reg.isMatch(
"423",
"^[1-9]{1,1}?[0-9]{0,}$")}) ;
std.debug.print("Macth tel fr{} \r\n",.{reg.isMatch(
"+(33)6.12.34.56.78",
"^[+]{1,1}[(]{0,1}[0-9]{1,3}<a>)</a>{1,1}([-. ]?[0-9]{2,3}){2,4}$")}) ;
std.debug.print("Macth tel us{} \r\n",.{reg.isMatch(
"+(001)456.123.789",
"^[+]{1,1}<a>(</a><a>)</a>{2,4}$")}) ;
std.debug.print("Macth date fr{} \r\n",.{reg.isMatch(
"12/10/1951",
"^(0[1-9]|[12][0-9]|3[01])<a>\/</a>[\/][0-9]{4,4}$")});
std.debug.print("Macth date us{} \r\n",.{reg.isMatch(
"10/12/1951",
"^(0[1-9]|1[012])<a>\/</a>[\/][0-9]{4,4}$")});
std.debug.print("Macth date iso{} \r\n",.{reg.isMatch(
"2003-02-25",
"^([0-9]{4,4})<a>-</a><a>-</a>$")});
// https://stackoverflow.com/questions/201323/how-can-i-validate-an-email-address-using-a-regular-expression
// chapitre RFC 6532 updates 5322 to allow and include full, clean UTF-8.
std.debug.print("Macth Mail{} \r\n",.{reg.isMatch(
"myname.myfirstname@gmail.com",
"^([-!#-\'<em>+\/-9=?A-Z^-~]{1,64}(\.[-!#-\'</em>+\/-9=?A-Z^-~]{1,64})*|\"([]!#-[^-~ \t]|(\[\t -~]))+\")@<a>0-9A-Za-z</a>?(\.<a>0-9A-Za-z</a>?)+$")});
//oreilly
std.debug.print("Macth Mail{} \r\n",.{reg.isMatch(
"myname.myfirstname@gmail.com",
"^[A-Z0-9_!#$%&'*+/=?`{|}~^.-]+@[A-Z0-9.-]+$")});
var width :usize = 5;
// unsigned digit
std.debug.print("Macth digit unsigned{} \r\n",.{reg.isMatch(
"123",
std.fmt.allocPrint(allocatorPrint,"^[0-9]{s}{d}{s}$",.{"{1,",width,"}"},) catch unreachable)});
// unsigned digit
std.debug.print("Macth digit {} \r\n",.{reg.isMatch(
"+12345",
std.fmt.allocPrint(allocatorPrint,"^[+-][0-9]{s}{d}{s}$",.{"{1,",width,"}"},) catch unreachable)});
// decimal unsigned scal = 0
std.debug.print("Macth decimal unsigned scal = 0 {} \r\n",.{reg.isMatch(
"12345",
std.fmt.allocPrint(allocatorPrint,"^[0-9]{s}1,{d}{s}$",.{"{",width,"}"},) catch unreachable)});
var scal :usize = 2;
// decimal unsigned scal > 0
std.debug.print("Macth decimal unsigned scal > 0 {} \r\n",.{reg.isMatch(
"12345.02",
std.fmt.allocPrint(allocatorPrint,
"^[0-9]{s}1,{d}{s}[.][0-9]{s}{d}{s}$",.{"{",width,"}","{",scal,"}"}
) catch unreachable)});
_= try stdin.readUntilDelimiterOrEof(buf[0..], '\n');
// decimal signed scal = 0
std.debug.print("Macth decimal signed scal = 0 {} \r\n",.{reg.isMatch(
"+12345",
std.fmt.allocPrint(allocatorPrint,"^[+-][0-9]{s}1,{d}{s}$",.{"{",width,"}"},) catch unreachable)});
// decimal unsigned scal > 0
std.debug.print("Macth decimal signed scal > 0 {} \r\n",.{reg.isMatch(
"+12345.02",
std.fmt.allocPrint(allocatorPrint,
"^[+-][0-9]{s}1,{d}{s}[.][0-9]{s}{d}{s}$",.{"{",width,"}","{",scal,"}"}
) catch unreachable)});
var i: usize = 0 ;
while(i < 5000) : ( i += 1 ) {
_=reg.isMatch(
"1951-10-12",
"^([0-9]{4,4})<a>-</a><a>-</a>$");
}
buf = [<em>]u8{0} ** 3;
</em>= try stdin.readUntilDelimiterOrEof(buf[0..], '\n');
}
```
<ul>
<li>
•upgrade 2024-03-23.
</li>
<li>
•upgrade 2024-06-29.
← zig version 0.13.0
</li>
<li>
•upgrade 2024-07-01.
← Test Fluent and PCRE "C" Zregex
</li>
<li>
•upgrade 2024-07-22.
← Test MVZR and PCRE "C" Zregex
</li>
<li>
•upgrade 2025-03-12.
← zig version 0.14.0
</li>
<li>
•upgrade 2025-03-13.
← update normalise and edit-code
</li>
</ul> | [] |
https://avatars.githubusercontent.com/u/24283234?v=4 | platformer | h2cone/platformer | 2025-03-02T07:11:38Z | 2D platformer jump. | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/h2cone/platformer/tags | Apache-2.0 | [
"gamedv",
"platformer",
"raylib",
"zig"
] | 15,439 | false | 2025-04-20T07:12:07Z | true | true | 0.14.0 | github | [
{
"commit": "master",
"name": "raylib_zig",
"tar_url": "https://github.com/Not-Nik/raylib-zig/archive/master.tar.gz",
"type": "remote",
"url": "https://github.com/Not-Nik/raylib-zig"
}
] | platformer
| [] |
https://avatars.githubusercontent.com/u/11753414?v=4 | fishystuff | karpfediem/fishystuff | 2025-03-23T22:37:49Z | Fishing Guides and Tools for Black Desert | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/karpfediem/fishystuff/tags | MIT | [
"blackdesertonline",
"fish",
"fishing",
"fishing-game",
"guides",
"ssg",
"zig",
"zine"
] | 15,392 | false | 2025-04-18T11:35:36Z | true | true | unknown | github | [
{
"commit": "master",
"name": "zine",
"tar_url": "https://github.com/kristoff-it/zine/archive/master.tar.gz",
"type": "remote",
"url": "https://github.com/kristoff-it/zine"
}
] | fishystuff
A very fishy website
Development
Prerequisites
This project uses a nix flake and <a>devenv</a>
To install them you can follow this guide: https://devenv.sh/getting-started/
Once installed you can enter the devenv shell either by running
<code>bash
devenv shell</code>
or via
<code>bash
nix develop --impure</code>
Commands
List commands
<code>bash
just -l</code> | [] |
https://avatars.githubusercontent.com/u/442455?v=4 | cimgui-knobs | dinau/cimgui-knobs | 2025-02-18T14:27:42Z | Knobs library wrapper in C lang. for Dear ImGui | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/dinau/cimgui-knobs/tags | MIT | [
"cimgui",
"cimknobs",
"imgui",
"knobs",
"luajit",
"nim",
"rust",
"warpper",
"zig"
] | 1,979 | false | 2025-02-25T01:17:16Z | false | false | unknown | github | [] | CImGui Knobs
This is a port/adaptation of <a>ImGui-Knobs</a>, for C language (contributed to <a>ImGuin</a> project) by <a>system64MC</a> at <a>2024/12</a>.
I've just isolated the sources from ImGuin project for maintenance and convenience and added <a>a simple demo program in C language</a>.
Usage
Add
<code>txt
cimgui-knobs.cpp
cimgui-knobs.h
imgui-knobs.cpp
imgui-knobs.h</code>
to your project and include <code>cimgui-knobs.h</code> in some source file.
Building and runiing demo in C language
Prerequisites
<ul>
<li>Windows10 OS or later </li>
<li>
<a>Msys2/MinGW</a> tools installed. (gcc, make, etc)
```sh
pacman -S mingw-w64-ucrt-x86_64-{gcc,glfw,SDL2,pkgconf} make
```
</li>
<li>
Linux OS (Debian/ Ubuntu families)
</li>
</ul>
<code>sh
$ sudo apt install xorg-dev libopengl-dev libgl1-mesa-dev
$ sudo apt install libglfw3 libglfw3-dev libsdl2-dev</code>
Building and running demo
<code>sh
git clone --recursive https://github.com/dinau/cimgui-knobs
cd cimgui-knobs/demo/c
make run</code> | [] |
https://avatars.githubusercontent.com/u/77605763?v=4 | uwah | dragsbruh/uwah | 2025-04-28T04:58:59Z | user wpm analytics hogger | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/dragsbruh/uwah/tags | - | [
"analytics",
"linux",
"wpm",
"wpm-counter",
"zig"
] | 9 | false | 2025-04-28T05:01:20Z | true | true | 0.14.0 | github | [] | 404 | [] |
https://avatars.githubusercontent.com/u/52092726?v=4 | devs | Adamkaram/devs | 2025-03-06T21:21:55Z | for personal use you can fork it for your needs | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/Adamkaram/devs/tags | - | [
"bash",
"dotfiles",
"go",
"i3",
"lua",
"nvim",
"rust",
"tmux",
"ubuntu",
"vim",
"zig"
] | 3,379 | false | 2025-05-04T21:44:15Z | false | false | unknown | github | [] | with one line you are ready to go
<code>curl -fsSL https://ahmadkaram-dev.vercel.app | sh</code>
for adding one line to install
1- fork this repo
2- there's two main files public.index and vercel.json those files required for making vecel project work(index.html)
and vercel.json for redirecting to sh file
3- edit resources/setup file to match your repo file
todo
fetch my ssh and private key from vercel with password and username
listing plugins and lsp in readme
credit
1- (the primeagen) https://github.com/ThePrimeagen/dev
2- (adibhanna) https://github.com/adibhanna/nvim
3- as always thanx gpt for hard work | [] |
https://avatars.githubusercontent.com/u/146390816?v=4 | binutils | allyourcodebase/binutils | 2025-04-11T03:07:56Z | binutils ported to the zig build system | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/allyourcodebase/binutils/tags | GPL-2.0 | [
"zig",
"zig-package"
] | 50 | false | 2025-05-20T23:57:23Z | true | true | 0.14.0 | github | [
{
"commit": "4746604fb42357df32169db7c77d1b11c90eb9a7.tar.gz",
"name": "binutils",
"tar_url": "https://github.com/bminor/binutils-gdb/archive/4746604fb42357df32169db7c77d1b11c90eb9a7.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/bminor/binutils-gdb"
},
{
"commit": "6c72830... | <a></a>
binutils
This is <a>binutils</a>, packaged for <a>Zig</a>.
The following subset of tools and libraries have been ported:
<ul>
<li><code>bfd</code> - A library for manipulating binary files in a variety of different formats.</li>
<li><code>libsframe</code> - A library for assembling and disassembling a variety of different assembler languages.</li>
<li><code>opcodes</code> - A library for manipulating the SFRAME debug format.</li>
</ul>
Installation
First, update your <code>build.zig.zon</code>:
```
Initialize a <code>zig build</code> project if you haven't already
zig init
zig fetch --save git+https://github.com/allyourcodebase/binutils.git
```
You can then import <code>binutils</code> in your <code>build.zig</code> with:
<code>zig
const binutils_dependency = b.dependency("binutils", .{
.target = target,
.optimize = optimize,
});
your_exe.root_module.linkLibrary(binutils_dependency.artifact("binutils"));</code> | [
"https://github.com/allyourcodebase/binutils",
"https://github.com/allyourcodebase/kcov"
] |
https://avatars.githubusercontent.com/u/85131?v=4 | doc_poc | mooseman/doc_poc | 2025-03-08T01:02:50Z | Documentation proof-of-concept. | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/mooseman/doc_poc/tags | Unlicense | [
"css",
"documentation",
"html",
"javascript",
"mit-license",
"proof-of-concept",
"sidebar",
"tabs",
"template",
"themes",
"unlicense",
"zig"
] | 54 | false | 2025-03-08T20:59:51Z | false | false | unknown | github | [] | doc_poc
Documentation proof-of-concept.
This repo is meant as a hopefully-useful proof of concept for website documentation.
All code (HTML, CSS and javascript) and all text is AI-generated.
I'm slowly starting to get into some Zig coding, hence the text content here.
This repo is aimed in particular at showing how the layout of the Zig Standard Library documentation
could be improved, as that is currently (IMO) a bit cluttered and difficult to navigate, understand and
"get the big picture".
The code (HTML, CSS and javascript) is released to the public domain under the Unlicense.
The text content (including all Zig code within it) is released under the MIT license, as that is the
license that Zig uses.
Given that all content in this repo (except this README is AI-generated, IT IS STRONGLY RECOMMENDED THAT
THIS REPO NOT BE USED AS AN ACTUAL SOURCE OF DOCUMENTATION.
THE CODE HAS NOT BEEN TESTED.
The IMPORTANT thing here is the LAYOUT of the content and how easy it is to navigate around it and
"see the big picture".
Themes have been added to (hopefully) enhance the user-experience.
In particular, I hope users enjoy the "PULL OVER, BUDDY!" theme............ ;)
As mentioned, the HTML, CSS and javacript code is released to the public domain.
"Share and enjoy....." :)
<ul>
<li>mooseman</li>
</ul> | [] |
https://avatars.githubusercontent.com/u/33239151?v=4 | vyper | karlbateman/vyper | 2025-04-14T19:08:33Z | An experimental programming language inspired by Python and Go. | develop | 0 | 0 | 0 | 0 | https://api.github.com/repos/karlbateman/vyper/tags | BSD-3-Clause | [
"codegen",
"golang",
"lexer",
"parser",
"programming",
"python",
"zig"
] | 7 | false | 2025-04-14T19:25:45Z | true | false | unknown | github | [] | Vyper (Prototype)
Vyper is an experimental programming language inspired by Python's syntax and
Go's performance and tooling.
This is a <strong>minimal prototype</strong> showing the first end-to-end flow:
<ul>
<li>Lexing</li>
<li>Parsing</li>
<li>Generating C code</li>
<li>Compiling to a native binary using <code>zig cc</code></li>
</ul>
📦 Requirements
<ul>
<li><a>Zig</a> <strong>0.13.0</strong> or newer</li>
</ul>
🚀 Usage
First, compile the <code>vyper</code> compiler itself:
<code>bash
zig build</code>
This will produce a binary located at <code>zig-out/bin/vyper</code> which can be used to
compile one of the example <code>.vy</code> programs as follows:
<code>bash
./zig-out/bin/vyper build examples/hello.vy</code>
This will compile the Vyper program to a single binary located in the
<code>out/hello</code> directory. To run this example, use the following:
<code>bash
./out/hello</code> | [] |
https://avatars.githubusercontent.com/u/8993721?v=4 | Splixel | Corvusant/Splixel | 2025-03-28T21:38:13Z | Splixel is a small CLI tool which allows creation of an image diff using base64 encoded images in and html page. The main use is convenient sharing of diffs using a single file, allowing for direct comparison. | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/Corvusant/Splixel/tags | MIT | [
"diff",
"html",
"image",
"images",
"zig",
"ziglang"
] | 655 | false | 2025-05-05T15:54:19Z | true | true | 0.15.0-dev.137+db7db4802 | github | [] | 404 | [] |
https://avatars.githubusercontent.com/u/106361809?v=4 | ubuntux | zpaceway/ubuntux | 2025-03-31T08:40:24Z | null | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/zpaceway/ubuntux/tags | - | [
"go",
"linux",
"mise",
"podman",
"python",
"rust",
"ubuntu",
"zig"
] | 5 | false | 2025-04-05T21:53:14Z | false | false | unknown | github | [] | Ubuntu WSL Development Environment via wsmaker
This repository provides an Ubuntu 24.04-based WSL environment pre-configured for development. Instead of building the Docker image manually, you can easily install and mount this image using <a>wsmaker</a>, a tool that simplifies the installation process for WSL images.
Overview
This image is designed for developers who need a robust WSL environment featuring:
<ul>
<li><strong>WSL-Ready Configuration:</strong> Systemd enabled with customized networking.</li>
<li><strong>Essential Utilities:</strong> Tools like <code>sudo</code>, <code>nano</code>, <code>nmap</code>, <code>net-tools</code>, <code>snap</code>, <code>git</code>, <code>curl</code>, <code>wget</code>, and more.</li>
<li><strong>Google Chrome:</strong> Installed for web browsing.</li>
<li><strong>Multi-Language Support:</strong> Programming languages (Python, Node.js, Go, Rust, Zig, and ZLS) are installed and activated globally via the <a>Mise</a> tool.</li>
</ul>
Features
<ul>
<li><strong>Base Image:</strong> Ubuntu 24.04.</li>
<li><strong>Pre-installed Utilities:</strong> Including but not limited to:</li>
<li>sudo, nano, nmap, net-tools</li>
<li>snap & snapd, git, curl, wget</li>
<li>gcc, build-essential</li>
<li>alsa-base, alsa-utils, pulseaudio, pulseaudio-utils</li>
<li>apt-transport-https, lsb-release, ca-certificates, gnupg</li>
<li>podman</li>
<li><strong>WSL Configuration:</strong></li>
<li>Enables <code>systemd</code> support.</li>
<li>Sets a custom default user and hostname via build arguments.</li>
<li>Uses a mirrored networking mode for WSL2.</li>
<li><strong>Google Chrome:</strong> Installed from the official .deb package.</li>
<li><strong>Development Environments:</strong> Uses the Mise tool to install and globally configure:</li>
<li>Python, Node.js, Go, Rust, Zig, and ZLS</li>
</ul>
Getting Started with wsmaker
Prerequisites
<ul>
<li><strong>wsmaker:</strong> Download and install <a>wsmaker</a> (visit the official documentation or website for instructions).</li>
<li><strong>WSL:</strong> Ensure WSL is installed and configured on your system.</li>
<li><strong>Docker:</strong> wsmaker may require Docker to manage images. Check the <a>Docker documentation</a> for installation details.</li>
</ul>
Installing and Mounting the Image
Use the following command to install and mount the image with wsmaker:
<code>bash
.\wslmaker.exe install --name=<name> --distro=zpaceway/ubuntux:latest --build-arg-WSL_USERNAME=<username> --build-arg-WSL_HOSTNAME=<hostname></code>
Replace <code><username></code> and <code><hostname></code> with your desired WSL username and hostname. This command does the following:
<ul>
<li><strong>Image Installation:</strong> Downloads and installs the pre-configured Ubuntu 24.04 image from the <code>zpaceway/ubuntux:latest</code> repository.</li>
<li><strong>Customization:</strong> Applies the provided build arguments to set up the default user and hostname.</li>
<li><strong>Mounting:</strong> Integrates the image into your WSL environment, providing an interactive shell.</li>
</ul>
Post-Installation Configuration
After the installation is complete, launch your new WSL environment using the appropriate wsmaker or WSL commands. You will have an interactive bash shell with:
<ul>
<li>All essential development tools installed.</li>
<li>Google Chrome pre-installed.</li>
<li>Programming environments set up via Mise.</li>
</ul>
Detailed Configuration
WSL Settings
The image configures <code>/etc/wsl.conf</code> with the following settings to ensure a smooth WSL experience:
```ini
[boot]
systemd=true
[user]
default=${WSL_USERNAME}
[wsl2]
networkingMode=mirrored
[network]
hostname=${WSL_HOSTNAME}
generateHosts=false
```
These settings ensure:
<ul>
<li><strong>Systemd Support:</strong> Allows for proper service management.</li>
<li><strong>Custom User and Hostname:</strong> Based on the provided <code>WSL_USERNAME</code> and <code>WSL_HOSTNAME</code> build arguments.</li>
<li><strong>Mirrored Networking:</strong> Optimized networking for WSL2 environments.</li>
</ul>
Mise Tool Integration
Once the specified user is activated, the image installs the <a>Mise</a> tool, which then installs and globally configures the following programming languages:
<ul>
<li>Python</li>
<li>Node.js</li>
<li>Go</li>
<li>Rust</li>
<li>Zig</li>
<li>ZLS (Zig Language Server)</li>
</ul>
The Mise tool automates the installation and configuration of these environments, appending necessary activation commands to the user's <code>.bashrc</code>.
License
This project is licensed under the <a>MIT License</a>.
Acknowledgements
<ul>
<li><a>Ubuntu</a></li>
<li><a>wsmaker</a> (insert actual link if available)</li>
<li><a>Docker</a></li>
<li><a>Mise</a></li>
</ul>
Feel free to modify this <code>README.md</code> to suit your specific requirements or to add any additional details you might have. | [] |
https://avatars.githubusercontent.com/u/95457148?v=4 | uuidz | babiabeo/uuidz | 2025-03-11T15:33:05Z | Zig package for generating and parsing UUIDs based on RFC 9562 | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/babiabeo/uuidz/tags | MIT | [
"rfc9562",
"uuid",
"zig"
] | 17 | false | 2025-03-14T14:22:11Z | true | true | unknown | github | [] | uuidz
A Zig package for generating and parsing UUIDs based on <a>RFC 9562</a>.
Installation
First, to add <code>uuidz</code> package to your <code>build.zig.zon</code>, run:
<code>sh
zig fetch --save git+https://github.com/babiabeo/uuidz.git#main</code>
Then, in <code>build.zig</code>, add <code>uuidz</code> as a dependency to your program:
```zig
// ...
const uuidz = b.dependency("uuidz", .{
.target = target,
.optimize = optimize,
});
exe.root_module.addImport("uuidz", uuidz.module("uuidz"));
// ...
```
That's it! Now you can start your journey with <code>uuidz</code> :)
Usage
Generating
<code>uuidz</code> supports generating all versions defined in RFC 9562 (except version 2).
```zig
const uuidz = @import("uuidz");
pub fn main() void {
_ = uuidz.v1.new(); // Version 1
_ = uuidz.v3.new(); // Version 3
_ = uuidz.v4.new(); // Version 4
_ = uuidz.v5.new(); // Version 5
_ = uuidz.v6.new(); // Version 6
_ = uuidz.v7.new(); // Version 7
_ = uuidz.v8.new(); // Version 8
}
```
There is also <code>uuidz.ns</code> which is a collection of pre-defined namespace IDs as
provided in RFC. These namespaces are usually used when creating uuid version 3
or 5.
<code>zig
_ = uuidz.ns.DNS;
_ = uuidz.ns.URL;
_ = uuidz.ns.OID;
_ = uuidz.ns.X500;</code>
Parsing
<code>uuidz.UUID.parse</code> allows you to parse an uuid from a string. Only one of these
formats are supported:
<ul>
<li><code>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</code> (Standard form)</li>
<li><code>urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</code> (URN form)</li>
<li><code>{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}</code> (Microsoft's curly braced style)</li>
</ul>
<code>zig
_ = uuidz.UUID.parse("b953498c-fd02-449d-9dc6-c93e5e7985b2"); // valid
_ = uuidz.UUID.parse("urn:uuid:b953498c-fd02-449d-9dc6-c93e5e7985b2"); // valid
_ = uuidz.UUID.parse("{b953498c-fd02-449d-9dc6-c93e5e7985b2}"); // valid
_ = uuidz.UUID.parse("b953498cfd02449d9dc6c93e5e7985b2"); // error: Unsupported form</code>
License
<a>MIT</a> | [] |
https://avatars.githubusercontent.com/u/7925?v=4 | samdc | kumo/samdc | 2025-03-13T12:32:46Z | Interact with Samsung's MDC protocol using Zig. | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/kumo/samdc/tags | MIT | [
"cli",
"mdc",
"zig"
] | 86 | false | 2025-04-21T20:40:51Z | true | true | 0.14.0 | github | [] | SaMDC
A lightweight CLI tool for interacting with Samsung displays using the MDC (Multiple Display Control) protocol.
Overview
SaMDC is designed as a more user-friendly alternative to existing Samsung MDC tools, focusing on simplicity and common use cases like rebooting, replacing the app, and auditing one or more displays.
Features
<ul>
<li>Basic display control commands:</li>
<li><code>reboot</code>: Restart the display</li>
<li><code>on</code>: Power on the display</li>
<li><code>off</code>: Power off the display</li>
<li><code>volume</code>: Get or set the volume</li>
<li><code>url</code>: Get or set the launcher url</li>
</ul>
Installation
```bash
Installation instructions will go here
```
Usage
Basic Commands
```bash
Reboot a display
samdc reboot 10.10.10.10
Power on multiple displays
samdc on 10.10.10.10 11.11.11.11
Change the volume of a display
samdc volume 50 10.10.10.10
```
Development
This project is in very early development. Currently implementing core commands with plans to add more functionality over time.
Roadmap
<br/><input type='checkbox' class='w-4 h-4 text-green-500 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' checked disabled></input> Basic device control (reboot, wake, sleep)
<br/><input type='checkbox' class='w-4 h-4 text-green-500 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' checked disabled></input> Multi-device management
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Advanced display settings
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Export data in JSON
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Configuration profiles
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Audit capabilities
Contributing
Contributions welcome! Feel free to submit issues or pull requests.
License
<a>MIT License</a> | [] |
https://avatars.githubusercontent.com/u/4036118?v=4 | codecrafters-http-server-zig | pmbanugo/codecrafters-http-server-zig | 2025-04-10T21:51:49Z | code crafters low-level http server implementation | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/pmbanugo/codecrafters-http-server-zig/tags | - | [
"zig",
"ziglang"
] | 24 | false | 2025-04-23T20:58:26Z | true | true | 0.14.0 | github | [] | <a></a>
This is a starting point for Zig solutions to the
<a>"Build Your Own HTTP server" Challenge</a>.
<a>HTTP</a> is the
protocol that powers the web. In this challenge, you'll build a HTTP/1.1 server
that is capable of serving multiple clients.
Along the way you'll learn about TCP servers,
<a>HTTP request syntax</a>,
and more.
<strong>Note</strong>: If you're viewing this repo on GitHub, head over to
<a>codecrafters.io</a> to try the challenge.
Passing the first stage
The entry point for your HTTP server implementation is in <code>src/main.zig</code>. Study
and uncomment the relevant code, and push your changes to pass the first stage:
<code>sh
git commit -am "pass 1st stage" # any msg
git push origin master</code>
Time to move on to the next stage!
Stage 2 & beyond
Note: This section is for stages 2 and beyond.
<ol>
<li>Ensure you have <code>zig (0.14)</code> installed locally</li>
<li>Run <code>./your_program.sh</code> to run your program, which is implemented in
<code>src/main.zig</code>.</li>
<li>Commit your changes and run <code>git push origin master</code> to submit your solution
to CodeCrafters. Test output will be streamed to your terminal.</li>
</ol> | [] |
https://avatars.githubusercontent.com/u/11700503?v=4 | zonk | braheezy/zonk | 2025-04-27T00:21:43Z | 2D game engine powered by WebGPU | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/braheezy/zonk/tags | - | [
"game",
"text",
"webgpu",
"zig"
] | 23,912 | false | 2025-05-21T05:00:31Z | true | true | 0.14.0 | github | [
{
"commit": "30b29eee8047852708e79aadf0425494e6d7c5b5",
"name": "zglfw",
"tar_url": "https://github.com/zig-gamedev/zglfw/archive/30b29eee8047852708e79aadf0425494e6d7c5b5.tar.gz",
"type": "remote",
"url": "https://github.com/zig-gamedev/zglfw"
},
{
"commit": "3ae4a71af16df3a7dfa95023bba1... | Zonk
A 2D game library for Zig inspired by <a>Ebiten</a>.
Features
<ul>
<li>Hardware-accelerated 2D rendering via WebGPU</li>
<li>Input handling (keyboard, mouse)</li>
<li>Image loading and manipulation (PNG, JPEG)</li>
<li>Text rendering with FreeType and HarfBuzz</li>
<li>Fixed timestep game loop (60 FPS default)</li>
<li>Optional uncapped framerate</li>
</ul>
Integration
Add to your <code>build.zig.zon</code>:
<code>console
zig fetch --save git+https://github.com/braheezy/zonk</code>
Include in your <code>build.zig</code>:
```zig
const zonk_dep = b.dependency("zonk", .{
.target = target,
.optimize = optimize,
});
exe.root_module.addImport("zonk", zonk_dep.module("zonk"));
```
Architecture
Zonk implements the Ebiten core concept of separating game logic from rendering:
<ol>
<li><code>update()</code> - Game logic, called every frame</li>
<li><code>draw(screen)</code> - Rendering, called after update</li>
<li><code>layout(width, height)</code> - Window resize handling</li>
</ol>
Implement a struct with these methods and <code>zonk</code> will call them for you.
Game Interface
```zig
const YourGame = struct {
// State fields here
<code>pub fn update(self: *YourGame) void {
// Update game state
}
pub fn draw(self: *YourGame, screen: *image.RGBAImage) void {
// Render to screen buffer
}
pub fn layout(self: *YourGame, width: usize, height: usize) void {
// Handle resizing
}
</code>
};
```
Running Your Game
```zig
pub fn main() !void {
var game = YourGame{};
<code>try zonk.run(
YourGame,
&game,
std.heap.page_allocator,
.{
.title = "Your Game",
.width = 800,
.height = 600,
.vsync = true,
.uncapped_fps = false,
.enable_text_rendering = true,
},
);
</code>
}
```
Rendering
Zonk uses the <a>zpix</a> library for color support and image operations:
```zig
// Clear screen
screen.clear(.{ .rgba = .{ .r = 0, .g = 0, .b = 0, .a = 255 } });
// Draw rectangles
var d = Drawer.init(screen);
const rect = Rectangle{
.min = .{ .x = 10, .y = 10 },
.max = .{ .x = 50, .y = 50 },
};
d.fillRect(rect, color.Color{ .rgba = .{ .r = 255, .g = 0, .b = 0, .a = 255 } });
// Render text
zonk.print("Score: {d}", .{score}, 10, 10, [4]f32{ 1.0, 1.0, 1.0, 1.0 }) catch unreachable;
```
Input Handling
```zig
// Check key state
if (zonk.input_state.isKeyDown(.space)) {
// Space bar is pressed
}
// Check previous frame state
if (zonk.input_state.isKeyJustPressed(.enter)) {
// Enter key was just pressed this frame
}
```
Examples
The Pong example in <code>examples/pong</code> demonstrates core Zonk concepts including:
<ul>
<li>Game loop implementation</li>
<li>Collision detection</li>
<li>Input handling</li>
<li>Rendering and text display</li>
</ul>
Run it with <code>zig build pong</code>.
Attribution
The text rendering comes from <a><code>zig-text-rendering</code></a>, thank you for your work <strong>tchayen</strong>!
The contents of <code>pkg/</code> are from Ghostty because they are the most mature project that maintains these packages for the latest Zig. They say this about the <code>pkg</code> directory:
<blockquote>
If you want to use them, you can copy and paste them into your project.
</blockquote>
Very generous of the Ghostty team, thank you! | [] |
https://avatars.githubusercontent.com/u/3868549?v=4 | serve | sea-grass/serve | 2025-04-07T21:40:53Z | Serve is a small command-line utility to serve files via localhost. | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/sea-grass/serve/tags | MIT | [
"zig"
] | 11 | false | 2025-04-20T15:38:49Z | true | true | 0.14.0 | github | [
{
"commit": "master",
"name": "httpz",
"tar_url": "https://github.com/karlseguin/http.zig/archive/master.tar.gz",
"type": "remote",
"url": "https://github.com/karlseguin/http.zig"
}
] | Serve
Serve is a small command-line utility to serve files via localhost.
Features
<ul>
<li>Local HTTP server (always <code>http://127.0.0.1:3000</code>)</li>
<li>Specified directory path (as a command line argument)</li>
<li>File server (all files from within this directory path)</li>
<li>Request path mapping (e.g. <code>GET /app.js</code> -> <code>app.js</code>)</li>
<li>Index file mapping (e.g. <code>GET /some-path/</code> maps to the file <code>some-path/index.html</code>)</li>
<li>File extension-based content-type header</li>
</ul>
Optional features
These features are only enabled if Serve is built with the corresponding flag enabled.
<ul>
<li><code>-Dadditional_redirect</code> - Redirect file requests where instead a directory exists on the filesystem to a directory request (e.g. <code>GET /some-path</code> -> <code>GET /some-path/</code>)</li>
</ul>
Supported Zig version
Serve is tested with Zig <code>0.14.0</code>. Your mileage may vary on other versions. If you encounter an issue, patches are encouraged.
Usage
At the moment, there are no published binaries. If you want to use Serve, you'll need to obtain a copy of the Zig compiler and build it yourself.
To build the project, simply clone the repository, enter the directory, then build the project with:
<code>zig build</code>
The program will be available in your current directory at <code>zig-out/bin/serve</code>. Feel free to copy this somewhere accessible via your <code>PATH</code>.
Alternatively, you can build an optimized executable by building in release mode:
```
build in release mode
zig build -Doptimize=ReleaseSafe
or, build a release binary optimized for size
zig build -Doptimize=ReleaseSmall
```
Alternatives
Serve is meant to be used as a local development tool to serve files via localhost only. If you are looking for a static server to run on your production system, this is not it. For production, consider something like nginx.
An alternative you could consider is the <a>Python 3 built-in module <code>http.server</code></a>.
Contributions
Patches are welcome.
Acknowledgements
<ul>
<li><a>Zig</a> - This project is written in Zig</li>
<li><a>http.zig</a> - This project is a thin wrapper around http.zig</li>
</ul> | [
"https://github.com/sea-grass/goku"
] |
https://avatars.githubusercontent.com/u/95163444?v=4 | zhavok | AsgardXIV/zhavok | 2025-04-27T01:22:36Z | A pure Zig library for parsing Havok tag files. | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/AsgardXIV/zhavok/tags | MIT | [
"havok",
"havok-animation",
"havok-physics",
"zig",
"zig-package",
"ziglang"
] | 268 | false | 2025-05-09T02:51:36Z | true | true | 0.14.0 | github | [] | zhavok
zhavok is a pure Zig library for parsing Havok tag files.
It is currently very WIP and not ready to use.
Acknowledgements
Although it is not a direct port and does not include their code, zhavok is mostly based on the work of <a>HavokLib</a> and <a>hkxparse</a>. A huge thanks to those projects for the significant work they've done in reverse engineering the Havok formats. See the license section below for more information.
License
zhavok is licensed under the <a>MIT License</a>.
Licenses for third-party software and assets can be found <a>here</a>. | [] |
https://avatars.githubusercontent.com/u/98472963?v=4 | git.station | archellir/git.station | 2025-03-07T04:21:16Z | High-performance, extremely lightweight Git service built with Zig and SvelteKit | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/archellir/git.station/tags | - | [
"ci",
"git",
"svelte",
"zig"
] | 74 | false | 2025-05-04T04:37:33Z | false | false | unknown | github | [] | Git station
A high-performance, extremely lightweight Git service built with Zig and SvelteKit.
Features
<ul>
<li>Create and manage Git repositories</li>
<li>Web-based repository browsing</li>
<li>Branch management (create, delete)</li>
<li>Pull request workflow (create, update, close, merge, delete source branch)</li>
<li>CI/CD pipeline integration</li>
<li>Optimized for performance and minimal resource usage</li>
</ul>
Project Structure
<code>git.station/
├── backend/ # Zig backend
├── frontend/ # SvelteKit frontend
└── scripts/ # Helper scripts</code>
Getting Started
Prerequisites
<ul>
<li><a>Zig</a> (0.14.0 or later)</li>
<li><a>Node.js</a> (18 or later)</li>
<li><a>libgit2</a> development libraries</li>
<li><a>SQLite3</a> development libraries</li>
</ul>
Backend Setup
```bash
cd backend
zig build
zig build run
zig build && zig build run
```
Frontend Setup
<code>bash
cd frontend
npm install
npm run dev</code>
API Reference
Repository Management
<ul>
<li><code>GET /api/repo/{repo_name}</code> - Get repository details</li>
<li><code>GET /api/repo/{repo_name}/branches</code> - List branches in repository</li>
</ul>
Branch Management
<ul>
<li><code>POST /api/repo/{repo_name}/branches</code> - Create a new branch</li>
<li><code>DELETE /api/repo/{repo_name}/branch</code> - Delete a branch
<code>json
{ "branch": "branch-name-to-delete" }</code></li>
</ul>
Pull Request Workflow
<ul>
<li><code>GET /api/repo/{repo_name}/pulls</code> - List pull requests for a repository</li>
<li><code>GET /api/repo/{repo_name}/pulls/{id}</code> - Get a specific pull request</li>
<li><code>POST /api/repo/{repo_name}/pulls</code> - Create a new pull request
<code>json
{
"title": "Pull request title",
"body": "Description of changes",
"source_branch": "feature-branch",
"target_branch": "main"
}</code></li>
<li><code>PATCH /api/repo/{repo_name}/pulls/{id}</code> - Update a pull request
<code>json
{
"title": "Updated title",
"body": "Updated description",
"state": "open"
}</code></li>
<li><code>PUT /api/repo/{repo_name}/pulls/{id}/merge</code> - Merge a pull request</li>
<li><code>PUT /api/repo/{repo_name}/pulls/{id}/close</code> - Close a pull request</li>
<li><code>PUT /api/repo/{repo_name}/pulls/{id}/delete-branch</code> - Delete the source branch of a pull request</li>
</ul>
Testing
Git Station includes a comprehensive test suite for the backend components. Tests can be run either locally or in Docker.
Running Tests
The <code>run-tests.sh</code> script in the <code>backend</code> directory provides various options for running tests:
<code>bash
cd backend
sh run-tests.sh [options]</code>
Test Options
<ul>
<li><code>--all</code>: Run all tests (default)</li>
<li><code>--git</code>: Run only Git-related tests</li>
<li><code>--db</code>: Run only database tests</li>
<li><code>--auth</code>: Run only authentication tests</li>
<li><code>--unit</code>: Run only unit tests</li>
<li><code>--local</code>: Run tests locally instead of in Docker</li>
<li><code>--help</code>: Show help message</li>
</ul>
Examples
Run all tests in Docker (requires Docker and docker-compose):
<code>bash
sh run-tests.sh</code>
Run only Git tests locally:
<code>bash
sh run-tests.sh --git --local</code>
Run database tests locally:
<code>bash
sh run-tests.sh --db --local</code>
Continuous Integration
Tests are automatically run on every push to the <code>master</code> branch and on all pull requests through GitHub Actions. The workflow:
<ol>
<li>Builds the Docker container for testing</li>
<li>Runs the complete test suite</li>
<li>Reports the results directly in the GitHub interface</li>
</ol>
You can view test results in the "Actions" tab of the repository.
To run the same CI tests locally before pushing:
<code>bash
cd backend
./run-tests.sh</code>
Testing Environment Requirements
Local Testing
For local testing, you need:
- Zig compiler (0.14.0 or later)
- libgit2 development libraries
- SQLite3 development libraries
On macOS, you can install these with Homebrew:
<code>bash
brew install zig libgit2 sqlite3</code>
On Linux (Debian/Ubuntu):
<code>bash
apt-get install zig libgit2-dev libsqlite3-dev</code>
Docker Testing
For Docker-based testing, you need:
- Docker
- docker-compose
The Docker setup handles all dependencies automatically.
Test Architecture
The test suite is organized into several modules:
<ul>
<li><strong>Unit Tests</strong>: Basic functionality tests for individual components</li>
<li><strong>Git Tests</strong>: Tests for repository creation, cloning, and management</li>
<li><strong>Database Tests</strong>: Tests for data persistence and retrieval</li>
<li><strong>Authentication Tests</strong>: Tests for user authentication and authorization</li>
</ul>
Each test module can be run independently or as part of the complete test suite.
Development
<ul>
<li>The backend server will be available at http://localhost:8080</li>
<li>The frontend development server will be available at http://localhost:5173</li>
</ul>
License
MIT | [] |
https://avatars.githubusercontent.com/u/208390463?v=4 | SelvaFat | SystemElva/SelvaFat | 2025-05-16T09:23:07Z | FAT filesystem-library written in Zig. | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/SystemElva/SelvaFat/tags | MPL-2.0 | [
"fat",
"fat12",
"fatfs",
"filesystem",
"library",
"os",
"osdev",
"zig",
"zig-package"
] | 10 | false | 2025-05-16T09:49:27Z | true | true | 0.15.0-dev.278+7733b5dbe | github | [] | 404 | [
"https://github.com/SystemElva/SelvaDisk"
] |
https://avatars.githubusercontent.com/u/204596775?v=4 | comptime_allocator | qsrmc/comptime_allocator | 2025-03-23T17:03:15Z | Zig compile time only allocator | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/qsrmc/comptime_allocator/tags | EUPL-1.2 | [
"comptime",
"zig",
"zig-package"
] | 15 | false | 2025-04-21T14:06:45Z | true | true | unknown | github | [] | comptime_allocator
Based on <a>bnl1's work</a> and expanded
upon, this library was made to simplify the use of std lib containers in
comptime contexts.
License
While <a>bnl1's original work</a> was
made under MIT License, comptime_allocator is licensed under the
<a>European Union Public License 1.2</a>
or later.
Example
Directly from the tests:
```zig
const allocator = @import("comptime_allocator");
test "comptime ArrayList" {
const hello_world = comptime blk: {
var array_list = std.ArrayList(u8).init(allocator);
<code> try array_list.appendSlice("Helloo");
try array_list.appendSlice("wworld!");
try array_list.replaceRange(5, 2, ", ");
// You cannot use a pointer allocated at compile time during runtime,
// but you can copy its content to a static array
var out_buf: [array_list.items.len]u8 = undefined;
@memcpy(&out_buf, array_list.items);
break :blk out_buf;
};
try std.testing.expectEqualSlices(u8, "Hello, world!", &hello_world);
</code>
}
```
FAQ
Why use that allocator?
It makes using containers from the standard library really easy, therefore
making most dynamic function calls callable in a comptime context.
Why is this library under a copyleft license?
I hate proprietary software, just thinking that my code could be used in some
makes me puke.
But I can't use it for my own projects >:(
Get over it.
Use a copyleft license.
Make the world a better place. | [] |
https://avatars.githubusercontent.com/u/5214789?v=4 | levenshtein | bcvery1/levenshtein | 2025-03-28T16:40:04Z | Implementation of the Levenshtein Distance algorithm | main | 2 | 0 | 0 | 0 | https://api.github.com/repos/bcvery1/levenshtein/tags | MIT | [
"autocomplete",
"autocompletion",
"cli",
"fuzzy",
"fuzzy-search",
"levenshtein",
"levenshtein-distance",
"tooling",
"zig"
] | 19 | false | 2025-03-31T10:32:01Z | true | true | 0.14.0 | github | [] | Levenshteien
Implementation of the Levenshtein Distance algorithm in Zig.
Getting started
Adding as dependency
First use the following command to add the dependency to your <code>build.zig.zon</code>:
<code>sh
zig fetch --save https://github.com/bcvery1/levenshtein/archive/refs/tags/[RELEASE VERSION].tar.gz</code>
You may wish to save the library with a specific name, for example:
<code>sh
zig fetch --save=lev https://github.com/bcvery1/levenshtein/archive/refs/tags/v0.1.0.tar.gz</code>
We'll use the name <code>lev</code> the next excerpt.
Next you'll want to add the following to your <code>build.zig</code> file:
<code>zig
const levenshtein = b.dependency("lev", .{
.target = target,
.optimize = optimize,
});
exe.root_module.addImport("lev", levenshtein.module("lev");</code>
You can then import and use the library with <code>const lev = @import("lev");</code>
Basic usage
This simple example shows how to use the library to sort and get the closest word to any in a dictionary:
```zig
const std = @import("std");
const lev = @import("lev");
const assert = std.debug.assert;
var strs = [_][]const u8{
"bread",
"vegetables",
"cheese",
"ale",
};
pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
defer _ = gpa.deinit();
const allocator = gpa.allocator();
<code>const word1 = "a";
try lev.sort_in_place(allocator, word1, &strs, .{});
assert(std.mem.eql(u8, "ale", strs[0]));
const word2 = "vegeta";
try lev.sort_in_place(allocator, word2, &strs, .{});
assert(std.mem.eql(u8, "vegetables", strs[0]));
</code>
}
```
For more examples on usage, take a look at the <a>examples</a> directory.
Licence
<a>MIT</a> | [] |
https://avatars.githubusercontent.com/u/148264857?v=4 | lox | cyberwlodarczyk/lox | 2025-02-27T16:24:45Z | null | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/cyberwlodarczyk/lox/tags | MIT | [
"clox",
"craftinginterpreters",
"interpreter",
"lox",
"zig"
] | 58 | false | 2025-03-30T16:08:41Z | true | true | unknown | github | [] | Lox
Introduction
Lox is a very basic programming language designed for the <a>Crafting Interpreters</a> book by Robert Nystrom. This repository contains an implementation written in Zig based on the official guide that uses C (clox).
Overview
<code>print "hello, world!";</code>
Variables
<code>var a = "global";
{
var a = "outer";
{
var a = "inner";
print a;
}
print a;
}
print a;</code>
Control Flow
<code>if (2 + 2 < 5 and 6 * 8 != 50) {
print "yes";
} else {
print "no";
}</code>
<code>var a = 1;
while (a <= 10) {
print a;
a = a + 1;
}</code>
<code>for (var a = 1; a <= 10; a = a + 1) {
print a;
}</code>
Functions
```
fun add(a, b) {
return a + b;
}
print add(1, 2);
```
Closures
```
fun outer() {
var outside = "outside";
fun inner() {
print outside;
}
return inner;
}
var inner = outer();
inner();
``` | [] |
https://avatars.githubusercontent.com/u/228978?v=4 | boop.zig | JohnMurray/boop.zig | 2025-02-12T00:34:34Z | Collection of personal useful utilities (for Zig) | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/JohnMurray/boop.zig/tags | AGPL-3.0 | [
"library",
"utils",
"zig",
"ziglang"
] | 52 | false | 2025-03-09T01:38:33Z | true | true | 0.14.0 | github | [] | boop.zig
<a></a>
<a></a>
<a></a>
<strong>boop</strong>
A disorganized collection of utils (currently just the one, but more soon, probably) that I personally
use while working with Zig. You may or may not find utils that are useful for you, as the intended audience
is me.
Utilities
See <a>examples folder</a> for working examples.
<ul>
<li><a><strong><code>cli</code></strong></a> - Module containing a bare-bones CLI parser in the style of Go's <code>flags</code> package</li>
</ul>
Contributing
Pretty sure this repo will only ever see contributions from myself, but if you feel so inclined pull
requests are welcome. It might take me a while to see it and/or respond, so set expectations low.
License
<strong>AGPL-3</strong> | [] |
https://avatars.githubusercontent.com/u/61068799?v=4 | zig-rs | jcbhmr/zig-rs | 2025-04-17T21:16:07Z | ⚡ cargo install-able Zig | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/jcbhmr/zig-rs/tags | MIT | [
"cargo",
"rust",
"zig"
] | 28 | false | 2025-04-26T22:18:13Z | false | false | unknown | github | [] | zig-rs
⚡ Zig packaged for Rust
Installation
You can install Zig from the crates.io registry using Cargo:
<code>sh
cargo install zig</code>
If you prefer to avoid a build-time network dependency that fetches the <a>ziglang/zig-bootstrap</a> source code (larger than the 10 MB crates.io size limit), you can install this package directly from the GitHub repository which includes the <a>ziglang/zig-bootstrap</a> source code as a Git submodule:
<code>sh
cargo install --git https://github.com/jcbhmr/zig-rs.git --tag v0.14.0 zig</code>
Usage
```sh
```
Development | [] |
https://avatars.githubusercontent.com/u/12181586?v=4 | minichlink-ocd | ghostiam/minichlink-ocd | 2025-04-19T00:37:58Z | A wrapper around `minichlink` that converts commands for `openocd` to `minichlink`. Also contains binaries for `minichlink` and `minichlink-ocd`. | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/ghostiam/minichlink-ocd/tags | MIT | [
"ch32",
"ch32v",
"ch32v003",
"embedded",
"minichlink",
"wch",
"wch-link",
"zig"
] | 807 | false | 2025-04-24T02:14:17Z | true | true | 0.14.0 | github | [
{
"commit": "refs",
"name": "libusb",
"tar_url": "https://github.com/libusb/libusb/archive/refs.tar.gz",
"type": "remote",
"url": "https://github.com/libusb/libusb"
},
{
"commit": "733af62c26520d981c2a9f3e6b9485090109564d.zip",
"name": "ch32fun",
"tar_url": "https://github.com/cn... | minichlink-ocd
The official repository used as a dependency for building with the Zig compiler is located here:
https://github.com/cnlohr/ch32fun/tree/master/minichlink
Information
This repository automatically builds and publishes binary files for <code>minichlink</code> and <code>minichlink-ocd</code>. \
You can download them at the following link: https://github.com/ghostiam/minichlink-ocd/releases/latest
What is <code>minichlink-ocd</code>
<code>minichlink-ocd</code> is a wrapper around <code>minichlink</code> that converts commands for <code>openocd</code> into commands for <code>minichlink</code>. \
This allows to use <code>minichlink</code> in IDEs designed to work with <code>openocd</code>, such as CLion.
Setting up CLion to work with <code>minichlink-ocd</code>
Go to <code>Settings | Build, Execution, Deployment | Embedded Development</code> and specify the path to the extracted archive
with <code>minichlink-ocd</code>. \
Click the <code>Test</code> button to check if everything works. A pop-up message with the text
<code>Minichlink As Open On-Chip Debugger</code> should appear.
Fixing the <code>Memory View</code> feature
To make the <code>Memory View</code> feature work in CLion, you need to edit a parameter in the IDE:
<a>more about the issue</a>
Press CTRL+SHIFT+A (CMD+SHIFT+A) -> Registry... \
Find <code>cidr.debugger.memory.hex.blockSize</code> there
(start typing <code>blockSize</code>, and the IDE will automatically filter the fields as you type),
and set the value to <code>256</code> instead of <code>4096</code>.
| [] |
https://avatars.githubusercontent.com/u/196515647?v=4 | Zig-Golden-Syrup | MinervasRefuge/Zig-Golden-Syrup | 2025-05-11T03:33:14Z | A Zig implementation of the Syrup/Preserves serialization format/s. | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/MinervasRefuge/Zig-Golden-Syrup/tags | BSD-3-Clause | [
"serialization",
"zig",
"zig-package",
"ziglang"
] | 29 | false | 2025-05-17T02:54:32Z | true | true | 0.14.0 | github | [] | 404 | [] |
https://avatars.githubusercontent.com/u/58337159?v=4 | zig-uuid | bschaatsbergen/zig-uuid | 2025-05-20T11:38:17Z | A Zig library for UUIDs based on RFC 9562. | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/bschaatsbergen/zig-uuid/tags | Apache-2.0 | [
"rfc-9562",
"uuid",
"zig"
] | 5 | false | 2025-05-20T11:41:40Z | false | false | unknown | github | [] | zig-uuid
A Zig library for UUIDs based on RFC 9562 | [] |
https://avatars.githubusercontent.com/u/108448149?v=4 | raytracing.zig | chilir/raytracing.zig | 2025-02-15T01:21:05Z | ray tracing in one weekend with zig | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/chilir/raytracing.zig/tags | MIT | [
"raytracing",
"raytracing-in-one-weekend",
"zig"
] | 7,518 | false | 2025-02-24T05:41:07Z | true | true | unknown | github | [] |
raytracing.zig
Zig implementation of a ray tracer by following along with the Ray Tracing in One Weekend book.
Link below:
<a><em>Ray Tracing in One Weekend</em></a>
Usage
```bash
for now, make changes to rendered scene in src/main.zig
zig build -Doptimize=ReleaseFast
zig-out/bin/rtow > image.ppm
```
TODO
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Unit tests
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Configurable renders
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Optimizations (e.g. SIMD) | [] |
https://avatars.githubusercontent.com/u/19780895?v=4 | ziglings.org | HajagosNorbert/ziglings.org | 2025-02-14T20:03:39Z | My solutions to ziglings | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/HajagosNorbert/ziglings.org/tags | MIT | [
"zig"
] | 1,379 | false | 2025-02-15T15:55:53Z | true | false | unknown | github | [] | Ziglings
Welcome to Ziglings! This project contains a series of tiny
broken programs (and one nasty surprise). By fixing them, you'll
learn how to read and write <a>Zig</a> code.
Those broken programs need your help! (You'll also save the
planet from evil aliens and help some friendly elephants stick
together, which is very sweet of you.)
This project was initiated by <a>Dave Gauer</a> and is directly inspired
by the brilliant and fun <a>rustlings</a> project.
Indirect inspiration comes from <a>Ruby Koans</a> and the Little LISPer/Little
Schemer series of books.
Intended Audience
This will probably be difficult if you've <em>never</em> programmed
before. But no specific programming experience is required. And
in particular, you are <em>not</em> expected to have any prior
experience with "systems programming" or a "systems" level
language such as C.
Each exercise is self-contained and self-explained. However,
you're encouraged to also check out these Zig language resources
for more detail:
<ul>
<li>https://ziglang.org/learn/</li>
<li>https://ziglearn.org/</li>
<li>https://ziglang.org/documentation/master/</li>
<li><a>Zig in Depth! (video series)</a></li>
</ul>
Also, the <a>Zig community</a>
is incredibly friendly and helpful!
Getting Started
Install a <a>development build</a> of
the Zig compiler. (See the "master" section of the downloads
page.)
Verify the installation and build number of <code>zig</code> like so:
<code>$ zig version
0.14.0-dev.xxxx+xxxxxxxxx</code>
Clone this repository with Git:
<code>$ git clone https://ziglings.org
$ cd ziglings.org</code>
Then run <code>zig build</code> and follow the instructions to begin!
<code>$ zig build</code>
Note: The output of Ziglings is the unaltered output from the Zig
compiler. Part of the purpose of Ziglings is to acclimate you to
reading these.
A Note About Versions
<strong>Hint:</strong> To check out Ziglings for a stable release of Zig, you can use
the appropriate tag.
The Zig language is under very active development. In order to be
current, Ziglings tracks <strong>development</strong> builds of the Zig
compiler rather than versioned <strong>release</strong> builds. The last
stable release was <code>0.13.0</code>, but Ziglings needs a dev build with
pre-release version "0.14.0" and a build number at least as high
as that shown in the example version check above.
It is likely that you'll download a build which is <em>greater</em> than
the minimum.
Once you have a build of the Zig compiler that works with
Ziglings, they'll continue to work together. But keep in mind
that if you update one, you may need to also update the other.
Version Changes
Version-0.14.0-dev.1573
* <em>2024-09-16</em> zig 0.14.0-dev.1573 - introduction of labeled switch, see <a>#21257</a>
* <em>2024-09-02</em> zig 0.14.0-dev.1409 - several changes in std.builtin, see <a>#21225</a>
* <em>2024-08-04</em> zig 0.14.0-dev.1224 - several changes in build system, see <a>#21115</a>
* <em>2024-08-04</em> zig 0.14.0-dev.839 - several changes in build system, see <a>#20580</a>, <a>#20600</a>
* <em>2024-06-17</em> zig 0.14.0-dev.42 - changes in <code>std.mem.split and tokenize</code> - see <a>#15579</a>
* <em>2024-05-29</em> zig 0.13.0-dev.339 - rework std.Progress - see <a>#20059</a>
* <em>2024-03-21</em> zig 0.12.0-dev.3518 - change to @fieldParentPtr - see <a>#19470</a>
* <em>2024-03-21</em> zig 0.12.0-dev.3397 - rename std.os to std.posix - see <a>#5019</a>
* <em>2024-03-14</em> zig 0.12.0-dev.3302 - changes in <code>std.fmt</code> - floating-point formatting implementation - see <a>#19229</a>
* <em>2024-02-05</em> zig 0.12.0-dev.2618 - changes in <code>build system</code> - from <code>Step.zig_exe</code> to <code>Step.graph.zig_exe</code> - see <a>#18778</a>
* <em>2024-01-05</em> zig 0.12.0-dev.2043 - rename of <code>std.Build.FileSource</code> to <code>std.Build.LazyPath</code> - see <a>#16353</a>
* <em>2023-10-24</em> zig 0.12.0-dev.1243 - changes in <code>std.ChildProcess</code>: renamed exec to run - see <a>#5853</a>
* <em>2023-06-26</em> zig 0.11.0-dev.4246 - changes in compile step (now it can be null)
* <em>2023-06-26</em> zig 0.11.0-dev.3853 - removal of destination type from all cast builtins
* <em>2023-06-20</em> zig 0.11.0-dev.3747 - <code>@enumToInt</code> is now <code>@intFromEnum</code> and <code>@intToFloat</code> is now <code>@floatFromInt</code>
* <em>2023-05-25</em> zig 0.11.0-dev.3295 - <code>std.debug.TTY</code> is now <code>std.io.tty</code>
* <em>2023-04-30</em> zig 0.11.0-dev.2704 - use of the new <code>std.Build.ExecutableOptions.link_libc</code> field
* <em>2023-04-12</em> zig 0.11.0-dev.2560 - changes in <code>std.Build</code> - remove run() and install()
* <em>2023-04-07</em> zig 0.11.0-dev.2401 - fixes of the new build system - see <a>#212</a>
* <em>2023-02-21</em> zig 0.11.0-dev.2157 - changes in <code>build system</code> - new: parallel processing of the build steps
* <em>2023-02-21</em> zig 0.11.0-dev.1711 - changes in <code>for loops</code> - new: Multi-Object For-Loops + Struct-of-Arrays
* <em>2023-02-12</em> zig 0.11.0-dev.1638 - changes in <code>std.Build</code> cache_root now returns a directory struct
* <em>2023-02-04</em> zig 0.11.0-dev.1568 - changes in <code>std.Build</code> (combine <code>std.build</code> and <code>std.build.Builder</code> into <code>std.Build</code>)
* <em>2023-01-14</em> zig 0.11.0-dev.1302 - changes in <code>@addWithOverflow</code> (now returns a tuple) and <code>@typeInfo</code>; temporary disabled async functionality
* <em>2022-09-09</em> zig 0.10.0-dev.3978 - change in <code>NativeTargetInfo.detect</code> in build
* <em>2022-09-06</em> zig 0.10.0-dev.3880 - Ex 074 correctly fails again: comptime array len
* <em>2022-08-29</em> zig 0.10.0-dev.3685 - <code>@typeName()</code> output change, stage1 req. for async
* <em>2022-07-31</em> zig 0.10.0-dev.3385 - std lib string <code>fmt()</code> option changes
* <em>2022-03-19</em> zig 0.10.0-dev.1427 - method for getting sentinel of type changed
* <em>2021-12-20</em> zig 0.9.0-dev.2025 - <code>c_void</code> is now <code>anyopaque</code>
* <em>2021-06-14</em> zig 0.9.0-dev.137 - std.build.Id <code>.Custom</code> is now <code>.custom</code>
* <em>2021-04-21</em> zig 0.8.0-dev.1983 - std.fmt.format() <code>any</code> format string required
* <em>2021-02-12</em> zig 0.8.0-dev.1065 - std.fmt.format() <code>s</code> (string) format string required
Advanced Usage
It can be handy to check just a single exercise:
<code>zig build -Dn=19</code>
Or run all exercises, starting from a specific one:
<code>zig build -Ds=27</code>
Or let Ziglings pick an exercise for you:
<code>zig build -Drandom</code>
You can also run without checking for correctness:
<code>zig build -Dn=19 test</code>
Or skip the build system entirely and interact directly with the
compiler if you're into that sort of thing:
<code>zig run exercises/001_hello.zig</code>
Calling all wizards: To prepare an executable for debugging,
install it to zig-cache/bin with:
<code>zig build -Dn=19 install</code>
To get a list of all possible options, run:
```
zig build -Dn=19 -l
install Install 019_functions2.zig to prefix path
uninstall Uninstall 019_functions2.zig from prefix path
test Run 019_functions2.zig without checking output
...
```
What's Covered
The primary goal for Ziglings is to cover the core Zig language.
It would be nice to cover the Standard Library as well, but this
is currently challenging because the stdlib is evolving even
faster than the core language (and that's saying something!).
Not only would stdlib coverage change very rapidly, some
exercises might even cease to be relevant entirely.
Having said that, there are some stdlib features that are
probably here to stay or are so important to understand that they
are worth the extra effort to keep current.
Conspicuously absent from Ziglings are a lot of string
manipulation exercises. This is because Zig itself largely avoids
dealing with strings. Hopefully there will be an obvious way to
address this in the future. The Ziglings crew loves strings!
Zig Core Language
<ul>
<li>[x] Hello world (main needs to be public)</li>
<li>[x] Importing standard library</li>
<li>[x] Assignment</li>
<li>[x] Arrays</li>
<li>[x] Strings</li>
<li>[x] If</li>
<li>[x] While</li>
<li>[x] For</li>
<li>[x] Functions</li>
<li>[x] Errors (error/try/catch/if-else-err)</li>
<li>[x] Defer (and errdefer)</li>
<li>[x] Switch</li>
<li>[x] Unreachable</li>
<li>[x] Enums</li>
<li>[x] Structs</li>
<li>[x] Pointers</li>
<li>[x] Optionals</li>
<li>[x] Struct methods</li>
<li>[x] Slices</li>
<li>[x] Many-item pointers</li>
<li>[x] Unions</li>
<li>[x] Numeric types (integers, floats)</li>
<li>[x] Labelled blocks and loops</li>
<li>[x] Loops as expressions</li>
<li>[x] Builtins</li>
<li>[x] Inline loops</li>
<li>[x] Comptime</li>
<li>[x] Sentinel termination</li>
<li>[x] Quoted identifiers @""</li>
<li>[x] Anonymous structs/tuples/lists</li>
<li>[ ] Async <--- ironically awaiting upstream Zig updates</li>
<li>[X] Interfaces</li>
<li>[X] Bit manipulation</li>
<li>[X] Working with C</li>
<li>[X] Threading</li>
<li>[x] Labeled switch</li>
<li>[x] Vector operations (SIMD)</li>
</ul>
Zig Standard Library
<ul>
<li>[X] String formatting</li>
<li>[X] Testing</li>
<li>[X] Tokenization</li>
<li>[X] File handling</li>
</ul>
Contributing
Contributions are very welcome! I'm writing this to teach myself
and to create the learning resource I wished for. There will be
tons of room for improvement:
<ul>
<li>Wording of explanations</li>
<li>Idiomatic usage of Zig</li>
<li>Additional exercises</li>
</ul>
Please see <a>CONTRIBUTING</a>
in this repo for the full details. | [] |
https://avatars.githubusercontent.com/u/73492122?v=4 | zigdns | milo-g/zigdns | 2025-04-13T22:58:04Z | DNS packet/protocol library for Zig. | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/milo-g/zigdns/tags | MIT | [
"zig",
"zig-package",
"ziglang"
] | 81 | false | 2025-04-21T00:52:40Z | true | true | 0.14.0 | github | [] | zigdns
A DNS protocol library for Zig, offering robust functionality for DNS packet parsing, construction, and manipulation.
Features
<ul>
<li><strong>Complete DNS packet handling</strong>: Parse and construct DNS packets according to RFC standards.</li>
<li><strong>Compressed name parsing</strong>: Supports parsing compressed names.</li>
<li><strong>Support for mDNS</strong>: Implements mDNS query/record specific flags for unicast-desired and flush-cache.</li>
<li><strong>Resource Record Support</strong>: Includes comprehensive support for common DNS record types:</li>
<li>A (IPv4 addresses)</li>
<li>AAAA (IPv6 addresses)</li>
<li>CNAME (Canonical names)</li>
<li>NS (Nameserver records)</li>
<li>MX (Mail exchange records)</li>
<li>TXT (Text records)</li>
<li>PTR (Pointer records)</li>
<li>SRV (Service records)</li>
</ul>
Limitations
<ul>
<li><strong>Encoding compressed names</strong>: Writing compressed packets is not supported at this time.</li>
<li><strong>EDNS</strong>: Extended DNS records OPT, SIG, and others are not supported at this time.</li>
<li><strong>EDNS - Additional Records</strong>: Additional EDNS record parsing is skipped.</li>
</ul>
Installation
Add zigdns to your project:
<code>bash
zig fetch --save="dns" https://github.com/milo-g/zigdns/archive/refs/tags/0.3.2.tar.gz</code>
Then in your <code>build.zig</code>:
```zig
const dns = b.dependency("dns", .{
.target = target,
.optimize = optimize,
});
exe.root_module.addImport("dns", dns.module("dns"));
```
Usage
Basic DNS Query
```zig
const std = @import("std");
const dns = @import("dns");
pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
const allocator = gpa.allocator();
defer _ = gpa.deinit();
<code>// Create a DNS packet
var packet = dns.Packet.init(allocator);
defer packet.deinit();
// Set up the header with query flags and ID
packet.header.id = 1234;
packet.header.flags = dns.Flags{ .rd = true }; // Recursion desired
// Add a question - lookup the A record for example.com
try packet.addQuestion(.{
.name = "example.com",
.type = .A,
.class = .IN,
});
// Encode the packet to a buffer
var buffer: [512]u8 = undefined;
var fbs = std.io.fixedBufferStream(&buffer);
const writer = fbs.writer();
try packet.encode(writer);
const encoded_len = fbs.pos;
// Now you can send this buffer to a DNS server...
</code>
}
```
Creating a DNS Response
```zig
const std = @import("std");
const dns = @import("dns");
pub fn createResponse(allocator: std.mem.Allocator) !dns.Packet {
var packet = dns.Packet.init(allocator);
<code>// Set up the header as a response
packet.header.id = 1234;
packet.header.flags = dns.Flags{
.qr = true, // This is a response
.aa = true, // Authoritative answer
.rd = true, // Recursion desired
.ra = true, // Recursion available
};
// Add a question
try packet.addQuestion(.{
.name = "example.com",
.type = .A,
.class = .IN,
});
// Add an A record answer
try packet.addAnswer(.{
.A = .{
.name = "example.com",
.address = [_]u8{ 93, 184, 216, 34 }, // Example.com IP
.ttl = 3600,
}
});
return packet;
</code>
}
```
Parsing a DNS Packet
```zig
const std = @import("std");
const dns = @import("dns");
pub fn parseDnsPacket(allocator: std.mem.Allocator, buffer: []const u8) !void {
var reader = dns.PacketReader.init(buffer);
<code>var packet = try dns.Packet.decode(allocator, &reader);
defer packet.deinit();
// Access header fields
std.debug.print("DNS ID: {d}\n", .{packet.header.id});
// Check if it's a query or response
if (packet.header.flags.qr) {
std.debug.print("This is a response\n", .{});
} else {
std.debug.print("This is a query\n", .{});
}
// Access questions
for (packet.questions.items, 0..) |q, i| {
const name = try q.name.toOwnedSlice(allocator);
defer allocator.free(name);
std.debug.print("Question {d}: {s} (Type: {s})\n", .{
i + 1,
name,
q.type.toString(),
});
}
// Access answers
for (packet.answers.items, 0..) |a, i| {
const name = try a.name.toOwnedSlice(allocator);
defer allocator.free(name);
std.debug.print("Answer {d}: {s} (Type: {s})\n", .{
i + 1,
name,
a.type.toString(),
});
switch (a.type) {
.A => {
std.debug.print("Handling A record...\n", .{});
const addr = a.rdata.A;
std.debug.print("Address is {d}.{d}.{d}.{d}\n", .{addr[0], addr[1], addr[2], addr[3] });
},
.CNAME => {
std.debug.print("Handling CNAME record...\n", .{});
const canonical = a.rdata.CNAME.toOwnedSlice(allocator);
defer allocator.free(canonical);
std.debug.print("Canonical name: {s}", .{canonical});
},
...
else => break
}
}
</code>
}
```
mDNS Support
```zig
...
// Creating packets
try packet.addQuestion(.{
.name = "example.com",
.type = .A,
.class = .IN,
.unicast = true, // unicast response desired.
});
try packet.addAnswer(.{
.A = .{
.name = "example.com",
.address = [_]u8{ 192, 168, 1, 0 },
.ttl = 3600,
.flush = true, // clients should flush cache for this record.
}
});
...
// Reading packets.
for (packet.questions.items, 0..) |q, i| {
if (q.unicast) {
std.debug.print("Client requesting a unicast response", .{});
}
}
for (packet.answers.items, 0..) |a, i| {
if (a.flush) {
std.debug.print("Flush this record from the cache", .{});
}
}
```
Documentation
The library includes several examples demonstrating different aspects of the DNS protocol:
<ul>
<li><code>packet.zig</code>: Basic DNS packet construction and parsing</li>
<li><code>name.zig</code>: Working with DNS name format, using <code>toOwnedSlice</code> and wire format encoding</li>
<li><code>response.zig</code>: Creating complex DNS response packets with multiple record types</li>
<li><code>records.zig</code>: Demonstration of all supported DNS record types</li>
</ul>
Building and Running Examples
Build all examples:
<code>bash
zig build examples</code>
Run a specific example:
<code>bash
zig build example-packet # Run the packet example
zig build example-name # Run the name handling example
zig build example-response # Run the response example
zig build example-records # Run the records example</code>
Building and Testing
<code>bash
zig build test</code>
License
<a>MIT License</a> | [] |
https://avatars.githubusercontent.com/u/192349959?v=4 | dsa-zig | PedroRevesMD/dsa-zig | 2025-02-23T20:43:54Z | Implementation of Data Structures and Algorithms in Zig | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/PedroRevesMD/dsa-zig/tags | MIT | [
"dsa",
"dsa-algorithm",
"zig",
"zig-dsa",
"zig-lang",
"ziglang"
] | 7,302 | false | 2025-02-23T20:50:00Z | true | true | unknown | github | [] | 404 | [] |
https://avatars.githubusercontent.com/u/51851906?v=4 | zigws | dead-tech/zigws | 2025-02-28T14:41:06Z | Simple Web Socket Library for Zig | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/dead-tech/zigws/tags | MIT | [
"websockets",
"zig"
] | 4 | false | 2025-02-28T14:42:32Z | true | false | unknown | github | [] | Websocket Library for Zig
<em>Disclaimer: Project still in active development</em> | [] |
https://avatars.githubusercontent.com/u/49991411?v=4 | SDL_ttf | boubl/SDL_ttf | 2025-03-08T13:00:44Z | SDL_ttf but with the zig build system | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/boubl/SDL_ttf/tags | Zlib | [
"sdl",
"sdl3",
"sdl3-ttf",
"zig",
"zig-package"
] | 106,482 | true | 2025-03-12T07:20:03Z | true | true | 0.14.0 | github | [
{
"commit": "dbb1b96360658f5845ff6fac380c4f13d7276dc2",
"name": "sdl",
"tar_url": "https://github.com/castholm/SDL/archive/dbb1b96360658f5845ff6fac380c4f13d7276dc2.tar.gz",
"type": "remote",
"url": "https://github.com/castholm/SDL"
},
{
"commit": "1dea2c6021c53d4ba53d6cc8e36e8b16984a920f... | SDL_ttf but with the zig build system
This is a port of <a>SDL_ttf</a> to the zig build system, to use it with the zig package manager.
This is <strong><em>not</em></strong> a wrapper.
Usage
Requires zig version <code>0.14.0</code>, higher versions not tested.
Fetch it with:
<code>bash
zig fetch --save git+https://github.com/boubl/SDL_ttf.git</code>
And link it in your <code>build.zig</code>:
```zig
{
// SDL_ttf Dependency
const sdl_ttf_dep = b.dependency("sdl_ttf", .{
.target = target,
.optimize = optimize,
});
const sdl_ttf_lib = sdl_ttf_dep.artifact("SDL_ttf");
<code>exe_mod.linkLibrary(sdl_ttf_lib);
</code>
}
```
<blockquote>
<span class="bg-blue-100 text-blue-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-blue-900 dark:text-blue-300">NOTE</span>
This was only tested on macOS with 0.14.0 for my personal use. PR are welcome if this does not work on other platforms.
</blockquote> | [] |
https://avatars.githubusercontent.com/u/2773256?v=4 | zware | dasimmet/zware | 2025-04-04T22:33:17Z | Zig WebAssembly Runtime Engine | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/dasimmet/zware/tags | MIT | [
"zig",
"zig-package"
] | 2,272 | true | 2025-04-28T21:39:05Z | true | true | 0.14.0 | github | [
{
"commit": "39f85a791cbbad91a253a851841a29777efdc2cd.tar.gz",
"name": "wabt",
"tar_url": "https://github.com/WebAssembly/wabt/archive/39f85a791cbbad91a253a851841a29777efdc2cd.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/WebAssembly/wabt"
},
{
"commit": "e25ae159357c055b3... | zware
<strong>Zig WebAssembly Runtime Engine</strong>
About
<code>zware</code> is a library for executing WebAssembly embedded in <a>Zig</a> programs.
Example
From <code>examples/fib</code>:
```zig
const std = @import("std");
const zware = @import("zware");
const Store = zware.Store;
const Module = zware.Module;
const Instance = zware.Instance;
const GeneralPurposeAllocator = std.heap.GeneralPurposeAllocator;
var gpa = GeneralPurposeAllocator(.{}){};
pub fn main() !void {
defer _ = gpa.deinit();
const alloc = gpa.allocator();
<code>const bytes = @embedFile("fib.wasm");
var store = Store.init(alloc);
defer store.deinit();
var module = Module.init(alloc, bytes);
defer module.deinit();
try module.decode();
var instance = Instance.init(alloc, &store, module);
try instance.instantiate();
defer instance.deinit();
const n = 39;
var in = [1]u64{n};
var out = [1]u64{0};
try instance.invoke("fib", in[0..], out[0..], .{});
const result: i32 = @bitCast(@as(u32, @truncate(out[0])));
std.debug.print("fib({}) = {}\n", .{ n, result });
</code>
}
```
Requirements
Compile-time
<ul>
<li>Zig 0.12 (master)</li>
</ul>
Run-time
<ul>
<li>None, zig generates static binaries:</li>
</ul>
<code>bash
➜ zware git:(master) ✗ ldd fib
not a dynamic executable</code>
Goals
<ul>
<li>Embed WebAssembly programs in other zig programs</li>
<li>Be fast enough to be useful</li>
</ul>
Status
<ul>
<li>The project is very much alpha quality</li>
<li>WebAssembly 2.0 supported (apart from the vector / SIMD support which is WIP)</li>
<li>The WebAssembly official testsuite passes (not including SIMD tests)</li>
<li>Partial WASI support</li>
</ul>
Running tests
Use <code>zig build --help</code> to see all the test targets, here's a summary of the important ones:
<code>sh
zig build test # Run all the tests (includes unittest and testsuite)
zig build unittest # Run the library unittests
zig build testsuite # Run all the testsuite tests
zig build test-NAME # Run the NAME testsuite test, i.e. test-type</code>
Does it run doom?
Yes, <a>yes it does</a>
https://github.com/malcolmstill/zware/assets/2567177/c9acdcb2-69e7-495f-b3f1-89cf6b807a43 | [
"https://github.com/dasimmet/zcomplete"
] |
https://avatars.githubusercontent.com/u/122979595?v=4 | zigecs | SpyMander/zigecs | 2025-04-12T12:06:41Z | simple entity component system for zig | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/SpyMander/zigecs/tags | - | [
"ecs",
"zig",
"zig-library"
] | 154,866 | false | 2025-05-10T14:42:34Z | true | true | unknown | github | [] | ZIGECS
an archetypal ecs for zig, smol and simple.
INSTALL
... in an already existing project:
get the tarball-link through the releases.
run: <code>zig zig fetch --save "https://github.com/SpyMander/zigecs/archive/refs/tags/[VERIOSN_TAG].tar.gz"</code>
zig build config example:
``` zig
const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
<code>const optimize = b.standardOptimizeOption(.{});
const exe = b.addExecutable(.{
.name = "usinglibs.d",
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
// ecs library
const ecs_dep = b.dependency("ecs", .{
.target = target,
.optimize = optimize,
});
const ecs = ecs_dep.module("zigecs");
exe.root_module.addImport("zigecs", ecs);
// options
const maxEntities = b.option(u32, "maxEntities", "maximum entity limit for the ecs (default=1024)") orelse 1024;
const options = b.addOptions();
options.addOption(u32, "maxEntities", maxEntities);
ecs.addOptions("zigecsOptions", options);
b.installArtifact(exe);
const run_cmd = b.addRunArtifact(exe);
run_cmd.step.dependOn(b.getInstallStep());
if (b.args) |args| {
run_cmd.addArgs(args);
}
const run_step = b.step("run", "Run the app");
run_step.dependOn(&run_cmd.step);
</code>
}
```
the important bit in the config is the max entity limit.
be sure to add the options to the zigecs module
EXAMPLE
``` zig
const std = @import("std");
const archetypeManager = @import("zigecs").ArchetypeManager;
pub fn main() !void {
const stdout_file = std.io.getStdOut().writer();
var bw = std.io.bufferedWriter(stdout_file);
const stdout = bw.writer();
<code>var gpa = std.heap.GeneralPurposeAllocator(.{}){};
defer {
_ = gpa.deinit();
}
var x = arhcetypeManager.init(gpa.allocator());
defer x.deinit();
const randoType = &[_]type{ u32, f32 };
x.addArchetype(randoType);
x.insert(
0,
randoType,
.{
@as(u32, 5),
@as(f32, 12.4),
},
);
var iter = x.getComponentIterator(&[_]type{u32});
while (iter.next()) {
const value = iter.get(u32);
try stdout.print("value: {}\n", .{value.*});
}
try stdout.print("hi\n", .{});
try bw.flush(); // don't forget to flush!
</code>
}
```
Features to be added in the future:
<ol>
<li>removing archetypeManager at runtime</li>
<li>auto inserting creating an archetype automatically
<em>and other stuff?</em></li>
</ol> | [] |
https://avatars.githubusercontent.com/u/58788?v=4 | HelloZig | luck7/HelloZig | 2025-02-28T04:21:23Z | Learning Zig Language | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/luck7/HelloZig/tags | - | [
"zig",
"ziglang"
] | 0 | false | 2025-02-28T04:21:42Z | false | false | unknown | github | [] | HelloZig
Learning Zig Language | [] |
https://avatars.githubusercontent.com/u/95163444?v=4 | calyx | AsgardXIV/calyx | 2025-04-01T02:48:57Z | A Zig library for interacting with FFXIV game data. | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/AsgardXIV/calyx/tags | MIT | [
"ffxiv",
"final-fantasy-xiv",
"zig",
"zig-package",
"ziglang"
] | 237 | false | 2025-04-29T03:46:40Z | true | true | 0.14.0 | github | [] | Calyx
A Zig library for interacting with game files from Final Fantasy XIV.
It aims to offer features and functionality available in other languages to interact with FFXIV to Zig developers.
State of the project
Calyx is still very early in development and the API surface is not stable. Contributions are appreciated.
Current Features
<ul>
<li>SqPack</li>
<li>Mounting SqPack</li>
<li>Discovering and accessing repositories, categories and chunks</li>
<li>Index1 and Index2 exploration</li>
<li>Game path parsing and hashing</li>
<li>Retrieving files via game path or index hash<ul>
<li>Standard, Texture and Model</li>
</ul>
</li>
<li>Excel</li>
<li>Load the root.exl and lookup sheets via id</li>
<li>Load sheets</li>
<li>Retrieve or iterate rows</li>
<li>Retrieve column data</li>
</ul>
Future Plans
<ul>
<li>Type safe Excel access (using EXDSchema or SaintCoinach defs or similar)</li>
<li>Game file format support (Models, Textures, Skeletons etc) both reading and writing</li>
</ul>
Using the Library
<ol>
<li>
Add Calyx to your build.zig.zon
<code>zig fetch --save git+https://github.com/AsgardXIV/calyx</code>
</li>
<li>
Add the dependency to your project, for example:
```zig
const calyx_dependency = b.dependency("calyx", .{
.target = target,
.optimize = optimize,
});
</li>
</ol>
exe_mod.addImport("calyx", calyx_dependency.module("calyx"));
```
<ol>
<li>Use the library
```zig
// Init Calyx
const calyx = @import("calyx");
const game = try calyx.GameData.init(allocator, .{});
defer game.deinit();</li>
</ol>
// Read a game file
const swine_head_model = try game.getFileContents(allocator, "chara/equipment/e6023/model/c0101e6023_met.mdl");
defer allocator.free(swine_head_model);
try std.io.getStdOut().writer().print("Swine Head model length: {d} bytes\n", .{swine_head_model.len});
// Read from Excel
const sheet = try game.getSheet("Item");
const wind_up_raha = try sheet.getRow(23992);
const wind_up_raha_name = try wind_up_raha.getRowColumnValue(9);
try std.io.getStdOut().writer().print("Item Name: {s}\n", .{wind_up_raha_name.string});
```
Developing Locally
Some development requires a locally installed copy of FFXIV. You should set the <code>FFXIV_GAME_PATH</code> environment variable so Calyx can discover the location.
<ol>
<li>Running the sample: <code>zig build sample</code></li>
<li>Running the unit tests: <code>zig build test</code></li>
<li>Running the integration tests: <code>zig build integrationTest</code></li>
<li>Generating the docs: <code>zig build docs</code></li>
</ol>
Alternatives
Not using Zig?
* C#
* <a>Lumina</a>
* <a>SaintCoinach</a>
* <a>xivModdingFramework</a>
* Rust
* <a>Physis</a>
Acknowledgements
Calyx is frequently based on the work done by other projects, particularly those listed in the <code>Alternatives</code> section. | [] |
https://avatars.githubusercontent.com/u/131526244?v=4 | opengl-demo | 7R35C0/opengl-demo | 2025-05-11T08:34:42Z | Simple demos of using GLFW, Glad and OpenGL. | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/7R35C0/opengl-demo/tags | MIT | [
"glad",
"glfw",
"opengl",
"opengl-demo",
"zig",
"zig-build-system"
] | 135 | false | 2025-05-11T09:40:06Z | true | true | 0.14.0 | github | [
{
"commit": null,
"name": "glfw",
"tar_url": null,
"type": "relative",
"url": "./pkg/glfw"
},
{
"commit": null,
"name": "glad",
"tar_url": null,
"type": "relative",
"url": "./pkg/glad"
}
] | README
The repo contains simple demos of using GLFW, Glad and OpenGL.
Tested only with Linux Fedora 41, X11, glfw 3.5.0, glad 2.0.8 and zig 0.14.0
📌 Requirement
Before running the demos:
<ul>
<li>check <a>GLFW 3.5.0</a>
requirements, especially installing dependencies; system environment is
not checked for required packages and their absence may generate errors</li>
<li>update Glad with <a>webservice</a>, existing files may
not meet desired requirements (optional, check first <code>include/glad/gl.h</code>)</li>
<li>install <a>Zig 0.14.0</a>
programming language</li>
<li>install <a>Clang (19.1.7)</a>, this version is
informative, the code may or may not work with other versions</li>
</ul>
Demos requires linking to the C libraries from target environment; this is
done by default, but the system must provide these libraries.
📌 Implementation
Repo uses the <a>Zig Build System</a>
to build and run the demos written in C language.
GLFW and Glad are built by default when building a demo, and outputs will
be in <code>zig-out/include</code> and <code>zig-out/lib</code> folders; see the related files
in <code>pkg/glfw</code> and <code>pkg/glad</code> for their implementation.
More information are in <a>build.zig</a> and each demo file.
📌 Usage
Use <code>zig build run -- demo/<folder_name></code> step to run a demo, output will
be in <code>zig-out/bin</code>. Step <code>zig build run</code> uses the <code>src</code> folder by default.
📌 License
Unless explicitly stated otherwise, the source codes are licensed under
the <a>MIT License</a> | [] |
https://avatars.githubusercontent.com/u/521102?v=4 | intro-to-zig | rajeshpillai/intro-to-zig | 2025-02-11T14:14:11Z | https://pedropark99.github.io/zig-book/ | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/rajeshpillai/intro-to-zig/tags | - | [
"zig"
] | 749 | false | 2025-04-21T03:21:04Z | false | false | unknown | github | [] | 404 | [] |
https://avatars.githubusercontent.com/u/99440446?v=4 | z8x | utox39/z8x | 2025-04-17T12:47:02Z | z8x checks if a given input string is valid UTF-8 and finds Tags (Unicode block) to prevent ASCII Smuggling | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/utox39/z8x/tags | MIT | [
"ascii",
"ascii-smuggling",
"cli",
"security",
"utf-8",
"utf-8-validator",
"zig"
] | 16 | false | 2025-04-22T09:31:46Z | true | true | 0.14.0 | github | [] | z8x
Description
z8x checks if a given input string is valid UTF-8 and finds <a>Tags (Unicode block)</a>
to prevent <a>ASCII Smuggling</a>.
Requirements
<ul>
<li><a>zig v0.14.0</a></li>
</ul>
Intallation
```console
Clone the repo
$ git clone https://github.com/utox39/z8x.git
cd to the path
$ cd path/to/z8x
Build zigfetch
$ zig build -Doptimize=ReleaseSafe
Then move it somewhere in your $PATH. Here is an example:
$ mv ./zig-out/z8x ~/bin
```
Usage
Command-line args
```console
$ z8x "some text"
```
Stdin
```console
$ echo "some text" | z8x
```
Contributing
If you would like to contribute to this project just create a pull request which I will try to review as soon as possible. | [] |
https://avatars.githubusercontent.com/u/152508846?v=4 | phage | haha-systems/phage | 2025-04-13T23:25:20Z | An ultra fast key-value store that uses disk storage, not memory. | trunk | 0 | 0 | 0 | 0 | https://api.github.com/repos/haha-systems/phage/tags | MIT | [
"high-performance",
"key-value-store",
"zig"
] | 9,607 | false | 2025-04-26T17:46:48Z | true | true | 0.11.0 | github | [
{
"commit": "175c78f8fadec1e9da23fdf5eacd02c99f6cb47e",
"name": "colored_logger",
"tar_url": "https://github.com/4zv4l/zig_colored_logger/archive/175c78f8fadec1e9da23fdf5eacd02c99f6cb47e.tar.gz",
"type": "remote",
"url": "https://github.com/4zv4l/zig_colored_logger"
},
{
"commit": "c9327... |
Phage
<a></a>
Phage is a fast key/value store similar to Redis and Valkey, with these goals in mind:
<ul>
<li>Achieve one-million key reads per second on consumer hardware</li>
<li>Use disk storage as the primary storage medium to reduce operating costs</li>
<li>Be ACID compliant and rock-solid, including data recovery</li>
</ul>
A note on the current state of Phage
Phage is written in Zig for speed and safety, and is currently in the early stages of development. Zig is still young, and is continually changing. Equally, this is my first real Zig project. I'm still learning and Phage began as an experiment to get better at Zig and systems programming.
Currently, Phage has achieved the following stats on simple key values:
<ul>
<li>Reads: > 1 million keys per second</li>
<li>Writes: > 300k keys per second</li>
</ul>
<strong>Benchmark System Specs</strong>
<ul>
<li>AMD Ryzen 5600X @ 4.8GHZ</li>
<li>16 GB RAM</li>
<li>1TB Western Digital SSD</li>
</ul>
I currently perform the benchmarks on my own PC to push the performance as much as possible, but I expect it to perform much better on server-grade hardware.
I hope it's useful, but beware that its not a production-ready tool right now.
<ul>
<li>@xiy</li>
</ul>
Features
<ul>
<li>Asynchronous file I/O using <code>io_uring</code></li>
<li>Write-ahead logging and recovery of entries</li>
<li>A dual-layer storage mechanism consisting of:<ul>
<li>A mininal footprint, in-memory index of key-values</li>
<li>A disk-backed storage of keys-values through <code>io_uring</code></li>
</ul>
</li>
<li>CRC32 checksumming for key-value entry integrity</li>
</ul>
Operations
Phage currently supports the following operations. You can interact directly with the database using the CLI, called <strong>Demon</strong>.
<br/><input type='checkbox' class='w-4 h-4 text-green-500 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' checked disabled></input> <strong>put (key, value)</strong>: insert a new key/value entry into the database
<br/><input type='checkbox' class='w-4 h-4 text-green-500 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' checked disabled></input> <strong>get (key)</strong>: retrieve a key/value entry by it's key name
<br/><input type='checkbox' class='w-4 h-4 text-green-500 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' checked disabled></input> <strong>delete (key)</strong>: delete a key/value entry` from the database
<br/><input type='checkbox' class='w-4 h-4 text-green-500 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' checked disabled></input> <strong>keys (pattern)</strong>: return keys from the database matching a regex pattern
<br/><input type='checkbox' class='w-4 h-4 text-green-500 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' checked disabled></input> <strong>exit</strong>: quits Demon
TODO
<ul>
<li>[] <strong>bench (n)</strong>: benchmark the database, inserting and then retrieving <em>n</em> key-values</li>
<li>[] <strong>recover-wal</strong>: force a recovery of the database using the write-ahead log</li>
<li>[] <strong>recover-index</strong>: force a recovery of the database from storage</li>
</ul>
Clients
Phage currently only has a single client; a terminal CLI for direct access to the database. In the future, Phage will include a clustered server and libraries for common languages like Go, Ruby, and JavaScript.
Planned features
<ul>
<li>[] Sets</li>
<li>[] Ordered Sets</li>
<li>[] JSON blobs</li>
<li>[] Publish/Subscribe</li>
<li>[] Events</li>
<li>[] Queue patterns</li>
<li>[] Bus patterns</li>
<li>[] Vector storage</li>
</ul>
License
This project is licensed under the MIT License - see the <a>LICENSE</a> file for details.
Contributing
If you want to contribute to make Phage better, I'm very open to pull/feature requests. | [] |
https://avatars.githubusercontent.com/u/103554944?v=4 | zsum | TemariVirus/zsum | 2025-04-13T09:46:59Z | CLI checksums, made simple | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/TemariVirus/zsum/tags | Unlicense | [
"checksum",
"zig"
] | 8 | false | 2025-05-19T04:51:25Z | true | true | 0.14.0 | github | [
{
"commit": "9425b94c103a031777fdd272c555ce93a7dea581",
"name": "args",
"tar_url": "https://github.com/ikskuh/zig-args/archive/9425b94c103a031777fdd272c555ce93a7dea581.tar.gz",
"type": "remote",
"url": "https://github.com/ikskuh/zig-args"
}
] | zsum
zsum is a command-line tool that calculates the checksum of a file, and optionally compares it to an expected checksum.
Usage
```
Usage: zsum [options] [checksum] file
If checksum is provided, check if the file's hash matches the given checksum.
Otherwise, print the file's hash to stdout.
file is either a file path or the file's contents piped from stdin.
Supported hashing algorithms:
blake2b_128
blake2b_160
blake2b_256
blake2b_384
blake2b_512
blake2s_128
blake2s_160
blake2s_224
blake2s_256
blake3
md5
sha1
sha224
sha256
sha384
sha512
sha3_224
sha3_256
sha3_384
sha3_512
Options:
-a, --algo The hashing algorithm to use (default: sha256).
-h, --help Print this help message and exit.
```
Why?
I don't use a package manager on windows, so it's not uncommon that I have to install software manually.
Typically, I don't bother checking the checksum because it's too much of a hassle to type <code>Get-Filehash ...</code>
and visually verify that everything matches. And while I have some level of trust in the sources I download from,
this is still a security hole, so I decided to write <code>zsum</code> to hopefully make checking checksums a habit. | [] |
https://avatars.githubusercontent.com/u/23142073?v=4 | zig-sync | jrachele/zig-sync | 2025-02-17T16:34:36Z | Manage Zig and ZLS versions | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/jrachele/zig-sync/tags | GPL-3.0 | [
"tools",
"version",
"zig",
"ziglang",
"zigup",
"zls"
] | 280 | false | 2025-03-01T03:22:21Z | true | true | unknown | github | [
{
"commit": "1cceeb70e77dec941a4178160ff6c8d05a74de6f",
"name": "known-folders",
"tar_url": "https://github.com/ziglibs/known-folders/archive/1cceeb70e77dec941a4178160ff6c8d05a74de6f.tar.gz",
"type": "remote",
"url": "https://github.com/ziglibs/known-folders"
}
] | zig-sync
Download and manage Zig compilers and ZLS versions.
A fork of Zigup with built-in support for Mach releases and ZLS, which itself was forked from <a>Zigdown</a>
Building
zig-sync-down is currently built/tested using zig master (0.14.0-dev).
```sh
git clone https://github.com/jrachele/zig-sync
cd zig-sync
Build in release mode
zig build -Doptimize=ReleaseSafe
```
Usage
<code><version></code> may be any version number, <code>stable</code>, <code>master</code>, <code><version>-mach</code>, <code>mach-latest</code>, <code>latest-installed</code>, or <code>stable-installed</code>
```sh
fetch a compiler + zls version and set it as the default
zig-sync
zig-sync 0.13.0
zig-sync 0.4.0-mach
zig-sync master
zig-sync mach-latest
fetch a compiler + zls version (does not set it as default)
zig-sync fetch
zig-sync fetch master
print the default compiler version
zig-sync default
set the default compiler
zig-sync default
zig-sync default latest-installed
zig-sync default stable-installed
list the installed compiler versions
zig-sync list
Removes this compiler
zig-sync clean
Removes all compilers except latest-installed, latest installed stable, and any kept compilers
zig-sync clean outdated
mark a compiler to keep
zig-sync keep
run a specific version of the compiler
zig-sync run ...
```
How the compilers are managed
zig-sync stores each compiler and language server in a subdirectory of the installation directory, by default the data directory from <a>known-folders</a>.
zig-sync can optionally symlink a "default" Zig/ZLS. On windows this will create an executable that forwards invocations to one of the <code>zig</code>/<code>zls</code> executables in the install directory.
Options can be configured via the following command line options:
```sh
Single-run
zig-sync --install-dir
zig-sync --zig-symlink
zig-sync --zls-symlink
Persist settings (saves in the default configuration directory from known-folders)
zig-sync set-install-dir
zig-sync set-zig-symlink
zig-sync set-zls-symlink
```
License
Copyright (c) zig-sync contributers
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | [] |
https://avatars.githubusercontent.com/u/12962231?v=4 | builder | optimistiCli/builder | 2025-04-24T13:23:37Z | Compile CLI binaries for DSM on DSM | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/optimistiCli/builder/tags | - | [
"cli",
"docker",
"dsm",
"golang",
"rust",
"synology",
"synology-dsm",
"zig"
] | 3 | false | 2025-04-24T13:32:46Z | false | false | unknown | github | [] | Docker image for building rust, go, zig on DSM for DSM
Uses <a>Zig</a>'s built-in ability to link binaries with arbitrary versions of <code>glibc</code> for compiling rust and go (and probably other) command line utilities for <a>Synology DSM</a> on same very DSM. Derived from <a>messense/cargo-zigbuild docker image</a>.
Building Image
<code>bash
$ DOCKER_BUILDKIT=1 docker build -f builder.dockerfile -t builder:latest .</code>
Or just use <a>diwu</a> (-;
Running the image
The <code>builder.sh</code> script that comes with the image mounts current dir to <code>/mnt</code> and sets up a few environment variables needed for compiling rust and go sources. Particular valuies will depend on Synology box's CPU and DSM's glibc version:
<code>bash
CARGO_BUILD_TARGET=x86_64-unknown-linux-gnu.2.26
CC='zig cc -target x86_64-linux-gnu.2.26'
CXX='zig c++ -target x86_64-linux-gnu.2.26'
CGO_ENABLED=1
GOARCH=amd64
GOOS=linux</code>
Following vars might come handy too:
<code>bash
TGT_ARCH=x86_64
TGT_GLIBC=2.26</code>
Building Binaries
Environment variables set by the <code>builder.sh</code> script should be in most cases enough to build in a normal way as applies to a particular project. But your millage may vary. This project comes with no means of a compiled project installation, just put the binaries manually to <code>/usr/local/bin</code> or wherever you want them.
Limitations And Disclaimer
Though tested only on a <code>x86_64</code> host, this image would probably work on <code>aarch64</code> and maybe on some other platforms, but most probably it would require some extra work on it. I created this image for personal consumption and share it “as-is” for fellow tinkerers' inpiration. Plesae note that Synology generally discoureges users from doing anything that requires root access to the DSM command line. So if sometghing goes wrong – it's on you, not me.
Links And Sources
Rust
<ul>
<li><a>Releases</a></li>
<li>Cargo <a>Configuration environment variables</a></li>
</ul>
cargo-zigbuild
<ul>
<li><a>GitHub</a></li>
<li><a>Docker Hub</a></li>
</ul>
Zig
<ul>
<li><a><code>zig cc</code>: a Powerful Drop-In Replacement for GCC/Clang</a></li>
<li><a>Releases</a></li>
<li><a>Direct download</a></li>
<li><a>Installation</a></li>
<li><a>Specify target glibc at command line</a></li>
</ul>
Dockerfile
<ul>
<li><a>RUN With Cache Mount</a></li>
<li><a>BuildKit</a></li>
<li><a>Use cache mounts</a></li>
<li><a>When using BuildKit with Docker, how do I see the output of RUN commands?</a></li>
</ul>
Go
<ul>
<li><a>Zig Makes Go Cross Compilation Just Work</a></li>
<li><a>Download and install</a></li>
<li><a>All releases</a></li>
</ul>
DSM
<ul>
<li><a>What kind of CPU does my Synology NAS have?</a></li>
<li><a>Development Tool</a></li>
</ul> | [] |
https://avatars.githubusercontent.com/u/64833487?v=4 | zig-cpp-interop | kj-crypto/zig-cpp-interop | 2025-05-14T10:02:21Z | Zig interoperability with g++ compiled code | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/kj-crypto/zig-cpp-interop/tags | - | [
"c",
"cpp",
"gnu-gcc",
"zig",
"ziglang"
] | 2 | false | 2025-05-14T14:11:12Z | false | false | unknown | github | [] | The Zig C/C++ interoperability minimal working example
The purpose of this example was to establish interoperability between c++ code and zig.
Key issue is to use non llvm c++ compiler to create static lib and the use it and resolve
linking symbols using zig.
Key points
<ol>
<li>All c++ code is complied by g++</li>
<li>C++ name mangling can be solved in following way
<code>const cppLibAddFun = @extern(*const fn (i64, i64) callconv(.C) i64, .{ .name = "_Z12cppLibAddFunii" });</code>
more info https://github.com/ziglang/zig/issues/19999</li>
<li>Zig uses clang under the hood and it defaul links against <a>libc++</a> which differs
from gnu <code>libstdc++</code>.
To solve this issue we need explicity pass the <code>libstdc++</code> lib and use <code>-lc++</code> linker flag.
Example:
<code>zig build-exe example_2.zig libzig_static.a /lib/x86_64-linux-gnu/libstdc++.so.6 --name example-2 -lc++ -I${PWD}/lib</code></li>
</ol>
Build and run
<ol>
<li>Install <code>zig</code> and <code>build-essential</code> to have access to <code>g++</code> and gnu <code>make</code></li>
<li>In <a>Makefile</a> setup <code>ZIG</code> compiler version or path to zig bin</li>
<li>Run <code>make all</code> to complile all targets</li>
</ol> | [] |
https://avatars.githubusercontent.com/u/22438427?v=4 | czalloc | bernardassan/czalloc | 2025-05-17T09:55:29Z | Override C global allocators to use Zig allocators in a Zig + C mixed project | main | 1 | 0 | 0 | 0 | https://api.github.com/repos/bernardassan/czalloc/tags | BSD-3-Clause | [
"aligned-alloc",
"allocator",
"c",
"calloc",
"free",
"malloc",
"malloc-library",
"posix-memalign",
"realloc",
"zig",
"zig-package"
] | 16 | false | 2025-05-18T23:16:25Z | true | true | 0.15.0-dev.558+9279ff888 | github | [] | czalloc
Override C global allocators to use Zig allocators in a Zig + C mixed project | [] |
https://avatars.githubusercontent.com/u/112688179?v=4 | chip8-emulator | its-me-ojas/chip8-emulator | 2025-04-12T21:38:29Z | This Chip-8 emulator is a learning project that implements the classic Chip-8 virtual machine from the 1970s. Chip-8 was designed to make game programming easier on 8-bit microcomputers, and it's often used as a first project for emulator development. | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/its-me-ojas/chip8-emulator/tags | - | [
"sdl2",
"zig"
] | 6,160 | false | 2025-04-12T21:39:36Z | true | true | unknown | github | [] | Chip-8 Emulator
A simple Chip-8 emulator written in Zig with SDL2 for rendering.
Overview
This Chip-8 emulator is a learning project that implements the classic Chip-8 virtual machine from the 1970s. Chip-8 was designed to make game programming easier on 8-bit microcomputers, and it's often used as a first project for emulator development.
Features
<ul>
<li>Complete implementation of the Chip-8 instruction set</li>
<li>SDL2-based display with configurable scaling</li>
<li>ROM loading functionality</li>
<li>Memory and register debugging capabilities</li>
</ul>
Requirements
<ul>
<li>Zig compiler (latest version recommended)</li>
<li>SDL2 library</li>
</ul>
Building
<code>bash
zig build</code>
Usage
<code>bash
./chip8Emulator /path/to/your/rom.ch8</code>
Project Structure
<code>chip8Emulator/
├── src/
│ ├── main.zig # Entry point and SDL setup
│ ├── emulator/
│ │ └── chip8.zig # Core Chip-8 implementation</code>
Implementation Details
The emulator implements:
- 4KB of memory
- 16 8-bit registers (V0-VF)
- An index register (I)
- A program counter (PC)
- A 16-level stack with stack pointer
- ROM loading from file
Current Status
The emulator is in early development. Basic ROM loading and memory inspection are working, with graphics rendering in progress. | [] |
https://avatars.githubusercontent.com/u/680789?v=4 | cmake2zig | rupurt/cmake2zig | 2025-04-06T13:32:02Z | Zig library to convert CMake bulds to the Zig build system | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/rupurt/cmake2zig/tags | MIT | [
"cmake",
"zig"
] | 10 | false | 2025-04-08T17:21:53Z | true | true | 0.14.0 | github | [] | cmake2zig
Zig library to convert CMake bulds to the Zig build system
```console
<blockquote>
dev
</blockquote>
USAGE: dev
COMMANDS:
setup Ensures configuration has been initialized
check Ensures code is formatted and that tests pass
examples Example CMake build systems that can be converted to the Zig build system
```
License
<code>cmake2zig</code> is released under the <a>MIT license</a> | [] |
https://avatars.githubusercontent.com/u/30992149?v=4 | micro | Harry-Heath/micro | 2025-03-23T00:21:45Z | A little arcade game running on the esp32c3, made with zig | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/Harry-Heath/micro/tags | - | [
"esp32",
"st7789",
"zig"
] | 858 | false | 2025-04-26T15:31:11Z | true | true | 0.14.0 | github | [
{
"commit": "354342c2aa31ceb8cb5a9e123662d73e6681438e",
"name": "microzig",
"tar_url": "https://github.com/ZigEmbeddedGroup/microzig/archive/354342c2aa31ceb8cb5a9e123662d73e6681438e.tar.gz",
"type": "remote",
"url": "https://github.com/ZigEmbeddedGroup/microzig"
},
{
"commit": "ad338133e... | <code>zig build firmware</code>
<code>zig build pc</code>
<code>zig build flash -- {port}</code>
<code>zig build listen -- {port}</code> | [] |
https://avatars.githubusercontent.com/u/99440446?v=4 | zigfetch | utox39/zigfetch | 2025-03-02T13:20:10Z | Zigfetch is a minimal neofetch/fastfetch like system information tool | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/utox39/zigfetch/tags | MIT | [
"cli",
"fastfetch",
"neofetch",
"system",
"system-information",
"zig",
"ziglang"
] | 104 | false | 2025-05-16T12:01:35Z | true | true | 0.14.0 | github | [] | Zigfetch
Description
Zigfetch is a minimal <a>neofetch</a>/<a>fastfetch</a> like system information tool
Requirements
<ul>
<li><a>zig v0.14.0</a></li>
</ul>
Installation
```console
Clone the repo
$ git clone https://github.com/utox39/zigfetch.git
cd to the path
$ cd path/to/zigfetch
Build zigfetch
$ zig build -Doptimize=ReleaseSafe
Then move it somewhere in your $PATH. Here is an example:
$ mv ./zig-out/zigfetch ~/bin
```
Usage
<code>console
$ zigfetch</code>
Roadtrip
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Add ASCII art for each operating system and Linux distro
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Add GPU info for Linux
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Add packages info for Linux
<br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Add user customization
Contributing
If you would like to contribute to this project just create a pull request which I will try to review as soon as possible. | [] |
https://avatars.githubusercontent.com/u/137334444?v=4 | Zig | qompassai/Zig | 2025-04-23T20:44:54Z | Equator Zig: Educational Content on the Zig Programming Language | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/qompassai/Zig/tags | AGPL-3.0 | [
"equator",
"zig"
] | 75,505 | false | 2025-05-21T21:35:53Z | true | true | unknown | github | [
{
"commit": "refs",
"name": "zfetch",
"tar_url": "https://github.com/truemedian/zfetch/archive/refs.tar.gz",
"type": "remote",
"url": "https://github.com/truemedian/zfetch"
},
{
"commit": "refs",
"name": "zig_json_decode",
"tar_url": "https://github.com/haze/zig-json-decode/archi... |
Zig: Solving the cross compilation conundrum
Qompass AI on Zig
<a>
</a>
<a>
</a>
<a>
</a>
<a></a>
<a></a>
<strong>Contact Qompass AI</strong>
Matthew A. Porter
Qompass AI, Spokane, WA
Publications
<a>
</a>
<a>
</a>
<a>
</a>
Developer Programs
[](https://developer.nvidia.com/)
[](https://developers.facebook.com/)
[](https://hackerone.com/phaedrusflow)
[](https://huggingface.co/qompass)
[](https://dev.epicgames.com/)
Professional Profiles
<a>
</a>
<a>
</a>
Social Media
<a>
</a>
<a>
</a>
<a>
</a>
Support & Funding
💰 Pre-Seed Funding 2023-2025
🏆 Amount
📅 Date
<a>RJOS/Zimmer Biomet Research Grant</a>
$30,000
March 2024
<a>Pathfinders Intern Program</a>
<a target="_blank">View on LinkedIn</a>
$2,000
October 2024
Your support helps us continue building innovative solutions at the intersection of health and education.
<a target="_blank">
</a>
<i>Funding helps us continue our research at the intersection of AI, healthcare, and education</i>
<strong>Frequently Asked Questions</strong>
### Q: How do you mitigate against bias?
**TLDR - we do math to make AI ethically useful**
### A: We delineate between mathematical bias (MB) - a fundamental parameter in neural network equations - and algorithmic/social bias (ASB). While MB is optimized during model training through backpropagation, ASB requires careful consideration of data sources, model architecture, and deployment strategies. We implement attention mechanisms for improved input processing and use legal open-source data and secure web-search APIs to help mitigate ASB.
[AAMC AI Guidelines | One way to align AI against ASB](https://www.aamc.org/about-us/mission-areas/medical-education/principles-ai-use)
### AI Math at a glance
## Forward Propagation Algorithm
$$
y = w_1x_1 + w_2x_2 + ... + w_nx_n + b
$$
Where:
- $y$ represents the model output
- $(x_1, x_2, ..., x_n)$ are input features
- $(w_1, w_2, ..., w_n)$ are feature weights
- $b$ is the bias term
### Neural Network Activation
For neural networks, the bias term is incorporated before activation:
$$
z = \sum_{i=1}^{n} w_ix_i + b
$$
$$
a = \sigma(z)
$$
Where:
- $z$ is the weighted sum plus bias
- $a$ is the activation output
- $\sigma$ is the activation function
### Attention Mechanism- aka what makes the Transformer (The "T" in ChatGPT) powerful
* [Attention High level overview video](https://www.youtube.com/watch?v=fjJOgb-E41w)
* [Attention Is All You Need Arxiv Paper](https://arxiv.org/abs/1706.03762)
The Attention mechanism equation is:
$$
\text{Attention}(Q, K, V) = \text{softmax}\left( \frac{QK^T}{\sqrt{d_k}} \right) V
$$
Where:
- $Q$ represents the Query matrix
- $K$ represents the Key matrix
- $V$ represents the Value matrix
- $d_k$ is the dimension of the key vectors
- $\text{softmax}(\cdot)$ normalizes scores to sum to 1
### Q: Do I have to buy a Linux computer to use this? I don't have time for that!
### A: No. You can run Linux and/or the tools we share alongside your existing operating system:
* Windows users can use Windows Subsystem for Linux [WSL](https://learn.microsoft.com/en-us/windows/wsl/install)
* Mac users can use [Homebrew](https://brew.sh/)
* The code-base instructions were developed with both beginners and advanced users in mind.
### Q: Do you have to get a masters in AI?
### A: Not if you don't want to. To get competent enough to get past ChatGPT dependence at least, you just need a computer and a beginning's mindset. Huggingface is a good place to start.
* [Huggingface](https://docs.google.com/presentation/d/1IkzESdOwdmwvPxIELYJi8--K3EZ98_cL6c5ZcLKSyVg/edit#slide=id.p)
### Q: What makes a "small" AI model?
### A: AI models ~=10 billion(10B) parameters and below. For comparison, OpenAI's GPT4o contains approximately 200B parameters.
<strong>Digital Object Identifier (DOI) for public transparency and accountability</strong>
Badge
```markdown
[](https://doi.org/10.5281/zenodo.xxxxxx)
```
---
- See `.zenodo.json` for metadata, authorship, licensing, and related software attribution.
🧭 Attribution
<strong>What a Dual-License Means</strong>
### Protection for Vulnerable Populations
The dual licensing aims to address the cybersecurity gap that disproportionately affects underserved populations. As highlighted by recent attacks[^1], low-income residents, seniors, and foreign language speakers face higher-than-average risks of being victims of cyberattacks. By offering both open-source and commercial licensing options, we encourage the development of cybersecurity solutions that can reach these vulnerable groups while also enabling sustainable development and support.
### Preventing Malicious Use
The AGPL-3.0 license ensures that any modifications to the software remain open source, preventing bad actors from creating closed-source variants that could be used for exploitation. This is especially crucial given the rising threats to vulnerable communities, including children in educational settings. The attack on Minneapolis Public Schools, which resulted in the leak of 300,000 files and a $1 million ransom demand, highlights the importance of transparency and security[^8].
### Addressing Cybersecurity in Critical Sectors
The commercial license option allows for tailored solutions in critical sectors such as healthcare, which has seen significant impacts from cyberattacks. For example, the recent Change Healthcare attack[^4] affected millions of Americans and caused widespread disruption for hospitals and other providers. In January 2025, CISA[^2] and FDA[^3] jointly warned of critical backdoor vulnerabilities in Contec CMS8000 patient monitors, revealing how medical devices could be compromised for unauthorized remote access and patient data manipulation.
### Supporting Cybersecurity Awareness
The dual licensing model supports initiatives like the Cybersecurity and Infrastructure Security Agency (CISA) efforts to improve cybersecurity awareness[^7] in "target rich" sectors, including K-12 education[^5]. By allowing both open-source and commercial use, we aim to facilitate the development of tools that support these critical awareness and protection efforts.
### Bridging the Digital Divide
The unfortunate reality is that too many individuals and organizations have gone into a frenzy in every facet of our daily lives[^6]. These unfortunate folks identify themselves with their talk of "10X" returns and building towards Artificial General Intelligence aka "AGI" while offering GPT wrappers. Our dual licensing approach aims to acknowledge this deeply concerning predatory paradigm with clear eyes while still operating to bring the best parts of the open-source community with our services and solutions.
### Recent Cybersecurity Attacks
Recent attacks underscore the importance of robust cybersecurity measures:
- The Change Healthcare cyberattack in February 2024 affected millions of Americans and caused significant disruption to healthcare providers.
- The White House and Congress jointly designated October 2024 as Cybersecurity Awareness Month. This designation comes with over 100 actions that align the Federal government and public/private sector partners are taking to help every man, woman, and child to safely navigate the age of AI.
By offering both open source and commercial licensing options, we strive to create a balance that promotes innovation and accessibility. We address the complex cybersecurity challenges faced by vulnerable populations and critical infrastructure sectors as the foundation of our solutions, not an afterthought..
[^1]: [International Counter Ransomware Initiative 2024 Joint Statement](https://www.whitehouse.gov/briefing-room/statements-releases/2024/10/02/international-counter-ransomware-initiative-2024-joint-statement/)
[^2]: [Contec CMS8000 Contains a Backdoor](https://www.cisa.gov/sites/default/files/2025-01/fact-sheet-contec-cms8000-contains-a-backdoor-508c.pdf)
[^3]: [CISA, FDA warn of vulnerabilities in Contec patient monitors](https://www.aha.org/news/headline/2025-01-31-cisa-fda-warn-vulnerabilities-contec-patient-monitors)
[^4]: [The Top 10 Health Data Breaches of the First Half of 2024](https://www.chiefhealthcareexecutive.com/view/the-top-10-health-data-breaches-of-the-first-half-of-2024)
[^5]: [CISA's K-12 Cybersecurity Initiatives](https://www.cisa.gov/K12Cybersecurity)
[^6]: [Federal Trade Commission Operation AI Comply: continuing the crackdown on overpromises and AI-related lies](https://www.ftc.gov/business-guidance/blog/2024/09/operation-ai-comply-continuing-crackdown-overpromises-ai-related-lies)
[^7]: [A Proclamation on Cybersecurity Awareness Month, 2024 ](https://www.whitehouse.gov/briefing-room/presidential-actions/2024/09/30/a-proclamation-on-cybersecurity-awareness-month-2024/)
[^8]: [Minneapolis school district says data breach affected more than 100,000 people](https://therecord.media/minneapolis-schools-say-data-breach-affected-100000/)
| [] |
https://avatars.githubusercontent.com/u/146390816?v=4 | elfutils | allyourcodebase/elfutils | 2025-04-28T19:16:27Z | elfutils ported to the zig build system | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/allyourcodebase/elfutils/tags | GPL-3.0 | [
"zig",
"zig-package"
] | 34 | false | 2025-04-28T19:20:42Z | true | true | 0.14.0 | github | [
{
"commit": "6c72830882690c1eb2567a537525c3f432c1da50",
"name": "zlib",
"tar_url": "https://github.com/allyourcodebase/zlib/archive/6c72830882690c1eb2567a537525c3f432c1da50.tar.gz",
"type": "remote",
"url": "https://github.com/allyourcodebase/zlib"
},
{
"commit": "master",
"name": "z... | <a></a>
elfutils
This is <a>elfutils</a>, packaged for <a>Zig</a>.
Installation
First, update your <code>build.zig.zon</code>:
```
Initialize a <code>zig build</code> project if you haven't already
zig init
zig fetch --save git+https://github.com/allyourcodebase/elfutils.git
```
You can then import <code>elfutils</code> in your <code>build.zig</code> with:
```zig
const elfutils_dependency = b.dependency("elfutils", .{
.target = target,
.optimize = optimize,
});
const libelf = elfutils_dependency.artifact("elf");
const libdw = elfutils_dependency.artifact("dw");
const libasm = elfutils_dependency.artifact("asm");
your_exe.linkLibrary(libelf);
your_exe.linkLibrary(libdw);
your_exe.linkLibrary(libasm);
``` | [
"https://github.com/allyourcodebase/kcov"
] |
https://avatars.githubusercontent.com/u/183272735?v=4 | orion | ciathefed/orion | 2025-04-26T20:47:57Z | 64-bit register based VM written in Zig | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/ciathefed/orion/tags | MIT | [
"register-based",
"vm",
"zig"
] | 72 | false | 2025-05-03T03:20:13Z | true | true | 0.14.0 | github | [
{
"commit": "master",
"name": "args",
"tar_url": "https://github.com/ikskuh/zig-args/archive/master.tar.gz",
"type": "remote",
"url": "https://github.com/ikskuh/zig-args"
}
] | Orion
64-bit register based VM written in <a>Zig</a>
Usage
Build Orion
<code>shell
zig build</code>
Compile an assembly program to bytecode
<code>shell
./zig-out/bin/orion build examples/hello.oasm</code>
Execute the bytecode in the virtual machine
<code>shell
./zig-out/bin/orion run app.ob</code> | [] |
https://avatars.githubusercontent.com/u/161847788?v=4 | radish | wipeseals/radish | 2025-04-10T13:21:54Z | Ray Tracing in One Weekend implemented in zig. | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/wipeseals/radish/tags | MIT | [
"raytracing",
"zig",
"ziglang"
] | 1,771 | false | 2025-04-17T13:31:10Z | true | true | 0.14.0 | github | [] | radish
Ray Tracing in One Weekend implemented in zig.
Running
<code>bash
zig build run</code>
References
<ul>
<li><a>Ray Tracing in One Weekend</a></li>
<li><a>週末レイトレーシング(翻訳)</a></li>
</ul> | [] |
https://avatars.githubusercontent.com/u/196794749?v=4 | notes | cynumini/notes | 2025-02-17T15:35:12Z | notes is a cli program to help you manage your notes | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/cynumini/notes/tags | 0BSD | [
"cli",
"notes",
"zig"
] | 15 | false | 2025-02-24T16:34:18Z | true | true | unknown | github | [] | notes
notes is a command line utility that helps to find notes (both existing and just links to non-existing ones), find duplicate notes and rename notes. This program is a part of the neovim plugin that hasn't been uploaded yet.
To determine the title of a note it uses the <code>title</code> field in YAML frontmatter, or uses filename if there is no YAML frontmatter.
notes only uses wikilinks, so it ignores normal markdown links.
Installation
Install <a>zig</a> 0.14.0-dev.3298+6fe1993d8 or later.
<code>bash
git clone https://github.com/cynumini/notes
cd notes
zig build -Doptimize=ReleaseFast -p ~/.local # this means it will put the bin file in ~/.local/bin</code>
<blockquote>
<span class="bg-yellow-100 text-yellow-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-yellow-900 dark:text-yellow-300">WARNING</span>
This program has only been tested on Linux. It won't work on Windows, and probably not on macOS either.
</blockquote>
Commands
For now notes have the 3 command.
json
<code>bash
notes json ~/notes</code>
It will return all your notes in the ~/notes folder in this format:
<code>json
{
"My note 1": "my-note-1.md",
"my-note-2": "my-note-2.md",
"my-note-3": "subfolder/my-note-3.md",
"My note 4": null
}</code>
In this example, <code>my-note-1.md</code> has YAML frontmatter with title, and <code>my-note-2.md</code> and <code>my-note-3.md</code> don't. If there are notes with the same title, the program returns the one with the shortest path. To check if there are duplicates use the <code>duplicate</code> command.
<code>My note 4</code> on the other hand is not a file, but a link to a non-existent file in <code>my-note-1.md</code>.
duplicate
It prints a list of notes that have the same title.
<code>bash
notes duplicate ~/notes</code>
This gives this result:
<code>Duplicate: my-note-1.md - subfolder/my-note-5.md</code>
In this example my <code>my-note-1</code> and <code>my-note-5</code> have the same title in YAML frontmatter.
rename
Rename the note title and all links in other files.
<code>bash
notes rename ~/notes "my-note-2" "My note 2"</code>
In this example, since <code>my-note-2.md</code> doesn't have YAML frontmatter, it will insert it with the new title <code>My note 2</code> and after that, if there are other notes with links on <code>my-note-2</code>, they will be renamed to <code>My note 2</code>. | [] |
https://avatars.githubusercontent.com/u/117400842?v=4 | Sodusolver | LucasSantos91/Sodusolver | 2025-05-06T04:41:41Z | Fastest Sudoku solver | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/LucasSantos91/Sodusolver/tags | - | [
"sudoku",
"zig"
] | 12 | false | 2025-05-07T19:42:23Z | true | true | 0.15.0-dev.465+bb79c85cb | github | [] | Fastest Sudoku solver.
Clues are given through standard in. Pass clues as such: A12, where A is the row, 1 is the column and 2 is the digit.
Example:
```
echo B63 B88 B95 C31 C52 D45 D67 E34 E71 F29 G15 G87 G93 H32 H51 I54 I99 | Sodusolver.exe
Given grid:
1 2 3 4 5 6 7 8 9
A* | | * | | * | | *
B<em> | | * | |3</em> |8|5*
C<em> | |1</em> |2| * | | *
D<em> | | </em>5| |7* | | *
E<em> | |4</em> | | *1| | *
F* |9| * | | * | | *
G<em>5| | * | | * |7|3</em>
H<em> | |2</em> |1| * | | *
I<em> | | * |4| * | |9</em>
``` | [] |
https://avatars.githubusercontent.com/u/1906851?v=4 | debuglog | jhark/debuglog | 2025-05-08T14:45:45Z | Command line log viewer for Windows' OutputDebugStringA API. | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/jhark/debuglog/tags | ISC | [
"win32",
"windows",
"zig"
] | 12 | false | 2025-05-12T11:11:41Z | true | true | 0.14.0 | github | [
{
"commit": "0e2491d8e6d2be38dc0c2ce8e103469886e468bb",
"name": "flags",
"tar_url": "https://github.com/joegm/flags/archive/0e2491d8e6d2be38dc0c2ce8e103469886e468bb.tar.gz",
"type": "remote",
"url": "https://github.com/joegm/flags"
}
] | debuglog
A command-line tool for Windows that captures debug log messages sent to the <a>OutputDebugStringA</a> API.
See also <a>Sysinternals' DebugView</a>.
Requirements
<ul>
<li>Windows.</li>
<li>Zig compiler (version 0.14.0)</li>
</ul>
Building
<code>sh
zig build</code>
Usage
```
Usage: debuglog [-p | --pid ] [-e | --stderr] [-o | --stdout]
[-f | --file ] [-h | --help]
Captures messages sent by applications using OutputDebugStringA and prints them.
Example:
debuglog # Print messages from all processes
debuglog -p 1234 # Print messages from process with PID 1234
debuglog -- app.exe --foo # Launch <code>app.exe --foo</code> and print only its messages.
Messages are printed to stdout by default, or to stderr when spawning a subprocess.
Options:
-p, --pid Filter messages to show only those from the specified process ID
-e, --stderr Send output to stderr
-o, --stdout Send output to stdout
-f, --file Send output to the specified file
-h, --help Show this help and exit
```
License
This project is licensed under the ISC License - see the <a>LICENSE</a> file for details. | [] |
https://avatars.githubusercontent.com/u/3380474?v=4 | zax | exlee/zax | 2025-05-09T13:21:59Z | Alexander's Zig Utilities | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/exlee/zax/tags | MIT | [
"zig",
"zig-build"
] | 6,385 | false | 2025-05-14T17:09:42Z | true | true | 0.14.0 | github | [] | ZAX
<strong>Z</strong>ig utils by <strong>A</strong>le<strong>x</strong>ander.
It also sounds a little bit like Zig Axe if you <a>lisp</a>
hard enough <code>;-)</code>.
Usage
See the docs on <a>Github Pages</a>
I wouldn't suggest importing it directly, but rather copy&paste or check it out.
There are some recipies I found useful and some ideas I entertained while doing this.
Most are simple helpers I use in my other project. | [] |
https://avatars.githubusercontent.com/u/54503497?v=4 | sudoku | RetroDev256/sudoku | 2025-02-25T17:14:40Z | size-optimized sudoku solver | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/RetroDev256/sudoku/tags | MIT | [
"zig"
] | 46 | false | 2025-05-17T08:53:19Z | true | true | unknown | github | [] | What?
It's a command-line sudoku solver that is made to be ultra tiny. Of course, the page size of many file systems makes a size below 4k no different than any other, but it's still fun to work with :)
The current size of the linux binary is 438 bytes.
Usage:
<code>sudoku GRID</code> - where <code>GRID</code> is a string of 81 consecutive digits, 0 representing empty cells.
eg. <code>./sudoku 530070000600195000098000060800060003400803001700020006060000280000419005000080079</code>
Compile with <code>zig build -Drelease -Drisky shrink</code>
(Will require sstrip from elfkickers)
The program will not output anything if the input grid cannot be solved. It is undefined behavior if you don't give it a valid input grid.
Hexdump:
<code>+-------------------------+-------------------------+--------+--------+
| 7f 45 4c 46 01 01 01 00 | 00 00 00 00 00 00 00 00 |•ELF•••⋄|⋄⋄⋄⋄⋄⋄⋄⋄|
| 02 00 03 00 01 00 00 00 | 54 00 01 00 34 00 00 00 |•⋄•⋄•⋄⋄⋄|T⋄•⋄4⋄⋄⋄|
| 00 00 00 00 00 00 00 00 | 34 00 20 00 01 00 28 00 |⋄⋄⋄⋄⋄⋄⋄⋄|4⋄ ⋄•⋄(⋄|
| 00 00 00 00 01 00 00 00 | 54 00 00 00 54 00 01 00 |⋄⋄⋄⋄•⋄⋄⋄|T⋄⋄⋄T⋄•⋄|
| 54 00 01 00 62 01 00 00 | 62 01 00 00 07 00 00 00 |T⋄•⋄b•⋄⋄|b•⋄⋄•⋄⋄⋄|
| 00 10 00 00 89 e0 50 e8 | 00 00 00 00 55 89 e5 53 |⋄•⋄⋄××P×|⋄⋄⋄⋄U××S|
| 57 56 83 ec 68 8b 45 08 | 8b 50 08 31 c0 8a 0c 02 |WV××h×E•|×P•1××_•|
| 84 c9 74 0d 80 c1 d0 88 | 0c 02 88 4c 05 8f 40 eb |××t_××××|_•×L•×@×|
| ec 8a 1a 31 c9 b7 03 89 | 55 ec 84 db 0f 84 cd 00 |×ו1×ו×|U××ו××⋄|
| 00 00 89 c8 89 d6 31 d2 | 6a 09 5f f7 f7 89 cf 89 |⋄⋄××××1×|j__×××××|
| 55 e4 29 d7 8d 14 3e 89 | 55 e8 89 7d e0 29 cf 6a |U×)×ו>×|U××}×)×j|
| f7 5e 85 f6 74 14 8d 14 | 37 83 fa f7 74 09 8b 55 |×^××t•ו|7×××t_×U|
| e8 3a 5c 32 09 74 76 46 | eb e8 8b 55 e4 03 55 ec |×:\2_tvF|×××UוU×|
| 6a af 5f 85 ff 74 10 83 | e8 01 72 06 3a 5c 3a 51 |j×_××t•×|וr•:\:Q|
| 74 5b 83 c7 09 eb ec 89 | c8 31 d2 6a 1b 5e f7 f6 |t[××_×××|×1×j•^××|
| 89 c2 0f b6 45 e4 f6 f7 | 0f b6 f4 6b c2 1b 8d 14 |×ו×E×××|•××kוו|
| 01 29 f2 8b 7d e0 29 fa | 01 f7 29 f8 31 f6 03 55 |•)××}×)×|•×)×1וU|
| ec 83 fe 03 74 46 89 75 | e8 6a fd 5f 85 ff 74 11 |××וtF×u|×j×_××t•|
| 8d 34 38 83 fe fd 74 06 | 3a 5c 3a 03 74 0f 47 eb |×48×××t•|:\:•t•G×|
| eb 8b 75 e8 46 83 c2 09 | 83 c0 09 eb d4 8b 55 ec |××u×F××_|××_×××U×|
| 80 7c 0d 8f 00 75 0e 8a | 1c 0a fe cb 88 1c 0a 0f |×|_×⋄u•×|•_××ו_•|
| 85 35 ff ff ff 85 c9 74 | 56 49 eb e4 8b 55 ec 80 |×5×××××t|VI×××U××|
| 3c 0a 00 74 08 41 83 f9 | 51 75 f4 eb 0b c6 04 0a |<_⋄t•A××|Qu×וו_|
| 09 b3 09 e9 12 ff ff ff | 6a af 5e 8d 4d f3 31 db |_×_ו×××|j×^×M×1×|
| 43 6a 09 5f 85 f6 74 27 | 8a 44 32 51 04 30 88 45 |Cj__××t'|×D2Q•0×E|
| f3 6a 04 58 89 da cd 80 | 4f 75 0e c6 45 f3 0a 6a |×j•X××××|Ou•×E×_j|
| 04 58 89 da cd 80 6a 09 | 5f 46 8b 55 ec eb d5 31 |•X××××j_|_F×U×××1|
| c0 40 31 db cd 80 | |×@1××× | |
+-------------------------+-------------------------+--------+--------+</code> | [] |
https://avatars.githubusercontent.com/u/126345041?v=4 | zterm | PaNDa2code/zterm | 2025-03-20T15:29:20Z | Cross compiled terminal emulator written in zig | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/PaNDa2code/zterm/tags | - | [
"cross-platform",
"linux",
"macos",
"terminal",
"windows",
"zig"
] | 118 | false | 2025-05-21T16:29:48Z | true | true | 0.14.0 | github | [
{
"commit": "7b434a47c2b85f395d8e5a6dca47af6a74422521",
"name": "zigwin32",
"tar_url": "https://github.com/marlersoft/zigwin32//archive/7b434a47c2b85f395d8e5a6dca47af6a74422521.tar.gz",
"type": "remote",
"url": "https://github.com/marlersoft/zigwin32/"
},
{
"commit": "a5b065dbdce02ea86c0... | 404 | [] |
https://codeberg.org/avatars/c5ff3705f467c933cd27a3b9a43bbf3c45c92fb6580ca6870a94f2fcffb6da4b | adbz | nitrogenez/adbz | 2024-11-17T14:32:37+01:00 | An adb client library for zig | main | 0 | 0 | 0 | 1 | - | [
"adb",
"adb-client",
"android",
"client",
"lib",
"library",
"utility-library",
"zig",
"zig-library",
"ziglang"
] | 35 | false | 2024-11-17T14:36:18+01:00 | false | false | unknown | codeberg | [] | 404 | [] | |
https://codeberg.org/avatars/b0bfc579a86b72a8b6631539660a4393 | advent_of_code | adept/advent_of_code | 2025-01-23T19:59:02+01:00 | Advent of code (https://adventofcode.com/) | main | 0 | 0 | 0 | 1 | - | [
"advent-of-code",
"adventofcode",
"aoc",
"factor",
"haskell",
"nix",
"nushell",
"rust",
"zig"
] | 561 | false | 2025-05-20T16:40:29+02:00 | false | false | unknown | codeberg | [] | 404 | [] | |
https://codeberg.org/avatars/ecb1523137217490b227822dda38e73aa370fda87997d19bd1c63cbcd7ae06ee | advent-of-code-zig | wackbyte/advent-of-code-zig | 2024-12-01T02:02:11+01:00 | Advent of Code solutions in Zig. | trunk | 0 | 0 | 0 | 1 | - | [
"advent-of-code",
"zig"
] | 127 | false | 2024-12-07T07:48:44+01:00 | false | false | unknown | codeberg | [] | 404 | [] | |
https://codeberg.org/avatars/cae688e192e2a9e45c79176a0cec214e | adventure-game | etgr/adventure-game | 2020-10-27T00:31:42+01:00 | A Pokemon-inspired game, a la Gen1. | trunk | 0 | 1 | 0 | 1 | - | [
"game",
"zig",
"pokemon"
] | 1,115 | false | 2024-12-03T05:12:13+01:00 | false | false | unknown | codeberg | [] | 404 | [] | |
https://codeberg.org/avatars/5a10312f410f207da165d36072e9da7b8c152320d104585111c0b70cca54765c | aoc2023 | hDS9HQLN/aoc2023 | 2023-12-01T17:40:34+01:00 | My solutions for advent of code 2023 | main | 0 | 0 | 0 | 1 | - | [
"zig",
"aoc",
"adventofcode",
"aoc-2023",
"adventofcode2023"
] | 117 | false | 2024-12-03T05:43:41+01:00 | false | false | unknown | codeberg | [] | 404 | [] | |
https://codeberg.org/avatars/b099a76b3be01fe5f8ee390f0aeade0e993d0cf3bc55cb95e9b31db5cb266d70 | awesome | edwinjhlee/awesome | 2025-05-16T16:05:21+02:00 | Rossetta Stone of Awesomeness | main | 0 | 0 | 0 | 1 | - | [
"awesome",
"deno",
"go",
"java",
"kotlin",
"node",
"python",
"rust",
"zig"
] | 102 | false | 2025-05-16T16:15:09+02:00 | false | false | unknown | codeberg | [] | 404 | [] | |
https://codeberg.org/avatars/f2b22254d5ca3a741a1de61a088b536773100cf05393146155ee5897d660dc30 | backutil | AlxFG/backutil | 2024-06-14T19:36:41+02:00 | backlight utility | master | 0 | 0 | 0 | 1 | - | [
"backlight",
"linux",
"zig"
] | 38 | false | 2024-06-15T10:23:26+02:00 | true | false | unknown | codeberg | [] | 404 | [] | |
https://codeberg.org/avatars/6cefaa64249b4d33eee4bcd41bb5d7979b4b6852c2c8239e2565ad5dc8f257e4 | blockly-zig-nuttx | lupyuen/blockly-zig-nuttx | 2022-08-13T15:44:05+02:00 | Visual Programming for Zig with NuttX Sensors | master | 0 | 1 | 1 | 1 | - | [
"bl604",
"zig",
"nuttx",
"bl602",
"pinedio",
"pinecone",
"riscv32",
"sensor",
"bme280",
"blockly",
"visualprogramming"
] | 125,399 | false | 2024-12-03T05:24:02+01:00 | false | false | unknown | codeberg | [] | 404 | [] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.