avatar_url
stringlengths 46
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 45
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 0
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 60
values | repo_from
stringclasses 3
values | dependencies
listlengths 0
121
| readme_content
stringlengths 0
437k
| dependents
listlengths 0
21
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
https://avatars.githubusercontent.com/u/1916079?v=4 | zig-cassandra | vrischmann/zig-cassandra | 2020-03-22T18:39:13Z | Cassandra CQL client | master | 1 | 12 | 0 | 12 | https://api.github.com/repos/vrischmann/zig-cassandra/tags | MIT | [
"cassandra",
"cassandra-client",
"zig"
]
| 1,004 | false | 2025-03-05T12:13:39Z | true | true | 0.14.0 | github | [
{
"commit": "master",
"name": "lz4",
"tar_url": "https://github.com/allyourcodebase/lz4/archive/master.tar.gz",
"type": "remote",
"url": "https://github.com/allyourcodebase/lz4"
},
{
"commit": "master",
"name": "linenoise",
"tar_url": "https://codeberg.org/raddari/zig-linenoise/archive/master.tar.gz",
"type": "remote",
"url": "https://codeberg.org/raddari/zig-linenoise"
},
{
"commit": "master",
"name": "snappy",
"tar_url": "https://github.com/vrischmann/snappy/archive/master.tar.gz",
"type": "remote",
"url": "https://github.com/vrischmann/snappy"
}
]
| zig-cql
This is a CQL (the native protocol used by Cassandra) implementation in Zig.
License
See the <code>LICENSE</code> file. | []
|
https://avatars.githubusercontent.com/u/34610?v=4 | zigmmverify | marnix/zigmmverify | 2020-06-27T08:25:41Z | null | zig-master | 0 | 11 | 0 | 11 | https://api.github.com/repos/marnix/zigmmverify/tags | - | [
"metamath",
"proof-assistant",
"proof-automation",
"proofs",
"verifier",
"zig",
"ziglang"
]
| 256 | false | 2023-06-08T23:28:26Z | true | false | unknown | github | []
| <em>Note that this branch is built using nightly 'master' zig.
The more actively developed branch is
<a>zig-0.9.x</a>.
Changes are periodically merged from there to this branch.</em>
<a></a>
A <a>Metamath</a> proof verifier in <a>Zig</a>
At least, the beginnings of one.
This is partly to learn Zig,
partly to have a fast verifier that I can hack
(Python is way too slow, Rust is too weird for me still, Nim seems less clean, C is out),
so that I can perhaps one day try to do experiments around
parsing (where parse tree of <code>X...</code> is proof of <code>|- TOPLEVEL X...</code> ),
abbreviations,
and modules.
How to build and run
Build using Zig master, then just run the resulting binary,
passing a single .mm file on the command line.
For example, use set.mm, which you can get from metamath.org,
or download the most recent version directly from GitHub:
https://github.com/metamath/set.mm/raw/develop/set.mm.
The version of the Metamath specification that was implemented, is
the one from the 2nd edition Metamath book.
(Norman D. Megill, David A. Wheeler,
"Metamath: A Computer Language for Mathematical Proofs".
Lulu Press, 2019.
http://us.metamath.org/downloads/metamath.pdf .)
Next tasks
Verifier completeness:
<ul>
<li>
Verify that 'normal' tokens don't start with <code>$</code>,
label tokens use only allowed characters, etc.
</li>
<li>
Support <code>?</code> in proofs.
</li>
</ul>
Clean up:
<ul>
<li>
Clean-up / refactor RuleIterator + ScopeDiff:
Add methods, move functionality between these structs.
Also encapsulate some parts.
Also try to avoid duplication in statement handling.
</li>
<li>
Work towards a library that can also be used for $a/$p/$e parse trees.
</li>
</ul>
Functionality:
<ul>
<li>Generate a parse tree for every $a/$p/$e statement.
If possible/feasible, check that it is the only possible parse tree.
Try to also support 'conditional syntax rules,
so e.g. <code>${ $e -. B = 0 $. $a class ( A / B ) $. $}</code> which expresses that
<code>A / B</code> is only a syntactically valid expression if <code>B</code> is not zero.</li>
</ul>
Verifier performance:
<ul>
<li>
Optimize performance by reducing memory use:
A token is currently represented by a Zig slice (= pointer and a length),
and this could be replaced by a single small(ish) integer
by 'interning' all tokens.
</li>
<li>
Optimize performance by parallelizing using Zig <code>async</code>.
</li>
<li>
Optimize performance by reducing memory use:
I suspect ArrayList is not the right data structure for some of the lists.
</li>
</ul>
Verifier tests:
<ul>
<li>
Run the test suite from https://github.com/david-a-wheeler/metamath-test
probably by checking it out as a Git submodule
and using the zig-mm-verify binary as the approved-or-not judge.
</li>
<li>
(Separate project.) Extend that test suite, to capture as many as possible
deviations from the specification as possible.
</li>
</ul>
Verifier usability:
<ul>
<li>
Identify the location (line/column) of at least the first error.
</li>
<li>
Don't use 'error union' for Metamath verification errors.
</li>
</ul>
Language dialects:
<ul>
<li>Optional modes where $c/$v is allowed to be duplicated
(useful to create set-parsed.mm which declares stuff before <code>$[ set.mm $]</code>);
where $f implicitly does $c/$v;
and perhaps more.</li>
</ul> | []
|
https://avatars.githubusercontent.com/u/3932972?v=4 | zig-uri | ikskuh/zig-uri | 2020-05-15T16:00:29Z | A small URI parser that parses URIs after RFC3986 | master | 1 | 11 | 2 | 11 | https://api.github.com/repos/ikskuh/zig-uri/tags | MIT | [
"uri-parser",
"zig",
"zig-package",
"ziglang"
]
| 21 | false | 2024-03-25T21:15:01Z | false | false | unknown | github | []
| Zig URI Parser
A small URI parser that parses URIs after <a>RFC3986</a>.
<blockquote>
<strong>NOTICE: THIS LIBRARY IS DEPRECATED!</strong>
This library is now part of zig <code>std</code> library, available as <code>std.Uri</code> since <a>87b2234</a>.
</blockquote>
Usage Example
<code>zig
var link = try uri.parse("https://github.com/MasterQ32/zig-uri");
// link.scheme == "https"
// link.host == "github.com"
// link.path == "/MasterQ32/zig-uri"</code> | []
|
https://avatars.githubusercontent.com/u/14790226?v=4 | vmt | chivay/vmt | 2020-07-26T19:23:28Z | Toy OS written in Zig | master | 0 | 10 | 0 | 10 | https://api.github.com/repos/chivay/vmt/tags | MIT | [
"kernel",
"osdev",
"zig"
]
| 340 | false | 2025-04-23T12:09:42Z | true | false | unknown | github | []
| vmt
Toy OS written in Zig ;)
Requires Zig>=0.9.0.
Contribute
Send your patches to <code>~chivay/[email protected]</code>
How to
<code>bash
$ zig build qemu
[Info] x86: CPU Vendor: GenuineIntel
[Info] x86: Booting the kernel...
[Info] x86.mm: BIOS memory map:
[Info] x86.mm: [0000000000-000009fbff] Available
[Info] x86.mm: [000009fc00-000009ffff] Reserved
[Info] x86.mm: [00000f0000-00000fffff] Reserved
[Info] x86.mm: [0000100000-003ffdefff] Available
[Info] x86.mm: [003ffdf000-003fffffff] Reserved
[Info] x86.mm: [00b0000000-00bfffffff] Reserved
[Info] x86.mm: [00fed1c000-00fed1ffff] Reserved
[Info] x86.mm: [00feffc000-00feffffff] Reserved
[Info] x86.mm: [00fffc0000-00ffffffff] Reserved
[Info] x86.mm: Detected 1022MiB of free memory
[Info] kernel.mm: VirtualAddress{ffff800000000000} -> PhysicalAddress{0} (0x40000000 bytes)
[Info] kernel.mm: VirtualAddress{ffffffff80000000} -> PhysicalAddress{0} (0x200000 bytes)
[Info] x86.mm: Memory subsystem initialized
[Info] x86.trampoline: Initializing trampolines
[Info] x86.acpi: Initializing ACPI
[Info] x86.acpi: Valid RSDP found
[Info] x86.acpi: Found table FACP
[Info] x86.acpi: Found table APIC
[Info] x86.acpi: Found table HPET
[Info] x86.acpi: Found table MCFG
[Info] x86.acpi: Found table WAET
[Info] x86.apic: Initializing APIC
[Info] x86.apic: LAPIC is at PhysicalAddress{fee00000}
[Info] x86.apic: LAPIC ID 0
[Info] x86.pci: Initializing PCI
[Info] x86.pci: 00.00.0 Device 8086:29c0
[Info] x86.pci: 00.01.0 Device 1234:1111
[Info] x86.pci: 00.02.0 Device 8086:10d3
[Info] x86.pci: 00.1f.0 Device 8086:2918
[Info] x86.pci: 00.1f.2 Device 8086:2922
[Info] x86.pci: 00.1f.3 Device 8086:2930
[Info] x86.smp: Performing AP startup code relocation
[Info] x86.smp: CPU1 up
[Info] x86.smp: CPU2 up
....</code> | []
|
https://avatars.githubusercontent.com/u/4252848?v=4 | otp | Luukdegram/otp | 2020-04-26T17:33:03Z | Simple, basic OTP library written in Zig. | master | 0 | 10 | 3 | 10 | https://api.github.com/repos/Luukdegram/otp/tags | MIT | [
"one-time-password",
"otp",
"otpauth",
"zig",
"ziglang"
]
| 23 | false | 2024-05-18T05:42:49Z | true | false | unknown | github | []
|
OTP
OTP is a one-time-password library supporting both HOTP and TOTP according to <a><code>RFC 4226</code></a> and <a><code>RFC 6238</code></a>.
Currently only the generation of codes is supported. Verification has to be done by the implementation.
<strong>note</strong>
This library's primary goal was to get more familair with the Zig language.
Example
```zig
const std = @import("std");
const otp = @import("otp");
const warn = std.debug.warn;
pub fn main() !void {
const hotp = otp.Hotp.init();
const code = try hotp.generateCode("secretkey", 0);
warn("code: {}\n", .{code});
}
<code>``
You can use the</code>build.zig` file as reference point on how to link the library to your own project.
Tests
You can run the tests using the following command
<code>shell
zig build</code> | []
|
https://avatars.githubusercontent.com/u/12723818?v=4 | zig-pixman | ifreund/zig-pixman | 2020-10-13T20:09:31Z | [mirror] Zig bindings for pixman | master | 0 | 10 | 4 | 10 | https://api.github.com/repos/ifreund/zig-pixman/tags | MIT | [
"pixman",
"zig"
]
| 43 | false | 2025-04-15T10:52:21Z | true | true | 0.14.0 | github | []
| zig-pixman
<a>zig</a> 0.14 bindings for
<a>pixman</a> that are a little
nicer to use than the output of <code>zig translate-c</code>.
The main repository is on <a>codeberg</a>,
which is where the issue tracker may be found and where contributions are accepted.
Read-only mirrors exist on <a>sourcehut</a>
and <a>github</a>.
Versioning
For now, zig-pixman versions are of the form <code>0.major.patch</code>. A major version
bump indicates a zig-pixman release that breaks API or requires a newer Zig
version to build. A patch version bump indicates a zig-pixman release that is
fully backwards compatible.
For unreleased versions, the <code>-dev</code> suffix is used (e.g. <code>0.1.0-dev</code>).
The version of zig-pixman currently has no direct relation to the upstream
pixman version supported.
Breaking changes in zig-pixman's API will be necessary until a stable Zig 1.0
version is released, at which point I plan to switch to a new versioning scheme
and start the version numbers with <code>1</code> instead of <code>0</code>. | [
"https://github.com/riverwm/river"
]
|
https://avatars.githubusercontent.com/u/265903?v=4 | zdwg | alexnask/zdwg | 2020-04-30T15:57:41Z | Read, manipulate, write AutoCad DWG files in zig | master | 0 | 9 | 2 | 9 | https://api.github.com/repos/alexnask/zdwg/tags | - | [
"autocad",
"dwg",
"zig",
"zig-library"
]
| 86 | false | 2025-01-13T15:55:32Z | true | false | unknown | github | []
| 404 | []
|
https://avatars.githubusercontent.com/u/74373851?v=4 | hello-triangle | zig-community/hello-triangle | 2020-12-13T10:33:50Z | Opens a window and draws a nice little triangle | main | 0 | 9 | 2 | 9 | https://api.github.com/repos/zig-community/hello-triangle/tags | - | [
"example",
"opengl",
"tutorial",
"zig",
"ziglang"
]
| 32 | false | 2025-02-18T03:56:02Z | true | false | unknown | github | []
| Hello Triangle (OpenGL)
Opens a window and draws a nice little triangle with OpenGL 3.3.
Building
Checkout all submodules, then use <code>zig</code> to build the example.
<code>sh
git clone https://github.com/zig-community/hello-triangle --recursive
cd hello-triangle
zig build run # builds the example and runs it</code>
Dependencies
This project depends on the awesome <a>Zig Window Library (ZWL)</a> by @Aransentin.
Supported Platforms
Right now, ZWL only supports <em>Linux</em> and <em>Windows</em>. No support for <em>MacOS</em> at the moment. | []
|
https://avatars.githubusercontent.com/u/41671631?v=4 | ziglearn-cn | glepnir/ziglearn-cn | 2020-09-17T05:17:22Z | zig programming language tutorial | master | 0 | 8 | 2 | 8 | https://api.github.com/repos/glepnir/ziglearn-cn/tags | MIT | [
"zig",
"zig-programming-language"
]
| 11 | false | 2025-04-25T19:02:54Z | false | false | unknown | github | []
| zig-tutorial
zig 编程语言入门教程
目录
<ul>
<li><a>引言</a></li>
<li><a>基本类型</a></li>
</ul> | []
|
https://avatars.githubusercontent.com/u/65570835?v=4 | zig-windows-console | ziglibs/zig-windows-console | 2021-01-06T03:04:07Z | Zig Windows Console stuff | main | 0 | 8 | 1 | 8 | https://api.github.com/repos/ziglibs/zig-windows-console/tags | MIT | [
"console-application",
"windows-console",
"zig",
"zig-package",
"ziglang"
]
| 53 | false | 2025-01-02T01:39:20Z | true | false | unknown | github | []
| zig-windows-console
Tools for all your Zig + Windows Console needs!
Usage
Add this to your <code>build.zig</code> and check out <code>examples/events.zig</code> for a quick, 5 minute primer.
Try It!
```bash
Build it!
zig build demo
``` | []
|
https://avatars.githubusercontent.com/u/380158?v=4 | zig-buildpack | frmdstryr/zig-buildpack | 2020-04-01T11:51:46Z | A buildpack to deploy zig projects on Heroku / Dokku | master | 0 | 8 | 2 | 8 | https://api.github.com/repos/frmdstryr/zig-buildpack/tags | MIT | [
"buildpack",
"dokku",
"heroku",
"zig"
]
| 9 | false | 2025-01-13T21:28:15Z | false | false | unknown | github | []
| Zig Buildpack
This is a Buildpack for <a>Zig</a>, the general-purpose
programming language and toolchain for maintaining robust, optimal, and
reusable software.
This buildpack is for building a zig project and deploying using heroku or
similar platforms.
Usage and files needed
A <code>build.zig</code> file is needed. This is a standard zig build file except
it must contain a line with the following comment:
<code>zig
// zig-release: zig-linux-x86_64-<version-string+hash>.tar.xz</code>
The buildpack looks for <code>// zig-release:</code> and uses whatever follows to determine
which version of zig to download and extract (see bin/steps/zig_compile).
The supported zig builds are the ones in <a>this list</a>.
If the repo contains a <code>prebuild.zig</code> file in the repository root, that
will be run before building (eg to download files/repos needed).
It will run then run <code>zig build</code> and the rest is up to the <code>Procfile</code>.
Example
An example <code>build.zig</code> shows how to define the zig version runtime.
```zig
// This tells the buildpack which version to install
// zig-release: zig-linux-x86_64-0.5.0+9e019ed26.tar.xz
const Builder = @import("std").build.Builder;
pub fn build(b: *Builder) void {
const exe = b.addExecutable("zhttpd", "main.zig");
exe.setBuildMode(.ReleaseSafe);
const run_cmd = exe.run();
<code>const run_step = b.step("run", "Run the app");
run_step.dependOn(&run_cmd.step);
b.default_step.dependOn(&exe.step);
b.installArtifact(exe);
</code>
}
``` | []
|
https://avatars.githubusercontent.com/u/124872?v=4 | zig-alzette | jedisct1/zig-alzette | 2020-08-18T16:46:53Z | Implementation of the Alzette box and the CRAX block cipher in Zig. | master | 0 | 8 | 1 | 8 | https://api.github.com/repos/jedisct1/zig-alzette/tags | - | [
"alzette",
"crax",
"crypto",
"cryptography",
"lightweight",
"trax",
"zig",
"zig-package",
"ziglang"
]
| 6 | false | 2024-10-25T08:42:12Z | true | false | unknown | github | []
| zig-alzette
Implementation of the Alzette box and CRAX block cipher in Zig.
References
<ul>
<li><a>Alzette: a 64-bit ARX-box</a></li>
</ul> | []
|
https://avatars.githubusercontent.com/u/7270159?v=4 | glob | mattnite/glob | 2021-01-19T05:00:15Z | small library for globing file paths | main | 0 | 7 | 5 | 7 | https://api.github.com/repos/mattnite/glob/tags | MIT | [
"filesystem",
"zig",
"zig-package"
]
| 7 | false | 2023-11-28T15:41:07Z | true | false | unknown | github | []
| glob
small library for globing file paths | []
|
https://avatars.githubusercontent.com/u/61620631?v=4 | HelloWorld | R4356th/HelloWorld | 2020-04-19T09:41:13Z | A collection of code to print out "Hello World!" in different languages. Contributions are very much welcome. | main | 1 | 7 | 22 | 7 | https://api.github.com/repos/R4356th/HelloWorld/tags | GPL-3.0 | [
"beginner-code",
"beginner-friendly",
"contribute",
"contribute-here",
"contributions-welcome",
"good-first-issue",
"hello-world",
"help-wanted",
"javascript",
"learn-to-code",
"learn-to-contribute",
"looking-for-contributors",
"pr-welcome",
"up-for-grabs",
"zig"
]
| 92 | false | 2025-04-11T17:47:59Z | false | false | unknown | github | []
| Hello World!
This repository contains a collection of code in different languages to print out "Hello World!", printing out which has been a programming convention since 1978. You can read <a>this article on Wikipedia</a> to learn more about the convention. | []
|
https://avatars.githubusercontent.com/u/13420428?v=4 | Hazel-OS | IridescenceTech/Hazel-OS | 2020-10-18T08:34:59Z | An x86-64 OS in Zig! | edge | 0 | 7 | 1 | 7 | https://api.github.com/repos/IridescenceTech/Hazel-OS/tags | AGPL-3.0 | [
"operating-system",
"zig"
]
| 37 | false | 2023-08-02T15:51:29Z | true | false | unknown | github | []
| 404 | []
|
https://avatars.githubusercontent.com/u/65322356?v=4 | zpm-server | zigtools/zpm-server | 2020-10-03T11:24:35Z | Open API Server providing a filterable list of curated Zig packages | master | 0 | 7 | 5 | 7 | https://api.github.com/repos/zigtools/zpm-server/tags | - | [
"api",
"package",
"package-manager",
"webserver",
"zig",
"ziglang",
"zkg",
"zpm"
]
| 33 | false | 2025-04-03T09:45:24Z | true | false | unknown | github | []
| 404 | []
|
https://avatars.githubusercontent.com/u/12070598?v=4 | wasm-counter | rvcas/wasm-counter | 2020-04-09T01:11:06Z | Simple Counter using React and Zig | master | 2 | 7 | 0 | 7 | https://api.github.com/repos/rvcas/wasm-counter/tags | - | [
"parcel-bundler",
"react",
"zig"
]
| 280 | false | 2023-01-28T12:51:41Z | false | false | unknown | github | []
| WASM Counter
A super simple React component that increments a count on an interval.
The cool part is that the function used to increment the count is written in
<a>zig</a>. <a>Parcel</a> handles the instantiation of the
WebAssembly module so the DX is as simple as directly importing <code>.wasm</code> files into your JavaScript.
Running
You'll need <a>yarn</a> and
<a>zig</a>
installed.
<ul>
<li><code>yarn install</code></li>
<li><code>yarn start</code></li>
</ul> | []
|
https://avatars.githubusercontent.com/u/2567177?v=4 | zig-amqp | malcolmstill/zig-amqp | 2020-10-28T02:34:40Z | AMQP 0.9.1 library for Zig | master | 7 | 6 | 4 | 6 | https://api.github.com/repos/malcolmstill/zig-amqp/tags | BSD-3-Clause | [
"amqp",
"amqp0-9-1",
"zig"
]
| 184 | false | 2025-02-11T16:35:45Z | true | true | unknown | github | []
| zig-amqp
<strong>AMQP 0.9.1 library for Zig</strong>
About
<code>zig-amqp</code> is a <a>Zig</a> library for writing AMQP 0.9.1 clients (and servers), letting zig programs to connect to, for example, <a>RabbitMQ</a>.
How to use
See <a>the examples</a> for an idea of how to use the library.
The simplest program is probably a simple declare and publish:
```zig
const std = @import("std");
const amqp = @import("amqp");
var rx_memory: [4096]u8 = undefined;
var tx_memory: [4096]u8 = undefined;
pub fn main() !void {
var conn = amqp.init(rx_memory[0..], tx_memory[0..]);
const addr = try std.net.Address.parseIp4("127.0.0.1", 5672);
try conn.connect(addr);
<code>var ch = try conn.channel();
_ = try ch.queueDeclare("simple_publish", .{}, null);
try ch.basicPublish("", "simple_publish", "hello world", .{});
</code>
}
```
Status
The project is alpha with only basic functionality working and almost certainly is not
ready for you to use. Contributions welcome and I can prioritise features that people
require.
Goals
<ul>
<li>Easy to use API</li>
<li>Simple / clean code</li>
<li>Minimal allocations / customisable allocation</li>
<li>Fast</li>
</ul>
Dependencies
Runtime
<ul>
<li>None...and the binaries are small (other than a server to speak to)</li>
</ul>
<code>➜ zig-amqp git:(master) ✗ zig build-exe src/example.zig -O ReleaseSafe --strip
➜ zig-amqp git:(master) ✗ ldd example
not a dynamic executable
➜ zig-amqp git:(master) ✗ ls -l example
-rwxr-xr-x. 1 malcolm malcolm 44872 Dec 20 04:26 example</code>
Build
<ul>
<li>A zig compiler (tested on at least 0.13.0)</li>
</ul>
Regenerating <code>src/protocol.zig</code>
<ul>
<li>python 3</li>
</ul> | []
|
https://avatars.githubusercontent.com/u/39484230?v=4 | zervo | zenith391/zervo | 2020-11-14T15:32:19Z | Zig Geminispace browser | master | 1 | 6 | 1 | 6 | https://api.github.com/repos/zenith391/zervo/tags | MIT | [
"gemini",
"zig"
]
| 63,648 | false | 2021-11-09T16:41:11Z | true | false | unknown | github | []
| Zervo
Zig <a>Gemini</a> browser. | []
|
https://avatars.githubusercontent.com/u/3768010?v=4 | advent-of-code | ManDeJan/advent-of-code | 2020-12-01T15:16:33Z | Advent of Code solutions | master | 0 | 6 | 0 | 6 | https://api.github.com/repos/ManDeJan/advent-of-code/tags | MIT | [
"advent-of-code",
"advent-of-code-2015",
"advent-of-code-2020",
"advent-of-code-2021",
"advent-of-code-2022",
"template",
"zig"
]
| 489 | false | 2024-12-03T21:42:32Z | true | false | unknown | github | []
| Advent of Code solutions
In zig, cause we gotta go fast B)
Run code with <code>zig build run -Doptimize=ReleaseFast</code>
Timings
Measurements are taken from an average of 100 runs on my Ryzen 5950x processor
(~4.2GHz) I compile everything with -OReleaseFast
Every day is programmed as a function that receives a string and returns a pair
of ints. This is what is measured, I decided not to include file I/O in the benchmarks because it causes a lot of variance and is not very interesting (imho) to optimize.
Results
<code>┌─────────┐
│Year 2015│
├───┬─────┴──────────┬────────────────┬──────────────┐
│Day│ Part 1 │ Part 2 │ Time │
│ 1│ 74 │ 1795 │ 3.590 μs│
│ 2│ 1586300 │ 3737498 │ 45.780 μs│
│ 3│ 2592 │ 2360 │ 314.540 μs│
│ 4│ 117946 │ 3938038 │ 371379.340 μs│
│ 5│ 258 │ 53 │ 113.550 μs│
└───┴────────────────┴──────┬─────────┼─────────── + ┤
│Year time│ 371856.800 μs│
└─────────┴──────────────┘
┌─────────┐
│Year 2016│
├───┬─────┴──────────┬────────────────┬──────────────┐
│Day│ Part 1 │ Part 2 │ Time │
│ 1│ 239 │ 141 │ 5.160 μs│
└───┴────────────────┴──────┬─────────┼─────────── + ┤
│Year time│ 5.160 μs│
└─────────┴──────────────┘
┌─────────┐
│Year 2020│
├───┬─────┴──────────┬────────────────┬──────────────┐
│Day│ Part 1 │ Part 2 │ Time │
│ 1│ 719796 │ 144554112 │ 2.600 μs│
│ 2│ 460 │ 251 │ 16.530 μs│
│ 3│ 265 │ 3154761400 │ 1.250 μs│
│ 4│ 170 │ 103 │ 35.890 μs│
│ 5│ 926 │ 657 │ 2.320 μs│
│ 6│ 6596 │ 3219 │ 25.130 μs│
│ 7│ 119 │ 155802 │ 41.620 μs│
│ 8│ 2051 │ 2304 │ 32.890 μs│
│ 9│ 85848519 │ 13414198 │ 45.410 μs│
│ 10│ 2400 │338510590509056 │ 1.000 μs│
└───┴────────────────┴──────┬─────────┼─────────── + ┤
│Year time│ 204.640 μs│
└─────────┴──────────────┘
┌─────────┐
│Year 2021│
├───┬─────┴──────────┬────────────────┬──────────────┐
│Day│ Part 1 │ Part 2 │ Time │
│ 1│ 1387 │ 1362 │ 36.900 μs│
│ 2│ 1488669 │ 1176514794 │ 5.260 μs│
│ 3│ 3969000 │ 4267809 │ 97.190 μs│
│ 4│ 49686 │ 26878 │ 88.490 μs│
│ 5│ 9723 │ 22116 │ 137.990 μs│
│ 6│ 388419 │ 1740449478328 │ 0.660 μs│
│ 7│ 343605 │ 96744904 │ 23.100 μs│
│ 8│ 284 │ 973499 │ 19.510 μs│
│ 9│ 518 │ 0 │ 2.940 μs│
└───┴────────────────┴──────┬─────────┼─────────── + ┤
│Year time│ 412.040 μs│
└─────────┴──────────────┘
┌─────────┐
│Year 2022│
├───┬─────┴──────────┬────────────────┬──────────────┐
│Day│ Part 1 │ Part 2 │ Time │
│ 1│ 74711 │ 209481 │ 31.660 μs│
│ 2│ 11063 │ 10349 │ 2.500 μs│
│ 3│ 7737 │ 2697 │ 24.000 μs│
│ 5│ HBTMTBSDC │ PQTJRSHWS │ 25.430 μs│
│ 6│ 1042 │ 2980 │ 3.560 μs│
│ 7│ 1477771 │ 3579501 │ 17.320 μs│
│ 9│ 6284 │ 2661 │ 413.440 μs│
│ 10│ 12880 │ FCJAPJRE │ 1.080 μs│
│ 11│ 110220 │ 19457438264 │ 2587.290 μs│
│ 12│ 481 │ 480 │ 21.760 μs│
└───┴────────────────┴──────┬─────────┼─────────── + ┤
│Year time│ 3128.040 μs│
└─────────┴──────────────┘
┌─────────┐
│Year 2023│
├───┬─────┴──────────┬────────────────┬──────────────┐
│Day│ Part 1 │ Part 2 │ Time │
│ 1│ 54239 │ 55524 │ 44.530 μs│
│ 2│ 2268 │ 63542 │ 14.850 μs│
│ 3│ 528819 │ 80403602 │ 85.880 μs│
│ 4│ 21105 │ 5329815 │ 2.600 μs│
│ 6│ 503424 │ 32607562 │ 0.170 μs│
│ 7│ 250602641 │ 251037509 │ 49.070 μs│
└───┴────────────────┴──────┬─────────┼─────────── + ┤
│Year time│ 197.100 μs│
└─────────┴──────────────┘
┌─────────┐
│Year 2024│
├───┬─────┴──────────┬────────────────┬──────────────┐
│Day│ Part 1 │ Part 2 │ Time │
│ 1│ 1722302 │ 20373490 │ 38.833 μs│
│ 2│ 332 │ 398 │ 54.226 μs│
│ 3│ 153469856 │ 77055967 │ 20.955 μs│
└───┴────────────────┴──────┬─────────┼─────────── + ┤
│Year time│ 114.014 μs│
└─────────┴──────────────┘</code>
| []
|
https://avatars.githubusercontent.com/u/30749142?v=4 | advent-of-code | DearRude/advent-of-code | 2020-12-07T21:19:57Z | Solutions to Advent Of Code | main | 0 | 6 | 0 | 6 | https://api.github.com/repos/DearRude/advent-of-code/tags | GPL-3.0 | [
"advent-of-code",
"go",
"julialang",
"zig"
]
| 225 | false | 2024-12-15T23:30:04Z | false | false | unknown | github | []
| Advent of Code
2020
I was doing this as an incentive to learn Julia. Feel free to criticize my code.
2021
I'm doing this year as an incentive to learn Zig. I'll try to solve in both Julia and Zig.
2024
This year I'm trying to learn a bit JavaScript and solve in it (sadly) | []
|
https://avatars.githubusercontent.com/u/10237796?v=4 | ztor | iansimonson/ztor | 2020-09-27T10:05:46Z | A (partial) bittorrent client in zig | master | 0 | 6 | 1 | 6 | https://api.github.com/repos/iansimonson/ztor/tags | NOASSERTION | [
"bittorrent",
"libuv",
"zig"
]
| 113 | false | 2024-12-14T09:57:31Z | true | false | unknown | github | []
| ZTOR
Zig BitTorrent Client
A small but slightly more than non-trivial program written in Zig.
This was mostly an experiment in using zig with a c event-loop library and callback-based appraoch. A number of
useful zig features, such as errors, can't be used due to the C abi boundary being pervasive.
I do not recommend using this code as a good example as there are no tests and currently I've thrown a lot of it together in one place. But if it helps then go for it.
The torrent file is for the <a>debian net install image</a> which was used because
A. debian has seeders so we probably don't have to worry about being choked all the time, and
B. it's a single file torrent so no need to deal with directories and multiple files.
Build
This program depends on a number of modules and builds both http_parser and libuv.
<code>git clone --recursive https://github.com/iansimonson/ztor.git
cd ztor
zig build</code>
Plan
<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> Connect to tracker and download peer info
<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> Parse .torrent into tree
<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> Find announce url
<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> Connect and download peer list
<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> Establish connections to peers
<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> Construct peer connection info per peer
<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> Only download on unchoke
<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> Use <code>uv_get_handle</code> rather than the members
<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 N .torrent files at once
<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> Don't shutdown after a file is done downloading
<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> Implement upload and answering requests
<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> Send <code>have</code> messages to all peers on download
<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> If <code>have</code> send piece on request
<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> provide mechanism to get non-owning immutable slice to piece
<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 server for incoming connections
<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> Upload throttled amount of data
<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> Send bitfield on new incoming connections
<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 invalid threshold
<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> After x amount of invalid pieces close connection to peer
<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> Throttle data speeds
<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>Token Bucket</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> Upload throttle
<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> Download throttle
<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 imgui (or similar) for handling torrents in GUI mode
Additional TODO:
<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> Build libuv in build.zig
<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> Move from libuv to native zig async/await
<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> Abstract away libuv
<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 non-compact peer list
<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> Confirm peer_ids
<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 uTP protocol rather than using TCP
<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 UDP tracker protocol (BEP 015)
<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> SSL/TLS 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> Watch a folder for <code>.torrent</code> files
<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> Other BEPs?
<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> Make the Torrent Lexer work with Reader/Writer
Relevant links
Prior to this I only knew how torrents worked conceptually. How to implement a torrent downloader was way outside what I knew. The following are relevant links when learning:
<ul>
<li><a>Building a BitTorrent client from the ground up in go</a></li>
<li><a>BitTorrent protocol</a></li>
<li><a>BitTorrent.org</a></li>
<li><a>Basics of Libuv</a></li>
</ul> | []
|
https://avatars.githubusercontent.com/u/13669835?v=4 | zig-gap-buffer | lukewilson2002/zig-gap-buffer | 2020-06-09T15:57:26Z | A gap buffer implementation for Zig. | master | 0 | 5 | 0 | 5 | https://api.github.com/repos/lukewilson2002/zig-gap-buffer/tags | MIT | [
"allocation",
"cursor",
"data-structures",
"gap-buffers",
"text-editor",
"zig",
"zig-package"
]
| 19 | false | 2023-12-29T19:41:26Z | true | false | unknown | github | []
| Zig Gap Buffer
A gap buffer implementation for Zig, designed to be idiomatic. The design of this code is styled after the standard library.
Feel free to just copy the gap-buffer.zig source file to your project if you'd rather.
What is a Gap Buffer?
A <a>gap buffer</a> is like a growable array, but the reserved space is in the middle of the data, separating two sides, as opposed to being fixed at the end. This data structure is efficient for inserting and deleting data in close proximity. Gap buffers are commonly used in text editors as a simpler method than, say, <a>ropes</a>.
On each side of the gap is a string. The gap of the gap buffer should be at the same location as the cursor in the text editor. When the cursor moves, the gap moves. Moving the cursor causes no allocation because it is moving data from the right side of the gap to the left side. Inserting text appends to the data on the left side, shrinking the gap. Deleting text grows the gap. When data inserted exceeds the gap size, more space is allocated.
Gap buffers are not efficient for large files. For more information, see <a>the Gap Buffer Wikipedia article</a>.
Examples
There are several examples of usage in the test section at the bottom of the <code>gap-buffer.zig</code> source file.
But basically, here's your getting started:
```zig
const std = @import("std");
const GapBuffer = @import("gap-buffer").GapBuffer;
pub fn main() void {
// Whatever allocator you wish to use ...
var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator);
defer arena.deinit();
<code>var gb = try GapBuffer.init(&arena.allocator, "");
// defer gb.deinit(); // Arena frees data automatically
// Insert some text into the currently empty buffer
try gb.insert("some text", .{ .line = 0, .col = 0 });
var text = try gb.toSlice(&arena.allocator); // Don't forget to free the string
std.debug.warn("{}\n", .{text}); // "some text"
</code>
}
``` | []
|
https://avatars.githubusercontent.com/u/59506423?v=4 | jemalloc-zig | protheory8/jemalloc-zig | 2020-07-30T17:34:31Z | Implementation of std.mem.Allocator that wraps Jemalloc. | master | 0 | 5 | 0 | 5 | https://api.github.com/repos/protheory8/jemalloc-zig/tags | MIT | [
"allocator",
"jemalloc",
"zig",
"ziglang"
]
| 25 | false | 2023-03-25T00:33:57Z | true | false | unknown | github | []
| jemalloc-zig
Implementation of <code>std.mem.Allocator</code> interface that wraps Jemalloc.
Works on master builds of Zig.
Example usage
Use this library as a Zig library (<a>instructions here</a>) and then add something like this to your root source file:
```zig
const jemalloc_zig = @import("jemalloc-zig");
const gpa = jemalloc_zig.jemalloc_allocator;
pub fn main() !void {
const memory = try gpa.alloc(i32, 1);
memory[0] = 12;
gpa.free(memory);
}
``` | []
|
https://avatars.githubusercontent.com/u/65570835?v=4 | wavefront-obj | ziglibs/wavefront-obj | 2020-11-20T12:56:23Z | A parser for wavefront object files | main | 0 | 5 | 2 | 5 | https://api.github.com/repos/ziglibs/wavefront-obj/tags | MIT | [
"3d-format",
"wavefront-obj",
"zig",
"zig-package",
"ziglang"
]
| 24 | false | 2025-01-15T21:34:10Z | false | false | unknown | github | []
| wavefront-obj
A parser for wavefront object files
Dependencies
Requires package <a><code>zlm</code></a> to be present. | []
|
https://avatars.githubusercontent.com/u/2707340?v=4 | zig-ulid | stripedpajamas/zig-ulid | 2020-09-09T00:31:26Z | ULID generation in Zig | main | 0 | 4 | 0 | 4 | https://api.github.com/repos/stripedpajamas/zig-ulid/tags | MIT | [
"generator",
"ulid",
"uuid",
"zig"
]
| 11 | false | 2022-02-04T08:15:17Z | false | false | unknown | github | []
| zig-ulid
ULIDs are
- 128-bit compatibility with UUID 1.21e+24 unique ULIDs per millisecond
Lexicographically sortable!
- Canonically encoded as a 26 character string, as opposed to the 36 character UUID
- Uses Crockford's base32 for better efficiency and readability (5 bits per character)
- Case insensitive
- No special characters (URL safe)
- Monotonic sort order (correctly detects and handles the same millisecond)
See the full spec <a>here</a>.
This repo intends to implement the spec in Zig.
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> Monotonic ULID support
Use
See <a><code>example.zig</code></a> for usage examples.
```zig
const Ulid = @import("./ulid.zig");
// with passed in allocator; caller owns returned bytes
var ulid = try Ulid.ulidAllocNow(allocator);
// returns something like 01EHWMX9NA2P3ERBR5ESV5E3QP
// with buffer passed in
var ulid: [26]u8 = undefined;
try Ulid.ulidNow(&ulid);
// custom seed time with allocator
var ulid = try Ulid.ulidAlloc(allocator, 273);
// returns something like 000000008HMKR2RRN4VY1D3X2H
// custom seed time without allocator
try Ulid.ulid(&ulid, 273);
```
License
MIT | []
|
https://avatars.githubusercontent.com/u/23725145?v=4 | wekua | kython28/wekua | 2020-03-01T00:26:12Z | Linear Algebra and Deep Learning Zig library with GPGPU and heterogeneous computing | master | 0 | 4 | 1 | 4 | https://api.github.com/repos/kython28/wekua/tags | MIT | [
"c",
"deep-learning",
"deep-neural-network",
"deep-neural-networks",
"neural-network",
"neural-networks",
"opencl",
"opencl-kernels",
"zig",
"ziglang"
]
| 896 | false | 2025-04-10T13:57:32Z | true | true | 0.14.0 | github | []
|
Linear Algebra and Deep Learning Zig library with GPGPU and heterogeneous computing
<strong>Wekua</strong> is a lightweight and optimized library that allows you to build and run deep learning models using GPGPU and heterogeneous computing with OpenCL.
Thanks to OpenCL, Wekua offers the flexibility to build and run deep learning models on any processing chip that supports OpenCL. Whether you have an AMD, NVIDIA, or Intel GPU, or even just a CPU, you can run them seamlessly. Additionally, <strong>you can combine the power of all the processing chips available in your machine to execute your deep learning models or any tensor operations, making the most of your hardware resources</strong>.
Getting Started
First off, you must install the opencl runtime to use your hardware in wekua. For more info: https://wiki.archlinux.org/index.php/GPGPU#OpenCL_Runtime
Once the OpenCL runtime is installed, all that remains is to install wekua on your project. To include it, follow these steps:
<ol>
<li>
<strong>Edit your <code>build.zig.zon</code>:</strong>
Add the <code>wekua</code> dependency to your <code>build.zig.zon</code> file, similar to the following:
<code>zig
.{
// ......
.dependencies = .{
.wekua = .{
.url = "https://github.com/kython28/wekua/archive/refs/tags/v{version}.tar.gz",
},
},
// .....
}</code>
</li>
<li>
<strong>Edit your <code>build.zig</code>:</strong>
Configure your <code>build.zig</code> file to include the <code>wekua</code> module:
```zig
const std = @import("std");
</li>
</ol>
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
<code>const package = b.dependency("wekua", .{
.target = target,
.optimize = optimize
});
const module = package.module("wekua");
const app = b.addExecutable(.{
.name = "test-wekua",
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize
});
app.root_module.addImport("wekua", module);
b.installArtifact(app);
</code>
}
```
<ol>
<li><strong>Build the project:</strong>
Now you can build your project:
<code>bash
zig build</code>
This setup will allow you to use the <code>wekua</code> module in your project.</li>
</ol>
How to use?
Check out a complete XOR neural network example in <a><code>examples/xor_neural_network.zig</code></a>.
⚠️ Note
Currently, Wekua is available in two versions: one in C and another in Zig. The Zig version is under active development. If you want to try it out, you can compile it directly from the build.zig file and run its tests without any issues.
The C version is fully functional and stable at the moment. However, it will be deprecated once the Zig version covers all functionalities and offers the same level of stability. | []
|
https://avatars.githubusercontent.com/u/7270159?v=4 | tar | mattnite/tar | 2021-01-19T05:15:20Z | tar library that has a bad interface ngl | main | 1 | 4 | 3 | 4 | https://api.github.com/repos/mattnite/tar/tags | MIT | [
"archive",
"zig",
"zig-package"
]
| 13 | false | 2024-05-12T06:43:26Z | true | false | unknown | github | []
| tar
tar library that has a bad interface ngl | []
|
https://avatars.githubusercontent.com/u/1892046?v=4 | zig_ccsds_primary_header | nsmryan/zig_ccsds_primary_header | 2020-08-09T15:24:12Z | Implementation of the CCSDS Space Packet Protocol in Zig | master | 0 | 4 | 0 | 4 | https://api.github.com/repos/nsmryan/zig_ccsds_primary_header/tags | - | [
"ccsds",
"space",
"zig",
"ziglang"
]
| 16 | false | 2022-07-02T22:44:05Z | true | false | unknown | github | []
| Zig CCSDS Primary Header
This repository contains a basic, but essentially complete, implementation
of the CCSDS Space Packet Protocol Primary Header in the Zig programming language.
The point of writing this library is to try Zig out on a binary data
specification 1) without serialization and deserialization, and 2) with the
format known beforehand, to see how it compares to C and Rust. Overall it
performs very well, and this is my preferred encoding compared to similar
libraries I've written in those languages.
This library contains a potential solution for bit field definitions
which pack in the opposite order from Zig bit fields. This should be
generally applicable when faced with this problem- essentially
you break the bitfield into separate structures along byte-aligned
sequences of fields, swap their order in the definition, and then
byte swap before and after accessing their fields.
I would be interested in other solutions- this repository establishes
that at least this solution works, but better ones likely exist.
Primary Header Layout
The CCSDS Primary Header is a simple binary packet header containing
three sections, each of which is two bytes, which is referred to as a 'word':
<ul>
<li>The 'control' section (this is my name, not in the standard) which contains an
identifier for the source/destination pair, a flag for whether there is another
header following the primary header, a flag indicating whether the packet
contains a command or telemetry, and the protocol version (always 0).</li>
<li>The 'sequence' section contains the sequence flag indicating whether the
packet is part of a larger related sequence of packets, and the sequence
counter whose meaning depends on the sequence flag.</li>
<li>The 'length' section is simply the packet length, not including the header
itself, minus 1. The minus 1 comes from the fact that a CCSDS packet cannot
have an empty data section (there must be at least 1 byte afterwards), so the
standard does not account for that one required byte in the length field.
Whether this was a good idea or not (I don't think so) it ensures that
all length field values are valid.</li>
</ul>
This diagram gives a basic description of the format, going from
most significant bit to least significant bit from left to right,
across three 16-bit fields for a total of six bytes:
```
+--------+-------+------------+-------------------------------------+
|Version |Packet |Secondary | APID |
| |Type |Header Flag | |
+--------+-------+------------+-------------------------------------+
|3 bits | 1 bit | 1 bit | 11 bit |
+--------+--------------------+-------------------------------------+
| 16 bit word, bits 0..15 |
+-------------------------------------------------------------------+
+---------+---------------------------------------------------------+
|Sequence | Sequence Count |
|Flags | |
+---------+---------------------------------------------------------+
| 2 bits | 14 bit |
+---------+---------------------------------------------------------+
| 16 bit word, bits 16..31 |
+-------------------------------------------------------------------+
+-------------------------------------------------------------------+
| Packet Length |
| |
+-------------------------------------------------------------------+
| 16 bits |
+-------------------------------------------------------------------+
| 16 bit word, bits 32..47 |
+-------------------------------------------------------------------+
```
Background
As a test of a new language, I sometimes write this library for encoding
and decoding CCSDS primary headers. This is a fairly simple packet header,
containing only 6 bytes, but forces you to think about how you will
handle endianness and bit field data in a language. These are important
for embedded systems programmers (and other systems programmes), so
I see this as a litmus test for how a language will handle these kinds of
concerns.
There are many ways to handle this kind of data encoding. Many libraries,
especially in managed languages, is to deserialize the packet from bytes
into a native structure, and then serialize it back when it is ready
to be sent on the network. A similar process would be necessary
for controlling hardware registers.
However, I always write this library in such a way that the binary
data is kept in the format defined in the standard. I prefer this
to avoid creating duplicates of the data in a system (the "true"
form within a byte buffer, and copy deserialized and manipulated).
C
To accomplish this in C we have to keep the data as byte pairs and construct a
16 bit unsigned integer out of them (this keeps the layout fixed and works on
both big and little endian systems). We can then do the bit mask and shift
operations to extract the correct bits, and then the opposite mask/shift/OR
operations to place bits within these 16-bit words. This is error prone, but it
does work, its cross platform, and its preferrable to C bitfields.
When getting and setting fields, an integer with at least the field
width is used. For example, the APID (Application Identifier) is 11 bits,
but is read out as a uint16_t in C as C does not have the ability to
describe integers that are not powers of two.
Rust
Rust has a number of possible solutions- it does not currently have bitfields,
although perhaps it may in the future, so we have to create the same effect
through other means. The C solution works just as well in Rust as in C, and
there are other solutions if you are willing to accept libraries which provide
macros that extend the Rust language.
There are a number of these macro libraries. However, some of them seem to do
serialization/deserialization, and all of them require your types to be defined
within the macro context. I would much prefer a language that allows me to do
this kind of thing without this kind of extension. This is a complex topic,
and many people may not feel this way, but I personally avoid language
extension for this specific use-case.
Zig
For this library, I found that there are many options, especially around
dealing with endianness. Zig does better with bitfields then C or Rust- they
have a defined layout and should only access bytes that are required (which is
important for hardware access). Zig also has the ability to work with integers
of bit sizes that are not powers of 2, like a u3 as an unsigned three bit
integer, which is nice as it describes the fields of a bit field without
worrying as much about invalid values when getting and setting fields.
Knowing this, I was determined to use bitfields for
this library and finally get bit level access to a binary format.
However, these bit fields have one limitation for this particular binary layout-
while Zig bit fields pack bits in a big-endian order, within each byte
they pack Least Significant Bit (LSB) to Most Significant Bit (MSB). This
is the packing in some formats, but the binary data I usually deal with
packs from MSB to LSB in the first byte, moving to the next byte when all
bits are used up, and this is the case in CCSDS. This can also be seen
as packing LSB to MSB, but starting at the least significant byte of
the byte aligned sequence, which is harder to state.
It turns out that the Zig bitfield packing can still be used in this situation,
but with a little bit of extra work. It looks like if you data packs
the way Zig bitfields natively pack it, then the format can be easily described
directly in bitfields. Otherwise, a system like the one used in this
library can be used (described below).
Accessing Bit Packed Data
Getting and setting fields within a bit field structure is an occasional
task of embedded programming, so we want a strategy we can apply to these
situations. They do not come up as often as other tasks, but when they
do they are usually very important- perhaps part of the core requirements
of a system.
Zig Native Bit Packing
As stated above, if your data is bit packed in the native format provided
by Zig, just encode the fields in a bit field and you are done. access
the fields as normal, and learn Zig's rules on non-byte-aligned data.
If you want, fields can be wrapped in types, so the u3 for the version
number can be renamed to Version, to help communicate intent and
avoid mixing fields with the same width, but this is a design choice
that is up to you.
An example of this for the sequence flags would be:
<code>zig
pub const CcsdsSequence = packed struct {
seq_flag: SeqFlag = SeqFlag.Unsegmented,
sequence: Sequence = 0,
};</code>
Which in bits, from MSB to LSB of the most significant byte to least
significant byte, where where F is a bit cooresponding to the sequence flag,
and S is a bit cooresponding to the sequence count:
<code>SSSS SFFF SSSS SSSS</code>
CCSDS Bit Packing
If your fields bit pack in the opposite order, you need a way to
create the packing:
<code>FFFS SSSS SSSS SSSS</code>
One attempt might be to swap the field order, like so:
<code>zig
pub const CcsdsSequence = packed struct {
sequence: Sequence = 0,
seq_flag: SeqFlag = SeqFlag.Unsegmented,
};</code>
This creates the following bit packing:
<code>SSSS SSSS FFFS SSSS</code>
So close! In fact, we also have to swap bytes to get:
<code>FFFS SSSS SSSS SSSS</code>
which is what we want.
This means that we need to wrap field accesses in some way to
ensure that the byte-aligned integer that contains the field
is read, byte swapped, used, and then (for setters) byte swapped
again and placed in memory. In other words, we need to ensure
that swapping occurs before and after using a field to
get the designed bit packing.
I played around with various designs, such as wrapping types
to contain type-level information about endianness and size,
but I ended up no a fairly simple design that can automate
some of the details through comptime programming.
Creating Fields
The design here is that each byte-aligned sequence, in this
case the 'control' word, 'sequence' word, and length word,
each get their own type, which is a bitfield. I choose
to rename some bit types like Apid instead of using u11,
but again, that is a design decision and not essential.
Once each bit field was defined, I created getters and setters
for each field. These are required to ensure that the fields
are accessed on correctly laid out fields. This is the one
place where language features like properties (where
accessing the fields can implcitly happen through a function),
or injecting generated functions in a structure (kind of
Ruby style monkey patching) would make the use of these
structure slightly simplier.
However, I've very, very glad that Zig does not include these features- what I
want out of ZIg is not programmer convienence, not is it every cool programming
feature of modern languages. I want something small and predictable,
where I control the flow of the program, the layout of data in memory,
and I do not get bogged down in complex language feature. There are
plenty of languages with fancy features for when we want them- I want to
see languages choose discipline and control for times when we need it.
Speaking of fancy language features, the getters are setters are
done using the set_field_swapped, and get_field_swapped function.
These use comptime information to generally access a field of
structure on a byte swapped version of the structure. They
are not perfect- I believe they can be written more generically
by using byte arrays instead of integer types for swapping, but
get do automate the getter/setter pairs.
Comptime
Overall I am finding that comptime is perhaps the most challenging
and interesting feature of Zig. I very much like its ability
to perform introspection (I wish so much for this in C), to
create polymorphic types, and its dependent type style capabilities.
Its possible that it could make things difficult down the line- I truely
don't know- such as for code analysis which needs to run a Turing complete
language in order to analyze a file. Perhaps there could be some
restrictions on the use of comptime, or perhaps comptime itself
can perform the required analysis, but I think its too early
to tell.
Either way, it turned out to be useful in this scenario,
even though some of the error messages when I got it wrong where
quite difficult to understand, and I ran into an
not-yet-implemented feature of inferring return types of
comptime functions, which lead me to take an extra type parameter
that would otherwise not be needed.
Defining Structures
Once each byte-aligned set of fields was broken out into a packed struct,
the CcsdsPrimary structure is just each field in sequence:
<code>zig
pub const CcsdsPrimary = packed struct {
control: CcsdsControl,
sequence: CcsdsSequence,
length: CcsdsLength,
};</code>
There are functions in here as well, but for simplicity this is the structure.
To access, say, the APID of a variable with type CcsdsPrimary, you would
access its 'control' field and use the 'get_apid' function:
<code>zig
const primary = /* Create Primary Header */;
std.debug.print("APID = {}", .{ primary.control.get_apid() });</code>
This is not the most convienent, and the getters and setters could have
been moved into the CcsdsPrimary structure itself to avoid that field
access, but I felt like this design is the most generally applicable-
create these substructures with field accessors, combine them into
a full structure with all fields, and access your data through field
and accessor functions.
Conclusion
Overall I think this is the best CCSDS Primary Header library I've ever written.
My C version has to constantly deal with potential errors due to NULL pointers
(which I check in every function, every time), and has to do a lot
of manual bit manipulation. My Rust version does not have the error
cases of the C version, but does the same bit manipulation as I did not
want to extend the language with macros. The Zig version is the only
one that does not have error conditions <em>and</em> does not require bit manipulation,
although at the cost of extra syntax in getters and setters and a pair
of perhaps tricky generic accessor functions to help write the accessor
functions.
Both the Rust and Zig version are great for unit testing- I find that
I benefit a great deal from being able to write simple tests alongside
my code and run them quickly. My C version does have tests, using
the Unity test framework from ThrowTheSwitch, but I have to deal with
building it myself, and my tests are in a separate file so I can
compile them out of release builds.
I did not tackle other concerns for a library like this, like validating
headers, handling secondary headers or data sections (which requires
casting byte arrays to different types), or data integrity checking
such as checksums or CRCs. I would add these if I were using this library
for real work, but for now I'm quite pleased with how this worked in
Zig. I will continue to withhold judgement on the language until I've used
it in anger, but it continues to impress me, even having now worked
out something simple but non-trivial with it. | []
|
https://avatars.githubusercontent.com/u/2286349?v=4 | zig-pc_keyboard | leecannon/zig-pc_keyboard | 2020-12-07T18:40:57Z | PS/2 Keyboard Decoder | master | 0 | 4 | 2 | 4 | https://api.github.com/repos/leecannon/zig-pc_keyboard/tags | MIT | [
"osdev",
"zig",
"zig-library",
"zig-package",
"ziglang"
]
| 37 | false | 2023-12-31T18:08:49Z | true | false | unknown | github | []
| zig-pc_keyboard
A zig reimplementation of the <a>pc-keyboard</a> rust crate
How to get
Gyro
<code>gyro add leecannon/pc_keyboard</code>
Zigmod
<code>zigmod aq add 1/leecannon/pc_keyboard</code>
Git
Submodule
<code>git submodule add https://github.com/leecannon/zig-pc_keyboard zig-pc_keyboard</code>
Clone
<code>git clone https://github.com/leecannon/zig-pc_keyboard</code> | []
|
https://avatars.githubusercontent.com/u/3759175?v=4 | lemonbar-maker | Hejsil/lemonbar-maker | 2020-11-29T00:12:36Z | null | master | 0 | 4 | 1 | 4 | https://api.github.com/repos/Hejsil/lemonbar-maker/tags | MIT | [
"bar",
"lemonbar",
"zig"
]
| 142 | false | 2024-03-15T22:43:07Z | true | true | unknown | github | [
{
"commit": "9c23bcb5aebe0c2542b4de4472f60959974e2222.tar.gz",
"name": "clap",
"tar_url": "https://github.com/Hejsil/zig-clap/archive/9c23bcb5aebe0c2542b4de4472f60959974e2222.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/Hejsil/zig-clap"
},
{
"commit": "5d572b31b08268e977bd52ba6701dfea6bf08025.tar.gz",
"name": "mecha",
"tar_url": "https://github.com/Hejsil/mecha/archive/5d572b31b08268e977bd52ba6701dfea6bf08025.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/Hejsil/mecha"
},
{
"commit": "5d16400660919a8317c5a15a95616a7e1faa192d.tar.gz",
"name": "sab",
"tar_url": "https://github.com/Hejsil/sab/archive/5d16400660919a8317c5a15a95616a7e1faa192d.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/Hejsil/sab"
},
{
"commit": "a9c75242dfc119a305c1381c2352d2fc16b2e0aa.tar.gz",
"name": "datetime",
"tar_url": "https://github.com/frmdstryr/zig-datetime/archive/a9c75242dfc119a305c1381c2352d2fc16b2e0aa.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/frmdstryr/zig-datetime"
}
]
|
lemonbar-maker
This is me trying out the event loop and async by creating a program
that produces bar strings for <a>lemonbar</a>. | []
|
https://avatars.githubusercontent.com/u/3759175?v=4 | zte | Hejsil/zte | 2020-04-01T19:29:57Z | The Zig text editor (not maintained) | master | 0 | 4 | 1 | 4 | https://api.github.com/repos/Hejsil/zte/tags | MIT | [
"text-editor",
"zig"
]
| 2,974 | false | 2024-05-03T10:35:08Z | true | false | unknown | github | []
| zte
A terminal text editor written in Zig (not maintained).
Things I remember about this editor:
* I was playing around with immutable data structures, so the entire editor
is based around this concept (See the immutable list implementation
<a>here</a>).
* This editor currently just leaks all its memory. The idea was to
implement some manual garbage collector where the implementer would
have to tag memory as alive themself and then they could run it
to clean up the rest.
* There is also a terminal <a>UI <em>framework</em></a>
in there that allows programmers
to statically declare the layout of the UI at compile time.
* In theory, the layout is completly seperated from the drawing
of the layout, allowing for many backends. In practice, it might
not be this simple though.
* There is also a terminal backend for this <em>framework</em>
* It nearly has no dependencies, only relying on glibc for
<a>1 function</a>.
| []
|
https://avatars.githubusercontent.com/u/34946442?v=4 | zig-ed25519-blake2b | cryptocode/zig-ed25519-blake2b | 2021-01-21T10:42:55Z | ed25519-blake2b implementation for Zig | master | 0 | 4 | 1 | 4 | https://api.github.com/repos/cryptocode/zig-ed25519-blake2b/tags | MIT | [
"blake2b",
"ed25519",
"zig"
]
| 5 | false | 2023-08-31T15:50:32Z | false | false | unknown | github | []
| This is a variation of the Zig standard library implementation of ed25519, using Blake2b as the hash function.
Last tested with <code>stage2</code> using Zig version <code>0.10.0-dev.4418+99c3578f6</code> | []
|
https://avatars.githubusercontent.com/u/25238?v=4 | zraytrace | jsyrjala/zraytrace | 2020-10-03T08:05:34Z | Raytracing implemented in Zig language | master | 0 | 4 | 0 | 4 | https://api.github.com/repos/jsyrjala/zraytrace/tags | - | [
"raytracing",
"raytracing-in-one-weekend",
"zig"
]
| 3,930 | false | 2022-02-21T01:11:20Z | true | false | unknown | github | []
| zraytrace
Ray tracing implemented in <a>Zig</a>.
Inspiration
Code follows mostly <a>Ray Tracing in One Weekend</a> and <a>Physically Based Rendering</a>.
Features
Single threaded, uses only on CPU.
Materials:
- diffuse (matte)
- metal (fully reflective)
- dielectric (glass like objects)
Shapes
- sphere
- triangle
Textures:
- constant color
- image textures
Algorithms
- Bounded volume hierarchy
File formats:
- PNG images, read and write
- OBJ 3d models, read
Examples
Spheres
This doesn't use bounded volume hierarchy because its overhead is too big for scene with 7 spheres.
From the left:
- reflective texture mapped sphere (earth)
- hollow dielectric sphere (glass)
- diffuse texture mapped sphere (Nitor logo)
- filled dielectric sphere (glass)
- reflective sphere with silver color (mirror ball)
- diffuse green sphere (ground level)
Some statistics
- Surfaces: 7
- Pixels: 1000x1000
- Samples per pixel: 1000
- Max recursion depth: 30
- Total reflections: 1144753226
- Total background hits: 999892115
- Total pixels: 1000000
- Total samples: 1000000000
- Total rays: 2144645362
- Total reflections: 1144753226
- Pixels per second: 1619.68 pixels/s
- Total runtime: 617.41 seconds | []
|
https://avatars.githubusercontent.com/u/265903?v=4 | lepto.zig | alexnask/lepto.zig | 2020-05-12T11:43:13Z | Date and time library for zig, inspired by C++20 std::chrono | master | 0 | 4 | 0 | 4 | https://api.github.com/repos/alexnask/lepto.zig/tags | - | [
"datetime",
"time",
"timezone",
"zig",
"zig-library",
"zig-package",
"ziglang"
]
| 16 | false | 2023-03-15T18:13:30Z | false | false | unknown | github | []
| 404 | []
|
https://avatars.githubusercontent.com/u/5464072?v=4 | ziglaunch | nektro/ziglaunch | 2020-11-22T23:31:36Z | Introductory files to get started with different types of projects in Zig. | master | 0 | 4 | 1 | 4 | https://api.github.com/repos/nektro/ziglaunch/tags | MIT | [
"zig"
]
| 13 | false | 2022-03-18T16:35:01Z | false | false | unknown | github | []
| ziglaunch
<a></a>
Repo for https://ziglaunch.org. | []
|
https://avatars.githubusercontent.com/u/265945?v=4 | sodium-wrapper | nmichaels/sodium-wrapper | 2020-02-12T02:28:14Z | Sodium for Zig | master | 0 | 3 | 0 | 3 | https://api.github.com/repos/nmichaels/sodium-wrapper/tags | NOASSERTION | [
"sodium",
"zig"
]
| 54 | false | 2024-03-27T14:27:45Z | true | false | unknown | github | []
| A Sodium Wrapper for Zig
Salty!
It's very incomplete. It's not even plete.
Requires libsodium-dev or, if not on Debian, some package that
provides sodium.h.
Official home: https://hg.sr.ht/~nmichaels/sodium-wrapper | []
|
https://avatars.githubusercontent.com/u/12176994?v=4 | zig-wasm-dsp | schroffl/zig-wasm-dsp | 2021-01-07T19:38:05Z | Zig DSP in the Browser via WebAssembly | master | 0 | 3 | 0 | 3 | https://api.github.com/repos/schroffl/zig-wasm-dsp/tags | - | [
"dsp",
"webassembly",
"zig"
]
| 567 | false | 2023-09-29T10:03:30Z | true | false | unknown | github | []
| 404 | []
|
https://avatars.githubusercontent.com/u/418638?v=4 | zigdf | nfultz/zigdf | 2020-12-01T23:06:52Z | A Data Frame in zig | master | 0 | 3 | 0 | 3 | https://api.github.com/repos/nfultz/zigdf/tags | - | [
"dataframe",
"zig"
]
| 2 | false | 2025-01-03T19:32:36Z | false | false | unknown | github | []
| zigdf
A Data Frame for zig. | []
|
https://avatars.githubusercontent.com/u/11694033?v=4 | parzig | notCalle/parzig | 2020-10-27T09:23:07Z | Parser Combinator library for Zig | main | 3 | 3 | 0 | 3 | https://api.github.com/repos/notCalle/parzig/tags | MIT | [
"parser-combinators",
"parser-library",
"zig",
"zig-lang",
"zig-library",
"zig-package"
]
| 75 | false | 2025-04-03T02:32:03Z | true | false | unknown | github | []
| <a></a>
<a></a>
ParZig
A parser combinator library for <a>Zig</a>.
Install
<ul>
<li>Git submodule</li>
</ul>
<code>shell
git submodule add https://github.com/notCalle/parzig lib/parzig</code>
<code>zig
const parzig = Pkg { .name = "parzig", .path = "lib/parzig/exports.zig" };</code>
<ul>
<li>Import declaration for [<code>zkg</code>]</li>
</ul>
<code>zig
pub const parzig = zkg.import.git(
"https://github.com/notCalle/parzig",
"main",
null,
);</code>
Examples
<ul>
<li>Party Ghosts vs Ghost Parties</li>
</ul>
```zig
usingnamespace @import("parzig");
const Ghost = Char('👻');
const Party = Char('🥳');
const ghost = "👻";
const party = "🥳";
test "ghost party" {
const GhostParty = Ghost.Seq(Party));
const ghost_party = ghost ++ party;
const party_ghost = party ++ ghost;
<code> std.testing.expectEqualSlices(
u8,
ghost_party,
GhostParty.parse(ghost_party).value().?,
);
std.testing.expect(.None == GhostParty.parse(party_ghost));
</code>
}
```
<ul>
<li>Numeric expression evaluator</li>
</ul>
```zig
usingnamespace @import("parzig");
const Expression = Parser(struct {
pub fn parse(input: Input) Result(i32) {
return Term.Opt(AddSub.Seq(Term)).Map(evalExpression);
}
});
const Term = Parser(struct {
pub fn parse(input: Input) Result(i32) {
return Factor.Opt(MulDiv.Seq(Factor)).Map(evalTerm);
}
});
const Factor = Parser(struct {
pub fn parse(input: Input) Result(i32) {
return Opt(Char('-')).Seq(Number.Or(Paren)).Map(evalFactor);
}
});
const Number = Parser(struct {
pub fn parse(input: Input) Result(i32) {
return CharRange('0', '9').Many1.Map(evalNumber);
}
});
const Paren = Parser(struct {
pub fn parse(input: Input) Result(i32) {
return Char('(').Seq(Expression).Seq(Char(')')).Map(evalParen);
}
});
// ...
test "" {
std.testing.expectEqual(
Result(i32).some(7, ""),
Expression.parse("-(1-2)*3+4"),
);
}
``` | []
|
https://avatars.githubusercontent.com/u/43353831?v=4 | storopoli.com | storopoli/storopoli.com | 2020-12-13T17:48:30Z | Personal Website | main | 0 | 3 | 2 | 3 | https://api.github.com/repos/storopoli/storopoli.com/tags | MIT | [
"bitcoin",
"blog",
"cryptography",
"math",
"privacy",
"science",
"statistics",
"zig",
"zine"
]
| 17,036 | false | 2025-05-12T16:16:54Z | false | false | unknown | github | []
| storopoli.com
This is my personal site at <a>storopoli.com</a>.
It is built with <a>Rust</a>,
<a>Zola</a>,
and the <a>tabi</a> theme.
To run the site locally, you need to have Zola installed,
and run the following command;
<code>sh
zola serve</code>
JavaScript
By default, all JavaScript[^javascript] is disabled.
Math Support
Math support can be enabled by setting the frontmatter with:
<code>toml
[extra]
katex = true</code>
This will load <a>KaTeX</a>
under the hood, and anything between <code>$</code> and <code>$$</code>
will be rendered as inline or equation math
using JavaScript.
Check all the supported functions in <a>KaTeX documentation</a>.
Mermaid
Mermaid diagrams can be enabled by setting the frontmatter with:
<code>toml
[extra]
mermaid = true</code>
This will load <a>Mermaid</a>
under the hood, and anything between <code>{% mermaid() %}</code> and <code>{% end %}</code>
will be rendered as a Mermaid diagram.
License
The code is <a>MIT</a>
and the content is <a>Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International</a>.
<a></a>
[^javascript]:
JavaScript is a security issue.
JavaScript enables <strong>remote code execution</strong>.
The browser is millions of lines of code, nobody truly knows what is going on,
and often has escalated privileges in your computer. | []
|
https://avatars.githubusercontent.com/u/2286349?v=4 | zig-bootboot | leecannon/zig-bootboot | 2020-12-07T00:04:49Z | A zig'ified BOOTBOOT header file | master | 0 | 3 | 1 | 3 | https://api.github.com/repos/leecannon/zig-bootboot/tags | MIT | [
"osdev",
"zig",
"zig-library",
"zig-package",
"ziglang"
]
| 36 | false | 2023-12-28T12:22:52Z | true | false | unknown | github | []
| zig-bootboot
This repo contains a zig'ified <a>BOOTBOOT</a> header file.
How to get
Gyro
<code>gyro add leecannon/bootboot</code>
Zigmod
<code>zigmod aq add 1/leecannon/bootboot</code>
Git
Submodule
<code>git submodule add https://github.com/leecannon/zig-bootboot zig-bootboot</code>
Clone
<code>git clone https://github.com/leecannon/zig-bootboot</code> | []
|
https://avatars.githubusercontent.com/u/7270159?v=4 | version | mattnite/version | 2021-01-19T04:55:33Z | small library for semver | main | 0 | 3 | 2 | 3 | https://api.github.com/repos/mattnite/version/tags | MIT | [
"semver",
"zig",
"zig-package"
]
| 10 | false | 2023-04-13T18:01:44Z | true | false | unknown | github | []
| version
small library for semver | []
|
https://avatars.githubusercontent.com/u/3932972?v=4 | zig-ihex | ikskuh/zig-ihex | 2020-04-18T19:44:56Z | An intel hex loader written in Zig | master | 0 | 3 | 2 | 3 | https://api.github.com/repos/ikskuh/zig-ihex/tags | MIT | [
"ihex",
"intel-hex",
"zig",
"zig-package",
"ziglang"
]
| 2,285 | false | 2025-04-04T19:18:21Z | true | true | unknown | github | []
| Zig Intel Hex parser
A loader for the <a>Intel Hex</a> format used in embedded
development.
Features
<ul>
<li>Supports all 6 record types</li>
<li>Raw record parser (<code>parseRaw</code>)</li>
<li>User-friendly preprocessor (<code>parseData</code>)</li>
<li>Pedantic and lax parsing</li>
</ul>
Example
```zig
fn processData(x: void, offset: u32, data: []const u8) !void {
std.debug.warn("read slice @ 0x{x}: {x}\n", .{ offset, data });
}
pub fn main() !void {
var file = try std.fs.cwd().openFile("data/example.ihex", .{ .read = true, .write = false });
defer file.close();
<code>const entry_point = try ihex.parseData(file.reader(), ihex.ParseMode{ .pedantic = true }, {}, error{}, processData);
if (entry_point) |ep| {
std.debug.warn("entry point: 0x{x}\n", .{ep});
}
</code>
}
``` | []
|
https://avatars.githubusercontent.com/u/17814263?v=4 | osdev-zig-barebone-x64 | d0p1s4m4/osdev-zig-barebone-x64 | 2020-11-26T22:53:30Z | null | master | 0 | 3 | 1 | 3 | https://api.github.com/repos/d0p1s4m4/osdev-zig-barebone-x64/tags | Unlicense | [
"barebone",
"osdev",
"x64",
"x86-64",
"zig"
]
| 4 | false | 2023-03-26T17:59:17Z | true | false | unknown | github | []
| osdev-zig-barebone-x64 | []
|
https://avatars.githubusercontent.com/u/68269045?v=4 | dogma.zig | dogmatists/dogma.zig | 2020-07-14T13:50:07Z | Dogma for Zig. | master | 1 | 3 | 0 | 3 | https://api.github.com/repos/dogmatists/dogma.zig/tags | Unlicense | [
"dogma",
"polyglot",
"zig",
"zig-library"
]
| 14 | false | 2020-08-03T12:31:08Z | false | false | unknown | github | []
| Dogma for Zig
<a></a>
<a></a>
<a>https://dogma.dev</a>
Prerequisites
<ul>
<li><a>Zig</a> <a>0.6.0</a></li>
</ul>
Installation
<code>bash
$ git clone https://github.com/dogmatists/dogma.zig.git</code>
Examples
Importing the library
<code>zig
const dogma = @import("dogma");</code>
Checking the library version
Reference
Structs
<ul>
<li><a><code>dogma.Angle</code></a></li>
<li><a><code>dogma.Latitude</code></a></li>
<li><a><code>dogma.Longitude</code></a></li>
</ul>
See Also
Dogma for <a>C</a>, <a>C++</a>, <a>Dart</a>, <a>Protobuf</a>, <a>Python</a>, and <a>Ruby</a>. | []
|
https://avatars.githubusercontent.com/u/2665334?v=4 | cat-zig | gsquire/cat-zig | 2020-05-17T21:01:50Z | A simple cat clone using Zig | master | 0 | 2 | 1 | 2 | https://api.github.com/repos/gsquire/cat-zig/tags | MIT | [
"zig"
]
| 2 | false | 2022-08-22T17:27:29Z | false | false | unknown | github | []
| cat-zig
This is a simple CLI program to get acquainted with Zig. See the associated blog post for
more information.
Building
There is a Makefile that you can use.
```sh
Build a release version of the binary.
make
Clean up the object file and binary.
make clean
Format the source code.
make fmt
```
License
MIT | []
|
https://avatars.githubusercontent.com/u/748913?v=4 | compile-time-string-validation | euantorano/compile-time-string-validation | 2020-06-09T22:23:29Z | Companion repository for my "Validating strings at compile time" log post | master | 0 | 2 | 0 | 2 | https://api.github.com/repos/euantorano/compile-time-string-validation/tags | BSD-3-Clause | [
"compile-time-checking",
"dlang",
"nim",
"zig"
]
| 10 | false | 2023-10-17T09:52:48Z | false | false | unknown | github | []
| Compile Time String Validation
Companion repository for my blog post <a>"Compile Time String Validation"</a>
This repository contains code for a couple of implementations of a dummy <code>pledge</code> function (based upon the <a><code>pledge(2)</code></a> system call in OpenBSD) that validates its arguments at compile time rather than run time.
The aim is to explore the compile time facilities of different languages.
CI Status
| Language | Status |
| -------- | ------ |
| D | <a></a> |
| Nim | <a></a> |
| Zig | <a></a> | | []
|
https://avatars.githubusercontent.com/u/755611?v=4 | adventofcode | dundalek/adventofcode | 2020-12-01T20:53:27Z | null | master | 0 | 2 | 0 | 2 | https://api.github.com/repos/dundalek/adventofcode/tags | - | [
"advent-of-code",
"clojure",
"liz",
"zig"
]
| 109 | false | 2023-09-08T18:15:30Z | false | false | unknown | github | []
| 404 | []
|
https://avatars.githubusercontent.com/u/2286349?v=4 | zig-xbeam | leecannon/zig-xbeam | 2020-12-12T19:34:09Z | A very partial re-implementation of the rust crate crossbeam. | master | 0 | 2 | 1 | 2 | https://api.github.com/repos/leecannon/zig-xbeam/tags | MIT | [
"zig",
"zig-library",
"zig-package",
"ziglang"
]
| 25 | false | 2022-12-15T10:44:48Z | true | false | unknown | github | []
| zig-xbream
This repo is a <em>very</em> partial (pull requests welcome) re-implementation of the rust crate <a>crossbeam</a>.
Only the following types are implemented:
Data structures
<ul>
<li><code>xbeam.queue.ArrayQueue</code> - a bounded MPMC queue that allocates a fixed-capacity buffer on construction.</li>
<li><code>xbeam.queue.ArrayQueueNoAlloc</code> - an implementation of <code>ArrayQueue</code> that does not allocate.</li>
</ul>
Utilities
<ul>
<li><code>xbeam.utils.Backoff</code> - for exponential backoff in spin loops.</li>
<li>
<code>xbeam.utils.CACHE_LINE_LENGTH</code> - replacement for the rust <code>CachePadded</code>, used like this:
<code>zig
var aligned: usize align(xbeam.utils.CACHE_LINE_LENGTH) = 0;</code>
</li>
</ul>
Contributions are welcome!
How to use
Download the repo somehow then either:
Use a package manager
<ul>
<li><a>zigmod</a></li>
<li><a>zkg</a></li>
</ul>
Add as package in <code>build.zig</code>
<ul>
<li>To <code>build.zig</code> add:</li>
</ul>
<code>zig
exe.addPackagePath("xbeam", "zig-xbeam/src/index.zig"); // or whatever the path is</code>
* Then the package is available within any zig file:
<code>zig
const xbeam = @import("xbeam");</code>
Import directly
In any zig file add:
<code>zig
const xbeam = @import("../zig-xbeam/src/index.zig"); // or whatever the path is from *that* file</code> | []
|
https://avatars.githubusercontent.com/u/15308111?v=4 | rubik.zig | Vexu/rubik.zig | 2020-12-02T13:03:41Z | Rubik's cube stuff | master | 0 | 2 | 1 | 2 | https://api.github.com/repos/Vexu/rubik.zig/tags | MIT | [
"rubiks-cube",
"zig"
]
| 21 | false | 2024-12-28T00:16:14Z | true | false | unknown | github | []
| Rubik's cube stuff in Zig. | []
|
https://avatars.githubusercontent.com/u/1892046?v=4 | zig_msgpack | nsmryan/zig_msgpack | 2020-10-07T00:47:28Z | An attempt to implement the MsgPack protocol in Zig | master | 0 | 2 | 0 | 2 | https://api.github.com/repos/nsmryan/zig_msgpack/tags | - | [
"msgpack",
"unmaintained",
"zig"
]
| 8 | false | 2021-01-22T21:14:40Z | true | false | unknown | github | []
| MsgPack in Zig
This repository contains an attempt to implement the <a>MsgPack</a> serialization
format in Zig. This format is pretty interesting- its like a binary JSON, but more compact, supporting binary
buffers, and supporting maps between arbitrary objects.
I attempted to implement this protocol in Zig to see how a binary protocol would work with Zig's type system.
Overall I think Zig offers some interesting advantages compared to, say, C, but I did run into problems as well.
I was able to encode some aspects of the protocol in the type system, which is nice, but ran into some issues
with type resolution in complex transformations (not too big of a deal), and a codegen crash.
Ideally I think a Zig MsgPack implementation could have a zero-copy interface for fast parsing, and should be
able to automatically encode and decode types (at least basic types). This would make MsgPack a more compact
alternative to the JSON interface in the Zig standard library.
Design
The API that is currently, mostly, implemented is that the user provides a buffer that is expected to contain a MsgPack
message to the parse_token function, and this function returns whether more bytes are needed (an how many), or a Token
which indicates part of a message, and the number of bytes that the token takes up.
The idea is that you have bytes available from some source, such as a TCP/IP socket or file, and you want to parse out
MsgPack structures. The parse_token function provides the next MsgPack structure in the buffer, and how many bytes to
move forward to find the next structure. This does not require any allocation- the Token structure is small and contains
slices into the buffer provided by the user.
For some structures (maps and arrays), the Token only indicates the number of elements that follow, but does not attempt
to parse those tokens. The user is responsible for keeping track of how many elements are needed, and whether they
are in a nested map or array. This keeps the tokens small.
The token interface was going to be the basic interface on top of which other interfaces could be built. You could
keep calling this function, skipping over the bytes it reports having parsed, and build up the structure you are interested
in.
I was intending to also provide functions to build up a kind of "simple" MsgPack structure that unpacked a buffer
into a single fully parsed structure. This would not necessarily be the most efficient- it would allocate buffers for string, arrays,
maps, binary buffers, etc, but it would serve as a simple test case and an interface to test against.
The next intended feature was to implement a function that would accept a pointer to a structure of some type,
and a buffer, and would attempt to fill out the fields of the structure with the contents of the buffer decoded
as a MsgPack structure. If we could then implement the opposite, you could use this library as a kind of serialize/
deserialize for any type to send it to another program. Zig's compile time programming would make this fairly
straightforward, which is intriguing to me.
Issues
I was not able to finish the token interface due to some kind of segfault in code generation. I could not figure out more,
such as where in the code the problem occurred, but I have not been able to test or run the code.
Ideally I will come back to this project some time in the future and figure out where the codegen issue is- perhaps
I'm doing something too tricky and causing a crash, and perhaps future versions of Zig will catch the error (if
it is actually an unrealized type error) or just generate the code and run.
See https://github.com/mkeeter/futureproof/blob/master/src/msgpack.zig for a working implementation. It sounds like the author also ran into some issues, but pushed through and ended up with a working library. Nice! | []
|
https://avatars.githubusercontent.com/u/22226942?v=4 | grapl | funnbot/grapl | 2020-07-31T05:55:55Z | Great... Really? Another programming language? | master | 0 | 2 | 0 | 2 | https://api.github.com/repos/funnbot/grapl/tags | - | [
"programming-language",
"zig",
"ziglang"
]
| 127 | false | 2022-03-23T07:53:40Z | true | false | unknown | github | []
| Grapl (Grapple)
Great... Really? Another Programming Language?
Simple programming language for fun made with <a>zig</a>.
Grapl is currently being developed on zig version: <code>0.6.0+84d50c892</code>, and may not compile or function on a different commit. | []
|
https://avatars.githubusercontent.com/u/44361234?v=4 | zark | ryuukk/zark | 2020-10-14T00:10:07Z | 2D & 3D Game Framework written in Zig, inspired by libGDX/XNA | main | 0 | 2 | 0 | 2 | https://api.github.com/repos/ryuukk/zark/tags | - | [
"crossplatform",
"engine",
"framework",
"game",
"gamedev",
"glfw",
"native",
"opengl",
"zig",
"ziglang"
]
| 1,186 | false | 2024-05-29T09:00:46Z | false | false | unknown | github | []
| ZARK
ZARK is a simple OpenGL game framework, it is not a fully featured engine, instead it gives you simple APIs to get started
Notes
⛔ This library won't be for you if need:
<ul>
<li>next gen graphics</li>
<li>fully featured engine</li>
<li>to target mobiles</li>
<li>something battle tested</li>
<li>vulkan, directx, metal</li>
</ul>
✅ This library is for you if you need: <em>(it probably won't be for you :trollface:)</em>
<ul>
<li>a dead simple library</li>
<li>a very efficient and simple 3D rendering API with skeletal animations</li>
<li>to target low-poly art style</li>
</ul>
I made this for me, for learning purposes, so it suits my needs
I'm still learning ZIG, so the code can be bad.. very bad
If you want to help, review the code, offer improvements, go ahead!
Features
Core
<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> 2D spritebatching
<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> 3D skeletal animation
<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> Material System and proper 3D rendering API (in progress)
<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> Audio (SFX/Music)
<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> GUI
Build
<ul>
<li><code>git clone --depth=1 https://github.com/ryuukk/zark.git</code></li>
<li><code>cd zark/samples</code></li>
<li><code>zig build help</code> <em>to check list of samples</em></li>
</ul>
Supported platforms
<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> Windows
<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> Linux
<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> macOS
Open-Source libraries used
3rd-party
<ul>
<li><a>glfw</a>: windowing/input</li>
<li><a>glad</a>: opengl loader</li>
</ul> | []
|
https://avatars.githubusercontent.com/u/3932972?v=4 | cbm-tools | ikskuh/cbm-tools | 2020-12-16T20:16:13Z | A small collection of CBM computer related tools | master | 0 | 2 | 0 | 2 | https://api.github.com/repos/ikskuh/cbm-tools/tags | - | [
"c128",
"c64",
"cbm",
"commodore-64",
"zig",
"ziglang"
]
| 16 | false | 2022-10-03T21:08:05Z | true | true | unknown | github | [
{
"commit": "3797c1473b48e445d721d40c8fbbe9a7422095ae.tar.gz",
"name": "args",
"tar_url": "https://github.com/MasterQ32/zig-args/archive/3797c1473b48e445d721d40c8fbbe9a7422095ae.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/MasterQ32/zig-args"
}
]
| CBM Tools
My collection of smaller tools related to <a>CBM</a> computers like C64 or C128.
<code>cbm-basic</code>
<code>cbm-basic</code> is a simple tokenizer/detokenizer to convert your BASIC <code>PRG</code> files into plain text files or back.
<strong>Usage:</strong>
<code>``
cbm-basic [fileName]
Supported command line arguments:
-h, --help Prints this help text.
--start-address [num] Defines the load address of the basic program. [num] is decimal (default) or hexadecimal (when prefixed).
-o, --output [file] Sets the output file to [file] when given.
-m, --mode [mode] Sets the mode to</code>compile<code>or</code>decompile`.
-d, --device [dev] Sets the device. Supported devices are listed below.
-V, --version [vers] Sets the used basic version. Supported basic versions are listed below.
In <code>compile</code> mode, the application will read BASIC code from stdin or [fileName] when given and will tokenize it into a CBM readable format.
Each line in the input must have a decimal line number followed by several characters. The input encoding is assumed to be PETSCII.
In <code>decompile</code> mode the application will read in a BASIC PRG file and will output detokenized BASIC code.
Each line in the output will be prefixed by a decimal line number and a space. The output encoding is assumed to be PETSCII.
Supported devices:
c64, c128
Supported BASIC versions:
1.0, 2.0, 3.5, 7.0
```
<code>cbm2wav</code>
(<em>Planned</em>) Converts <code>PRG</code> files to audio files that can be used with a datassette. | []
|
https://avatars.githubusercontent.com/u/10093365?v=4 | bcrypt-encoder | Daimanta/bcrypt-encoder | 2021-01-09T21:01:37Z | A CLI Bcrypt encoder written in Zig. | master | 0 | 1 | 0 | 1 | https://api.github.com/repos/Daimanta/bcrypt-encoder/tags | NOASSERTION | [
"bcrypt",
"zig"
]
| 84 | false | 2025-03-05T21:36:01Z | true | false | unknown | github | []
| Bcrypt encoder
Bcrypt encoder hashes password with the bcrypt algorithm. Also allows checking if a password matches a provided hash.
Usage
```
Usage: bcrypt-encoder [OPTION]
Hashes password with the bcrypt algorithm. Also allows checking if a password matches a provided hash.
If arguments are possible, they are mandatory unless specified otherwise.
-h, --help Display this help and exit.
-r, --rounds Indicates the log number of rounds, 1<= rounds <= 31. Default value is 10.
-c, --check Prompts for a password. 'true' or 'false' will be returned whether the password matches the hash. Cannot be combined with -er.
-e, --encrypt Prompts for a password. The result will be a bcrypt hash of the password. Cannot be combined with -c. Default option.
``` | []
|
https://avatars.githubusercontent.com/u/17525998?v=4 | celeritas-old | omnisci3nce/celeritas-old | 2020-04-26T06:50:24Z | OpenGL renderer with basic shading and OBJ loading | master | 1 | 1 | 0 | 1 | https://api.github.com/repos/omnisci3nce/celeritas-old/tags | - | [
"opengl",
"zig"
]
| 86,802 | false | 2024-09-10T10:56:54Z | true | false | unknown | github | []
| celeritas
Windows
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
need to run this first to get microsoft runtime for glfw I think | []
|
https://avatars.githubusercontent.com/u/46252311?v=4 | Folly | deingithub/Folly | 2020-05-17T19:57:12Z | "All of it… all of it… madness." | master | 0 | 1 | 0 | 1 | https://api.github.com/repos/deingithub/Folly/tags | MIT | [
"osdev",
"riscv",
"zig"
]
| 87 | false | 2020-05-31T11:57:50Z | true | false | unknown | github | []
| The Folly of Cass
A RV64G kernel implemented in Zig
This is a timesink. To waste your time similarly to how I do, you need <a>The Nix Package Manager</a> and <a>The Zig Programming Language</a>.
Technically you only need the latter but the former does a lot of important stuff too and makes the entire thing … <em>comparatively</em> painless. You should use it anyway. I am being really helpful, I know.
Executive Summary
Wow I can't decide if that sounds more self-important or soulless. I'll keep it for now, it is apt in either case. The kernel entry point is in <code>src/startup.asm</code>, which does some setup and hands over to <code>src/main.zig</code>'s <code>kmain()</code>. It goes downhill from there. Currently Folly can receive interrupts, allocate heap memory in page sized chunks and write to and read from the UART. Planned features include a userspace exclusively implemented in an interpreted language (probably going to be WASM), graphics support for a vaguely Oberon-inspired textual user interface (if that's possible with QEMU currently), and an overall oppressive and impersonal atmosphere.
Hacking
<code>sh
nix-shell # this installs a metric fuckton of version-locked tools courtesy of nixpkgs
zig build run # this builds the kernel and runs it in qemu</code> | []
|
https://avatars.githubusercontent.com/u/7283681?v=4 | zig-kak | lun-4/zig-kak | 2020-02-16T15:49:02Z | kakoune plugin for zig support (wip) | master | 0 | 1 | 0 | 1 | https://api.github.com/repos/lun-4/zig-kak/tags | - | [
"kakoune",
"zig"
]
| 4 | false | 2023-01-28T13:27:35Z | false | false | unknown | github | []
| note
kakoune master branch has builtin zig highlighting, afaik it isn't in a release
yet but: https://github.com/mawww/kakoune/pull/3422
thank you so much, ifreund
(what is) zig-kak
wip plugin providing zig support in kakoune
this only provides syntax highlighting.
using zig fmt in kakoune
requires this edit to kakrc
<code>hook global WinSetOption filetype=zig %{
set-option window formatcmd 'zig fmt --color off --stdin'
hook buffer BufWritePre .* %{format}
}</code> | []
|
https://avatars.githubusercontent.com/u/10249330?v=4 | zgit | frenata/zgit | 2020-04-20T14:43:49Z | Implementing git in zig in order to learn both! | master | 0 | 1 | 0 | 1 | https://api.github.com/repos/frenata/zgit/tags | - | [
"git",
"wyag",
"zig"
]
| 8 | false | 2021-09-23T09:55:51Z | true | false | unknown | github | []
| ZGit
An exercise in learning both <code>zig</code> and more about the internals of <code>git</code>, roughly following <a>WYAG</a> towards that end.
Steps:
<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> 3: initializing repos
<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> command: init
<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> searching upwards for a repo
<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> 4: reading and writing objects
<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> 5: reading commit history
<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> 6: reading commit data
<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> 7: refs, tags, and branches
<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> 8: staging and the index | []
|
https://avatars.githubusercontent.com/u/17314063?v=4 | zig-date | JoaoSilveira/zig-date | 2020-08-09T22:13:45Z | Date/time related repos, Gregorian calendar only for now | master | 0 | 1 | 0 | 1 | https://api.github.com/repos/JoaoSilveira/zig-date/tags | - | [
"date-time",
"date-time-formatting",
"gregorian-calendar",
"zig"
]
| 8 | false | 2025-01-09T15:15:33Z | false | false | unknown | github | []
| Zig Date
At the present moment it's just a not really functional GregorianDateTime, but will, hopefully, be a fully functional Gregorian calendar date time.
It already supports formatting documented in <code>date.zig:200</code> or <code>format</code> function of <code>DateTime</code> struct. There were some problems with zig's <code>std.fmt.format</code> so you can't format in <code>std.debug.print</code> yet
No tests were written for now, but will soon be added | []
|
https://avatars.githubusercontent.com/u/3932972?v=4 | navmesh | ikskuh/navmesh | 2020-08-21T12:20:12Z | A navmesh implementation in zig | master | 0 | 1 | 0 | 1 | https://api.github.com/repos/ikskuh/navmesh/tags | - | [
"navmesh",
"pathfinding",
"zig",
"zig-package",
"ziglang"
]
| 120 | false | 2022-03-01T09:48:08Z | true | false | unknown | github | []
| 404 | []
|
https://avatars.githubusercontent.com/u/28556218?v=4 | zig-smaz | joachimschmidt557/zig-smaz | 2020-05-18T21:35:08Z | Port of smaz string compression to zig | master | 0 | 1 | 0 | 1 | https://api.github.com/repos/joachimschmidt557/zig-smaz/tags | MIT | [
"zig",
"zig-package"
]
| 21 | false | 2025-01-22T13:04:25Z | true | false | unknown | github | []
| zig-smaz
Port of the <a>smaz string compression algorithm</a> to <a>zig</a>
Works with Zig 0.13.0 | []
|
https://avatars.githubusercontent.com/u/28556218?v=4 | zig-wcwidth | joachimschmidt557/zig-wcwidth | 2020-03-28T20:56:28Z | [WIP] Implementation of wcwidth() in zig | master | 2 | 1 | 2 | 1 | https://api.github.com/repos/joachimschmidt557/zig-wcwidth/tags | MIT | [
"unicode",
"zig",
"zig-package"
]
| 36 | false | 2025-03-07T16:24:38Z | true | true | unknown | github | []
| zig-wcwidth
A port of <a>wcwidth</a> to zig
<code>wcwidth</code> works with Zig 0.14.0. | []
|
https://avatars.githubusercontent.com/u/5727856?v=4 | zpq | Aransentin/zpq | 2020-09-26T11:04:58Z | zpq is a connection library for PostgreSQL | master | 0 | 1 | 1 | 1 | https://api.github.com/repos/Aransentin/zpq/tags | EUPL-1.2 | [
"postgresql",
"zig"
]
| 13 | false | 2022-12-26T12:43:37Z | true | false | unknown | github | []
| 404 | []
|
https://avatars.githubusercontent.com/u/14693516?v=4 | kindling | cshenton/kindling | 2020-08-09T08:40:59Z | Fire starter for html5 3d development with WebGL 2.0, WebAudio, and Websockets. | master | 0 | 1 | 0 | 1 | https://api.github.com/repos/cshenton/kindling/tags | MIT | [
"game-development",
"wasm",
"web-game-development",
"webaudio",
"webgl2",
"zig"
]
| 4,407 | false | 2024-07-26T08:35:17Z | true | false | unknown | github | []
| Kindling
Fire starter for 3D web projects. This is a set of hand written zig bindings to
various web platform APIs that enable zig to be a complete application
development environment for the browser.
The goal is to make getting a fullscreen canvas with a webGL 2.0 context, audio,
and networking interfaces that are all callable from a webassembly module
generated from zig code.
<ul>
<li>[X] Zig Build Generating <code>.wasm</code> module</li>
<li>[X] Core Wasm Bindings (<code>console.log</code>, canvas size, etc.)</li>
<li>[X] WebGL 2.0 Bindings (mostly finished)
<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> WebAudio Bindings
<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> WebSockets Bindings</li>
</ul>
Current State
All I do currently is create a fullscreen canvas, then render to that canvas
from inside a wasm module. This involves creating a fullscreen quad and
uploading it, compiling a shader embedded in the wasm module itself, and making
the appropriate draw calls, see <code>src/main.zig</code> for the callback functionality,
and <code>index.html</code> for how it all gets tied together in the browser.
Building
Ensure you have a newish version of zig installed and then just:
<code>zig build wasm</code>
And copy <code>zig-cache/lib/kindling.wasm</code> to this directory.
Running
To preview things in their current state just run a webserver in this directory,
you probably have python installed so the following may work.
<code>sh
python -m http.server</code>
How It Works
I found "all in one" solutions like emscripten and wasm-bindgen more confusing
than helpful so this is a "raw" implementation of wasm bindings. All you have to
do is define some javascript functions (like the ones in <code>js/webgl.js</code>) then
pass them into the environment when you initialise your wasm module.
To call those js functions you need corresponding function prototypes in your
wasm language (so here the corresponding bindings are in <code>src/webgl.zig</code>) and
the browser will handle linking them when the module is initialised.
It's very straightforward, with the caveat that complex types can't be passed
across that ABI, so you do sometimes need to keep objects in JS land and pass
handles to your wasm module (which is what I do with gl objects).
The great thing about doing things this way is you're not tied to someone else's
platform bindings. If you need more functionality from the browser, you just
write it.
Credits
A big thanks to <a>flooh</a> for sokol and
<a>raulgrell</a> for wasm tetris. These both helped me
understand how wasm platform bindings actually work (and at least as
importantly, how to get a nice looking fullscreen canvas). | []
|
https://avatars.githubusercontent.com/u/11507066?v=4 | vulkan-triangle | abdelq/vulkan-triangle | 2020-06-14T02:37:38Z | Triangle example from the Vulkan Tutorial in Zig | master | 0 | 1 | 0 | 1 | https://api.github.com/repos/abdelq/vulkan-triangle/tags | MIT | [
"vulkan",
"zig"
]
| 32 | false | 2021-07-08T18:50:50Z | true | false | unknown | github | []
| Vulkan Triangle
Example of triangle drawing from the <a>Vulkan Tutorial</a>
written in <a>Zig</a>.
Build
Requires <code>glslc</code> and <code>zig > 0.6.0</code>.
<code>zig build</code>
License
This project is available under the <a>MIT license</a>. | []
|
https://avatars.githubusercontent.com/u/34610?v=4 | experiment-zig-generator | marnix/experiment-zig-generator | 2020-11-04T12:02:06Z | null | master | 0 | 1 | 0 | 1 | https://api.github.com/repos/marnix/experiment-zig-generator/tags | - | [
"generator-function",
"zig",
"ziglang"
]
| 7 | false | 2020-12-28T05:25:24Z | false | false | unknown | github | []
| 404 | []
|
https://avatars.githubusercontent.com/u/54483?v=4 | vm2gol-v2-zig | sonota88/vm2gol-v2-zig | 2021-01-05T23:09:10Z | simple toy compiler | main | 0 | 1 | 0 | 1 | https://api.github.com/repos/sonota88/vm2gol-v2-zig/tags | MIT | [
"compiler",
"zig",
"ziglang"
]
| 198 | false | 2025-03-29T07:31:41Z | false | false | unknown | github | []
| 素朴な自作言語のコンパイラをZigに移植した
https://memo88.hatenablog.com/entry/2021/01/07/235019
<code>sh
git clone --recursive https://github.com/sonota88/vm2gol-v2-zig.git
cd vm2gol-v2-zig
./docker.sh build
./test.sh all</code>
```sh
./docker.sh run zig version
# 0.14.0
LANG=C wc -l {lexer,parser,codegen}.zig lib/{types,utils,json}.zig
# 189 lexer.zig
# 630 parser.zig
# 552 codegen.zig
# 209 lib/types.zig
# 210 lib/utils.zig
# 144 lib/json.zig
# 1934 total
``` | []
|
https://avatars.githubusercontent.com/u/15308111?v=4 | zig-lint | Vexu/zig-lint | 2020-03-14T17:41:47Z | null | master | 0 | 1 | 0 | 1 | https://api.github.com/repos/Vexu/zig-lint/tags | MIT | [
"zig"
]
| 18 | false | 2023-01-28T14:31:46Z | true | false | unknown | github | []
| Zig linter | []
|
https://avatars.githubusercontent.com/u/12919300?v=4 | zigscript | Nuss9940/zigscript | 2020-09-09T13:40:21Z | Run a zig file directly by using a shebang line | main | 0 | 1 | 0 | 1 | https://api.github.com/repos/Nuss9940/zigscript/tags | Unlicense | [
"zig"
]
| 2 | false | 2025-03-01T17:34:41Z | false | false | unknown | github | []
| Zigscript
Installation
Put the zigscript file in this repository on your $PATH
<code># ln -s zigscript /usr/local/bin/
</code>
How to use
Simply put
<code>#!/usr/bin/env zigscript
</code>
in the first line of your script.
Example:
<code>#!/usr/bin/env zigscript
const std = @import("std");
pub fn main() !void {
const stdout = std.io.getStdOut().writer();
try stdout.print("Hello, {}!\n", .{"world"});
}
</code>
Save it as <code>example</code>, make sure it's executable and run it:
<code>$ ./example
Hello, world!
</code>
How it works
It simply copies your script to another directory excluding the first line. Then <code>zig run</code> is
called with the copied file as an argument. It compiles the code and runs the result. Zig's caching
system will make sure to only recompile when there are changes in the script.
Limitations
<ul>
<li>You will need a main function, just like in any other executable zig program</li>
<li>All your code needs to be in one file. You may import stuff from the standard library</li>
<li>Line numbers on compile errors/warnings are off by one</li>
</ul>
See also
Closed issue on this topic: https://github.com/ziglang/zig/issues/2165 | []
|
https://avatars.githubusercontent.com/u/2538614?v=4 | libyaml-zig | noahp/libyaml-zig | 2020-06-29T13:55:36Z | Building libyaml with `zig cc` | master | 0 | 1 | 0 | 1 | https://api.github.com/repos/noahp/libyaml-zig/tags | - | [
"libyaml",
"yaml",
"zig"
]
| 7 | false | 2023-01-01T22:30:20Z | false | false | unknown | github | []
| libyaml-zig
Playing around with using zig to build libyaml.
TODO look into adding zig native bindings for manipulating yaml documents. | []
|
https://avatars.githubusercontent.com/u/9454576?v=4 | utilz | emekoi/utilz | 2020-12-28T07:46:22Z | small(-ish) unix/linux "utilities" written in zig | master | 0 | 1 | 0 | 1 | https://api.github.com/repos/emekoi/utilz/tags | MIT | [
"zig"
]
| 185 | false | 2021-08-07T05:49:17Z | true | false | unknown | github | []
| utilz
i started using linux a while back and ricing seemed kinda cool, so i wanted to try writing some utils for ricing in zig. i might also add any other unix/linux utilities and little zig libraries i write later on. one of my goals is to use libc as little as possible.
utilities
<ul>
<li><a>pal</a></li>
</ul>
libraries
<ul>
<li><a>build_sys</a></li>
<li><a>stb</a></li>
</ul> | []
|
https://avatars.githubusercontent.com/u/5862812?v=4 | binary_size_comparison | Adobe-Android/binary_size_comparison | 2020-08-16T03:07:16Z | A binary size comparison across various programming languages | master | 0 | 1 | 0 | 1 | https://api.github.com/repos/Adobe-Android/binary_size_comparison/tags | MIT | [
"c",
"cpp",
"golang",
"rust",
"zig"
]
| 41 | false | 2025-02-01T18:57:17Z | false | false | unknown | github | []
| binary size comparison
A binary size comparison across various programming languages
C++
<strong>Note:</strong> <em>Extraneous information like BuildID omitted from file output.</em>
<strong>Note:</strong> <em>Windows build 2004 and/or Ubuntu Linux 20.04 used for testing.</em>
Idiomatic
```cpp
include
int main()
{
std::string hello_str = "Hello C++\n";
std::cout << hello_str;
}
```
<strong>Compiler:</strong>
Visual Studio 2019 16.7 - MSVC 19.27 - amd64 - Windows 64-bit release build
<strong>Size:</strong>
12K
<strong>Size (with UPX compression):</strong>
9K
<strong>Compiler:</strong>
Visual Studio 2019 16.7 - MSVC 19.27 - x86 - Windows 32-bit release build
<strong>Size:</strong>
11K
<strong>Size (with UPX compression):</strong>
8K
<strong>Compiler:</strong>
GCC 9.3 - Linux 64-bit build
<strong>Size:</strong>
18K
<strong>Size (stripped binary):</strong>
15K
<strong>Command:</strong>
<code>sh
strip hello</code>
<strong>Final output from <a>file(1)</a>:</strong>
<code>sh
ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, stripped</code>
C-style
```cpp
include
int main()
{
char hello_str[] = "Hello C++\n";
printf("%s", hello_str);
}
```
<strong>Compiler:</strong>
Visual Studio 2019 16.7 - MSVC 19.27 - amd64 - Windows 64-bit release build
<strong>Size:</strong>
11K
<strong>Size (with UPX compression):</strong>
8K
<strong>Compiler:</strong>
Visual Studio 2019 16.7 - MSVC 19.27 - x86 - Windows 32-bit release build
<strong>Size:</strong>
9K
<strong>Size (with UPX compression):</strong>
7K
<strong>Compiler:</strong>
GCC 9.3 - Linux 64-bit build
<strong>Size:</strong>
17K
<strong>Size (stripped binary):</strong>
15K
<strong>Command:</strong>
<code>sh
strip hello</code>
<strong>Final output from <a>file(1)</a>:</strong>
<code>sh
ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, stripped</code>
<strong>For further details on optimizing the size of our C and C++ binaries:</strong>
Please see <a>c_compiler_comparison</a>
Rust
<code>rust
fn main() {
println!("Hello, world!");
}</code>
<strong>Compiler:</strong>
Rustc 1.43 - Linux 64-bit release build
<strong>Size:</strong>
7M
<strong>Command:</strong>
<code>sh
cargo build --release</code>
<strong>Size (with LTO):</strong>
1.8M
see <a>Cargo.toml</a>
<strong>Size (with LTO and stripped):</strong>
195K
<strong>Command:</strong>
<code>sh
strip hello</code>
<strong>Final output from <a>file(1)</a>:</strong>
<code>sh
ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, stripped</code>
Go
```go
package main
import "fmt"
func main() {
fmt.Println("Hello, world!")
}
```
<strong>Compiler:</strong>
Go 1.13 - Linux 64-bit build
<strong>Size:</strong>
2.0M
<strong>Command:</strong>
<code>sh
go build hello.go</code>
<strong>Output from <a>file(1)</a>:</strong>
<code>sh
ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, not stripped</code>
<strong>Size (-ldflags "-s -w"):</strong>
1.4M
<strong>Command:</strong>
<code>sh
go build -ldflags "-s -w" hello.go</code>
<strong>Final output from <a>file(1)</a>:</strong>
<code>sh
ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped</code>
Zig
```zig
const std = @import("std");
pub fn main() !void {
const stdout = std.io.getStdOut().outStream();
try stdout.print("Hello, {}!\n", .{"world"});
}
```
<strong>Compiler:</strong>
Zig 0.6.0 - Linux 64-bit release build
<strong>Size (--release-fast):</strong>
167K
<strong>Command:</strong>
<code>sh
zig build-exe hello.zig --release-fast</code>
<strong>Size (--release-small):</strong>
78K
<strong>Command:</strong>
<code>sh
zig build-exe hello.zig --release-small</code>
<strong>Output from <a>file(1)</a>:</strong>
<code>sh
ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, with debug_info, not stripped</code>
<strong>Size (--release-small and stripped):</strong>
5.3K
<strong>Command:</strong>
<code>sh
strip hello</code>
<strong>Final output from <a>file(1)</a>:</strong>
<code>sh
ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped</code>
Resources:
<ul>
<li>http://timelessname.com/elfbin/</li>
<li>https://lifthrasiir.github.io/rustlog/why-is-a-rust-executable-large.html</li>
<li>https://stackoverflow.com/questions/3861634/how-to-reduce-compiled-file-size</li>
<li>https://golang.org/cmd/link/</li>
<li>https://ziglang.org/documentation/0.6.0/</li>
<li>https://ziglang.org/documentation/0.6.0/#Build-Mode</li>
<li>https://docs.microsoft.com/en-us/cpp/build/reference/compiler-options-listed-alphabetically?view=vs-2019</li>
</ul> | []
|
https://avatars.githubusercontent.com/u/1892046?v=4 | zig_copy | nsmryan/zig_copy | 2020-10-07T02:16:54Z | A Zig implementation of Rust's Copy trait | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/nsmryan/zig_copy/tags | - | [
"zig"
]
| 2 | false | 2020-12-22T15:41:57Z | true | false | unknown | github | []
| Copy Trait for Zig
This repo contains a simple implementation of Rust's Copy trait in Zig, using the
std.meta.trait.TraitFn implementation of traits.
The purpose is mostly to play around with Zig's meta programming through comptime type
reflection, and to explore my interest in languages where all possible shapes of a
type can be inspected.
If you look at <a>Zig's traits</a>
you can see the core concept is:
<code>zig
pub const TraitFn = fn (type) bool;</code>
In other words- a trait is a function from types to booleans. Traits/Protocols/TypeClasses
can be considered predicates in the type system, taking types to true or false, where true
indicates that a type implements the trait.
Zig's implementation of this concept feels very much in line with the rest of Zig's design-
it is pragmatic and uses basic concepts like functions with no need for built in support.
I'm sure this limits the languages ability to perform checks such as Rust's orfan rule, or
some of the more complex Haskell concepts, or the ability to create a Zig version of Hoogle,
or Rust's trait documentation. It also makes the use of traits seem more like what I believe
is done in Go, where a type can implement a Protocol as long as it has the correct
definitions, rather then the explicit way this is done in Rust and Haskell. Whether this is
good or not is a whole bag of tradeoffs- its certainly not what I'm used to.
However, I think the intent is to get much of the advantage
of other language's innovations while keeping the Zig version simple and built within the
language instead of build into the language. This is a signficant tradeoff, and one I will
be interested to watch within the Zig community.
The Implementation
The implementation of the Copy trait is a single function that switches on the given type.
Some simple types like u8 or bool result in an immediate return of true, while others like
a struct or union require recursing on the types of each field (or the child type in the case
of an array).
Overall the implementation is probably too trivial to really say any more- you use the
<a>typeInfo</a> to get the
type of type (the kind) and that guides whether to return or decompose the type
into smaller types.
I think it would be interesting to try to implement ever more complex concepts in this system-
not necessarily to use them for real, but just to explore what can be done with Zig's comptime. | []
|
https://avatars.githubusercontent.com/u/59871781?v=4 | zrc | timmyjose-projects/zrc | 2020-07-17T15:30:54Z | Zig egg for generating Adler-32 and CRC-32 checksums | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/timmyjose-projects/zrc/tags | Unlicense | [
"adler-32",
"crc",
"crc-32",
"zig"
]
| 13 | false | 2023-01-28T13:24:09Z | true | false | unknown | github | []
| zrc
A Zig egg (library) for calculating the <code>Adler-32</code> and <code>CRC-32</code> checksums of strings.
An interface is also provided to extend the library with custom checksum algorithms.
Usage
Example:
<code>adler32</code> checksum:
```
var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator);
defer arena.deinit();
var allocator = &arena.allocator;
<code>var string = "Hello, world";
var cs_adler = adler32.Adler32().init(allocator);
try cs_adler.checksum.updateByteArray(string[0..string.len]);
testing.expect(cs_adler.checksum_value == 466879593);
cs_adler.checksum.close();
</code>
```
<code>crc-32</code> checksum:
```
var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator);
defer arena.deinit();
var allocator = &arena.allocator;
<code>const string = "Hallo, Welt";
var cs_crc32 = crc32.Crc32().init(allocator);
for (string) |b| {
try cs_crc32.checksum.updateByte(b);
}
testing.expect(cs_crc32.checksum_value == 1317902423);
cs_adler.checksum.close();
</code>
```
See the tests in <code>src/lib.zig</code> for more usage details.
LICENCE
See <a>LICENCE</a>. | []
|
https://avatars.githubusercontent.com/u/39384757?v=4 | zig.kak | chadwain/zig.kak | 2020-11-10T17:19:02Z | Zig language support for kakoune | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/chadwain/zig.kak/tags | MIT | [
"kakoune",
"zig"
]
| 5 | true | 2020-11-10T18:50:08Z | false | false | unknown | github | []
| 404 | []
|
https://avatars.githubusercontent.com/u/17795572?v=4 | docker-zig | Eloitor/docker-zig | 2020-12-13T06:13:33Z | A docker image for Zig with X11 and Xft librariesbased upon Alpine Linux 3.12. | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/Eloitor/docker-zig/tags | BSD-3-Clause | [
"docker",
"x11",
"xft",
"zig"
]
| 62 | true | 2020-12-14T15:17:50Z | false | false | unknown | github | []
| Zig
<a></a>
A docker image for <a>Zig</a> with the c libraries X11 and Xft.
This image is based upon Alpine Linux 3.12.
See https://github.com/euantorano/docker-zig the original version of this image without the libraries.
Using this image
Building an executable
<code>docker run -v $PWD:/app eloitor/zig:0.7.0 build-exe hello.zig -lc -lX11 -lXft</code>
The commands for the extra libraries (<code>-lc -lX11 -lXft</code> are optional.
If you don't need the libraries, you can also run the image <code>euantorano/zig</code>.
Available tags
There are two variants of tags provided by this repository - release tags such as <code>0.7.0</code>, and <code>master</code> branch builds such as <code>master-28018703</code>.
The most recent <code>master-X</code> build is always tagged as simply <code>master</code> as well as having a tag including the Git hash for the release.
The most recent stable release is always tagged as <code>latest</code>.
Building the Docker image(s)
A simple Python script (<code>build.py</code>) is included that scrapes the <a>Zig Releases web page</a> in order to get available releases. It then builds an image for every release, including the current master release and pushes them to Docker Hub.
This script uses <a><code>pipenv</code></a> and can be ran as follows: <code>pipenv run python build.py --version-path ./last_version --master-path ./last_master</code>. | []
|
https://avatars.githubusercontent.com/u/4116675?v=4 | fluent-bit-zig | sriduth/fluent-bit-zig | 2020-02-23T17:29:15Z | Try to write a simple fluent bit output plugin in Zig | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/sriduth/fluent-bit-zig/tags | - | [
"fluent-bit",
"logging",
"zig",
"ziglang"
]
| 5 | false | 2020-02-23T17:35:36Z | false | false | unknown | github | []
| Writing a fluent-bit output plugin in Zig
First translate the C headers
These are the same headers used by the go output plugin scaffolding project: https://github.com/fluent/fluent-bit-go
<code>bash
zig translate-c include/flb_output.h > include/flb_output.zig
zig translate-c include/flb_plugin.h > include/flb_plugin.zig</code>
Build a shared object
<code>bash
zig build-lib -dynamic scaffolding.zig</code>
This will generate a <code>libscaffolding.so.0.0.0</code> in the current directory.
Use!
<code>bash
bin/fluent-bit -e libscaffolding.so.0.0.0 -i random -o zstdout -v</code> | []
|
https://avatars.githubusercontent.com/u/5048090?v=4 | zigfmt-web | jackdbd/zigfmt-web | 2020-12-10T16:55:08Z | run zig fmt in a wasm module | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/jackdbd/zigfmt-web/tags | MIT | [
"wasm",
"webassembly",
"zig"
]
| 964 | true | 2023-10-06T12:34:13Z | true | false | unknown | github | []
| zigfmt-web
<a></a>
Write zig code in a <code><textarea></code>, format it with WebAssembly. Try <a>me</a>.
Installation
Clone the repo and jump into it:
<code>sh
git clone [email protected]:jackdbd/zigfmt-web.git
cd zigfmt-web</code>
Install JS dev dependencies (prettier, eslint, etc):
<code>sh
npm install</code>
Use <a>zigup</a> to fetch and manage zig compilers:
<code>sh
zigup fetch master
zigup default master</code>
Double check the version of the zig compiler:
<code>sh
zig version</code>
Develop
Compile the wasm module and move it to the <code>public</code> directory:
<code>sh
npm run build</code>
<em>Note</em>: the wasm module is generated compiling <code>src/lib.zig</code> with <code>wasm32-freestanding-musl</code> as the compilation target, and with the release-small build mode.
Serve the <code>public</code> directory:
<code>sh
npm run serve</code>
Deploy
The <code>public</code> directory will be deployed to <a>GitHub pages</a>, so each <code>git push</code> automatically triggers a new deploy.
WASI
The <code>src/main.zig</code> file can be compiled for <a>wasm32-wasi-musl</a> and run on any WebAssembly runtime. You can compile for WASI with:
<code>sh
zig build-exe src/main.zig \
-target wasm32-wasi-musl \
-O Debug && \
mv main.wasm wasi-demo</code>
Note: compile the WASI demo using <code>-O Debug</code> so you can see the print statements from <code>std.log.debug</code> and <code>std.log.info</code>.
You can execute the demo with a WASI runtime like <a>wasmtime</a>:
```sh
wasmtime run wasi-demo/main.wasm 'const answer: u8 = 42;'
wasmtime run wasi-demo/main.wasm 'this is not valid zig code'
```
In alternative, you can run this script that uses the Node.js <a>wasi module</a>:
```sh
node --experimental-wasi-unstable-preview1 wasi-demo/main.mjs \
'const answer: u8 = 42;'
node --experimental-wasi-unstable-preview1 wasi-demo/main.mjs \
'this is not valid zig code'
```
Note: the <code>--experimental-wasi-unstable-preview1</code> flag should no longer be required from Node.js 20 onwards.
If you want to know more
wasm-ld
zig uses <a>wasm-ld</a>, a LLVM-based linker. You can see it when passing the <code>--verbose-link</code> flag:
<code>sh
zig build-lib src/lib.zig \
-target wasm32-freestanding-musl \
-dynamic \
--verbose-link</code>
If you have some issues related to the wasm linker, see these links:
<ul>
<li>https://gist.github.com/josephg/873a21d4558fd69aeccea19c3df96672</li>
<li>https://github.com/ziglang/zig/issues/11209</li>
<li>https://lld.llvm.org/WebAssembly.html</li>
<li>https://github.com/WebAssembly/tool-conventions/blob/main/Linking.md</li>
</ul>
WABT
You can debug the generated wasm module using a few tools from the <a>WebAssembly Binary Toolkit</a>:
See the generated <a>WebAssemly Text Format (WAT)</a>:
<code>sh
wasm2wat public/lib.wasm</code>
Inspect the symbols in the wasm binary:
```sh
wasm-objdump public/lib.wasm --headers
wasm-objdump public/lib.wasm --details
wasm-objdump public/lib.wasm --full-contents
```
<a>Decompile the wasm file</a> to a pseudo C-like language:
<code>sh
wasm-decompile public/lib.wasm</code>
<a>Decompile the wasm file</a> to C:
<code>sh
wasm2c public/lib.wasm</code>
<a>count opcode usage for instructions</a>:
<code>sh
wasm-opcodecnt public/lib.wasm</code> | []
|
https://avatars.githubusercontent.com/u/3952805?v=4 | hsluv-zig | LakeByTheWoods/hsluv-zig | 2020-03-15T09:15:08Z | Zig implementation of HSLuv | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/LakeByTheWoods/hsluv-zig/tags | - | [
"hpluv",
"hsluv",
"zig",
"ziglang"
]
| 543 | false | 2020-10-02T06:56:32Z | true | false | unknown | github | []
| 404 | []
|
https://avatars.githubusercontent.com/u/1916079?v=4 | zig-bip39 | vrischmann/zig-bip39 | 2020-03-08T16:56:17Z | Partial implementation of BIP-0039 for Zig | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/vrischmann/zig-bip39/tags | MIT | [
"zig"
]
| 60 | false | 2021-12-24T19:49:16Z | true | false | unknown | github | []
| bip39
This is a partial implementation of <a>BIP-0039</a> in Zig.
This is a port of my Java implementation to Zig that I did as a way to learn the language.
Supported features
<ul>
<li>Encoding a byte array into a mnemonic</li>
<li>English wordlist</li>
</ul>
Missing features
<ul>
<li>Wordlists for other languages</li>
<li>Checksum validation</li>
<li>Seed creation</li>
</ul> | []
|
https://avatars.githubusercontent.com/u/59871781?v=4 | bohio | timmyjose-projects/bohio | 2020-07-14T14:27:10Z | A Zig egg (library) for providing definitive environment variables to be used by the `clutch` tool. | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/timmyjose-projects/bohio/tags | Unlicense | [
"clutch",
"env-vars",
"zig"
]
| 12 | false | 2023-01-28T13:24:09Z | true | false | unknown | github | []
| bohio
<code>bohio</code> refers to a house/roundhouse in the <a>Taino language</a>.
This <code>egg</code> (library) provides definitive, platform-independent environment variables for use with the <a>clutch package manager</a>.
Inspired by the Rust crate, <code>home</code>.
LICENCE
See <a>LICENCE</a>. | []
|
https://avatars.githubusercontent.com/u/5270804?v=4 | chelar | tombosc/chelar | 2020-12-10T10:44:14Z | Parsers of complex nested types in Zig generated at comptime! | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/tombosc/chelar/tags | MIT | [
"comptime",
"parser",
"parsing",
"zig"
]
| 39 | false | 2020-12-26T22:23:59Z | true | false | unknown | github | []
| chelar
Create simple parsers in <a>Zig</a> at compile-time. Warning: Hacky and experimental.
API:
<ul>
<li><code>pub fn Parser(comptime T: type) (fn (?*std.mem.Allocator, *std.mem.TokenIterator) Error!T)</code>: given a type, returns a parsing function that takes an optional allocator (only needed for slices and pointers) and an iterator. See 2nd example.</li>
<li>more experimental: <code>ParserStr</code> is identical, except that it doesn't need an iterator, but uses <em>formatted structs</em> -- structs that contain parsing information. The function returned returns not <code>Error!T</code>, but <code>Error!Unformat(T)</code>. <code>Unformat</code> recursively converts formatted structs and types containing these into types containing no nested formatted structs.</li>
</ul>
Example taken (modified) from <a>advent of code 2020</a>, day 8:
```Zig
test "AoC day8 (modified)" {
const alloc = std.testing.allocator;
const Opcode = enum {
nop,
acc,
jmp,
};
const Instruction = struct {
opcode: Opcode,
operand: ?i32,
};
// Parser definition:
// opcodes and operands are space-separated
const PInstruction = Join(Instruction, " ");
// there's an unknown number of instructions separated by \n
const PInstructions = Join([]PInstruction, "\n");
// name the data structure without formatting info
const Instructions = Unformat(PInstructions);
expect(Instructions == []Instruction);
const parser = ParserStr(PInstructions);
<code>const raw_instructions =
\\jmp +109
\\acc +10
\\jmp +18
\\nop
;
const parsed = try parser(alloc, raw_instructions);
defer alloc.free(parsed);
expect(parsed.len == 4);
expect(parsed[2].opcode == .jmp and parsed[2].operand.? == 18);
expect(parsed[3].opcode == .nop and parsed[3].operand == null);
</code>
}
```
Zig type | Regex | Grammar rule
---|---|---
<code>u8</code>, <code>u16</code>, ... | <code>[0-9]</code> |
<code>str</code> | <code>.*</code> |
<code>enum { a, b, c }</code> | <code>(a\|b\|c)</code> |
<code>?T</code> | <code>T?</code> |
<code>[]T</code> | <code>T*</code> |
<code>[19]T</code> | <code>T{19}</code> |
<code>const X = struct { a: T, b: U }</code> | | <code>X -> TU</code>
<code>const X = union(enum) { a: T, b: U }</code> | | <code>X -> T \| U</code>
You can also parse recursive languages, for instance:
```Zig
test "parser recursive base" {
var alloc = std.testing.allocator;
const LinkedList = struct {
_0: Match("("),
val: u32,
next: ?*@This(),
_1: Match(")"),
<code> pub fn deinit(list: *const @This(), alloc_: *std.mem.Allocator) void {
// see src/chelar.zig
}
pub fn sum(list: *const @This()) u32 {
var acc: u32 = 0;
var opt_cur: ?*const @This() = list;
while (opt_cur) |cur| {
acc += cur.val;
opt_cur = cur.next;
}
return acc;
}
};
const parser = Parser(*LinkedList);
const list = try parser(
alloc,
&std.mem.tokenize("( 3 ( 32 ( 5 ) ) )", " "),
);
defer list.deinit(alloc);
expect(list.sum() == 3 + 32 + 5);
</code>
}
```
The parser is a very naive <a>recursive descent parser</a>. There are major caveats:
<ul>
<li>does not deal with runtime errors (parsing errors) gracefully.</li>
<li>does not deal with compile time (errors of types). For instance, <code>Join(u32, " ")</code> should fail but doesn't. </li>
<li>numerous limitations when one creates types using <code>Join</code>, <code>Match</code> and <code>Unformat</code>.<ul>
<li>These functions create types which are not named properly (they are named after the line of code where the type is described). This can make it hard to debug. See <code>caveat type names</code>.</li>
<li>Right now, <code>Unformat</code> will recur infinitely. Therefore, it cannot remove <code>Match</code> fields in the <code>LinkedList</code> above, for example. Similarly, I don't know how to stop a potential operator like <code>Wrap(T, match_left, match_right)</code> from recursing infinitely (when T occurs in T as a pointer).</li>
<li><code>@Type</code> doesn't support creation of type with decls, as <a>proposed here (#6709)</a>. See <code>caveat functions in structs</code>.</li>
</ul>
</li>
</ul>
TODO:
<ul>
<li>A new operator on types <code>Wrap(T, '{', '}')</code>? See caveats.</li>
<li>Proper error handling</li>
<li>Comptime verbose mode</li>
<li>Serialization</li>
</ul> | []
|
https://avatars.githubusercontent.com/u/71220004?v=4 | mqttiotstuff.github.io | mqttiotstuff/mqttiotstuff.github.io | 2020-09-13T15:53:11Z | Web Site containing informations about the repositories and associated context https://mqttiotstuff.github.io | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/mqttiotstuff/mqttiotstuff.github.io/tags | MIT | [
"iot",
"mqtt",
"python",
"website",
"zig"
]
| 51,104 | false | 2022-01-28T07:33:10Z | false | false | unknown | github | []
| MQTTIOTStuff web pages
This repository contains the web pages resources, using Hugo
got to <a>https://mqttiotstuff.github.io/</a> | []
|
https://avatars.githubusercontent.com/u/60458916?v=4 | dice | nofmal/dice | 2020-04-22T06:20:00Z | A command-line tool for generating diceware password | master | 0 | 0 | 1 | 0 | https://api.github.com/repos/nofmal/dice/tags | Zlib | [
"diceware",
"password",
"zig"
]
| 56 | false | 2020-06-05T05:23:36Z | true | false | unknown | github | []
| 404 | []
|
https://avatars.githubusercontent.com/u/44962?v=4 | aoc2020 | nilium/aoc2020 | 2020-12-09T00:47:45Z | Advent of Code 2020, implemented in Zig 0.7.x. Mirror of https://git.sr.ht/~nilium/aoc2020. | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/nilium/aoc2020/tags | BSD-2-Clause | [
"advent-of-code",
"advent-of-code-2020",
"zig"
]
| 68 | false | 2020-12-10T08:35:13Z | true | false | unknown | github | []
| Advent of Code 2020
These are Advent of Code 2020 solutions written using <a>Zig</a> v0.7.0. | []
|
https://avatars.githubusercontent.com/u/29129213?v=4 | embedded_zig | dauc/embedded_zig | 2020-08-23T23:28:44Z | minimal Zig embedded ARM example (STM32F103 blue pill) | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/dauc/embedded_zig/tags | - | [
"bluepill",
"zig",
"ziglang"
]
| 16 | true | 2021-03-28T22:11:11Z | true | false | unknown | github | []
| embedded_zig
A "minimal" ARM cortex-M firmware in Zig running on a STM32F103. It blinks.
building
Get <a>GNU Arm Embedded Toolchain</a> and <a>Zig</a> in <code>PATH</code> and type:
<code>make
</code>
running on a <a>bluepill</a>
Run OpenOCD on a terminal:
<code>openocd -f /usr/share/openocd/scripts/interface/stlink-v2.cfg -f /usr/share/openocd/scripts/target/stm32f1x.cfg
</code>
Open your favorite GDB:
<code>arm-none-eabi-gdb firmware.elf -ex 'target extended-remote :3333'
load
r
</code>
Bonus: you can type <code>make</code> inside gdb and <code>load</code> it again.
issues
If you have any linking issues uncomment the line below (in the <code>Makefile</code>) to use GNU ld:
<code># zig build-exe ${BUILD_FLAGS} $(OBJS:%=--object %) --name [email protected] --linker-script ${LINKER_SCRIPT}
arm-none-eabi-ld ${OBJS} -o [email protected] -T ${LINKER_SCRIPT} -Map [email protected] --gc-sections
</code>
raq (rarely asked questions)
a) Shouldn't the Makefile...
A: lalalala
b) How do I flash this?
A: see <a>running on a bluepill</a>
c) Why didn't you use <code>@cImport()</code>?
A: yes | []
|
https://avatars.githubusercontent.com/u/19765253?v=4 | zig-libterm | DenizBasgoren/zig-libterm | 2020-12-18T04:25:01Z | A small library for writing CLI games in Zig | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/DenizBasgoren/zig-libterm/tags | MIT | [
"zig",
"ziglang"
]
| 250 | false | 2021-02-13T19:56:13Z | false | false | unknown | github | []
| zig-libterm
A small library for writing CLI games in Zig
to compile...
Make sure you have zig 0.7.0, then
<code>zig build-exe main.zig -lc</code> | []
|
https://avatars.githubusercontent.com/u/1892046?v=4 | zig_state_transitions | nsmryan/zig_state_transitions | 2020-10-11T23:45:47Z | An attempt to do type-checked state transitions in Zig | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/nsmryan/zig_state_transitions/tags | - | [
"zig",
"zig-comptime"
]
| 5 | false | 2020-12-22T15:41:48Z | true | false | unknown | github | []
| This repo is an attempt to use Zig's comptime mechanism to implement type checked
(or, at least comptime checked) state transitions.
The idea is that you have a type that represents you libraries state, and the
functions you define are only allowed on certain transitions. This could be used,
for example, to ensure that a socket's accept function is only called on a socket
after bind is called, or other such invariants.
I attempted this five times, and I will write up each attempt briefly
for future reference.
first_attempt.zig (Enum Type Parameters)
I found that the only way I can get this to happen successfully in Zig right
now is through type parameters.
Zig's comptime can be use similar to a
dependent type system, so you can parameterized a structure's type by the value
of an enum, and then write functions that only work for structs with a
particular value.
The limitation here is that the output of a particular function must have one
and only one state- there is no way to say that the function returns any state,
or one of two states. Looking over the standard liraries 'meta' code in the Zig
source shows that the language appears to have some kind of type switching that
might be used to return of several possible types, but there is currently
no documentation for this feature.
second_attempt.zig (Type as a Parameter)
I attempted to add the type as a parameter as well as the value indicating the
state. The hope was that I could say "the return value is a State structure parameterized
by a value of this known type". However, there is no way to say this in the return position
of a function. The return values have to be comptime known. This is when I started to realize
that this may be a rank-N type situation where I am attempting to bind a variable after the
functoin arrow and failing.
third_attempt.zig (Types for Types)
I then tried to avoid using the enum by splitting its variants into separate types. The
State struct is then parameterized by a type. This does not help at all. I thought maybe
I could use anytype, but that appears to only work in arguments? I couldn't get it to
work.
fourth_attempt.zig (Comptime Fields)
This was an interesting one. I thought I might be able to hide the type information inside
the structure, keeping it from appearing in the type at all. Then, I would just have to
add comptime block with assertions to enforce type invariants for state transitions.
This would not be the nice type theory solution, but it seemed Ziggy enough to me.
It would work, and be somewhat manual, but that seems fine for a language that is not
focused on theory but on engineering.
Sadly this also did not work. I added a comptime parameter called 'id' and tried to
set it to different value. Strangely you can create a structure with different values
for a comptime field, but the values are not actually used. The comptime field
will not compile without a default value, and this value is used whether or not you
set one when initializing the struct.
I made <a>issue 6656</a> asking if this should
work or not, and pointing out that the value appears to be set, and compiles, but that the
comptime field does not use this value. We will see how the issue plays out, but I am
leaving this repo as-is for now until another solution presents itself.
fifth_attempt.zig (Comptime Functions)
This attempt involved a function that transitions between states. The idea was to
define an 'input' type and 'state' type, and to be able to map states to
states depending on a comptime input. Then functions could be defined to take
comptime inputs, or use fixed inputs, and encode transitions that way.
I ran into an issue where the compiler reports "unable to evaluate constant expression",
and I don't know why. All the inputs should be constant, and making the function
trivial does not help. Its a complex encoding anyway, and I would have wanted to
wrap it up in some kind of interface anyway, but it doesn't seem to work. This is
one that might be worth getting back to once the stage2 compiler is in use in
case comptime changes or the error messages are more expressive.
Conclusion
As far as I can tell, the way to enforce state transitions in Zig right now would be to
define an enum of states, parameterize your types with values from this enum, and define
function that enforce certain inputs and outputs. There does not appear to be any
way to make this more flexible, which might be fine after all- I can't think of an
actual case right now where the return types needs to be more generic. In the
future the type switching that appears in the Zig source code might be applicable, but I
truely don't know. | []
|
https://avatars.githubusercontent.com/u/52813?v=4 | zionice | xyproto/zionice | 2021-02-04T15:04:39Z | Port of ionice to Zig | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/xyproto/zionice/tags | GPL-2.0 | [
"ionice",
"linux",
"port",
"util-linux",
"zig"
]
| 12 | false | 2021-02-11T18:59:04Z | false | false | unknown | github | []
| zionice
Port of ion to Zig.
ion is an extraction of just the ionice source code from util-linux.
WORK IN PROGRESS! | []
|
https://avatars.githubusercontent.com/u/346181?v=4 | exercism-zig | petertseng/exercism-zig | 2020-09-17T02:07:26Z | Exercism Zig track | master | 0 | 0 | 1 | 0 | https://api.github.com/repos/petertseng/exercism-zig/tags | MIT | [
"exercism-track",
"zig"
]
| 11 | false | 2020-11-24T04:53:38Z | false | false | unknown | github | []
| Exercism Zig Track
<a></a>
Exercism exercises in Zig.
Status:
This language has the potential to be made into an Exercism track, with a mostly straightforward process.
Please see <code>exercises/hello-world</code> as an example exercise.
Please see <a>CI results</a> for verification.
It will be up to future maintainers to continue by adding more exercises. | []
|
https://avatars.githubusercontent.com/u/28832235?v=4 | zig-sdk | pojntfx/zig-sdk | 2021-01-14T09:33:57Z | A containerized version of the Zig toolchain. | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/pojntfx/zig-sdk/tags | AGPL-3.0 | [
"docker",
"zig",
"ziglang"
]
| 14 | false | 2023-02-26T06:04:51Z | false | false | unknown | github | []
| zig-sdk
A containerized version of the <a>Zig toolchain</a>.
Installation
Images are built weekly and pushed to <a>hub.docker.com/repository/docker/alphahorizonio/zig-sdk</a>.
License
zig-sdk (c) 2021 Felicitas Pojtinger and contributors
SPDX-License-Identifier: AGPL-3.0 | []
|
https://avatars.githubusercontent.com/u/108928776?v=4 | bun | oven-sh/bun | 2021-04-14T00:48:17Z | Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one | main | 4,930 | 78,180 | 3,094 | 78,180 | https://api.github.com/repos/oven-sh/bun/tags | NOASSERTION | [
"bun",
"bundler",
"javascript",
"javascriptcore",
"jsx",
"nodejs",
"npm",
"react",
"transpiler",
"typescript",
"zig",
"ziglang"
]
| 256,019 | false | 2025-05-22T08:18:20Z | true | false | unknown | github | []
|
<a></a>
Bun
<a target="_blank"></a>
<a></a>
<a>Documentation</a>
•
<a>Discord</a>
•
<a>Issues</a>
•
<a>Roadmap</a>
<a>Read the docs →</a>
What is Bun?
Bun is an all-in-one toolkit for JavaScript and TypeScript apps. It ships as a single executable called <code>bun</code>.
At its core is the <em>Bun runtime</em>, a fast JavaScript runtime designed as <strong>a drop-in replacement for Node.js</strong>. It's written in Zig and powered by JavaScriptCore under the hood, dramatically reducing startup times and memory usage.
<code>bash
bun run index.tsx # TS and JSX supported out-of-the-box</code>
The <code>bun</code> command-line tool also implements a test runner, script runner, and Node.js-compatible package manager. Instead of 1,000 node_modules for development, you only need <code>bun</code>. Bun's built-in tools are significantly faster than existing options and usable in existing Node.js projects with little to no changes.
<code>bash
bun test # run tests
bun run start # run the `start` script in `package.json`
bun install <pkg> # install a package
bunx cowsay 'Hello, world!' # execute a package</code>
Install
Bun supports Linux (x64 & arm64), macOS (x64 & Apple Silicon) and Windows (x64).
<blockquote>
<strong>Linux users</strong> — Kernel version 5.6 or higher is strongly recommended, but the minimum is 5.1.
</blockquote>
```sh
with install script (recommended)
curl -fsSL https://bun.sh/install | bash
on windows
powershell -c "irm bun.sh/install.ps1 | iex"
with npm
npm install -g bun
with Homebrew
brew tap oven-sh/bun
brew install bun
with Docker
docker pull oven/bun
docker run --rm --init --ulimit memlock=-1:-1 oven/bun
```
Upgrade
To upgrade to the latest version of Bun, run:
<code>sh
bun upgrade</code>
Bun automatically releases a canary build on every commit to <code>main</code>. To upgrade to the latest canary build, run:
<code>sh
bun upgrade --canary</code>
<a>View canary build</a>
Quick links
<ul>
<li>
Intro
</li>
<li>
<a>What is Bun?</a>
</li>
<li><a>Installation</a></li>
<li><a>Quickstart</a></li>
<li>
<a>TypeScript</a>
</li>
<li>
Templating
</li>
<li>
<a><code>bun init</code></a>
</li>
<li>
<a><code>bun create</code></a>
</li>
<li>
CLI
</li>
<li>
<a><code>bun upgrade</code></a>
</li>
<li>
Runtime
</li>
<li>
<a><code>bun run</code></a>
</li>
<li><a>File types (Loaders)</a></li>
<li><a>TypeScript</a></li>
<li><a>JSX</a></li>
<li><a>Environment variables</a></li>
<li><a>Bun APIs</a></li>
<li><a>Web APIs</a></li>
<li><a>Node.js compatibility</a></li>
<li><a>Single-file executable</a></li>
<li><a>Plugins</a></li>
<li><a>Watch mode / Hot Reloading</a></li>
<li><a>Module resolution</a></li>
<li><a>Auto-install</a></li>
<li><a>bunfig.toml</a></li>
<li><a>Debugger</a></li>
<li>
<a>$ Shell</a>
</li>
<li>
Package manager
</li>
<li>
<a><code>bun install</code></a>
</li>
<li><a><code>bun add</code></a></li>
<li><a><code>bun remove</code></a></li>
<li><a><code>bun update</code></a></li>
<li><a><code>bun link</code></a></li>
<li><a><code>bun unlink</code></a></li>
<li><a><code>bun pm</code></a></li>
<li><a><code>bun outdated</code></a></li>
<li><a><code>bun publish</code></a></li>
<li><a><code>bun patch</code></a></li>
<li><a><code>bun patch-commit</code></a></li>
<li><a>Global cache</a></li>
<li><a>Workspaces</a></li>
<li><a>Lifecycle scripts</a></li>
<li><a>Filter</a></li>
<li><a>Lockfile</a></li>
<li><a>Scopes and registries</a></li>
<li><a>Overrides and resolutions</a></li>
<li>
<a><code>.npmrc</code></a>
</li>
<li>
Bundler
</li>
<li>
<a><code>Bun.build</code></a>
</li>
<li><a>Loaders</a></li>
<li><a>Plugins</a></li>
<li><a>Macros</a></li>
<li><a>vs esbuild</a></li>
<li><a>Single-file executable</a></li>
<li><a>CSS</a></li>
<li><a>HTML</a></li>
<li><a>Hot Module Replacement (HMR)</a></li>
<li>
<a>Full-stack with HTML imports</a>
</li>
<li>
Test runner
</li>
<li>
<a><code>bun test</code></a>
</li>
<li><a>Writing tests</a></li>
<li><a>Watch mode</a></li>
<li><a>Lifecycle hooks</a></li>
<li><a>Mocks</a></li>
<li><a>Snapshots</a></li>
<li><a>Dates and times</a></li>
<li><a>DOM testing</a></li>
<li><a>Code coverage</a></li>
<li><a>Configuration</a></li>
<li><a>Discovery</a></li>
<li><a>Reporters</a></li>
<li>
<a>Runtime Behavior</a>
</li>
<li>
Package runner
</li>
<li>
<a><code>bunx</code></a>
</li>
<li>
API
</li>
<li>
<a>HTTP server (<code>Bun.serve</code>)</a>
</li>
<li><a>WebSockets</a></li>
<li><a>Workers</a></li>
<li><a>Binary data</a></li>
<li><a>Streams</a></li>
<li><a>File I/O (<code>Bun.file</code>)</a></li>
<li><a>import.meta</a></li>
<li><a>SQLite (<code>bun:sqlite</code>)</a></li>
<li><a>PostgreSQL (<code>Bun.sql</code>)</a></li>
<li><a>Redis (<code>Bun.redis</code>)</a></li>
<li><a>S3 Client (<code>Bun.s3</code>)</a></li>
<li><a>FileSystemRouter</a></li>
<li><a>TCP sockets</a></li>
<li><a>UDP sockets</a></li>
<li><a>Globals</a></li>
<li><a>$ Shell</a></li>
<li><a>Child processes (spawn)</a></li>
<li><a>Transpiler (<code>Bun.Transpiler</code>)</a></li>
<li><a>Hashing</a></li>
<li><a>Colors (<code>Bun.color</code>)</a></li>
<li><a>Console</a></li>
<li><a>FFI (<code>bun:ffi</code>)</a></li>
<li><a>C Compiler (<code>bun:ffi</code> cc)</a></li>
<li><a>HTMLRewriter</a></li>
<li><a>Testing (<code>bun:test</code>)</a></li>
<li><a>Cookies (<code>Bun.Cookie</code>)</a></li>
<li><a>Utils</a></li>
<li><a>Node-API</a></li>
<li><a>Glob (<code>Bun.Glob</code>)</a></li>
<li><a>Semver (<code>Bun.semver</code>)</a></li>
<li><a>DNS</a></li>
<li><a>fetch API extensions</a></li>
</ul>
Guides
<ul>
<li>
Binary
</li>
<li>
<a>Convert a Blob to a string</a>
</li>
<li><a>Convert a Buffer to a blob</a></li>
<li><a>Convert a Blob to a DataView</a></li>
<li><a>Convert a Buffer to a string</a></li>
<li><a>Convert a Blob to a ReadableStream</a></li>
<li><a>Convert a Blob to a Uint8Array</a></li>
<li><a>Convert a DataView to a string</a></li>
<li><a>Convert a Uint8Array to a Blob</a></li>
<li><a>Convert a Blob to an ArrayBuffer</a></li>
<li><a>Convert an ArrayBuffer to a Blob</a></li>
<li><a>Convert a Buffer to a Uint8Array</a></li>
<li><a>Convert a Uint8Array to a Buffer</a></li>
<li><a>Convert a Uint8Array to a string</a></li>
<li><a>Convert a Buffer to an ArrayBuffer</a></li>
<li><a>Convert an ArrayBuffer to a Buffer</a></li>
<li><a>Convert an ArrayBuffer to a string</a></li>
<li><a>Convert a Uint8Array to a DataView</a></li>
<li><a>Convert a Buffer to a ReadableStream</a></li>
<li><a>Convert a Uint8Array to an ArrayBuffer</a></li>
<li><a>Convert an ArrayBuffer to a Uint8Array</a></li>
<li><a>Convert an ArrayBuffer to an array of numbers</a></li>
<li>
<a>Convert a Uint8Array to a ReadableStream</a>
</li>
<li>
Ecosystem
</li>
<li>
<a>Use React and JSX</a>
</li>
<li><a>Use EdgeDB with Bun</a></li>
<li><a>Use Prisma with Bun</a></li>
<li><a>Add Sentry to a Bun app</a></li>
<li><a>Create a Discord bot</a></li>
<li><a>Run Bun as a daemon with PM2</a></li>
<li><a>Use Drizzle ORM with Bun</a></li>
<li><a>Build an app with Nuxt and Bun</a></li>
<li><a>Build an app with Qwik and Bun</a></li>
<li><a>Build an app with Astro and Bun</a></li>
<li><a>Build an app with Remix and Bun</a></li>
<li><a>Build a frontend using Vite and Bun</a></li>
<li><a>Build an app with Next.js and Bun</a></li>
<li><a>Run Bun as a daemon with systemd</a></li>
<li><a>Deploy a Bun application on Render</a></li>
<li><a>Build an HTTP server using Hono and Bun</a></li>
<li><a>Build an app with SvelteKit and Bun</a></li>
<li><a>Build an app with SolidStart and Bun</a></li>
<li><a>Build an HTTP server using Elysia and Bun</a></li>
<li><a>Build an HTTP server using StricJS and Bun</a></li>
<li><a>Containerize a Bun application with Docker</a></li>
<li><a>Build an HTTP server using Express and Bun</a></li>
<li><a>Use Neon Postgres through Drizzle ORM</a></li>
<li><a>Server-side render (SSR) a React component</a></li>
<li><a>Read and write data to MongoDB using Mongoose and Bun</a></li>
<li>
<a>Use Neon's Serverless Postgres with Bun</a>
</li>
<li>
HTMLRewriter
</li>
<li>
<a>Extract links from a webpage using HTMLRewriter</a>
</li>
<li>
<a>Extract social share images and Open Graph tags</a>
</li>
<li>
HTTP
</li>
<li>
<a>Hot reload an HTTP server</a>
</li>
<li><a>Common HTTP server usage</a></li>
<li><a>Write a simple HTTP server</a></li>
<li><a>Configure TLS on an HTTP server</a></li>
<li><a>Send an HTTP request using fetch</a></li>
<li><a>Proxy HTTP requests using fetch()</a></li>
<li><a>Start a cluster of HTTP servers</a></li>
<li><a>Stream a file as an HTTP Response</a></li>
<li><a>fetch with unix domain sockets in Bun</a></li>
<li><a>Upload files via HTTP using FormData</a></li>
<li><a>Streaming HTTP Server with Async Iterators</a></li>
<li>
<a>Streaming HTTP Server with Node.js Streams</a>
</li>
<li>
Install
</li>
<li>
<a>Add a dependency</a>
</li>
<li><a>Add a Git dependency</a></li>
<li><a>Add a peer dependency</a></li>
<li><a>Add a trusted dependency</a></li>
<li><a>Add a development dependency</a></li>
<li><a>Add a tarball dependency</a></li>
<li><a>Add an optional dependency</a></li>
<li><a>Generate a yarn-compatible lockfile</a></li>
<li><a>Configuring a monorepo using workspaces</a></li>
<li><a>Install a package under a different name</a></li>
<li><a>Install dependencies with Bun in GitHub Actions</a></li>
<li><a>Using bun install with Artifactory</a></li>
<li><a>Configure git to diff Bun's lockb lockfile</a></li>
<li><a>Override the default npm registry for bun install</a></li>
<li><a>Using bun install with an Azure Artifacts npm registry</a></li>
<li><a>Migrate from npm install to bun install</a></li>
<li>
<a>Configure a private registry for an organization scope with bun install</a>
</li>
<li>
Process
</li>
<li>
<a>Read from stdin</a>
</li>
<li><a>Listen for CTRL+C</a></li>
<li><a>Spawn a child process</a></li>
<li><a>Listen to OS signals</a></li>
<li><a>Parse command-line arguments</a></li>
<li><a>Read stderr from a child process</a></li>
<li><a>Read stdout from a child process</a></li>
<li><a>Get the process uptime in nanoseconds</a></li>
<li>
<a>Spawn a child process and communicate using IPC</a>
</li>
<li>
Read file
</li>
<li>
<a>Read a JSON file</a>
</li>
<li><a>Check if a file exists</a></li>
<li><a>Read a file as a string</a></li>
<li><a>Read a file to a Buffer</a></li>
<li><a>Get the MIME type of a file</a></li>
<li><a>Watch a directory for changes</a></li>
<li><a>Read a file as a ReadableStream</a></li>
<li><a>Read a file to a Uint8Array</a></li>
<li>
<a>Read a file to an ArrayBuffer</a>
</li>
<li>
Runtime
</li>
<li>
<a>Delete files</a>
</li>
<li><a>Run a Shell Command</a></li>
<li><a>Import a JSON file</a></li>
<li><a>Import a TOML file</a></li>
<li><a>Set a time zone in Bun</a></li>
<li><a>Set environment variables</a></li>
<li><a>Re-map import paths</a></li>
<li><a>Delete directories</a></li>
<li><a>Read environment variables</a></li>
<li><a>Import a HTML file as text</a></li>
<li><a>Install and run Bun in GitHub Actions</a></li>
<li><a>Debugging Bun with the web debugger</a></li>
<li><a>Install TypeScript declarations for Bun</a></li>
<li><a>Debugging Bun with the VS Code extension</a></li>
<li><a>Inspect memory usage using V8 heap snapshots</a></li>
<li><a>Define and replace static globals & constants</a></li>
<li>
<a>Codesign a single-file JavaScript executable on macOS</a>
</li>
<li>
Streams
</li>
<li>
<a>Convert a ReadableStream to JSON</a>
</li>
<li><a>Convert a ReadableStream to a Blob</a></li>
<li><a>Convert a ReadableStream to a Buffer</a></li>
<li><a>Convert a ReadableStream to a string</a></li>
<li><a>Convert a ReadableStream to a Uint8Array</a></li>
<li><a>Convert a ReadableStream to an array of chunks</a></li>
<li><a>Convert a Node.js Readable to JSON</a></li>
<li><a>Convert a ReadableStream to an ArrayBuffer</a></li>
<li><a>Convert a Node.js Readable to a Blob</a></li>
<li><a>Convert a Node.js Readable to a string</a></li>
<li><a>Convert a Node.js Readable to an Uint8Array</a></li>
<li>
<a>Convert a Node.js Readable to an ArrayBuffer</a>
</li>
<li>
Test
</li>
<li>
<a>Spy on methods in <code>bun test</code></a>
</li>
<li><a>Bail early with the Bun test runner</a></li>
<li><a>Mock functions in <code>bun test</code></a></li>
<li><a>Run tests in watch mode with Bun</a></li>
<li><a>Use snapshot testing in <code>bun test</code></a></li>
<li><a>Skip tests with the Bun test runner</a></li>
<li><a>Using Testing Library with Bun</a></li>
<li><a>Update snapshots in <code>bun test</code></a></li>
<li><a>Run your tests with the Bun test runner</a></li>
<li><a>Set the system time in Bun's test runner</a></li>
<li><a>Set a per-test timeout with the Bun test runner</a></li>
<li><a>Migrate from Jest to Bun's test runner</a></li>
<li><a>Write browser DOM tests with Bun and happy-dom</a></li>
<li><a>Mark a test as a "todo" with the Bun test runner</a></li>
<li><a>Re-run tests multiple times with the Bun test runner</a></li>
<li><a>Generate code coverage reports with the Bun test runner</a></li>
<li><a>import, require, and test Svelte components with bun test</a></li>
<li>
<a>Set a code coverage threshold with the Bun test runner</a>
</li>
<li>
Util
</li>
<li>
<a>Generate a UUID</a>
</li>
<li><a>Hash a password</a></li>
<li><a>Escape an HTML string</a></li>
<li><a>Get the current Bun version</a></li>
<li><a>Encode and decode base64 strings</a></li>
<li><a>Compress and decompress data with gzip</a></li>
<li><a>Sleep for a fixed number of milliseconds</a></li>
<li><a>Detect when code is executed with Bun</a></li>
<li><a>Check if two objects are deeply equal</a></li>
<li><a>Compress and decompress data with DEFLATE</a></li>
<li><a>Get the absolute path to the current entrypoint</a></li>
<li><a>Get the directory of the current file</a></li>
<li><a>Check if the current file is the entrypoint</a></li>
<li><a>Get the file name of the current file</a></li>
<li><a>Convert a file URL to an absolute path</a></li>
<li><a>Convert an absolute path to a file URL</a></li>
<li><a>Get the absolute path of the current file</a></li>
<li>
<a>Get the path to an executable bin file</a>
</li>
<li>
WebSocket
</li>
<li>
<a>Build a publish-subscribe WebSocket server</a>
</li>
<li><a>Build a simple WebSocket server</a></li>
<li><a>Enable compression for WebSocket messages</a></li>
<li>
<a>Set per-socket contextual data on a WebSocket</a>
</li>
<li>
Write file
</li>
<li>
<a>Delete a file</a>
</li>
<li><a>Write to stdout</a></li>
<li><a>Write a file to stdout</a></li>
<li><a>Write a Blob to a file</a></li>
<li><a>Write a string to a file</a></li>
<li><a>Append content to a file</a></li>
<li><a>Write a file incrementally</a></li>
<li><a>Write a Response to a file</a></li>
<li><a>Copy a file to another location</a></li>
<li><a>Write a ReadableStream to a file</a></li>
</ul>
Contributing
Refer to the <a>Project > Contributing</a> guide to start contributing to Bun.
License
Refer to the <a>Project > License</a> page for information about Bun's licensing. | []
|
https://avatars.githubusercontent.com/u/19482899?v=4 | mach | hexops/mach | 2021-07-04T17:37:47Z | zig game engine & graphics toolkit | main | 156 | 3,961 | 182 | 3,961 | https://api.github.com/repos/hexops/mach/tags | NOASSERTION | [
"2d",
"3d",
"composable",
"cross-platform",
"ecs",
"entity-component-system",
"game-development",
"game-engine",
"gamedev",
"graphics",
"gui",
"open-source",
"steam-deck",
"webassembly",
"webgpu",
"zig",
"ziglang"
]
| 10,250 | false | 2025-05-21T13:56:34Z | true | true | unknown | github | [
{
"commit": null,
"name": "mach_freetype",
"tar_url": null,
"type": "remote",
"url": "https://pkg.machengine.org/mach-freetype/d63efa5534c17f3a12ed3d327e0ad42a64adc20a.tar.gz"
},
{
"commit": "b2336a29b1ae633d47452a2041b258e9538ef5f0.tar.gz",
"name": "font_assets",
"tar_url": "https://github.com/hexops/font-assets/archive/b2336a29b1ae633d47452a2041b258e9538ef5f0.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/hexops/font-assets"
},
{
"commit": null,
"name": "mach_objc",
"tar_url": null,
"type": "remote",
"url": "https://pkg.machengine.org/mach-objc/79b6f80c32b14948554958afe72dace261b14afc.tar.gz"
},
{
"commit": null,
"name": "xcode_frameworks",
"tar_url": null,
"type": "remote",
"url": "https://pkg.machengine.org/xcode-frameworks/9a45f3ac977fd25dff77e58c6de1870b6808c4a7.tar.gz"
},
{
"commit": null,
"name": "directx_headers",
"tar_url": null,
"type": "remote",
"url": "https://pkg.machengine.org/directx-headers/eae9b3b8a84a32ae9e67025fd64e8d8b7755e628.tar.gz"
},
{
"commit": null,
"name": "opengl_headers",
"tar_url": null,
"type": "remote",
"url": "https://pkg.machengine.org/opengl-headers/d0b37fdc3b039ba5b430110545f398f0278c5396.tar.gz"
},
{
"commit": null,
"name": "vulkan_zig_generated",
"tar_url": null,
"type": "remote",
"url": "https://pkg.machengine.org/vulkan-zig-generated/4134f910302a71731d8d32c91cfc1bc914e6d26b.tar.gz"
},
{
"commit": null,
"name": "linux_audio_headers",
"tar_url": null,
"type": "remote",
"url": "https://pkg.machengine.org/linux-audio-headers/81f1f13828a8b62467200ba2a0b0d911c4d089a7.tar.gz"
},
{
"commit": null,
"name": "wayland_headers",
"tar_url": null,
"type": "remote",
"url": "https://pkg.machengine.org/wayland-headers/7c53e7483c3cfb5c6780ae542c9f5cfa712a826a.tar.gz"
},
{
"commit": null,
"name": "x11_headers",
"tar_url": null,
"type": "remote",
"url": "https://pkg.machengine.org/x11-headers/bc049ff07d31014d4d409cc328c3feb57c9b9a83.tar.gz"
},
{
"commit": "48bfe6d413a5b3723a7bcf36f1fabbba30efef68.tar.gz",
"name": "zigimg",
"tar_url": "https://github.com/zigimg/zigimg/archive/48bfe6d413a5b3723a7bcf36f1fabbba30efef68.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/zigimg/zigimg"
},
{
"commit": null,
"name": "mach_opus",
"tar_url": null,
"type": "remote",
"url": "https://pkg.machengine.org/mach-opus/32712fd091636037959720ee00036a060816a4f0.tar.gz"
},
{
"commit": null,
"name": "mach_example_assets",
"tar_url": null,
"type": "remote",
"url": "https://pkg.machengine.org/mach-example-assets/dbc61a1470579a7834530567011227b1e680f2af.tar.gz"
}
]
| <a>
</a>
Zig game engine & graphics toolkit for building high-performance, truly cross-platform, robust & modular games, visualizations, and desktop/mobile GUI apps.
<a></a>
<a></a>
<a></a>
Learn more
<a>machengine.org</a>
Join the community
Join the <a>Mach community on Discord</a> to discuss this project, ask questions, get help, etc.
<strong>We're here to make games and have fun, so please help keep the community focused on that.</strong> No politics/heated topics are allowed. Unfortunately, the political landscape today makes it such that we must also state fascists can go f*k themselves. :) Anyone else is very welcome here. | [
"https://github.com/NippleOfAnApe/Dnipro-mirror-",
"https://github.com/fjebaker/zig-imgui-implot-template",
"https://github.com/foxnne/aftersun",
"https://github.com/foxnne/pixi"
]
|
https://avatars.githubusercontent.com/u/113083639?v=4 | zig-gamedev | zig-gamedev/zig-gamedev | 2021-07-16T14:14:52Z | Dev repo for @zig-gamedev libs and sample applications | main | 31 | 2,569 | 179 | 2,569 | https://api.github.com/repos/zig-gamedev/zig-gamedev/tags | MIT | [
"cross-platform",
"d3d12",
"demos",
"directx12",
"game-development",
"gamedev",
"graphics",
"libraries",
"math",
"opengl",
"physics",
"realtime",
"simd",
"webgpu",
"zig",
"ziglang"
]
| 62,952 | false | 2025-05-21T14:10:07Z | true | true | 0.14.0 | github | [
{
"commit": "c0dbf11cdc17da5904ea8a17eadc54dee26567ec.tar.gz",
"name": "system_sdk",
"tar_url": "https://github.com/zig-gamedev/system_sdk/archive/c0dbf11cdc17da5904ea8a17eadc54dee26567ec.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/zig-gamedev/system_sdk"
},
{
"commit": "1012b105627e28827f558b79e533575ef65a4965.tar.gz",
"name": "zaudio",
"tar_url": "https://github.com/zig-gamedev/zaudio/archive/1012b105627e28827f558b79e533575ef65a4965.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/zig-gamedev/zaudio"
},
{
"commit": "9a686d95f5e05cd6bb4a1f34fd59ee8e7ee2cc9d.tar.gz",
"name": "zbullet",
"tar_url": "https://github.com/zig-gamedev/zbullet/archive/9a686d95f5e05cd6bb4a1f34fd59ee8e7ee2cc9d.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/zig-gamedev/zbullet"
},
{
"commit": "34f6cc3f6d11fa13a44ae759e9ed6bec3a455fa4.tar.gz",
"name": "zflecs",
"tar_url": "https://github.com/zig-gamedev/zflecs/archive/34f6cc3f6d11fa13a44ae759e9ed6bec3a455fa4.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/zig-gamedev/zflecs"
},
{
"commit": "cac24b72f87432ce607c02abcfad7822b702aad9.tar.gz",
"name": "zemscripten",
"tar_url": "https://github.com/zig-gamedev/zemscripten/archive/cac24b72f87432ce607c02abcfad7822b702aad9.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/zig-gamedev/zemscripten"
},
{
"commit": "refs",
"name": "emsdk",
"tar_url": "https://github.com/emscripten-core/emsdk/archive/refs.tar.gz",
"type": "remote",
"url": "https://github.com/emscripten-core/emsdk"
},
{
"commit": "c337cb3d3f984468ea7a386335937a5d555fc024.tar.gz",
"name": "zglfw",
"tar_url": "https://github.com/zig-gamedev/zglfw/archive/c337cb3d3f984468ea7a386335937a5d555fc024.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/zig-gamedev/zglfw"
},
{
"commit": "d860e2b4a333cacffb168fab49a233c5d2f1bca2.tar.gz",
"name": "zgpu",
"tar_url": "https://github.com/zig-gamedev/zgpu/archive/d860e2b4a333cacffb168fab49a233c5d2f1bca2.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/zig-gamedev/zgpu"
},
{
"commit": "d3a68014e6b6b53fd330a0ccba99e4dcfffddae5.tar.gz",
"name": "dawn_x86_64_windows_gnu",
"tar_url": "https://github.com/michal-z/webgpu_dawn-x86_64-windows-gnu/archive/d3a68014e6b6b53fd330a0ccba99e4dcfffddae5.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/michal-z/webgpu_dawn-x86_64-windows-gnu"
},
{
"commit": "7d70db023bf254546024629cbec5ee6113e12a42.tar.gz",
"name": "dawn_x86_64_linux_gnu",
"tar_url": "https://github.com/michal-z/webgpu_dawn-x86_64-linux-gnu/archive/7d70db023bf254546024629cbec5ee6113e12a42.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/michal-z/webgpu_dawn-x86_64-linux-gnu"
},
{
"commit": "c1f55e740a62f6942ff046e709ecd509a005dbeb.tar.gz",
"name": "dawn_aarch64_linux_gnu",
"tar_url": "https://github.com/michal-z/webgpu_dawn-aarch64-linux-gnu/archive/c1f55e740a62f6942ff046e709ecd509a005dbeb.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/michal-z/webgpu_dawn-aarch64-linux-gnu"
},
{
"commit": "d2360cdfff0cf4a780cb77aa47c57aca03cc6dfe.tar.gz",
"name": "dawn_aarch64_macos",
"tar_url": "https://github.com/michal-z/webgpu_dawn-aarch64-macos/archive/d2360cdfff0cf4a780cb77aa47c57aca03cc6dfe.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/michal-z/webgpu_dawn-aarch64-macos"
},
{
"commit": "901716b10b31ce3e0d3fe479326b41e91d59c661.tar.gz",
"name": "dawn_x86_64_macos",
"tar_url": "https://github.com/michal-z/webgpu_dawn-x86_64-macos/archive/901716b10b31ce3e0d3fe479326b41e91d59c661.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/michal-z/webgpu_dawn-x86_64-macos"
},
{
"commit": "b1c775da1f14d9dbeadc22243a11f7342bf59a51.tar.gz",
"name": "zgui",
"tar_url": "https://github.com/zig-gamedev/zgui/archive/b1c775da1f14d9dbeadc22243a11f7342bf59a51.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/zig-gamedev/zgui"
},
{
"commit": "dfdb734e8084f7dc5010a4ded30bc8e04b6d4393.tar.gz",
"name": "zjobs",
"tar_url": "https://github.com/zig-gamedev/zjobs/archive/dfdb734e8084f7dc5010a4ded30bc8e04b6d4393.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/zig-gamedev/zjobs"
},
{
"commit": "6a0747fe6834e58793500e05953c4c6ca045d3e1.tar.gz",
"name": "zmath",
"tar_url": "https://github.com/zig-gamedev/zmath/archive/6a0747fe6834e58793500e05953c4c6ca045d3e1.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/zig-gamedev/zmath"
},
{
"commit": "f8f528128704ae879a16ddb0a3470c5e0a144a20.tar.gz",
"name": "zmesh",
"tar_url": "https://github.com/zig-gamedev/zmesh/archive/f8f528128704ae879a16ddb0a3470c5e0a144a20.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/zig-gamedev/zmesh"
},
{
"commit": "96f9458c2da975a8bf1cdf95e819c7b070965198.tar.gz",
"name": "znoise",
"tar_url": "https://github.com/zig-gamedev/znoise/archive/96f9458c2da975a8bf1cdf95e819c7b070965198.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/zig-gamedev/znoise"
},
{
"commit": "27f5f228bc1f6da4a4f6acaca07d1cc5ad135171.tar.gz",
"name": "zopengl",
"tar_url": "https://github.com/zig-gamedev/zopengl/archive/27f5f228bc1f6da4a4f6acaca07d1cc5ad135171.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/zig-gamedev/zopengl"
},
{
"commit": "89043db24aa8db9f46f125659952902cba636b57.tar.gz",
"name": "zopenvr",
"tar_url": "https://github.com/zig-gamedev/zopenvr/archive/89043db24aa8db9f46f125659952902cba636b57.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/zig-gamedev/zopenvr"
},
{
"commit": "0c60c1a0f2a2393c3c226dabd0bd7315f155f3ef.tar.gz",
"name": "zphysics",
"tar_url": "https://github.com/zig-gamedev/zphysics/archive/0c60c1a0f2a2393c3c226dabd0bd7315f155f3ef.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/zig-gamedev/zphysics"
},
{
"commit": "e1f5f72d2a64ac1c459a14be40df63bef07bb97e.tar.gz",
"name": "zpix",
"tar_url": "https://github.com/zig-gamedev/zpix/archive/e1f5f72d2a64ac1c459a14be40df63bef07bb97e.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/zig-gamedev/zpix"
},
{
"commit": "4c850e222e1ba507b45d7bab8cac83bdd74cacd6.tar.gz",
"name": "zpool",
"tar_url": "https://github.com/zig-gamedev/zpool/archive/4c850e222e1ba507b45d7bab8cac83bdd74cacd6.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/zig-gamedev/zpool"
},
{
"commit": "89c1fe2d7ef5020c68e71ac574195f09fc949cce.tar.gz",
"name": "zsdl",
"tar_url": "https://github.com/zig-gamedev/zsdl/archive/89c1fe2d7ef5020c68e71ac574195f09fc949cce.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/zig-gamedev/zsdl"
},
{
"commit": "7bc0fa9101342c019eed252d43f490660dfa411b.tar.gz",
"name": "sdl2_prebuilt_macos",
"tar_url": "https://github.com/zig-gamedev/sdl2-prebuilt-macos/archive/7bc0fa9101342c019eed252d43f490660dfa411b.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/zig-gamedev/sdl2-prebuilt-macos"
},
{
"commit": "8de1512cedfa1fb3ab17ecf295af8cabd7f231f1.tar.gz",
"name": "sdl2_prebuilt_x86_64_windows_gnu",
"tar_url": "https://github.com/zig-gamedev/sdl2-prebuilt-x86_64-windows-gnu/archive/8de1512cedfa1fb3ab17ecf295af8cabd7f231f1.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/zig-gamedev/sdl2-prebuilt-x86_64-windows-gnu"
},
{
"commit": "ce2b511c052c3fdc35c286ade8235d2830a50992.tar.gz",
"name": "sdl2_prebuilt_x86_64_linux_gnu",
"tar_url": "https://github.com/zig-gamedev/sdl2-prebuilt-x86_64-linux-gnu/archive/ce2b511c052c3fdc35c286ade8235d2830a50992.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/zig-gamedev/sdl2-prebuilt-x86_64-linux-gnu"
},
{
"commit": "e89207914a0f0163c0fb543da4f530f645ef5969.tar.gz",
"name": "sdl3_prebuilt_macos",
"tar_url": "https://github.com/zig-gamedev/sdl3-prebuilt-macos/archive/e89207914a0f0163c0fb543da4f530f645ef5969.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/zig-gamedev/sdl3-prebuilt-macos"
},
{
"commit": "8f5dc1a9c9450ac578286e90d4667fc3aa1b23e2.tar.gz",
"name": "sdl3_prebuilt_x86_64_windows_gnu",
"tar_url": "https://github.com/zig-gamedev/sdl3-prebuilt-x86_64-windows-gnu/archive/8f5dc1a9c9450ac578286e90d4667fc3aa1b23e2.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/zig-gamedev/sdl3-prebuilt-x86_64-windows-gnu"
},
{
"commit": "b19959ed3aa87d8393640d7ba3aec142ae85487b.tar.gz",
"name": "sdl3_prebuilt_x86_64_linux_gnu",
"tar_url": "https://github.com/zig-gamedev/sdl3-prebuilt-x86_64-linux-gnu/archive/b19959ed3aa87d8393640d7ba3aec142ae85487b.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/zig-gamedev/sdl3-prebuilt-x86_64-linux-gnu"
},
{
"commit": "094c4bba5cdbec167d3f6aaa98cccccd5c99145f.tar.gz",
"name": "zstbi",
"tar_url": "https://github.com/zig-gamedev/zstbi/archive/094c4bba5cdbec167d3f6aaa98cccccd5c99145f.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/zig-gamedev/zstbi"
},
{
"commit": "be3d003f29d59d72e68e493ab531374ab474a795.tar.gz",
"name": "ztracy",
"tar_url": "https://github.com/zig-gamedev/ztracy/archive/be3d003f29d59d72e68e493ab531374ab474a795.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/zig-gamedev/ztracy"
},
{
"commit": "c29e0fec072c282a8c6234c5837db071af42a11f.tar.gz",
"name": "zwindows",
"tar_url": "https://github.com/zig-gamedev/zwindows/archive/c29e0fec072c282a8c6234c5837db071af42a11f.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/zig-gamedev/zwindows"
}
]
| <a>zig-gamedev</a> dev repo
The original repo spawned in July 2021 by <a>Michal Ziulek</a>. This is the main development repo for the <a>zig-gamedev libraries</a> and <a>sample applications</a>.
Libraries now live in their own repositories and are consumed using Zig's package manager. Git submodules are also included in this repo for developer convenience but are not required to build. Users that wish to use the submodules instead of remote packages can replace build.zig.zon with dev.build.zig.zon.
Getting Started
<ul>
<li>Download and install <a>Git LFS</a></li>
<li>Download and install <a>anyzig</a> (recommended) or get a Zig compiler by some other means.</li>
<li>Clone this repo <code>git clone [email protected]:zig-gamedev/zig-gamedev.git && cd zig-gamedev</code></li>
<li>(Optional) Get the submodules and use them instead of the package manager <code>git submodule update --init && mv build.zig.zon backup.build.zig.zon && mv dev.build.zig.zon build.zig.zon</code></li>
</ul>
Build and run a sample app:
<code>sh
zig build physically_based_rendering_wgpu-run</code>
Get a list of all available build steps:
<code>sh
zig build -l</code>
Sample applications (native wgpu)
Some of the sample applications are listed below. More can be found in <a>samples</a> directory.
<ol>
<li><a>physically based rendering (wgpu)</a>: This sample implements physically-based rendering (PBR) and image-based lighting (IBL) to achive realistic looking rendering results.<code>zig build physically_based_rendering_wgpu-run</code></li>
</ol>
<a></a>
<ol>
<li><a>audio experiments (wgpu)</a>: This sample lets the user experiment with audio and observe data that feeds the hardware.<code>zig build audio_experiments_wgpu-run</code></li>
</ol>
<a></a>
<ol>
<li><a>bullet physics test (wgpu)</a>: This sample application demonstrates how to use full 3D physics engine in your Zig programs.<code>zig build bullet_physics_test_wgpu-run</code></li>
</ol>
<a></a>
<ol>
<li><a>procedural mesh (wgpu)</a>: This sample shows how to efficiently draw several procedurally generated meshes.<code>zig build procedural_mesh_wgpu-run</code></li>
</ol>
<a></a>
<ol>
<li><a>gui test (wgpu)</a>: This sample shows how to use our <a>zgui</a> library.<code>zig build gui_test_wgpu-run</code></li>
</ol>
<a></a>
Sample applications (DirectX 12)
Some of the sample applications are listed below. More can be found in <a>samples</a> directory. They can be built and run on Windows and Linux (Wine + VKD3D-Proton 2.8+):
<ol>
<li><a>bindless</a>: This sample implements physically based shading and image based lighting to achieve realistic looking rendering results. It uses bindless textures and HLSL 6.6 dynamic resources.<code>zig build bindless-run</code></li>
</ol>
<a></a>
<ol>
<li><a>rasterization</a>: This sample application shows how GPU rasterizes triangles in slow motion.<code>zig build rasterization-run</code></li>
</ol>
<a></a>
<ol>
<li><a>simple raytracer</a>: This sample implements basic hybrid renderer. It uses rasterization to resolve primary rays and raytracing (DXR) for shadow rays.<code>zig build simple_raytracer-run</code></li>
</ol>
<a></a>
<ol>
<li><a>mesh shader test</a>: This sample shows how to use DirectX 12 Mesh Shader.<code>zig build mesh_shader_test-run</code></li>
</ol>
<a></a> | []
|
https://avatars.githubusercontent.com/u/110254452?v=4 | capy | capy-ui/capy | 2021-03-24T11:36:16Z | 💻Build one codebase and get native UI on Windows, Linux and Web | master | 20 | 2,125 | 79 | 2,125 | https://api.github.com/repos/capy-ui/capy/tags | MPL-2.0 | [
"cross-platform",
"cross-platform-gui",
"gui",
"gui-library",
"linux",
"ui",
"user-interface",
"windows",
"zig",
"zig-package",
"ziglang"
]
| 15,627 | false | 2025-05-22T05:32:20Z | true | true | 0.13.0 | github | [
{
"commit": "362d12f4d91dfde84668e0befc5a8ca76659965a.zip",
"name": "zig-objc",
"tar_url": "https://github.com/mitchellh/zig-objc/archive/362d12f4d91dfde84668e0befc5a8ca76659965a.zip.tar.gz",
"type": "remote",
"url": "https://github.com/mitchellh/zig-objc"
},
{
"commit": "a4ea24f105902111633c6ae9f888b676ac5e36df.tar.gz",
"name": "macos_sdk",
"tar_url": "https://github.com/mitchellh/zig-build-macos-sdk/archive/a4ea24f105902111633c6ae9f888b676ac5e36df.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/mitchellh/zig-build-macos-sdk"
},
{
"commit": "c3bd7f9d593d75c60e70f0a950f499e55bd2a965",
"name": "zigimg",
"tar_url": "https://github.com/zigimg/zigimg/archive/c3bd7f9d593d75c60e70f0a950f499e55bd2a965.tar.gz",
"type": "remote",
"url": "https://github.com/zigimg/zigimg"
}
]
| <a>
</a>
<strong>As of now, Capy is NOT ready for use in production as I'm still making breaking changes</strong>
<strong>Capy targets Zig version <code>0.14.0-dev.1911+3bf89f55c</code> / <code>2024.10.0-mach</code> (<a>Nominated Zig versions</a>)</strong>
, it doesn't work on Zig <code>0.13.0</code>
<a></a>
<a></a>
Introduction
Capy is a <strong>GUI library for Zig</strong>. It is mainly intended for creating applications using native controls from the operating system.
Capy is a declarative UI library aiming to be easy to write for and versatile.
It has been made with the goal to empower standalone UI applications, integration in games or any other rendering process is a non-goal.
Features
<ul>
<li>Use Zig for frontend and backend</li>
<li>Accessibility: compatibility with almost all accessibility tools</li>
<li>Cross-platform</li>
<li>Uses the target OS toolkit</li>
<li>Cross-compilable from any platform to any other platform</li>
<li><em>Tiny</em> executables - Every <a>example</a>'s size < 2MB, which is smaller than 'hello world' in Go</li>
</ul>
Getting Started
If you're starting a new project, simply clone <a>capy-template</a> and follow build instructions.
Otherwise or for more information, please look in the <a>docs</a>.
You can ask questions and receive updates on the <a>#capy-ui Matrix channel</a> or on the
Zig Discord Server (in the #gui-dev channel).
Usage
A simple application using capy:
```zig
const capy = @import("capy");
const std = @import("std");
pub usingnamespace capy.cross_platform;
pub fn main() !void {
try capy.init();
<code>var window = try capy.Window.init();
try window.set(
capy.column(.{ .spacing = 10 }, .{ // have 10px spacing between each column's element
capy.row(.{ .spacing = 5 }, .{ // have 5px spacing between each row's element
capy.button(.{ .label = "Save", .onclick = @ptrCast(&buttonClicked) }),
capy.button(.{ .label = "Run", .onclick = @ptrCast(&buttonClicked) })
}),
// 'expanded' means the widget will take all the space it can
// in the parent container
capy.expanded(
capy.textArea(.{ .text = "Hello World!" })
)
})
);
window.setPreferredSize(800, 600);
window.show();
capy.runEventLoop();
</code>
}
fn buttonClicked(button: *capy.Button) !void {
std.log.info("You clicked the button with text {s}", .{button.getLabel()});
}
```
It is easy to add something like a button or a text area. The example can already be used to notice a widget's parameters are usually enclosed in anonymous
structs (<code>.{ .label = "Save" }</code>). You can also see that simply wrapping a widget with <code>capy.Expanded( ... )</code> will tell it to take all the space it can.
Contributing
Contributing can be as simple as opening an issue and detailling what bug you encountered or what feature you wish to have.
If you want to help the project more directly, you can fork the project and then create a pull request.
Supported platforms
A platform is considered supported only if it can be built to from every other OS.
Legends:
- ✅ Working and can be cross-compile from all platforms supported by Zig
- 🧪 Experimental
- 🏃 Planned
Desktop
✅ Windows x86_64
✅ Windows i386
🏃 macOS M1
🏃 macOS x86_64
✅ Linux x86_64
✅ Linux i386
✅ Linux aarch64 (PinePhone, PineBook...)
✅ FreeBSD x86_64
Mobile
🧪 Android
🏃 iOS
Web
✅ WebAssembly
Note: As there's no "official" GUI library for Linux, GTK 4 has been chosen as it is the one
that works and can be configured on the most distros. It's also the reason Libadwaita won't
be adopted, as it's meant for GNOME and GNOME only by disallowing styling and integration
with other DEs.
Supported components
For now, not every platform supports the same components. So here's a list of the ones that are supported:
| |win32|macOS|GTK|Android|wasm|
|------------------|-----|-----|---|-----|-----|
|Button |✅|✅|✅|✅|✅|
|Canvas |❌|❌|✅|✅|✅|
|CheckBox |✅|❌|✅|❌|❌|
|Dropdown |✅|❌|✅|❌|❌|
|Image |❌|❌|✅|❌|✅|
|Label |✅|✅|✅|✅|✅|
|Menu |❌|❌|❌|❌|❌|
|Navigation |❌|❌|❌|❌|❌|
|NavigationSidebar |❌|❌|✅|❌|❌|
|Scrollable |✅|❌|✅|❌|❌|
|Slider |✅|❌|✅|❌|✅|
|Tabs |✅|❌|✅|❌|❌|
|TextArea |✅|❌|✅|❌|❌|
|TextField |✅|❌|✅|✅|✅|
|Window |✅|✅|✅|✅|✅ | [
"https://github.com/Catniped/capy-stl-viewer"
]
|
https://avatars.githubusercontent.com/u/80392719?v=4 | microzig | ZigEmbeddedGroup/microzig | 2021-03-18T15:58:52Z | MicroZig is a toolbox for building embedded applications in Zig. | main | 57 | 1,630 | 128 | 1,630 | https://api.github.com/repos/ZigEmbeddedGroup/microzig/tags | Zlib | [
"embedded",
"hal",
"zig",
"zig-package",
"ziglang"
]
| 18,378 | false | 2025-05-21T22:41:53Z | true | true | 0.14.0 | github | [
{
"commit": null,
"name": "core",
"tar_url": null,
"type": "relative",
"url": "core"
},
{
"commit": null,
"name": "drivers",
"tar_url": null,
"type": "relative",
"url": "drivers"
},
{
"commit": "d50d7916b1f850048b2ad7e63a7abf05bd73c0e6",
"name": "boxzer",
"tar_url": "https://github.com/mattnite/boxzer/archive/d50d7916b1f850048b2ad7e63a7abf05bd73c0e6.tar.gz",
"type": "remote",
"url": "https://github.com/mattnite/boxzer"
}
]
|
<blockquote>
<strong>NOTE:</strong> This is in development; breaks in the API are bound to happen.
</blockquote>
What version of Zig to use
Zig 0.14.0
Getting Started With MicroZig
Go to <a>microzig.tech</a>! | []
|
https://avatars.githubusercontent.com/u/62678643?v=4 | awesome-zig | C-BJ/awesome-zig | 2022-01-20T10:11:35Z | 📜Zig Learning Guide & Project Lists | main | 1 | 1,428 | 74 | 1,428 | https://api.github.com/repos/C-BJ/awesome-zig/tags | CC0-1.0 | [
"awesome",
"awesome-list",
"zig",
"zig-library",
"zig-package",
"ziglang"
]
| 443 | false | 2025-05-18T14:55:16Z | false | false | unknown | github | []
| Awesome Zig
<blockquote>
📜Zig Learning Guide & Project Lists
</blockquote>
<a></a>
<a>Zig</a> is a general-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
<strong>Thanks to all the project authors and others who made this project possible.</strong>
<strong>Note🗒️A project can be a development tool, application, library or other category at the same time, but it will only appear once in this guide.</strong>
Table Of Contents
<ul>
<li><a>Related Web Sites</a></li>
<li><a>Development Tools</a></li>
<li><a>Editor Plugins</a></li>
<li><a>Package Managers</a></li>
<li><a>Other Tools</a></li>
<li><a>Applications</a></li>
<li><a>Blockchain</a></li>
<li><a>Command Line</a></li>
<li><a>Compiler & Parser & Interpreter</a></li>
<li><a>Database</a></li>
<li><a>Embedded</a></li>
<li><a>Game and Desktop(GUI) Applications</a></li>
<li><a>Operating Systems & Kernels</a></li>
<li><a>Simulator & Virtual Machine & Emulator</a></li>
<li><a>Web</a></li>
<li><a>Other Applications</a></li>
<li><a>Libraries</a></li>
<li><a>Artificial Intelligence</a></li>
<li><a>Blockchain Development</a></li>
<li><a>Database Operation</a></li>
<li><a>Encryption & Encoding & Decoding</a></li>
<li><a>Game Dev & GUI Dev & Media Framework</a></li>
<li><a>Language Bindings</a></li>
<li><a>Terminal & Low-Level Libraries & System API</a></li>
<li><a>Universal</a><ul>
<li><a>Algorithms & Data Structures</a></li>
<li><a>Concurrency</a></li>
<li><a>Memory Management</a></li>
<li><a>Other Universal Libraries</a></li>
</ul>
</li>
<li><a>Web</a></li>
<li><a>Other Libraries</a></li>
<li><a>Resources</a></li>
<li><a>Community</a></li>
<li><a>Introduction Or News</a></li>
<li><a>Learning</a></li>
<li><a>Contributing</a></li>
</ul>
Related Web Sites
<ul>
<li><a>Zig Official Website</a></li>
<li><a>Zig Github Page</a></li>
<li><a>Zig News</a></li>
<li><a>Zig Community List</a></li>
<li><a>Zig Showtime</a></li>
<li><a>Zig Playground</a></li>
<li><a>Andrew Kelley's (founder of zig) Personal Blog</a></li>
<li><a>Loris Cro's Personal Blog</a></li>
<li><a>Zig Weekly</a></li>
<li><a>Zigistry</a></li>
</ul>
Development Tools
<ul>
<li>
Editor Plugins
</li>
<li>
<a>kde-syntax-highlighting🗒️kde xml file for zig syntax highlighting</a>
</li>
<li>
<a>sublime-zig-language🗒️Zig language support for Sublime Text</a></li>
<li>
<a>vscode-zig🗒️Zig language support for VSCode</a></li>
<li>
<a>zigbrains🗒️The zig language plugin for intellij</a> </li>
<li>
<a>zig-mode🗒️Zig mode for Emacs</a> </li>
<li>
<a>zig.vim🗒️Vim configuration for Zig</a>
</li>
<li>
Package Managers
</li>
<li>
<a>asdf-zig🗒️zig plugin for asdf version manager</a>
</li>
<li>
<a>gyro🗒️A Zig package manager with an index, build runner, and build dependencies</a></li>
<li>
<a>zpm🗒️Package dependency generator; WIP</a> </li>
<li>
<a>Zig-AoC-Template🗒️A template for Advent of Code participants using Zig</a></li>
<li>
<a>zigmod🗒️A package manager for the Zig programming language</a>
</li>
<li>
Other Tools
</li>
<li>
<a>aquila🗒️📫 A federated package index and CI system for Zig projects</a>
</li>
<li>
<a>futureproof🗒️A live editor for fragment shaders, powered by Neovim, WebGPU, and Zig!</a> </li>
<li>
<a>jaz🗒️A JVM implementation in Zig!</a> </li>
<li>
<a>marble🗒️A metamorphic testing library for Zig</a> </li>
<li>
<a>poop🗒️Performance Optimizer Observation Platform</a></li>
<li>
<a>repository🗒️A community-maintained repository of zig packages</a> </li>
<li>
<a>setup-zig🗒️use a @ziglang compiler in your github actions workflows</a> </li>
<li>
<a>svd2zig🗒️Convert System View Description (svd) files to Zig headers for baremetal development</a> </li>
<li>
<a>tree-sitter-zig🗒️Tree Sitter for Zig</a> </li>
<li>
<a>xmake🗒️A cross-platform build utility based on Lua</a> </li>
<li>
<a>zigbo🗒️Zig build system graph output step</a> </li>
<li>
<a>zig-deploy🗒️Deploy your iOS apps written with Zig!</a> </li>
<li>
<a>zig-diff🗒️Text diffing in zig</a> </li>
<li>
<a>zig-doctest🗒️A tool for testing snippets of code, useful for websites and books that talk about Zig</a> </li>
<li>
<a>zigfmt-web🗒️zig fmt on the web</a> </li>
<li>
<a>zig-header-gen🗒️Automatically generate headers/bindings for other languages from Zig code</a> </li>
<li>
<a>zig-pypi🗒️The Zig programming language, packaged for PyPI</a></li>
<li>
<a>zig-sdk🗒️An MSBuild SDK for building Zig, C, and C++ projects using the Zig compiler</a> </li>
<li>
<a>zig-snapshots🗒️Preview Zig's incremental linker state in interactive HTML</a> </li>
<li>
<a>zigup🗒️Download and manage zig compilers</a> </li>
<li>
<a>zld🗒️Zig's lld drop-in replacement</a> </li>
<li>
<a>zls🗒️Zig LSP implementation + Zig Language Server</a> </li>
<li>
<a>zon2nix🗒️Convert the dependencies in <code>build.zig.zon</code> to a Nix expression</a></li>
<li>
<a>zvm🗒️Easily install/upgrade between different versions of Zig. ZLS install can be included.</a></li>
</ul>
Applications
<ul>
<li>
Blockchain
</li>
<li>
<a>btczee🗒️A Bitcoin protocol implementation in Zig</a>
</li>
<li>
<a>Coconut🗒️Cashu wallet and mint implementation in Zig</a></li>
<li>
<a>rheia🗒️A blockchain written in Zig</a></li>
<li>
<a>Sig🗒️A Solana Zig validator client</a></li>
<li>
<a>ziggy-starkdust🗒️Cairo VM in Zig</a>
</li>
<li>
Command Line
</li>
<li>
<a>calctax🗒️Simple tax calculator for employees in Poland after Nowy Lad changes in 2022</a>
</li>
<li>
<a>crisp🗒️A Minimal Lispy Calculator</a> </li>
<li>
<a>dt🗒️duct tape for your Unix pipes. Pipe text into a functional/concatenative awk-like tool.</a></li>
<li>
<a>gi🗒️Simple program that generates .gitignore files based on the templates from https://github.com/toptal/gitignore</a> </li>
<li><a>lsr🗒️Fast and efficient ls alternative with io_uring</a></li>
<li><a>outfieldr🗒️A TLDR client in Zig</a> </li>
<li>
<a>sapt🗒️Simple file-oriented API-testing tool</a> </li>
<li>
<a>pbui-main🗒️The main repository for the PBUI project</a> </li>
<li>
<a>redis-rope🗒️A fast native data type for manipulating large strings in Redis</a> </li>
<li>
<a>zcoff🗒️Like dumpbin.exe but cross-platform</a> </li>
<li>
<a>zig-inquirer🗒️A collection of utilities for prompting information from the user on the CLI</a> </li>
<li>
<a>zigish🗒️A toy Unix shell written in Zig</a>
</li>
<li>
Compiler & Parser & Interpreter
</li>
<li>
<a>arocc🗒️A C compiler written in Zig</a>
</li>
<li>
<a>base32🗒️base32 encoding/decoding for ziglang</a> </li>
<li>
<a>bog🗒️Small, strongly typed, embeddable language</a> </li>
<li>
<a>brainfuck-zig🗒️Brainfuck interpreter written in zig</a> </li>
<li>
<a>buzz🗒️buzz, A small/lightweight statically typed scripting language (in development)</a> </li>
<li>
<a>cmdlinezig🗒️A simple command line parser</a> </li>
<li>
<a>cyber🗒️Fast and concurrent scripting</a> </li>
<li>
<a>hzzp🗒️A I/O agnostic HTTP/1.1 parser and encoder for Zig</a> </li>
<li>
<a>ini🗒️A teeny tiny ini parser</a> </li>
<li>
<a>jng2-decrypt🗒️Small program for decrypting the Jets'n'Guns 2 game files</a> </li>
<li>
<a>koino🗒️CommonMark + GFM compatible Markdown parser and renderer</a> </li>
<li>
<a>libpcre.zig🗒️Zig bindings to libpcre</a> </li>
<li>
<a>liz🗒️Lisp-flavored general-purpose programming language (based on Zig)</a> </li>
<li>
<a>LoLa🗒️LoLa is a small programming language meant to be embedded into games</a> </li>
<li>
<a>luf🗒️Statically typed, embeddable, scripting language written in Zig</a></li>
<li>
<a>prettizy🗒️Zig library to prettify JSON and XML strings</a></li>
<li>
<a>protozig🗒️The protozig(uana), or protocol buffers implementation in Zig</a> </li>
<li>
<a>rem🗒️An HTML parsing library, written in Zig</a> </li>
<li>
<a>tres🗒️ValueTree-based JSON parser</a> </li>
<li>
<a>zacho🗒️Zig's Mach-O parser</a></li>
<li>
<a>zava🗒️Java VM / bytecode interpreter in Zig</a></li>
<li><a>zcheme🗒️WIP implementation of R7RS Scheme</a></li>
<li>
<a>zelf🗒️Zig's ELF parser utility</a> </li>
<li><a>zexpr🗒️Zig S-expression library</a></li>
<li>
<a>zig-cli🗒️A simple package for building command line apps in Zig</a> </li>
<li>
<a>zig-dwarfdump🗒️dwarfdump utility but in Zig</a> </li>
<li>
<a>zigmkv🗒️wip Matroska/webm (mkv) parser in Zig</a> </li>
<li>
<a>zig-parse-args🗒️Parse command line arguments</a></li>
<li>
<a>zig-parse-number🗒️Implement ParseNumber which can parse any TypeId.Int or TypeId.Float</a> </li>
<li>
<a>zig-regex🗒️A regex implementation for the zig programming language</a> </li>
<li>
<a>zig-ryu🗒️Zig port of https://github.com/ulfjack/ryu</a> </li>
<li>
<a>zig-toml🗒️A TOML parser written in Zig</a> </li>
<li>
<a>zig-toml🗒️An LL TOML parser that parses into Zig structs</a> </li>
<li>
<a>zig-json5🗒️A JSON5 Parser/Stringifier written in Zig</a> </li>
<li>
<a>ziguid🗒️GUID parsing/stringifying with zig</a> </li>
<li>
<a>zig-yaml🗒️YAML parser for Zig</a> </li>
<li><a>ztoml🗒️TOMLv1.0.0 parser</a></li>
<li>
<a>zua🗒️An implementation of Lua 5.1 in Zig, for learning purposes</a> </li>
<li>
<a>zuri🗒️URI parser for Zig</a>
</li>
<li>
Database
</li>
<li>
<a>awtfdb🗒️the Anime Woman's Tagged File Data Base</a>
</li>
<li>
<a>pg.zig🗒️Native PostgreSQL driver</a> </li>
<li>
<a>redis-cuckoofilter🗒️Hashing-function agnostic Cuckoo filters for Redis</a> </li>
<li>
<a>sqlite-zig SQLite bindings</a> </li>
<li>
<a>tigerbeetle🗒️A distributed financial accounting database designed for mission critical safety and performance to power the future of financial services</a> </li>
<li>
<a>zek</a> </li>
<li>
<a>zig-cassandra🗒️Cassandra CQL client</a> </li>
<li>
<a>zig-okredis🗒️Zero-allocation Client for Redis 6+</a> </li>
<li>
<a>zig-sqlite🗒️zig-sqlite is a small wrapper around sqlite's C API, making it easier to use with Zig</a> </li>
<li>
<a>zuckdb.zig🗒️driver for DuckDB, making it easier to use with Zig</a>
</li>
<li>
Embedded
</li>
<li>
<a>embedded_zig🗒️minimal Zig embedded ARM example (STM32F103 blue pill)</a>
</li>
<li>
<a>uefi-paint🗒️UEFI-bootable touch paint app</a> </li>
<li>
<a>zig-armv8m-test🗒️Minimal Zig-based app for Armv8-M + TrustZone</a> </li>
<li>
<a>zig-bare-metal-microbit🗒️Bare metal microbit program written in zig</a> </li>
<li>
<a>Ziguana-Game-System🗒️A retro-style gaming console running on bare x86 metal written in Zig</a>
</li>
<li>
Game & Desktop(GUI) Applications
</li>
<li>
<a>4x4-Sudoku-Game🗒️A simple Sudoku game on a 4x4 grid, uses Raylib for graphics</a>
</li>
<li>
<a>Cubyz🗒️Voxel sandbox game with a large render distance, procedurally generated content and some cool graphical effects.</a></li>
<li>
<a>blink🗒️A game about building logic with lasers</a> </li>
<li>
<a>bork🗒️A TUI chat client tailored for livecoding on Twitch</a></li>
<li>
<a>butterfly-quiz🗒️A simple quiz game about common North American butterfly names, uses Raylib for graphics</a> </li>
<li>
<a>clashos🗒️multiplayer arcade game for bare metal Raspberry Pi 3 B+</a> </li>
<li>
<a>curses-minesweeper🗒️Minesweeper game written in curses with zig</a> </li>
<li>
<a>gamejam-zig-vulkan🗒️A game written in ~1 day using zig and vulkan</a> </li>
<li>
<a>hello-triangle🗒️Opens a window and draws a nice little triangle</a> </li>
<li>
<a>legend-of-swarkland🗒️Hack-n-slash roguelike inspired by NetHack</a> </li>
<li>
<a>kisa🗒️Text editor of the new world</a> </li>
<li>
<a>minesweeper-zig🗒️Simple Minesweeper clone written in Zig, using SDL for graphics</a> </li>
<li>
<a>MiniPixel🗒️Tiny pixel art editor</a> </li>
<li>
<a>mogwai🗒️Graphic utility used to manipulate objects in 3D for scene editing (commonly called Gizmo)</a> </li>
<li>
<a>OpenCSE🗒️Free implementation of the Can't Stop Express dice game</a> </li>
<li>
<a>pacman.zig🗒️Simple Pacman clone written in Zig</a> </li>
<li>
<a>pixelcode</a> </li>
<li>
<a>rayray🗒️A tiny GPU raytracer, using Zig and WebGPU</a> </li>
<li>
<a>sliding-puzzle-in-zig🗒️A sliding tile puzzle game made with zglfw and zopengl</a></li>
<li>
<a>snake-zig🗒️A simple snake game written in the Zig programming language using OpenGL 2</a> </li>
<li>
<a>SoftRenderLib🗒️A collection of software rendering routines</a> </li>
<li>
<a>tetris🗒️A simple tetris clone written in zig programming language</a> </li>
<li>
<a>underburrow🗒️A small platformer example for Slingworks & Zig</a> </li>
<li>
<a>weekend-raytracer-zig🗒️A Zig implementation of the "Ray Tracing in One Weekend" book</a> </li>
<li>
<a>wired</a> </li>
<li>
<a>zig-gorillas🗒️A clone of the classic QBasic Gorillas written in the Zig programming language</a> </li>
<li>
<a>Zig-Oculus-Quest🗒️An example application for the Oculus Quest, written in Zig</a> </li>
<li>
<a>ZigPaint🗒️A simple paint application written in Zig. Used to create an OpenGL loader/wrapper and a minimal UI system</a> </li>
<li>
<a>zig-raylib-experiments🗒️Some classic game implementations in Zig using raylib</a> </li>
<li>
<a>zig-raytrace🗒️simple raytracer in zig</a> </li>
<li>
<a>Zig-Showdown🗒️A community effort to create a small multiplayer 3D shooter game in pure zig</a> </li>
<li>
<a>zig-vulkan-triangle🗒️simple triangle displayed using vulkan, glfw, and zig</a> </li>
<li>
<a>zig-wasm-snake🗒️Classic snake game written in Zig, compiled to WASM</a> </li>
<li>
<a>zootdeck🗒️Fediverse GTK Desktop Reader</a> </li>
<li>
<a>zstack🗒️Line-race tetris mode in Zig</a> </li>
<li>
<a>ztick🗒️tiny desktop utility to keep notes ( with no features ). Written in zig and gtk4</a> </li>
<li>
<a>zyg🗒️Pathtracer written in zig</a>
</li>
<li>
Operating Systems & Kernels
</li>
<li>
<a>BamOS🗒️Open-source OS focused on speed, quality and compatibility with the ABI of well-known systems.</a>
</li>
<li>
<a>CascadeOS🗒️General purpose operating system targeting standard desktops and laptops.</a> </li>
<li>
<a>georgios🗒️Hobby Operating System</a> </li>
<li>
<a>HellOS🗒️"hello world" x86 kernel example</a> </li>
<li>
<a>Hidamari🗒️Modern operating system aimed at running WebAssembly code</a> </li>
<li>
<a>kernel-zig🗒️hobby x86 kernel zig</a> </li>
<li>
<a>Lukarnel🗒️A microkernel in zig with rust microservices</a></li>
<li>
<a>Mewz🗒️A unikernel designed specifically for running Wasm applications and compatible with WASI</a> </li>
<li>
<a>microzig🗒️Unified abstraction layer and HAL for several microcontrollers</a> </li>
<li>
<a>pluto🗒️An x86 kernel written in Zig</a> </li>
<li>
<a>tizr80🗒️TiZr80, a TI-84+ CE/TI-83 Premium CE calculator emulator core</a> </li>
<li>
<a>trOS🗒️tiny aarch64 baremetal OS thingy</a> </li>
<li>
<a>uefi-bootstrap🗒️experiments with bootstrapping a kernel with UEFI</a> </li>
<li>
<a>uefi-examples🗒️UEFI examples in Zig</a> </li>
<li>
<a>rise🗒️A better operating system</a> </li>
<li>
<a>ZBZZ.OS🗒️An operating system built with RISCV and Zig</a> </li>
<li>
<a>zen🗒️Experimental operating system written in Zig</a></li>
<li>
<a>zestos🗒️A unix os written in zig for riscv64</a> </li>
<li>
<a>zig-bare-metal-raspberry-pi🗒️Bare metal raspberry pi program written in zig</a> </li>
<li>
<a>zig-x86_64🗒️Support for x86_64 specific instructions (e.g. TLB flush), registers (e.g. control registers), and structures (e.g. page tables)</a></li>
<li>
<a>ztatusbar🗒️Configurable statusbar for Xorg server using xsetroot</a>
</li>
<li>
Simulator & Virtual Machine & Emulator
</li>
<li>
<a>chip8-zig🗒️A CHIP-8 emulator written in Zig</a>
</li>
<li>
<a>ChipZ🗒️A simple Chip8 emulator (executable and library) written in Zig</a> </li>
<li>
<a>fundude🗒️Gameboy emulator:Zig -> wasm</a></li>
<li>
<a>ghostty🗒️👻 Ghostty is a fast, feature-rich, and cross-platform terminal emulator that uses platform-native UI and GPU acceleration.</a> </li>
<li>
<a>kc85.zig🗒️A KC85 emulator written in Zig</a> </li>
<li>
<a>riscv-zig🗒️A RISC-V emulator written in Zig</a> </li>
<li>
<a>zlox🗒️lox virtual machine implementation in zig!</a>
</li>
<li>
Web {#app}
</li>
<li>
<a>astrolabe🗒️backend for https://astrolabe.pm</a>
</li>
<li>
<a>aws-lambda-zig🗒️Super-fast AWS Lambda runtime for Zig</a> </li>
<li>
<a>hello🗒️Multi-threaded cross-platform HTTP/1.1 web server example in Zig</a> </li>
<li>
<a>http.zig🗒️Fast HTTP/1.1 server with routing, app context and testing</a> </li>
<li>
<a>lua-in-the-browser🗒️using zig to build lua for webassembly</a> </li>
<li>
<a>websocket.zig🗒️Websocket server and client</a> </li>
<li>
<a>zelda🗒️A simple HTTP client library for Zig</a> </li>
<li>
<a>zerve🗒️Simple framework for writing web services and web apps in zig</a> </li>
<li>
<a>zig-libressl🗒️LibreSSL stream wrappers for Zig</a></li>
<li>
<a>zig-objdump🗒️objdump but in Zig and for Zig</a> </li>
<li>
<a>zig-wasm-dom🗒️Zig + WebAssembly + JS + DOM</a> </li>
<li>
<a>zig-wasm-test🗒️A minimal Web Assembly example using Zig's build system</a> </li>
<li>
<a>zine🗒️Static Site Generator written in Zig</a> </li>
<li>
<a>zss🗒️zss is a CSS layout engine and renderer</a> </li>
<li>
<a>zwld🗒️Experimental wasm linker</a>
</li>
<li>
Other Applications
</li>
<li>
<a>bun🗒️Incredibly fast JavaScript runtime, bundler, transpiler and package manager – all in one</a> </li>
<li>
<a>cld🗒️Linker for the Coff/PE file format</a> </li>
<li>
<a>computils🗒️Zig utilities for all your comptime needs</a> </li>
<li>
<a>cosmic🗒️A general purpose runtime for Javascript/WASM</a></li>
<li>
<a>dipm🗒️A distro independent package manager for installing statically linked executables</a></li>
<li>
<a>dnns-from-scratch-in-zig</a></li>
<li>
<a>geteltorito-zig🗒️geteltorito re-write in Zig</a></li>
<li>
<a>hexdump-zip🗒️produce an annotated hexdump of a zipfile</a> </li>
<li>
<a>iguanaTLS🗒️Minimal, experimental TLS 1.2 implementation in Zig</a> </li>
<li>
<a>iotmonitor🗒️Monitor and State server for iot mqtt devices, and software agents. This daemon permit to maintain the execution of constellations of mqtt devices and associated agents</a> </li>
<li>
<a>onenightonearth🗒️An interactive star map, written in Typescript and WebAssembly using Zig</a> </li>
<li>
<a>pacman.zig🗒️Simple Pacman clone written in Zig</a> </li>
<li>
<a>proxy-wasm-cloud-logging-trace-context🗒️A proxy-wasm compliant WebAssembly module for making proxies integrate with Google Cloud Logging</a> </li>
<li>
<a>river🗒️A dynamic tiling Wayland compositor</a> </li>
<li>
<a>wayfarer🗒️Experiments involving a Zig Wayland compositor</a> </li>
<li>
<a>waylock🗒️A small screenlocker for Wayland compositors</a> </li>
<li>
<a>ZigAndroidTemplate🗒️This repository contains a example on how to create a minimal Android app in Zig</a> </li>
<li>
<a>zig-ios-example🗒️Minimal build.zig for targeting iOS</a> </li>
<li>
<a>zig-minisign🗒️Minisign reimplemented in Zig</a> </li>
<li>
<a>zig-nodejs-example🗒️Node.js Native Module written in Zig</a> </li>
<li>
<a>zig-protobuf🗒️a protobuf 3 implementation for zig</a> </li>
<li>
<a>zig-snappy🗒️Snappy compression for Zig</a> </li>
</ul>
Libraries
<ul>
<li>
Artificial Intelligence
</li>
<li>
<a>ollama-zig🗒️Ollama Zig library</a>
</li>
<li>
<a>llama2.zig🗒️Inference Llama 2 in one file of pure Zig</a></li>
<li>
<a>Zigrad🗒️ A deep learning framework built on an autograd engine with high level abstractions and low level control.</a></li>
<li>
<a>zml🗒️A machine learning framework</a>
</li>
<li>
Blockchain Development
</li>
<li>
<a>solana-program-sdk-zig🗒️Write Solana programs in Zig</a>
</li>
<li>
<a>verkle-crypto🗒️Cryptography for Ethereum Verkle Trees</a> </li>
<li>
<a>zig-on-stylus🗒️EVM-interoperable smart contracts written in Zig</a>
</li>
<li>
Database Operation
</li>
<li>
<a>lithdew/lmdb-zig🗒️Lightweight, fully-featured, idiomatic cross-platform Zig bindings to Lightning Memory-Mapped Database (LMDB)</a>
</li>
<li>
<a>zig-sqlite🗒️zig-sqlite is a small wrapper around sqlite's C API, making it easier to use with Zig</a> </li>
<li>
<a>zdb🗒️Allocator-free document oriented database management</a> </li>
<li>
<a>zig-sqlite3🗒️sqlite3 wrapper for Zig</a>
</li>
<li>
Encryption & Encoding & Decoding
</li>
<li>
<a>Base58-zig🗒️A base58 encoding/decoding library providing both alloc and non-alloc methods</a>
</li>
<li>
<a>hts-zig🗒️ziglang + htslib</a> </li>
<li>
<a>inon🗒️Data serialization format in Zig</a> </li>
<li>
<a>mecha🗒️A parser combinator library for Zig</a> </li>
<li>
<a>s2s🗒️A zig binary serialization format</a> </li>
<li>
<a>tls13-zig🗒️The first TLS1.3 implementation in Zig(master/HEAD) only with std</a> </li>
<li>
<a>uuencode🗒️Unix-To-Unix-Encoding for Zig</a> </li>
<li>
<a>xm🗒️Tokenize XML</a> </li>
<li>
<a>wavefront-obj🗒️A parser for wavefront object files</a> </li>
<li>
<a>zasp🗒️zasp ⚡ a streaming parser</a> </li>
<li>
<a>zaml🗒️Fast YAML 1.2 parsing library for Python 3</a> </li>
<li>
<a>zdwg🗒️Read, manipulate, write AutoCad DWG files in zig</a> </li>
<li>
<a>zig-args🗒️Simple-to-use argument parser with struct-based config</a> </li>
<li>
<a>zig-charm🗒️A Zig version of the Charm crypto library</a> </li>
<li>
<a>zig-libxml2🗒️libxml2 built using Zig build system</a></li>
<li>
<a>zig-md2🗒️A MD2 hash function for Zig</a> </li>
<li>
<a>zig-md4🗒️A MD4 hash function for Zig</a> </li>
<li>
<a>zig-sm3🗒️A SM3 hash function for Zig</a> </li>
<li>
<a>zig-tzif🗒️TZif parsing for Zig</a> </li>
<li>
<a>zig-nestedtext🗒️Zig NestedText parser library - a simple human readable data format based on YAML</a> </li>
<li>
<a>zig-wayland🗒️Zig wayland scanner and libwayland bindings</a> </li>
<li>
<a>zjson🗒️Minimal json library with zero allocations</a> </li>
<li>
<a>zpem🗒️A pem parse and encode library for Zig</a>
</li>
<li>
Game Dev & GUI Dev & Media Framework
</li>
<li>
<a>2jz🗒️An archetype-based entity-component-system library written in Zig</a>
</li>
<li>
<a>Alka🗒️Simple, fast, easy to get started mid-level game engine written in Zig</a> </li>
<li>
<a>audiometa🗒️An audio metadata/tag reading library written in Zig</a> </li>
<li>
<a>capy🗒️Cross-platform library for making true native GUIs in Zig</a> </li>
<li>
<a>cupcake🗒️an app framework for making small and delicious games! (very wip)</a> </li>
<li>
<a>didot🗒️Zig 3D game engine</a> </li>
<li>
<a>fontaine🗒️A library to support text rendering in arbitrary contexts</a> </li>
<li>
<a>gui</a> </li>
<li>
<a>IUPforZig🗒️Zig idiomatic and type-checked bindings for IUP Portable User Interface Toolkit</a></li>
<li>
<a>jok🗒️A minimal 2d/3d game framework for @ziglang.</a> </li>
<li>
<a>libvlc-zig🗒️Zig bindings for libVLC media framework</a> </li>
<li>
<a>mach🗒️Mach is a game engine & graphics toolkit for the future</a> </li>
<li>
<a>metronome🗒️A set of tools for modifying and randomizing Pokémon games</a> </li>
<li>
<a>moonshine🗒️A general purpose ray traced renderer built with Zig + Vulkan</a> </li>
<li>
<a>notcurses-zig-example🗒️Demo showing how to use Notcurses library for building terminal UIs with Zig</a> </li>
<li>
<a>painterz🗒️Low-level implementation of different painting primitives (lines, rectangles, ...) without specialization on a certain draw target</a> </li>
<li>
<a>qml_zig🗒️QML bindings for the Zig programming language</a> </li>
<li>
<a>qoiz🗒️A simple and fast implementation of the QOI image format decoder and encoder.</a> </li>
<li>
<a>raylib-zig🗒️Manually tweaked, auto generated raylib bindings for zig. https://github.com/raysan5/raylib</a> </li>
<li>
<a>SDL.zig🗒️A shallow wrapper around SDL that provides object API and error handling</a> </li>
<li>
<a>seizer🗒️Cross platform Zig library for obtaining a rendering context and loading assets</a> </li>
<li>
<a>slingworks🗒️Small to Medium scale 2d Game Engine for Zig</a> </li>
<li>
<a>sndio-zig🗒️sndio bindings for zig</a> </li>
<li>
<a>tm35-nds🗒️A library for working with Nintendo DS roms</a> </li>
<li>
<a>VecFns🗒️Automatic Vector Math Functions In Zig</a> </li>
<li>
<a>vulkan-zig🗒️Vulkan binding generator for Zig</a> </li>
<li>
<a>wasm4🗒️Build retro games using WebAssembly for a fantasy console</a> </li>
<li>
<a>zalgebra🗒️Linear algebra library for games and real-time graphics</a> </li>
<li>
<a>zero-graphics🗒️Application framework based on OpenGL ES 2.0. Runs on desktop machines, Android phones and the web</a> </li>
<li>
<a>zgl🗒️Zig OpenGL Wrapper</a> </li>
<li>
<a>zglfw🗒️A thin, idiomatic wrapper for GLFW. Written in Zig, for Zig!</a> </li>
<li>
<a>zig-gamedev-lib🗒️xq's Zig Game Development Library</a> </li>
<li>
<a>zig-gamedev🗒️Building game development ecosystem for @ziglang!</a> </li>
<li>
<a>zig-gamekit🗒️Companion repo for zig-renderkit for making 2D games</a> </li>
<li>
<a>ZigGBA🗒️Work in progress SDK for creating Game Boy Advance games using Zig programming language</a> </li>
<li>
<a>Zig-Gltf-Display🗒️A program that displays glTF files using Vulkan, written in Zig</a> </li>
<li>
<a>zigimg🗒️Zig library for reading and writing different image formats</a> </li>
<li>
<a>zignal🗒️Image processing library</a> </li>
<li>
<a>Zig-PSP🗒️A project to bring the Zig Programming Language to the Sony PlayStation Portable!</a> </li>
<li>
<a>zig-qoi🗒️Quite OK Image format encoder/decoder written in Zig</a> </li>
<li>
<a>zig-renderkit🗒️Cross platform Zig graphics backends with a 2D focus</a> </li>
<li>
<a>zig-sfml-wrapper🗒️A zig wrapper for csfml</a> </li>
<li>
<a>zig-tracy🗒️Zig bindings for the Tracy profiler</a> </li>
<li>
<a>zig-upaya🗒️Zig-based framework for creating game tools and helper apps</a> </li>
<li>
<a>zig-window🗒️window client library</a> </li>
<li>
<a>zig-wlroots🗒️Zig bindings for wlroots</a> </li>
<li>
<a>zlm🗒️Zig linear mathematics</a> </li>
<li>
<a>zplay🗒️A simple framework intended for game/tool creation</a> </li>
<li>
<a>ZT🗒️A zig based Imgui Application framework</a> </li>
<li>
<a>zwin🗒️Making windows with Zig! (Only works on Windows at the moment)</a> </li>
<li>
<a>ZWL🗒️Zig Windowing Library</a>
</li>
<li>
Language Bindings
</li>
<li>
<a>mruby-zig🗒️mruby bindings for zig</a>
</li>
<li>
<a>wren-zig🗒️wren bindings for zig</a> </li>
<li>
<a>zig-autolua🗒️Lua binding creator for zig</a></li>
<li>
<a>ziggy-pydust🗒️Bindings for building Python extensions with Zig</a></li>
<li>
<a>zig-objc🗒️Objective-C runtime bindings for Zig (Zig calling ObjC)</a>
</li>
<li>
Terminal & Low-Level Libraries & System API
</li>
<li>
<a>ansi-term🗒️Zig library for dealing with ANSI terminals</a>
</li>
<li>
<a>cova🗒️Commands, Options, Values, Arguments. A simple yet robust cross-platform command line argument parsing library for Zig.</a></li>
<li>
<a>dos.zig🗒️Create DOS programs with Zig</a> </li>
<li>
<a>known-folders🗒️Provides access to well-known folders across several operating systems</a> </li>
<li>
<a>libffi🗒️libffi with a Zig build script</a></li>
<li>
<a>linenoize🗒️A port of linenoise to zig</a> </li>
<li>
<a>lscolors🗒️A zig library for colorizing paths according to LS_COLORS</a> </li>
<li>
<a>mibu🗒️Pure Zig library for low-level terminal manipulation</a> </li>
<li>
<a>nfd-zig🗒️OS-native file dialogs on Linux, macOS and Windows</a> </li>
<li>
<a>TextEditor🗒️A backbone for text editors. No rendering, no input, but everything else</a> </li>
<li>
<a>x86-zig🗒️library for assembling x86 in zig (WIP)</a> </li>
<li>
<a>yazap🗒️A simple and easy-to-use zig library for parsing command line arguments, flags and subcommands</a></li>
<li>
<a>zargs🗒️Another Comptime-argparse for Zig</a></li>
<li>
<a>zig-clap🗒️Simple command line argument parsing library</a> </li>
<li>
<a>ZigKit🗒️Zig bindings for low-level macOS frameworks</a></li>
<li>
<a>zig-prompter🗒️A flexible library for building interactive command line prompts</a> </li>
<li>
<a>zigra🗒️Command line toolkit for Zig</a> </li>
<li>
<a>zig-serial🗒️Serial port configuration library for Zig</a></li>
<li>
<a>zig-syslinfo🗒️Linux sysinfo Zig library</a></li>
<li>
<a>zigwin32🗒️Autogenerated Zig bindings for Win32</a> </li>
<li>
<a>zig-windows-console🗒️Zig Windows Console stuff</a> </li>
<li>
<a>zinput🗒️A Zig command-line input library!</a>
</li>
<li>
Universal
</li>
<li>
Algorithms & Data Structures
<ul>
<li>
<a>ArrayVec🗒️An array with a vector feeling in Zig</a> </li>
<li>
<a>art.zig🗒️An Adaptive Radix Tree ported from c</a> </li>
<li>
<a>cache.zig🗒️A thread-safe, expiration-aware, LRU(ish) cache</a> </li>
<li>
<a>ctregex.zig🗒️Compile time regular expressions in zig</a> </li>
<li>
<a>comptime_hash_map🗒️A statically initiated HashMap</a> </li>
<li>
<a>deque.zig🗒️a lock free chase-lev deque for zig</a> </li>
<li>
<a>fastfilter🗒️fastfilter:Binary fuse & xor filters for Zig (faster and smaller than bloom filters)</a> </li>
<li>
<a>funzig🗒️Fun functional functionality for Zig!</a></li>
<li>
<a>HypergraphZ🗒️Hypergraph Implementation in Zig</a></li>
<li>
<a>ish🗒️Sketches for Zig</a> </li>
<li>
<a>it/redis-cuckoofilter🗒️Hashing-function agnostic Cuckoo filters for Redis</a> </li>
<li>
<a>Lazy-Zig🗒️Linq in Zig</a> </li>
<li>
<a>libredo🗒️Automatic dependency tracking</a></li>
<li>
<a>LZig4🗒️Implementing lz4 in zig</a> </li>
<li>
<a>minz🗒️Minimal string compression</a> </li>
<li>
<a>strcompare 🗒️ string comparison library implementing the Hamming, Levenshtein, Damerau-Levenshtein metrics</a> </li>
<li>
<a>string-searching🗒️String(not limited to [] const u8)-searching algorithms in zig</a></li>
<li>
<a>tiny_array_list🗒️Inline buffer-based, auto-heap-transitioning ArrayList variant optimized for small, frequent data interactions.</a> </li>
<li>
<a>tree.zig🗒️Splay Tree from OpenBSD Ported to Zig</a></li>
<li>
<a>zig-containers🗒️A container library for Zig</a> </li>
<li>
<a>zig-cuckoofilter🗒️Production-ready Cuckoo Filters for any C ABI compatible target</a> </li>
<li>
<a>zig-graph🗒️Directed graph data structure for Zig</a> </li>
<li>
<a>zig-prometheus🗒️Prometheus/VictoriaMetrics client library for Zig</a> </li>
<li>
<a>zig-sparse-set🗒️Sparse sets for zig, supporting both SOA and AOS style</a> </li>
<li>
<a>zigstr🗒️Zigstr is a UTF-8 string type for Zig programs</a> </li>
<li>
<a>zig-string🗒️A String Library made in Zig</a> </li>
<li>
<a>zigavl🗒️An AVL tree written in Zig</a> </li>
<li>
<a>zigfp🗒️Basic fixed point implementation in Zig</a> </li>
<li>
<a>zignite🗒️A lazy stream (iterator) library for Zig</a> </li>
<li>
<a>zigtimsort🗒️TimSort implementation for Zig</a> </li>
<li>
<a>zini🗒️Minimal perfect hash function for Zig</a> </li>
<li>
<a>ziter🗒️Best iterator library for Zig (fight me!)</a> </li>
<li><a>znum🗒️Simple numeric tower implemented on Zig standard types</a></li>
<li>
<a>zorm🗒️Lightweight and efficient object-relational mapping</a> </li>
<li>
<a>zort🗒️Implementation of 9 sorting algorithms in Zig</a> </li>
<li>
<a>zzz🗒️Simple and boring human readable data format for Zig</a></li>
</ul>
</li>
<li>
Concurrency
<ul>
<li>
<a>leviathan🗒️A lightning-fast Zig-powered event loop for Python's asyncio.</a></li>
<li>
<a>libxev🗒️libxev is a cross-platform, high-performance event loop that provides abstractions for non-blocking IO, timers, events, and more and works on Linux (io_uring or epoll), macOS (kqueue), and Wasm + WASI. Available as both a Zig and C API</a></li>
<li>
<a>zigcoro🗒️A Zig coroutine library</a></li>
</ul>
</li>
<li>
Memory Management
<ul>
<li>
<a>adma🗒️A general purpose, multithreaded capable slab allocator for Zig</a> </li>
<li>
<a>Seal🗒️An allocator that wraps another allocator and detects if memory is leaked after usage</a> </li>
<li>
<a>zcirc🗒️A dynamic circular buffer allocator for zig</a> </li>
<li>
<a>zee_alloc🗒️tiny Zig allocator primarily targeting WebAssembly</a> </li>
<li>
<a>ziegfried🗒️A general-purpose memory allocator for Zig</a> </li>
<li>
<a>zig-libgc🗒️Zig-friendly library for interfacing with libgc (bdwgc) -- the Boehm-Demers-Weiser conservative garbage collector</a> </li>
<li>
<a>zig-rcsp🗒️Reference-counted Shared Pointer for Zig</a> </li>
</ul>
</li>
<li>
Other Universal Libraries
<ul>
<li>
<a>async_io_uring🗒️An event loop in Zig using io_uring and coroutines</a> </li>
<li>
<a>comptemplate</a> </li>
<li>
<a>diffz🗒️Implementation of go-diff's diffmatchpatch in Zig</a> </li>
<li>
<a>getty🗒️Serialization framework for Zig</a> </li>
<li>
<a>interface.zig🗒️Dynamic dispatch for zig made easy</a> </li>
<li>
<a>log.zig🗒️a thread-safe logging library for zig</a> </li>
<li>
<a>PeerType🗒️Zig peer type resolution at comptime, ported from the compiler source code</a> </li>
<li>
<a>sokol-zig🗒️Zig bindings for the sokol headers (https://github.com/floooh/sokol)</a> </li>
<li><a>trace.zig🗒️A small and simple tracing client library for Zig</a></li>
<li>
<a>zap🗒️An asynchronous runtime with a focus on performance and resource efficiency</a> </li>
<li>
<a>zig-datetime🗒️A date and time module for Zig</a> </li>
<li>
<a>zig-extras🗒️An assortment of random utility functions that aren't in std and don't deserve their own package</a> </li>
<li>
<a>zig-generator🗒️Async generator type for Zig</a> </li>
<li>
<a>zig-leven🗒️Measure the difference between two slices using the Levenshtein distance algorithm</a> </li>
<li>
<a>ziglyph🗒️Unicode text processing for the Zig programming language</a> </li>
<li>
<a>zig-range🗒️A range function to loop over an index without an extra variable</a> </li>
<li>
<a>zig-regex🗒️A regex implementation for the zig programming language</a> </li>
<li>
<a>zig-time🗒️A date and time parsing and formatting library for Zig</a></li>
<li>
<a>deatil/zig-time🗒️A date and time parse and format library for Zig</a> </li>
<li>
<a>zig-ulid🗒️A binary implementation of ULID in Zig</a> </li>
<li>
<a>zoltan🗒️A Sol-inspired minimalist Lua binding for Zig</a></li>
</ul>
</li>
<li>
Web {#lib}
</li>
<li>
<a>apple_pie🗒️Basic HTTP server implementation in Zig</a>
</li>
<li>
<a>espresso-zig🗒️Zig bindings for espresso C library</a> </li>
<li>
<a>foxwren🗒️A WebAssembly runtime in zig</a> </li>
<li>
<a>h11🗒️I/O agnostic HTTP/1.1 implementation for Zig </a> </li>
<li>
<a>htmlentities.zig🗒️HTML entity data for Zig</a> </li>
<li>
<a>http🗒️HTTP core types for Zig 🦴</a> </li>
<li>
<a>ip.zig🗒️A Zig library for working with IP Addresses</a></li>
<li>
<a>jetzig🗒️Jetzig is a web framework written in Zig</a></li>
<li>
<a>jwt-zig🗒️Json Web Token library in zig</a></li>
<li>
<a>positron🗒️A web renderer frontend for zig applications</a> </li>
<li>
<a>rem🗒️An HTML parsing library, written in Zig</a> </li>
<li>
<a>routez🗒️Http server for Zig</a> </li>
<li>
<a>snow🗒️A small, fast, cross-platform, async Zig networking framework built on top of lithdew/pike</a></li>
<li>
<a>tokamak🗒️Server-side framework for Zig, relying heavily on dependency injection.</a></li>
<li>
<a>wasmer-zig🗒️Zig bindings for the Wasmer WebAssembly runtime</a> </li>
<li>
<a>wasmtime-zig🗒️Zig embedding of Wasmtime</a> </li>
<li>
<a>wasm-zig🗒️Common Wasm runtime binding to C API</a> </li>
<li>
<a>wazm🗒️Web Assembly Zig Machine</a> </li>
<li>
<a>wz🗒️An I/O agnostic WebSocket 1.3 library for Zig</a> </li>
<li>
<a>zCOM🗒️A composable network protocol stack for embedded and desktop</a> </li>
<li>
<a>zhp🗒️A Http server written in Zig</a> </li>
<li>
<a>zigdig🗒️naive dns client library in zig</a> </li>
<li>
<a>zig-dns🗒️Experimental DNS library implemented in zig</a> </li>
<li>
<a>zig-jwt🗒️A JWT library for zig</a> </li>
<li>
<a>zigly🗒️The easiest way to write services for Fastly's Compute@Edge in Zig</a> </li>
<li>
<a>zig-network🗒️A smallest-common-subset of socket functions for crossplatform networking, TCP & UDP</a> </li>
<li>
<a>zig-oauth2🗒️HTTP handler functions to allow you to easily add OAuth2 login support to your Zig application</a></li>
<li>
<a>zig-php🗒️PHP extension written in Zig</a></li>
<li>
<a>zig-v8🗒️Simple V8 builds with C and Zig bindings</a>
</li>
<li>
Other Libraries
</li>
<li>
<a>antiphony🗒️A zig remote procedure call solution</a>
</li>
<li>
<a>libflightplan🗒️A library for reading and writing flight plans in various formats. Available as both a C and Zig library</a> </li>
<li>
<a>SMTP Server🗒️Create custom SMTP servers on the fly</a></li>
<li>
<a>smtp_client.zig🗒️An SMTP client library</a> </li>
<li>
<a>tenet🗒️Automatic differentiation prototype in Zig</a> </li>
<li>
<a>zig-bench🗒️Simple benchmarking library</a> </li>
<li>
<a>zigcv🗒️zig bindings for OpenCV4</a> </li>
<li>
<a>zig-dis-x86_64🗒️x86_64 disassembler library written in Zig</a> </li>
<li>
<a>zig-docker🗒️Zig bindings for the Docker Engine API</a></li>
<li>
<a>zig-epub🗒️minimal zig library for creating EPUB files</a></li>
<li>
<a>zig-libcurl🗒️compile libcurl in your build.zig</a> </li>
<li>
<a>zig-lv2🗒️Zig-intuitive bindings for LV2</a> </li>
<li>
<a>zig-nanoid🗒️A tiny, secure, URL-friendly, unique string ID generator. Now available in pure Zig</a> </li>
<li>
<a>zig-pek🗒️A comptime HTML preprocessor with a builtin template engine for Zig</a> </li>
<li>
<a>zig-totp🗒️A totp library for zig</a> </li>
<li>
<a>zig-zlib🗒️compile zlib in your build.zig</a> </li>
</ul>
Resources
<strong>Content that has appeared in <a>Related Web Sites</a> will not appear here again</strong>
<ul>
<li>
<a>Community</a>
</li>
<li>
Introduction Or News
</li>
<li>
<a>Intro to the Zig Programming Language • Andrew Kelley • GOTO 2022</a> </li>
<li>
<a>The Road to Zig 1.0 - Andrew Kelley</a> </li>
<li>
<a>Zig Roadmap 2023 - Andrew Kelley</a></li>
<li>
<a>Zig Roadmap 2024 - Andrew Kelley</a></li>
</ul>
<ul>
<li>
<a>Zig Star History</a>
</li>
<li>
Learning
</li>
<li><a>Exercism exercises in Zig</a></li>
<li><a>zig-cookbook🗒️Zig cookbook is a collection of simple Zig programs that demonstrate good practices to accomplish common programming tasks.</a></li>
<li><a>zig.guide🗒️Repo for https://zig.guide content. Get up to speed with Zig quickly.</a></li>
<li><a>Learning Zig🗒️Comprehensive introduction to Zig</a></li>
<li><a>ziglings🗒️Learn the Zig programming language by fixing tiny broken programs</a></li>
<li>
<a>Zig language:a WAY better C! - YouTube</a> </li>
<li>
<a>Zig Programming Language Tutorials</a></li>
<li><a>Zig Language Reference</a></li>
<li>
<a>Zig Standard Library Documentation</a>
</li>
<li>
<a>zig-course(zh_CN)</a>
</li>
</ul>
The End | []
|
https://avatars.githubusercontent.com/u/112636619?v=4 | buzz | buzz-language/buzz | 2021-08-15T15:41:50Z | 👨🚀 buzz, A small/lightweight statically typed scripting language | main | 73 | 1,380 | 35 | 1,380 | https://api.github.com/repos/buzz-language/buzz/tags | MIT | [
"language",
"zig"
]
| 7,469 | false | 2025-05-19T02:47:57Z | true | true | 0.15.0-dev.190+bfbf4badd | github | [
{
"commit": "e47028deaefc2fb396d3d9e9f7bd776ae0b2a43a",
"name": "clap",
"tar_url": "https://github.com/Hejsil/zig-clap/archive/e47028deaefc2fb396d3d9e9f7bd776ae0b2a43a.tar.gz",
"type": "remote",
"url": "https://github.com/Hejsil/zig-clap"
},
{
"commit": "fe16f27f41ca5ad7ffb4e3d73e9e2a5ed42b0cc9",
"name": "zig_lsp_kit",
"tar_url": "https://github.com/buzz-language/zig-lsp-kit/archive/fe16f27f41ca5ad7ffb4e3d73e9e2a5ed42b0cc9.tar.gz",
"type": "remote",
"url": "https://github.com/buzz-language/zig-lsp-kit"
}
]
|
👨🚀 buzz
A small/lightweight statically typed scripting language written in Zig
<a>Homepage</a> — <a>Discord</a>
Features
<ul>
<li>Small in size and complexity (just a bit more than Lua though)</li>
<li>Statically typed</li>
<li>Unambiguous</li>
<li>No nonsense coercion</li>
<li><a>Fibers</a></li>
<li>JIT compilation with <a>MIR</a></li>
<li>Tooling<ul>
<li><a>VS Code extension</a></li>
<li>Helix support thanks to <a>tree-sitter grammar</a></li>
<li>LSP</li>
<li>Formatter</li>
</ul>
</li>
</ul>
How to build and install
<em>Latest zig version supported: 0.15.0-dev.263+d8153fa74</em>
Requirements
<ul>
<li>Since this is built with Zig, you should be able to build buzz on a wide variety of architectures even though this has only been tested on x86/M1.</li>
<li>Linux or macOS (Windows support <a>is coming</a>)</li>
<li>libc</li>
<li>zig master</li>
</ul>
Build
<ol>
<li>Clone the project: <code>git clone https://github.com/buzz-language/buzz <buzz_dir></code></li>
<li>Checkout submodules: <code>git submodule update --init</code></li>
<li>Have fun: <code>zig build run -- <myscript.buzz></code> to run a script or <code>zig build run</code> to start the REPL</li>
</ol>
Install
```bash
install locally at ~/.local
zig build -Doptimize=ReleaseSafe install -p ~/.local
install globally at /usr/local
sudo zig build -Doptimize=ReleaseSafe install -p /usr/local
```
If you're usage if performance critical (game dev for example), you can build using <code>-Doptimize=ReleaseFast</code>.
Remember to modify PATH to include the <code>bin</code> directory where it is installed. For example, <code>export PATH=PATH:/home/xxx/.local/bin</code>. You can then run buzz with <code>buzz <myscript.buzz></code>. Or you can simply run <code>buzz</code> to start the REPL. | []
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.