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/3759175?v=4 | delay-line | Hejsil/delay-line | 2020-10-14T16:42:52Z | Delays lines comming from stdin | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/Hejsil/delay-line/tags | MIT | [
"cli",
"command-line-tool",
"zig"
]
| 17 | false | 2024-09-13T12:23:53Z | true | false | unknown | github | []
| delay-line
A command line tool that prints all lines from stdin to stdout with
a fixed delay between each line.
Examples
Print the date+time every second:
```sh
Notice, this pipeline only ever launches 5 processes. It is also a
a lot cleaner than the alternative "run date every second in a loop".
Clean and efficient!
seq "$(date +%s)" 1 inf | sed 's/^/@/' | date -f - | delay-line 1s
You can get more efficient by raising the delay.
seq "$(date +%s)" 10 inf | sed 's/^/@/' | date -f - | delay-line 10s
This is useful for making your own status bar script for bars
such as lemonbar.
```
Build
External dependencies:
* <a>Zig <code>0.6.0</code></a>
After getting the dependencies just clone the repo and its submodules and run:
<code>zig build</code>
All build artifacts will end up in <code>zig-cache/bin</code>.
See <code>zig build --help</code> for build options. | []
|
https://avatars.githubusercontent.com/u/3952805?v=4 | Blue-Heaven | LakeByTheWoods/Blue-Heaven | 2020-03-09T06:12:34Z | Data visualiser and editor. | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/LakeByTheWoods/Blue-Heaven/tags | - | [
"zig",
"ziglang"
]
| 29 | false | 2021-02-15T10:34:56Z | true | false | unknown | github | []
| 404 | []
|
https://avatars.githubusercontent.com/u/3952805?v=4 | todo | LakeByTheWoods/todo | 2020-09-22T09:23:39Z | Simple terminal todo list | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/LakeByTheWoods/todo/tags | Unlicense | [
"cli",
"curses",
"ncurses",
"utility",
"zig",
"ziglang"
]
| 43 | false | 2020-10-02T06:55:49Z | true | false | unknown | github | []
| todo
Simple todo list command line utility.
Licence
This is free and unencumbered software released into the public domain.
See licence file for more details.
Compiling
To compile first install <a>zig master</a>.
<code>cd</code> to todo git directory and run <code>zig build</code>
The executable can be found in <code>zig-cache/bin</code>
Usage
To add new entries to the todo list (default location ~/todolist) run <code>todo "Descpription of entry 1" "Description of entry 2" "Description of entry 3"</code>
To view and update entries in curses interface just run <code>todo</code>
Interface Controls
Up/Down arrows change highlighted entry
Right arrow cycle through progress of selected entry (Not Started, Doing, Review, Done)
Left arrow reset entry to Not Started
Press ! to mark entry as High Priority
Press d to Delete entry (entries are never truly deleted, just moved to ARCHIVE section) | []
|
https://avatars.githubusercontent.com/u/1892046?v=4 | zig_ctest | nsmryan/zig_ctest | 2020-10-04T23:50:22Z | This repo contains an attempt to include C types into a Zig program and inspect them without prior knowledge | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/nsmryan/zig_ctest/tags | - | [
"c",
"zig",
"ziglang"
]
| 2 | false | 2021-04-03T16:57:36Z | false | false | unknown | github | []
| Zig C Include Test
This repo is simply an attempt to use the Zig programming language to include C definitions
from a header file, and inspect their structure without prior knowledge. In particular,
I would like to be able to iterate through the types in a header without knowing their
names.
This does not appear to work in Zig 0.6.0+0962CC5a3 due to some incompleteness
related to cimport structures.
The use-case here would be to include definitions that describe the structure
of the telemetry of embedded systems and automatically perform things like:
documentation, ingest into a database, montoring, display, etc, directly from
the headers. | []
|
https://avatars.githubusercontent.com/u/1892046?v=4 | zzforth | nsmryan/zzforth | 2020-09-25T14:19:15Z | A (WIP) reimplementation of zForth in Zig | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/nsmryan/zzforth/tags | - | [
"forth",
"forthlang",
"wip",
"zforth",
"zig",
"ziglang"
]
| 15 | false | 2020-10-22T16:25:11Z | true | false | unknown | github | []
| zzForth
This repository contains an implementation of <a>zForth</a> in the
<a>Zig programming language</a>.
This translation is mostly faithful, but makes some changes to the feature set compared
to the original zForth.
I did this translation to learn Zig because I like Forth, and I think its interesting to
consider embedding a simple language into other application, but this is just a
short learning project.
Building and Running
To run the tests, simply use:
<code>bash
zig test zzforth.zig</code>
and to build
<code>bash
zig build main.zig</code>
Differences from zForth
I did not implment the tracing capability- I think its useful and interesting,
but I was just trying to get the thing to work first.
I did not implement the variable sized cells. This is an interesting approach,
and I'm sure it makes the system much smaller, but the complexity wasn't worth
it for me.
I haven't yet made the system as configurable as zForth, such as cell type.
You can always modify the code to get this to work, but in Zig we could have
even a better system by providing extra comptime arguments.
User Defined Cell Type
I didn't not let the user define the cell type. In zForth the cell type is a
type in the zfconf.h file. This could be provided as a comptime argument to
the ZForth struct, but then you would need to figure out how to parse numbers,
either by providing a wrapping type or providing the parser as an argument.
Zig also doesn't want you to index an array with a signed type, so I had to
do a good bit of casting to get this to work.
Notes on Zig
I learned a good deal of Zig while writing this:
Array/Pointer Types
The different pointer types take some time to get used to. I like the precision
they imply- there are many use-cases for pointers and array, and Zig lets you
express which one you intend rather then using pointers for everything.
The disadvantage has been that I often find I have to cast or convert between types,
but I'm okay with that kind of thing if it makes the code more correct.
Error Handling
The error handling is quite nice. I am used to doing all of this manually in C, but
having the simple error handling cases bulit-in led me to handle errors naturally.
There is definitely some danger in just writing all code to short-circuit on errors,
but I don't expect the language to do the thinking, only to provide good mechanisms.
Zig seems to provide the error handling I do anyway, but built-in so it is concise
and takes many fewer lines of code then in C.
The zForth code uses setjmp/longjmp, and I'm happy to see that in Zig I can do
the simple error handling of returning error codes. There are also places in
zForth where C requires output arguments to return information when an error
code can also be returned, where Zig builds in an Either/Result type so the
return type describes both the error and the return value without resorting
to output parameters.
Compile Time Type Info
One of my favorite things about Zig is access to type information at compile time.
In zForth, the zf_prim type ends in PRIM\COUNT variants, which gives the number of
enum variants. This does work, but only when the compile assigns values and 0 is
valid. In Zig we can just ask for the number of variants directly, regardless of their
values.
This looks like "@typeInfo(ZfPrim).Enum.fields.len", asking for the length of the
array of fields of the Enum ZfPrim.
Zig Formatting
I am personally a fan of language formatters that keep all code consistent. I don't
necessarily agree with all formatting decisions in Zig, but I also don't care about
formatting and I would prefer all code to follow the same patterns to
help with mental pattern matching of code, and to avoid friction between
codebases, manual work, and any trivial discussions.
Compile Time Asserts
I very much like the ease of compile time asserts in Zig. I didn't make that
much use of them, but its nice to be able to express complex logic asserts.
I could see this being useful to add a bit of correctness in more complex cases.
Development Cycle
I had a good time with the genernal development cycle of Zig. The zig.vim plugin
for vim makes formatting errors immediately apparent so I can fix them as I go, which I
definitely prefer. I used <a>entr</a> to test immediately
on every save:
<code>bash
echo "zzforth.zig" | entr -c zig test zzforth.zig</code>
This occurs fast enough that it seems almost instant, which is very nice. I hear
Zig is supposed to get faster in the future, with the self-hosted change, which
may make this even better.
Writing tests alongside functions, and running them immediately and every time, is
a great way to develop. I do this in Rust as well, and sometimes set it up manually
in C, and I vastly prefer it to manually testing or even manually running tests.
Problems
I did have some problems with the current version of Zig (0.6.0+0962cc5a3):
It seems that Zig does not compile code that is not used. This means that unused
code is a landmine that might not compile, or might have compiled once but does
not anymore. I don't know if this is intentional, but it is quite surprising.
There are occasional errors in zigfmt and running the tests. Perhaps some kind
of race condition or inconsistent state occurred in at least two ways. All
I had to do was run them again, and I've had similar problems with Rust, but
its still worth noting. | []
|
https://avatars.githubusercontent.com/u/1327032?v=4 | zig-disk-info | GoNZooo/zig-disk-info | 2019-07-19T20:18:11Z | Disk information in a GUI format | master | 0 | 1 | 0 | 1 | https://api.github.com/repos/GoNZooo/zig-disk-info/tags | - | [
"disk-usage",
"win32",
"windows",
"zig",
"ziglang"
]
| 81 | false | 2025-01-25T19:21:25Z | true | false | unknown | github | []
| Why?
I needed an excuse to make something in Zig (this was my second project in it)
and coincidentally needed a way to see my hard drive usage without waiting for
Windows to calculate it.
I end up using it probably at least a few times a week so it's been useful.
Usage
Open the app, see how much disk space you have left. Click on the entries to
open the disk in the file explorer.
Internal libs
I might pull the small internal library used here out into a library of its own
but that would either be something I do because I need it elsewhere or because
someone else makes a neat case for it.
If one were so inclined they could add the entire package as a dependency and
just point the package declaration at <code>disk.zig</code> (I think?) to use it as a lib. | []
|
https://avatars.githubusercontent.com/u/11783095?v=4 | gameoflife | nrdmn/gameoflife | 2019-05-09T19:45:43Z | Multiboot-bootable Game of Life in Zig | master | 0 | 1 | 0 | 1 | https://api.github.com/repos/nrdmn/gameoflife/tags | - | [
"gameoflife",
"multiboot",
"x86",
"zig"
]
| 1,119 | false | 2023-10-28T13:46:40Z | true | false | unknown | github | []
| Bootable Game of Life in Zig
This is a bootable Game of Life written in <a>Zig</a> using the <a>GNU Multiboot</a> standard.
Build with <code>zig build</code>, run with <code>qemu-system-x86_64 -curses -kernel gameoflife</code>. | []
|
https://avatars.githubusercontent.com/u/1991931?v=4 | ziggurat | johan-bolmsjo/ziggurat | 2019-10-05T18:24:41Z | Zig Data Structures | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/johan-bolmsjo/ziggurat/tags | MIT | [
"data-structures",
"zig"
]
| 35 | false | 2024-05-09T14:56:28Z | false | false | unknown | github | []
| Ziggurat
Data structures for <a>zig</a>.
BEWARE: This is a learning experience!
I have just started this journey. Unless I tire of the language I will port my
favorite data structures and add them to this repo.
Compiles with: zig 0.12
Running Tests
<code>zig test list_test.zig
zig test -O ReleaseSafe avl_test.zig
</code> | []
|
https://avatars.githubusercontent.com/u/155788?v=4 | unique.zig | karrick/unique.zig | 2020-01-18T20:06:19Z | unique reads from standard input, printing lines it has not yet seen | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/karrick/unique.zig/tags | MIT | [
"command-line-tool",
"filter",
"zig"
]
| 11 | false | 2024-09-06T00:56:28Z | true | true | unknown | github | []
| unique.zig
unique reads from standard input, printing lines it has not yet seen
Example
<code>Bash
zig build && printf "line 1\nline 2\nline 1\nline 3\n" | ./zig-out/bin/unique</code> | []
|
https://avatars.githubusercontent.com/u/7581276?v=4 | advent_of_code | nhultz/advent_of_code | 2019-10-16T23:50:57Z | Advent of Code Solutions | master | 1 | 0 | 0 | 0 | https://api.github.com/repos/nhultz/advent_of_code/tags | - | [
"advent-of-code",
"c",
"hacktoberfest",
"rust",
"zig"
]
| 239 | false | 2024-10-30T02:02:21Z | false | false | unknown | github | []
| 404 | []
|
https://avatars.githubusercontent.com/u/16050377?v=4 | ziglang-libraries | MCRusher/ziglang-libraries | 2019-11-21T03:34:21Z | testing out ziglang by implementing data structures and writing code | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/MCRusher/ziglang-libraries/tags | MIT | [
"library",
"zig",
"ziglang"
]
| 16 | false | 2019-12-15T23:08:50Z | false | false | unknown | github | []
| 404 | []
|
https://avatars.githubusercontent.com/u/4075241?v=4 | zigtroids | rdunnington/zigtroids | 2019-12-24T04:57:30Z | Asteroids-like game written in Zig with SDL for graphics. | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/rdunnington/zigtroids/tags | - | [
"asteroids",
"game",
"zig"
]
| 8,236 | false | 2021-06-12T14:26:41Z | true | false | unknown | github | []
| 404 | []
|
https://avatars.githubusercontent.com/u/60458916?v=4 | blake2 | nofmal/blake2 | 2020-01-31T20:40:30Z | BLAKE2 implementation written in Zig | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/nofmal/blake2/tags | UPL-1.0 | [
"blake2",
"blake2b",
"blake2s",
"hash",
"zig"
]
| 7 | false | 2020-02-01T08:24:33Z | true | false | unknown | github | []
| 404 | []
|
https://avatars.githubusercontent.com/u/22677068?v=4 | zig-on-rpi-using-ultibo | markfirmware/zig-on-rpi-using-ultibo | 2019-03-07T00:41:11Z | zig receiving tv remote controller presses using ultibo on raspberry pi's | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/markfirmware/zig-on-rpi-using-ultibo/tags | MIT | [
"bare-metal",
"kernel",
"raspberry-pi",
"rpi",
"ultibo",
"zig"
]
| 34,489 | false | 2021-04-15T18:47:48Z | true | false | unknown | github | []
| zig-on-rpi-using-ultibo
Download and operate using an sd card zip file: https://github.com/markfirmware/zig-on-rpi-using-ultibo/releases
The main ultibo program calls the zig function named zigmain.
zigmain logs the command line arguments that are passed to it.
zigmain then registers a callback with the raspberry pi userland that is embedded in ultibo.
This callback responds to tv remote controller button presses by recording a message in the ultibo log (displayed on screen.)
The tv requires cec (consumer electronics control.)
ultibo supports a lot of the <a>raspberry pi hardware and accessories</a> and has many software <a>features</a> including various free pascal packages .
Development
Dependencies:
<ul>
<li>Developed on debian 9/x86_64</li>
<li>Install ultibo using <a>ultiboinstaller.sh</a></li>
<li>Install zig and add it to the PATH (must use most recent master from https://ziglang.org/download)</li>
<li>Install the arm embedded tool chain https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads</li>
<li>The installation directory is /usr and if not using gcc-arm-none-eabi-8-2018-q4-major then the build.zig file must be modified to reflect the correct path</li>
</ul>
Obtain this repo:
<code>git clone https://github.com/markfirmware/zig-on-rpi-using-ultibo
</code>
Build the kernels for the various raspberry pi models:
<code>zig build kernels
</code>
(For reference, these repositories have already been included as git subtrees:)
<code>git subtree add --prefix subtree/ultibohub/API https://github.com/ultibohub/API master --squash
git subtree add --prefix subtree/ultibohub/Userland https://github.com/ultibohub/Userland ultibo --squash
</code> | []
|
https://avatars.githubusercontent.com/u/657581?v=4 | RTCW-SP-Zig | BitPuffin/RTCW-SP-Zig | 2019-06-29T19:15:42Z | Return to Castle Wolfenstein Single Player GPL Source Release | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/BitPuffin/RTCW-SP-Zig/tags | GPL-3.0 | [
"game",
"game-engine",
"wolfenstein",
"zig"
]
| 3,675 | true | 2019-06-29T19:16:45Z | false | false | unknown | github | []
| Return to Castle Wolfenstein single player GPL source release
This file contains the following sections:
GENERAL NOTES
LICENSE
GENERAL NOTES
Game data and patching:
This source release does not contain any game data, the game data is still
covered by the original EULA and must be obeyed as usual.
You must patch the game to the latest version.
Note that RTCW is available from the Steam store at
http://store.steampowered.com/app/9010/
Linux note: due to the game CD containing only a Windows version of the game,
you must install and update the game using WINE to get the game data.
Compiling on win32:
A Visual C++ 2008 project is provided in src\wolf.sln.
The solution file is compatible with the Express release of Visual C++.
You will need to execute src\extractfuncs\extractfuncs.bat to generate src\game\g_save.c
You can test your binaries by replacing WolfSP.exe, qagamex86.dll, cgamex86.dll, uix86.dll at the top of the RTCW install
Compiling on GNU/Linux x86:
Go to the src/unix directory, and run the cons script
(cons is a perl based precursor to scons, this is what we were using at the time)
Run ./cons -h to review build options. Use ./cons -- release to compile in release mode.
If problems occur, consult the internet.
Other platforms, updated source code, security issues:
If you have obtained this source code several weeks after the time of release
(August 2010), it is likely that you can find modified and improved
versions of the engine in various open source projects across the internet.
Depending what is your interest with the source code, those may be a better
starting point.
LICENSE
See COPYING.txt for the GNU GENERAL PUBLIC LICENSE
ADDITIONAL TERMS: The Return to Castle Wolfenstein single player GPL Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU GPL which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
EXCLUDED CODE: The code described below and contained in the Return to Castle Wolfenstein single player GPL Source Code release is not part of the Program covered by the GPL and is expressly excluded from its terms. You are solely responsible for obtaining from the copyright holder a license for such code and complying with the applicable license terms.
IO on .zip files using portions of zlib
lines file(s)
4301 src/qcommon/unzip.c
Copyright (C) 1998 Gilles Vollant
zlib is Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
<ol>
<li>The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.</li>
<li>Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.</li>
<li>This notice may not be removed or altered from any source distribution.</li>
</ol>
MD4 Message-Digest Algorithm
lines file(s)
289 src/qcommon/md4.c
Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All rights reserved.
License to copy and use this software is granted provided that it is identified
as the <93>RSA Data Security, Inc. MD4 Message-Digest Algorithm<94> in all mater
ial mentioning or referencing this software or this function.
License is also granted to make and use derivative works provided that such work
s are identified as <93>derived from the RSA Data Security, Inc. MD4 Message-Dig
est Algorithm<94> in all material mentioning or referencing the derived work.
RSA Data Security, Inc. makes no representations concerning either the merchanta
bility of this software or the suitability of this software for any particular p
urpose. It is provided <93>as is<94> without express or implied warranty of any
kind.
JPEG library
src/jpeg-6
Copyright (C) 1991-1995, Thomas G. Lane
Permission is hereby granted to use, copy, modify, and distribute this
software (or portions thereof) for any purpose, without fee, subject to these
conditions:
(1) If any part of the source code for this software is distributed, then this
README file must be included, with this copyright and no-warranty notice
unaltered; and any additions, deletions, or changes to the original files
must be clearly indicated in accompanying documentation.
(2) If only executable code is distributed, then the accompanying
documentation must state that "this software is based in part on the work of
the Independent JPEG Group".
(3) Permission for use of this software is granted only if the user accepts
full responsibility for any undesirable consequences; the authors accept
NO LIABILITY for damages of any kind.
These conditions apply to any software derived from or based on the IJG code,
not just to the unmodified library. If you use our work, you ought to
acknowledge us.
NOTE: unfortunately the README that came with our copy of the library has
been lost, so the one from release 6b is included instead. There are a few
'glue type' modifications to the library to make it easier to use from
the engine, but otherwise the dependency can be easily cleaned up to a
better release of the library. | []
|
https://avatars.githubusercontent.com/u/6712477?v=4 | bstr | sstadick/bstr | 2020-02-02T02:16:31Z | Ziglang bstr library | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/sstadick/bstr/tags | MIT | [
"algorithm",
"strings-manipulation",
"zig",
"ziglang"
]
| 8 | false | 2020-02-02T20:07:47Z | true | false | unknown | github | []
| bstr
A collection of functions for working with byte strings in Zig. Much of
it is ported from the Go standard library. Currently there is no support
for simd operations, but those will be added a support comes along.
Goals
<ul>
<li>Keep this very simple and filling only the most common use cases. </li>
<li>Avoid allocations if possible</li>
<li>Return iterators where possible</li>
<li>Avoid an actual string type. []u8 is already a type</li>
</ul>
Questions?
- Should I make bstr a struct of some sort? probably not...
Notes
Search: https://golang.org/src/strings/search.go
General: https://golang.org/src/strings/strings.go
Optimized Native: https://golang.org/src/internal/bytealg/index_native.go
Rust: https://github.com/BurntSushi/bstr
Other Zig work:
https://github.com/clownpriest/strings/blob/master/src/strings.zig
Also look into burntsushi's bstr library | []
|
https://avatars.githubusercontent.com/u/6000520?v=4 | Playground | Pwera/Playground | 2019-08-14T19:32:03Z | null | master | 19 | 0 | 0 | 0 | https://api.github.com/repos/Pwera/Playground/tags | - | [
"cpp",
"deno",
"go",
"golang",
"javascript",
"js",
"rust",
"wasm",
"zig"
]
| 10,152 | false | 2024-09-12T20:53:57Z | false | false | unknown | github | []
| Playground | []
|
https://avatars.githubusercontent.com/u/35624?v=4 | davermouse.github.io | Davermouse/davermouse.github.io | 2019-04-26T21:34:40Z | null | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/Davermouse/davermouse.github.io/tags | - | [
"zig",
"zine"
]
| 4,434 | false | 2024-10-23T14:50:52Z | true | true | unknown | github | []
| 404 | []
|
https://avatars.githubusercontent.com/u/1826193?v=4 | AdventOfCode2019 | SLiV9/AdventOfCode2019 | 2019-12-01T11:24:42Z | My solutions for Advent of Code 2019. | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/SLiV9/AdventOfCode2019/tags | - | [
"advent-of-code",
"advent-of-code-2019",
"zig"
]
| 41 | false | 2023-12-05T22:00:48Z | false | false | unknown | github | []
| 404 | []
|
https://avatars.githubusercontent.com/u/24697112?v=4 | goreleaser | goreleaser/goreleaser | 2016-12-21T17:13:39Z | Release engineering, simplified | main | 23 | 14,642 | 992 | 14,642 | https://api.github.com/repos/goreleaser/goreleaser/tags | MIT | [
"apk",
"archlinux",
"bun",
"deb",
"deno",
"docker",
"github-actions",
"go",
"golang",
"hacktoberfest",
"homebrew",
"nix",
"nixos",
"package",
"release-automation",
"rpm",
"rust",
"snapcraft",
"travis",
"zig"
]
| 23,705 | false | 2025-05-22T06:08:28Z | false | false | unknown | github | []
|
GoReleaser
Release engineering, simplified.
We handle the complexities of releasing so you can focus in building what really
matters: <strong>your software</strong>.
Get GoReleaser
<ul>
<li><a>On your machine</a>;</li>
<li><a>On CI/CD systems</a>.</li>
</ul>
Documentation
Documentation is hosted live at https://goreleaser.com
Community
You have questions, need support and or just want to talk about GoReleaser?
Here are ways to get in touch with the GoReleaser community:
<a></a>
<a></a>
<a></a>
You can find the links above and all others <a>here</a>.
Code of Conduct
This project adheres to the Contributor Covenant <a>code of conduct</a>.
By participating, you are expected to uphold this code.
We appreciate your contribution.
Please refer to our <a>contributing guidelines</a> for further information.
Badges
<a></a>
<a></a>
<a></a>
<a></a>
<a></a>
<a></a>
<a></a>
<a></a>
<a></a>
<a></a>
<a></a>
<a></a>
GitHub Sponsors
High-tier sponsors of <a>@caarlos0</a> on GitHub:
<a target="_blank"></a>
OpenCollective
Sponsors
Does your company use goreleaser? Help keep the project bug-free and feature rich by <a>sponsoring the project</a>.
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
Backers
Love our work and community? <a>Become a backer</a>.
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
<a target="_blank"></a>
Contributors
This project exists thanks to all the people who contribute.
<a>Contribution guide</a>.
Stars
<a></a> | []
|
https://avatars.githubusercontent.com/u/27973237?v=4 | vscode-zig | ziglang/vscode-zig | 2017-07-14T23:02:35Z | Zig language support for VSCode | master | 36 | 646 | 67 | 646 | https://api.github.com/repos/ziglang/vscode-zig/tags | MIT | [
"visual-studio-code",
"zig"
]
| 944 | false | 2025-05-21T18:35:29Z | false | false | unknown | github | []
| vscode-zig
<a></a>
<a></a>
<a>Zig</a> support for Visual Studio Code.
Features
<ul>
<li>install and manage Zig version</li>
<li>syntax highlighting</li>
<li>basic compiler linting</li>
<li>automatic formatting</li>
<li>Run/Debug zig program</li>
<li>Run/Debug tests</li>
<li>optional <a>ZLS language server</a> features</li>
<li>completions</li>
<li>goto definition/declaration</li>
<li>document symbols</li>
<li>... and <a>many more</a></li>
</ul>
| []
|
https://avatars.githubusercontent.com/u/42113569?v=4 | Cubyz | PixelGuys/Cubyz | 2019-02-04T10:16:37Z | Voxel sandbox game with a large render distance, procedurally generated content and some cool graphical effects. | master | 465 | 564 | 69 | 564 | https://api.github.com/repos/PixelGuys/Cubyz/tags | GPL-3.0 | [
"3d-game",
"cubyz",
"game",
"procedural-generation",
"sandbox",
"sandbox-game",
"voxel",
"voxel-game",
"zig"
]
| 103,216 | false | 2025-05-21T18:43:07Z | true | true | unknown | github | [
{
"commit": null,
"name": "local",
"tar_url": null,
"type": "relative",
"url": "../Cubyz-libs/zig-out"
},
{
"commit": "master",
"name": "cubyz_deps_headers",
"tar_url": "https://github.com/PixelGuys/Cubyz-Libs/releases/download/5/cubyz_deps_headers.tar.gz/archive/master.tar.gz",
"type": "remote",
"url": "https://github.com/PixelGuys/Cubyz-Libs/releases/download/5/cubyz_deps_headers.tar.gz"
},
{
"commit": "master",
"name": "cubyz_deps_aarch64_macos",
"tar_url": "https://github.com/PixelGuys/Cubyz-Libs/releases/download/5/cubyz_deps_aarch64-macos-none.tar.gz/archive/master.tar.gz",
"type": "remote",
"url": "https://github.com/PixelGuys/Cubyz-Libs/releases/download/5/cubyz_deps_aarch64-macos-none.tar.gz"
},
{
"commit": "master",
"name": "cubyz_deps_aarch64_linux",
"tar_url": "https://github.com/PixelGuys/Cubyz-Libs/releases/download/5/cubyz_deps_aarch64-linux-musl.tar.gz/archive/master.tar.gz",
"type": "remote",
"url": "https://github.com/PixelGuys/Cubyz-Libs/releases/download/5/cubyz_deps_aarch64-linux-musl.tar.gz"
},
{
"commit": "master",
"name": "cubyz_deps_aarch64_windows",
"tar_url": "https://github.com/PixelGuys/Cubyz-Libs/releases/download/5/cubyz_deps_aarch64-windows-gnu.tar.gz/archive/master.tar.gz",
"type": "remote",
"url": "https://github.com/PixelGuys/Cubyz-Libs/releases/download/5/cubyz_deps_aarch64-windows-gnu.tar.gz"
},
{
"commit": "master",
"name": "cubyz_deps_x86_64_macos",
"tar_url": "https://github.com/PixelGuys/Cubyz-Libs/releases/download/5/cubyz_deps_x86_64-macos-none.tar.gz/archive/master.tar.gz",
"type": "remote",
"url": "https://github.com/PixelGuys/Cubyz-Libs/releases/download/5/cubyz_deps_x86_64-macos-none.tar.gz"
},
{
"commit": "master",
"name": "cubyz_deps_x86_64_linux",
"tar_url": "https://github.com/PixelGuys/Cubyz-Libs/releases/download/5/cubyz_deps_x86_64-linux-musl.tar.gz/archive/master.tar.gz",
"type": "remote",
"url": "https://github.com/PixelGuys/Cubyz-Libs/releases/download/5/cubyz_deps_x86_64-linux-musl.tar.gz"
},
{
"commit": "master",
"name": "cubyz_deps_x86_64_windows",
"tar_url": "https://github.com/PixelGuys/Cubyz-Libs/releases/download/5/cubyz_deps_x86_64-windows-gnu.tar.gz/archive/master.tar.gz",
"type": "remote",
"url": "https://github.com/PixelGuys/Cubyz-Libs/releases/download/5/cubyz_deps_x86_64-windows-gnu.tar.gz"
}
]
| Cubyz
Cubyz is a 3D voxel sandbox game (inspired by Minecraft).
Cubyz has a bunch of interesting/unique features such as:
- Level of Detail (→ This enables far view distances.)
- 3D Chunks (→ There is no height or depth limit.)
- Procedural Crafting (→ You can craft anything you want, and the game will figure out what kind of tool you tried to make.)
About
Cubyz is written in
<a>Zig</a>, a rather small language with some cool features and a focus on readability.
Windows and Linux are supported. Mac is not supported, as it does not have OpenGL 4.3.
Check out the <a>Discord server</a> for more information and announcements.
There are also some devlogs on <a>YouTube</a>.
History
Until recently (the Zig rewrite was started in August 2022) Cubyz was written in Java. You can still see the code in the <a>Cubyz-Java</a> repository and play it using the <a>Java Launcher</a>. <code>// TODO: Move this over to a separate repository</code>
Originally Cubyz was created on August 22, 2018 by <a>zenith391</a> and <a>ZaUserA</a>. Back then, it was called "Cubz".
However, both of them lost interest at some point, and now Cubyz is maintained by <a>IntegratedQuantum</a>.
Run Cubyz
The Easy Way (no tools needed)
<ol>
<li>Download the latest <a>source code</a></li>
<li>Extract the zip file</li>
<li>Go into the extraced folder and double click the <code>run_linux.sh</code> or <code>run_windows.bat</code> depending on your operating system.</li>
<li>Congratulations: You just compiled your first program!</li>
</ol>
It doesn't work?
<ul>
<li>If it doesn't work and keeps running for more than 10 minutes without doing anything it can help to kill and restart the process. A few people seem to experience this, and I have not found the cause. It might also help to delete the <code>zig-cache</code> folder.</li>
<li>If you see an error message in the terminal, please report it in the <a>Issues</a> tab or on the <a>Discord server</a>.</li>
<li>Otherwise you can always ask for help on the Discord server. If you are unable to get it compiling on your machine, you can also ask on the Discord server and we may compile a release for you.</li>
</ul>
Note for Linux Users:
I also had to install a few <code>-dev</code> packages for the compilation to work:
<code>sudo apt install libgl-dev libasound2-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxext-dev libxi-dev</code>
The Better Way
<ol>
<li>Install Git</li>
<li>Clone this repository <code>git clone https://github.com/pixelguys/Cubyz</code></li>
<li>Run <code>run_linux.sh</code> or <code>run_windows.bat</code>, if you already have Zig installed on your computer (it must be a compatible version) you can also just use <code>zig build run</code></li>
<li>When you want to update your local version you can use <code>git pull</code>. This keeps everything in one place, avoiding repeatedly downloading the compiler on every update.</li>
</ol>
Contributing
Code
Check out the <a>Contributing Guidelines</a>
Textures
If you want to add new textures, make sure they fit the style of the game. It's recommended that you have baseline skills in pixel art before attempting to make textures. A great collection of tutorials can be found <a>here</a>
If any of the following points are ignored, your texture will be rejected:
1. Resolution is 16 x 16
2. Lighting direction is top-left for items and blocks.
3. Keep colour palettes small. Do not use near-duplicate colours, do not use noise, filters, or brushes that create unnecessary amounts of colours. Most blocks can be textured with ~4-6 colours.
4. Reference other block textures to see how colours & contrast is used. Test your textures ingame alongside other blocks.
5. Blocks should tile smoothly. Avoid creating seams or repetitive patterns.
6. Use hue shifting conservatively. Take the material into account when choosing colours.
7. Items have full, coloured, 1-pixel outlines. It should be shaded so that the side in light (top left) is brighter, while the side in shadow (bottom right) is darker.
8. Items should have higher contrast than their block counterparts.
Your texture may be edited or replaced to ensure a consistent art style throughout the game.
For further information, ask <a>careeoki</a> on <a>Discord</a>. She has made a majority of the art for Cubyz. | []
|
https://avatars.githubusercontent.com/u/27973237?v=4 | zig.vim | ziglang/zig.vim | 2017-04-13T09:21:35Z | Vim configuration for Zig | master | 29 | 525 | 61 | 525 | https://api.github.com/repos/ziglang/zig.vim/tags | MIT | [
"vim",
"zig"
]
| 113 | false | 2025-05-14T17:17:30Z | false | false | unknown | github | []
| zig.vim
File detection and syntax highlighting for the
<a>zig</a> programming language.
Installation
If using <a><strong>vim-plug</strong></a> (for Vim or Neovim)
<ul>
<li>Open vim config</li>
<li>
Write <code>Plug 'ziglang/zig.vim'</code> inside the <code>plug</code> command:
<code>vim
call plug#begin('~/.vim/plugged')
Plug 'ziglang/zig.vim'
call plug#end()</code>
</li>
<li>
Restart vim / reload vim config
</li>
<li>type <code>:PlugInstall</code></li>
</ul>
If using <strong>Vim</strong>:
<ul>
<li>Use Vim 8 or newer</li>
<li><code>mkdir -p ~/.vim/pack/plugins/start/</code></li>
<li><code>cd ~/.vim/pack/plugins/start/</code></li>
<li><code>git clone https://github.com/ziglang/zig.vim</code></li>
</ul>
If using <strong>Neovim</strong>:
<ul>
<li><code>mkdir -p ~/.local/share/nvim/site/pack/plugins/start/</code></li>
<li><code>cd ~/.local/share/nvim/site/pack/plugins/start/</code></li>
<li><code>git clone https://github.com/ziglang/zig.vim</code></li>
</ul>
Configuration
This plugin enables automatic code formatting on save by default using
<code>zig fmt</code>. To disable it, you can use this configuration in vimrc:
<code>let g:zig_fmt_autosave = 0</code>
The default compiler which gets used by <code>:make</code> (<code>:help :compiler</code> for details)
is <code>zig_build</code> and it runs <code>zig build</code>. The other options are:
* <code>:compiler zig_test</code> which runs <code>zig test</code> on the current file.
* <code>:compiler zig_build_exe</code> which runs <code>zig build-exe</code> on the current file.
* <code>:compiler zig</code> which requires that a subcommand is passed as an argument
and it runs on the current file. | []
|
https://avatars.githubusercontent.com/u/1699414?v=4 | sokol-zig | floooh/sokol-zig | 2018-05-31T17:10:41Z | Zig bindings for the sokol headers (https://github.com/floooh/sokol) | master | 10 | 513 | 66 | 513 | https://api.github.com/repos/floooh/sokol-zig/tags | Zlib | [
"crossplatform",
"sokol",
"zig",
"zig-package"
]
| 3,194 | false | 2025-05-21T16:08:15Z | true | true | 0.14.0 | github | [
{
"commit": "4.0.3",
"name": "emsdk",
"tar_url": "https://github.com/emscripten-core/emsdk/archive/4.0.3.tar.gz",
"type": "remote",
"url": "https://github.com/emscripten-core/emsdk"
},
{
"commit": "9b5a3e2b57fe9783ba4d1f3249059bc4720b592f",
"name": "shdc",
"tar_url": "https://github.com/floooh/sokol-tools-bin/archive/9b5a3e2b57fe9783ba4d1f3249059bc4720b592f.tar.gz",
"type": "remote",
"url": "https://github.com/floooh/sokol-tools-bin"
}
]
| <a></a><a></a>
Auto-generated Zig bindings for the <a>sokol headers</a>.
<a>Auto-generated docs</a> (wip)
For Zig version 0.14.0+
In case of breaking changes in Zig, the bindings might fall behind. Please don't hesitate to
ping me via a Github issue, or even better, provide a PR :)
Support for stable Zig versions is in branches (e.g. <code>zig-0.12.0</code>), those versions are 'frozen in time' though.
Related projects:
<ul>
<li><a>pacman.zig</a></li>
<li><a>chipz emulators</a></li>
<li><a>Dear ImGui sample project</a></li>
</ul>
Building the samples
Supported platforms are: Windows, macOS, Linux (with X11) and web
On Linux install the following packages: libglu1-mesa-dev, mesa-common-dev, xorg-dev, libasound-dev
(or generally: the dev packages required for X11, GL and ALSA development)
To build the platform-native samples:
```sh
build all examples:
zig build examples
build and run individual examples
zig build run-clear
zig build run-triangle
zig build run-quad
zig build run-bufferoffsets
zig build run-cube
zig build run-noninterleaved
zig build run-texcube
zig build run-offscreen
zig build run-instancing
zig build run-mrt
zig build run-saudio
zig build run-sgl
zig build run-sgl-context
zig build run-sgl-points
zig build run-debugtext
zig build run-debugtext-print
zig build run-debugtext-userfont
zig build run-shapes
```
(also run <code>zig build -l</code> to get a list of build targets)
By default, the backend 3D API will be selected based on the target platform:
<ul>
<li>macOS: Metal</li>
<li>Windows: D3D11</li>
<li>Linux: GL</li>
</ul>
To force the GL backend on macOS or Windows, build with <code>-Dgl=true</code>:
```
<blockquote>
zig build -Dgl=true run-clear
```
</blockquote>
The <code>clear</code> sample prints the selected backend to the terminal:
<code>sokol-zig ➤ zig build -Dgl=true run-clear
Backend: .sokol.gfx.Backend.GLCORE33</code>
For the web-samples, run:
```sh
zig build examples -Dtarget=wasm32-emscripten
or to build and run one of the samples
zig build run-clear -Dtarget=wasm32-emscripten
...
```
When building with target <code>wasm32-emscripten</code> for the first time, the build script will
install and activate the Emscripten SDK into the Zig package cache for the latest SDK
version. There is currently no build system functionality to update or delete the Emscripten SDK
after this first install. The current workaround is to delete the global Zig cache
(run <code>zig env</code> to see where the Zig cache resides).
Improving the Emscripten SDK integration with the Zig build system is planned for the future.
How to integrate sokol-zig into your project
Add a build.zig.zon file to your project which has at least a <code>.sokol</code> dependency:
<code>zig
.{
.name = "my_project",
.version = "0.1.0",
.paths = .{
"src",
"build.zig",
"build.zig.zon",
},
.dependencies = .{
.sokol = .{
.url = "git+https://github.com/floooh/sokol-zig.git#[commit-hash]",
.hash = "[content-hash]",
},
},
}</code>
The easiest way to populate or update the <code>sokol</code> dependency is to run this on the cmdline:
<code>zig fetch --save=sokol git+https://github.com/floooh/sokol-zig.git</code>
This will automatically use the latest sokol-zig commit.
For a native-only project, a <code>build.zig</code> file looks entirely vanilla:
```zig
const std = @import("std");
const Build = std.Build;
const OptimizeMode = std.builtin.OptimizeMode;
pub fn build(b: *Build) !void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const dep_sokol = b.dependency("sokol", .{
.target = target,
.optimize = optimize,
});
const hello = b.addExecutable(.{
.name = "hello",
.target = target,
.optimize = optimize,
.root_source_file = b.path("src/hello.zig"),
});
hello.root_module.addImport("sokol", dep_sokol.module("sokol"));
b.installArtifact(hello);
const run = b.addRunArtifact(hello);
b.step("run", "Run hello").dependOn(&run.step);
}
```
If you also want to run on the web via <code>-Dtarget=wasm32-emscripten</code>, the web platform
build must look special, because Emscripten must be used for linking, and to run
the build result in a browser, a special run step must be created.
Such a 'hybrid' build script might look like this (copied straight from <a>pacman.zig</a>):
```zig
const std = @import("std");
const Build = std.Build;
const OptimizeMode = std.builtin.OptimizeMode;
const sokol = @import("sokol");
pub fn build(b: *Build) !void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const dep_sokol = b.dependency("sokol", .{
.target = target,
.optimize = optimize,
});
<code>// special case handling for native vs web build
if (target.result.cpu.arch.isWasm()) {
try buildWeb(b, target, optimize, dep_sokol);
} else {
try buildNative(b, target, optimize, dep_sokol);
}
</code>
}
// this is the regular build for all native platforms, nothing surprising here
fn buildNative(b: <em>Build, target: Build.ResolvedTarget, optimize: OptimizeMode, dep_sokol: </em>Build.Dependency) !void {
const pacman = b.addExecutable(.{
.name = "pacman",
.target = target,
.optimize = optimize,
.root_source_file = b.path("src/pacman.zig"),
});
pacman.root_module.addImport("sokol", dep_sokol.module("sokol"));
b.installArtifact(pacman);
const run = b.addRunArtifact(pacman);
b.step("run", "Run pacman").dependOn(&run.step);
}
// for web builds, the Zig code needs to be built into a library and linked with the Emscripten linker
fn buildWeb(b: <em>Build, target: Build.ResolvedTarget, optimize: OptimizeMode, dep_sokol: </em>Build.Dependency) !void {
const pacman = b.addStaticLibrary(.{
.name = "pacman",
.target = target,
.optimize = optimize,
.root_source_file = b.path("src/pacman.zig"),
});
pacman.root_module.addImport("sokol", dep_sokol.module("sokol"));
<code>// create a build step which invokes the Emscripten linker
const emsdk = dep_sokol.builder.dependency("emsdk", .{});
const link_step = try sokol.emLinkStep(b, .{
.lib_main = pacman,
.target = target,
.optimize = optimize,
.emsdk = emsdk,
.use_webgl2 = true,
.use_emmalloc = true,
.use_filesystem = false,
.shell_file_path = dep_sokol.path("src/sokol/web/shell.html"),
});
// attach Emscripten linker output to default install step
b.getInstallStep().dependOn(&link_step.step);
// ...and a special run step to start the web build output via 'emrun'
const run = sokol.emRunStep(b, .{ .name = "pacman", .emsdk = emsdk });
run.step.dependOn(&link_step.step);
b.step("run", "Run pacman").dependOn(&run.step);
</code>
}
```
Using sokol headers in C code
The sokol-zig build.zig exposes a C library artifact called <code>sokol_clib</code>.
You can lookup the build step for this library via:
<code>zig
const dep_sokol = b.dependency("sokol", .{
.target = target,
.optimize = optimize,
});
const sokol_clib = dep_sokol.artifact("sokol_clib");</code>
...once you have that library artifact, 'link' it to your compile step which contains
your own C code:
<code>zig
const my_clib = ...;
my_clib.linkLibrary(sokol_clib);</code>
This makes the Sokol C headers available to your C code in a <code>sokol/</code> subdirectory:
```c
include "sokol/sokol_app.h"
include "sokol/sokol_gfx.h"
// etc...
```
Keep in mind that the implementation is already provided in the <code>sokol_clib</code>
static link library (e.g. don't try to build the Sokol implementations yourself
via the <code>SOKOL_IMPL</code> macro).
wasm32-emscripten caveats
<ul>
<li>Zig allocators use the <code>@returnAddress</code> builtin, which isn't supported in the Emscripten
runtime out of the box (you'll get a runtime error in the browser's Javascript console
looking like this: <code>Cannot use convertFrameToPC (needed by __builtin_return_address) without -sUSE_OFFSET_CONVERTER</code>.
To link with <code>-sUSE_OFFSET_CONVERTER</code>, simply set the <code>.use_offset_converter</code> option
in the Emscripten linker step in your build.zig:</li>
</ul>
<code>zig
const link_step = try sokol.emLinkStep(b, .{
// ...other settings here
.use_offset_converter = true,
});</code>
<ul>
<li>the Zig stdlib only has limited support for the <code>wasm32-emscripten</code>
target, for instance using <code>std.fs</code> functions will most likely fail
to compile (the sokol-zig bindings might add more sokol headers
in the future to fill some of the gaps)</li>
</ul>
Dear ImGui support
The sokol-zig bindings come with sokol_imgui.h (exposed as the Zig package
<code>sokol.imgui</code>), but integration into a project's build.zig requires some extra
steps, mainly because I didn't want to add a
<a>cimgui</a> dependency to the sokol-zig package
(especially since cimgui uses git submodule which are not supported by the Zig
package manager).
The main steps to create Dear ImGui apps with sokol-zig are:
<ol>
<li>'bring your own cimgui'</li>
<li>tell the sokol dependency that it needs to include sokol_imgui.h into
the compiled C library:
<code>zig
const dep_sokol = b.dependency("sokol", .{
.target = target,
.optimize = optimize,
.with_sokol_imgui = true,
});</code></li>
<li>
inject the path to the cimgui directory into the sokol dependency so
that C compilation works (this needs to find the <code>cimgui.h</code> header)
<code>zig
dep_sokol.artifact("sokol_clib").addIncludePath(cimgui_root);</code>
</li>
</ol>
Also see the following example project:
https://github.com/floooh/sokol-zig-imgui-sample/ | []
|
https://avatars.githubusercontent.com/u/3673952?v=4 | zen | AndreaOrru/zen | 2017-04-04T20:02:11Z | Experimental operating system written in Zig | main | 2 | 480 | 29 | 480 | https://api.github.com/repos/AndreaOrru/zen/tags | BSD-3-Clause | [
"kernel",
"operating-system",
"os",
"zig"
]
| 297 | false | 2025-05-21T21:15:56Z | true | false | unknown | github | []
| Zen <a></a> <a></a>
Experimental operating system written in <a>Zig</a>.
<strong>NOTE:</strong> A rewrite using modern Zig is currently in progress in the <a>reboot</a> branch.
Build and test
To build the kernel, simply type:
<code>zig build</code>
You can run and debug the kernel straight away with Qemu:
```
Run the kernel inside the emulator.
zig build qemu
Wait for a GDB connection first (for debugging).
zig build qemu-debug
gdb
```
You can also generate a bootable ISO and try it on Bochs (or on real hardware if you feel like it):
<code>./iso.sh # Generate run/zen.iso
./bochs.sh</code> | []
|
https://avatars.githubusercontent.com/u/27973237?v=4 | www.ziglang.org | ziglang/www.ziglang.org | 2016-05-13T18:33:32Z | null | main | 22 | 394 | 193 | 394 | https://api.github.com/repos/ziglang/www.ziglang.org/tags | MIT | [
"documentation",
"zig"
]
| 98,445 | false | 2025-05-22T05:44:43Z | true | true | 0.14.0-dev.3451+d8d2aa9af | github | [
{
"commit": "0a55c7013461841ec34394c8d08749f5973706da",
"name": "doctest",
"tar_url": "https://github.com/ziglang/doctest/archive/0a55c7013461841ec34394c8d08749f5973706da.tar.gz",
"type": "remote",
"url": "https://github.com/ziglang/doctest"
},
{
"commit": "5408d3dff6107fc449a6d24d90f379b6fffdb4e6",
"name": "zine",
"tar_url": "https://github.com/kristoff-it/zine/archive/5408d3dff6107fc449a6d24d90f379b6fffdb4e6.tar.gz",
"type": "remote",
"url": "https://github.com/kristoff-it/zine"
}
]
| ziglang.org
Website for <a>Zig</a>.
How to Run Locally
We use <a>Zine</a> for static site generation.
Zine, and the Zig website itself (when it comes to code samples), target the latest tagged release of Zig.
For a convenient way of juggling multiple versions of Zig, take a look at <a>zigup</a>.
Once you have the correct version of Zig setup, simply run:
<code>zig build serve</code>
Get Editor Support
This step is optional but highly recommended.
Follow <a>the instructions</a> on the official Zine website.
Following this step will give you syntax highlighting and LSP support for the templating language.
Get other dependencies
Some code examples present on the site require some basic system dependencies:
- tar
- zlib
- jq
It should be possible to get them on all major OSs although on Windows it might be easier to just use WSL.
If you know how to get all dependencies on Windows please PR some instructions!
Writing a Translation
See <a>the Zine documentation</a> to learn more about content and templating syntax.
After you've familiarized yourself with the basics, take a look at <a>the i18n section</a> of the docs.
To recap, a translation needs to:
<ul>
<li>be listed in <code>build.zig</code> and have its corresponding content directory created</li>
<li>have a corresponding Ziggy file under <code>i18n/</code>, containing the localized version of every phrase used throughout the site</li>
<li>have all content files translated, with the exception of <code>news</code> and <code>devlog</code> that should not be translated</li>
</ul>
Getting Help
Crafting a translation is not a straight-forward process. You have to think about adaptation, spatial constraints (in the front page especially), and other Zine-specific issues that might not be immediately obvious.
If you don't mind instant messaging, please consider joining one of the <a>Zig communities</a>, where you will be able to communicate with other contributors and share some knowledge.
If you prefer asynchronous communication, feel free to open a draft PR, we will make sure to engage with you pronto.
Keep in mind that it's possible that the current setup doesn't allow you to correctly implement a translation without making ulterior changes to Zine's configuration or how the content is organized. Don't hesitate to reach out for help to avoid getting stuck in a problem that can't be solved without larger-scale changes. | []
|
https://avatars.githubusercontent.com/u/3252130?v=4 | blog | hhstore/blog | 2018-04-26T11:36:18Z | My Tech Blog: about Mojo / Rust / Golang / Python / Kotlin / Flutter / VueJS / Blockchain etc. | master | 412 | 310 | 27 | 310 | https://api.github.com/repos/hhstore/blog/tags | - | [
"ai",
"android",
"blockchain",
"blog",
"dart",
"docker",
"flutter",
"golang",
"gpt",
"ios",
"k8s",
"kotlin",
"mojo",
"nlp",
"python",
"rust",
"vuejs",
"web3",
"zig"
]
| 7 | false | 2025-05-21T12:00:39Z | false | false | unknown | github | []
| My Tech Blog
🔥️ Intro
<ul>
<li>✅ Focus on: <a>Mojo</a>, <a>Rust</a>, <a>Flutter</a>, <a>Golang</a>, <a>Python</a>, <a>Zig</a>, <a>Kotlin</a>, <a>VueJS</a>, , <code>Docker</code>, <code>Kubernetes(K8S)</code>, <code>Blockchain(BTC/ETH)</code>, etc.</li>
</ul>
| Blog | Link | Desc |
| :--- | :--- | :--- |
| Catalogue | https://github.com/hhstore/blog/issues | ⭐️⭐️⭐️⭐️ |
| Old Blog Archive | http://www.bytefire.io/ | ⭐️ |
📢 Subscibe
<ul>
<li>✅ Option 1: GitHub <code>Watch</code> Repo.</li>
<li>✅ Option 2: RSS Feed: <code>https://rsshub.app/github/issue/hhstore/blog</code></li>
</ul>
🍊 Contents
🧑🏻🎓 Programming Languages & Frameworks:
| 分类 | Index | Desc |
| :--------- | :------------------------------------ | :------ |
| ❤️ 总目录 | <a>总目录</a> | |
| 🦀 Rust | <a>Rust 相关</a> | 系统编程 |
| 🔥️ Mojo | <a>Mojo</a> | AI / 系统编程 |
| 🎯 Flutter/Dart | <a>Flutter</a> , <a>Dart</a> | App 开发框架 |
| ⚡ Zig | <a>Zig 相关</a> | 嵌入式编程 |
| 🐍️ Python | <a>Python 相关</a> | <a>Django 相关</a>, <a>Flask 相关</a> |
| 🐹 Golang | <a>Golang 相关</a> | <a>微服务框架 go-micro</a> |
| 💊 TypeScript | <a>TypeScript 相关</a> | 前端开发 |
| 💎 Kotlin | <a>Kotlin 相关</a> | 跨平台应用开发 |
📱 Desktop/Mobile:
| 分类 | Desc |
| :--------- | :------------------------------------ |
| ✅️ <a>Tauri</a> | 跨平台开发框架 |
| 🎯 <a>Flutter</a> | Mobile 开发框架 |
| 💎 <a>Kotlin</a> | 跨平台应用开发 |
💻 Web Frontend:
| 分类 | Desc |
| :--------- | :------------------------------------ |
| ✅️ <a>Vue.js</a> | 前端开发框架 |
| ✅️ <a>Weex 相关</a> | 前端 UI 框架 |
🐧 Middleware/Infra/Architecture/Design/Solution:
| 分类 | 索引 | 文章列表 |
| :--------- | :------------------------------------ | :------ |
| Micro Service | <a>Micro Service</a> | |
| RPC | <a>RPC 相关</a> | |
| | <a>gRPC 相关</a> | |
| MQ | <a>Kafka 相关</a> | |
| | <a>RabbitMQ 相关</a> | |
| Docker 🚀 | <a>Docker 相关</a> | <a>docker-compose 编排</a> |
| Kubernetes 🚀 | <a>Docker 相关</a> | |
| Blockchain 🚀 | <a> BTC 相关</a> | |
| | <a>ETH 相关</a> | |
| Trading Exchange | <a>Exchange 相关</a> | |
| API Design | <a>API 相关</a> | |
| | <a>GraphQL API 相关</a> | <a>GraphQL API使用</a> |
| | <a>Restful API 相关</a> | <a>Rest API 设计规范</a> |
| Test | <a>测试 相关</a> | <a>负载压力测试</a> | | []
|
https://avatars.githubusercontent.com/u/106511?v=4 | HellOS | andrewrk/HellOS | 2018-10-26T19:29:35Z | "hello world" x86 kernel example | master | 13 | 301 | 37 | 301 | https://api.github.com/repos/andrewrk/HellOS/tags | - | [
"operating-system",
"zig"
]
| 7 | false | 2025-05-17T12:41:28Z | false | false | unknown | github | []
| HellOS
Bare bones "hello world" i386 kernel written in <a>Zig</a>.
Building
<code>zig build-exe hellos.zig -target i386-freestanding -T linker.ld</code>
Testing with qemu
<code>qemu-system-i386 -kernel hellos</code> | []
|
https://avatars.githubusercontent.com/u/1950733?v=4 | redis-cuckoofilter | kristoff-it/redis-cuckoofilter | 2017-07-23T17:28:09Z | Hashing-function agnostic Cuckoo filters for Redis | master | 4 | 232 | 22 | 232 | https://api.github.com/repos/kristoff-it/redis-cuckoofilter/tags | MIT | [
"bloom-filter",
"c",
"cuckoo-filter",
"probabilistic-data-structures",
"redis",
"zig"
]
| 6,650 | false | 2025-03-23T07:23:43Z | false | false | unknown | github | []
| redis-cuckoofilter
<a></a>
<a></a>
<a></a>
<a></a>
Hashing-function agnostic Cuckoo filters for Redis.
What's a Cuckoo Filter?
Cuckoo filters are a probabilistic data structure that allows you to test for
membership of an element in a set without having to hold the whole set in
memory.
This is done at the cost of having a probability of getting a false positive
response, which, in other words, means that they can only answer "Definitely no"
or "Probably yes". The false positive probability is roughly inversely related
to how much memory you are willing to allocate to the filter.
The most iconic data structure used for this kind of task are Bloom filters
but Cuckoo filters boast both better practical performance and efficiency, and,
more importantly, the ability of <strong>deleting elements from the filter</strong>.
Bloom filters only support insertion of new items.
Some extensions of Bloom filters have the ability of deleting items but they
achieve so at the expense of precision or memory usage, resulting in a far worse
tradeoff compared to what Cuckoo filters offer.
What Makes This Redis Module Interesting
Cuckoo filters offer a very interesting division of labour between server and
clients.
Since Cuckoo filters rely on a single hashing of the original item you want to
insert, it is possible to off-load that part of the computation to the client.
In practical terms it means that instead of sending the whole item to Redis, the
clients send <code>hash</code> and <code>fingeprint</code> of the original item.
What are the advantages of doing so?
<ul>
<li>You need to push trough the cable a constant amount of data per item instead
of N bytes <em>(Redis is a remote service afterall, you're going through a UNIX
socket at the very least)</em>.</li>
<li>To perform well, Cuckoo filters rely on a good choice of fingerprint for each
item and it should not be left to the library.</li>
<li><strong>The hash function can be decided by you, meaning that this module is
hashing-function agnostic</strong>.</li>
</ul>
The last point is the most important one.
It allows you to be more flexible in case you need to reason about item hashes
across different clients potentially written in different languages.
Additionally, different hashing function families specialize on different use
cases that might interest you or not. For example some work best for small data
(< 7 bytes), some the opposite. Some focus more on performance at the expense of
more collisions, while some others behave better than the rest on peculiar
platforms.
<a>This blogpost</a>
shows a few benchmarks of different hashing function families.
Considering all of that, the choice of hashing and fingerprinting functions has
to be up to you.
<em>For the internal partial hashing that has to happen when reallocating a
fingerprint server-side, this implementation uses FNV1a which is robust and fast
for 1 byte inputs (the size of a fingerprint).</em>
<em>Thanks to how Cuckoo filters work, that choice is completely transparent to the
clients.</em>
Installation
<ol>
<li>
Download a precompiled binary from the
<a>Release section</a>
of this repo or compile it yourself (instructions at the end of this README).
</li>
<li>
Put <code>libredis-cuckoofilter.so</code> module in a folder readable by your Redis
server.
</li>
<li>
To try out the module you can send
<code>MODULE LOAD /path/to/libredis-cuckoofilter.so</code> using redis-cli or a client of
your choice.
</li>
<li>
Once you save on disk a key containing a Cuckoo filter you will need to add
<code>loadmodule /path/to/libredis-cuckoofilter.so</code> to your <code>redis.conf</code>, otherwise
Redis will not load complaining that it doesn't know how to read some data
from the <code>.rdb</code> file.
</li>
</ol>
Quickstart
```
redis-cli> MODULE LOAD /path/to/libredis-cuckoofilter.so
OK
redis-cli> CF.INIT test 64K
OK
redis-cli> CF.ADD test 5366164415461427448 97
OK
redis-cli> CF.CHECK test 5366164415461427448 97
(integer) 1
redis-cli> CF.REM test 5366164415461427448 97
OK
redis-cli> CF.CHECK test 5366164415461427448 97
(integer) 0
```
Client-side quickstart
```python
import redis
r = redis.Redis()
Load the module if you haven't done so already
r.execute_command("module", "load", "/path/to/libredis-cuckoofilter.so")
Create a filter
r.execute_command("cf.init", "test", "64k")
Define a fingerprinting function, for hashing we'll use python's builtin <code>hash()</code>
def fingerprint(x):
return ord(x[0]) # takes the first byte and returns its numerical value
item = "banana"
Add an item to the filter
r.execute_command("cf.add", "test", hash(item), fingerprint(item))
Check for its presence
r.execute_command("cf.check", "test", hash(item), finterprint(item)) # => true
Check for a non-existing item
r.execute_command("cf.check", "test", hash("apple"), fingerprint("apple")) # => false
```
Fingerprint size and error rates
In Cuckoo filters the number of bytes that we decide to use as fingerprint
will directly impact the maximum false positive error rate of a given filter.
This implementation supports 1, 2 and 4-byte wide fingerprints.
1 (3% error)
Error % -> <code>3.125e-02 (~0.03, i.e. 3%)</code>
2 (0.01% error)
Error % -> <code>1.22070312e-04 (~0.0001, i.e. 0.01%))</code>
4 (0.0000001% error)
Error % -> <code>9.31322574e-10 (~0.000000001, i.e. 0.0000001%)</code>
Complete command list
- <code>CF.SIZEFOR universe [fpsize] [EXACT]</code>
Complexity: O(1)
Example: <code>CF.SIZEFOR 1000 2 EXACT</code>
Returns the correct size for a filter that must hold at most <code>universe</code> items.
Default <code>fpsize</code> is 1, specify a different value if you need an error rate lower
than 3%.
Cuckoo filters should never be filled over 80% of their maximum theoretical capacity
both for performance reasons and because a filter that approaces 100% fill rate will
start refusing inserts with a <code>ERR too full</code> error.
This command will automatically pad <code>universe</code> for you. Use <code>EXACT</code> if you don't want
that behavior.
- <code>CF.CAPACITY size [fpsize]</code>
Complexity: O(1)
Example: <code>CF.CAPACITY 4G 2</code>
Returns the theoretical maximum number of items that can be added to a filter of given
<code>size</code> and <code>fpsize</code>. Default <code>fpsize</code> is 1.
- <code>CF.INIT key size [fpsize]</code>
Complexity: O(size)
Example: <code>CF.INIT mykey 64K</code>
Instantiates a new filter. Use <code>CF.SIZEFOR</code> to know the correct value for <code>size</code>.
Supported sizes are a power of 2 in this range: <code>1K .. 8G</code>.
Default error rate is 3%, use <code>fpsize</code> to specify a different target error rate.
- <code>CF.ADD key hash fp</code>
Complexity: O(1)
Example <code>CF.ADD mykey 100 97</code>
Adds a new item to the filter. Both <code>hash</code> and <code>fp</code> must be numbers.
In particular, <code>hash</code> has to be a 64bit representable number, while <code>fp</code>
should be a <code>fpsize</code> representable number. As an example, a filter with
<code>fpsize</code> set to <code>1</code> will cause the maximum recommended value of <code>fp</code> to be <code>255</code>.
The <code>fp</code> argument is a <code>u32</code> so <code>(2^32)-1</code> is its maximum valid value, but when
<code>fpsize</code> is lower than <code>4</code>, high bits will be truncated (e.g. <code>-1 == 255</code> when
<code>fpsize == 1</code>).
You can use both signed and unsigned values as long as you are consistent
in their use. Internally all values will be transalted to unsigned.
If a filter is undersized/overfilled or you are adding multiple copies of
the same item or, worse, you're not properely handling information entropy,
this command will return <code>ERR too full</code>.
Read the extented example in
<a>kristoff-it/zig-cuckoofilter</a>
to learn more about misusage scenarios.
- <code>CF.REM key hash fp</code>
Complexity: O(1)
Example <code>CF.REM mykey 100 97</code>
Deletes an item. Accepts the same arguments as <code>CF.ADD</code>.
WARNING: this command must be used to only delete items that were
previously inserted. Trying to delete non-existing items will corrupt the
filter and cause it to lockdown. When that happens all command will start
returning <code>ERR broken</code>, because at that point it will be impossible to
know what the correct state would be. Incurring in <code>ERR broken</code> is
a usage error and should never happen. Read the extented example in
<a>kristoff-it/zig-cuckoofilter</a>
to learn more about misusage scenarios.
- <code>CF.CHECK key hash fp</code>
Complexity: O(1)
Example <code>CF.CHECK mykey 100 97</code>
Checks if an item is present in the filter or not. Returns <code>1</code> for the
positive case and <code>0</code> otherwise. Accepts the same arguments as <code>CF.ADD</code>.
- <code>CF.COUNT key</code>
Complexity: O(1)
Example: <code>CF.COUNT mykey</code>
Returns the number of items present in the filter.
- <code>CF.ISBROKEN key</code>
Complexity: O(1)
Example: <code>CF.ISBROKEN mykey</code>
Returns <code>1</code> if the filter was broken because of misusage of <code>CF.REM</code>,
returns <code>0</code> otherwise. A broken filter cannot be fixed and will start
returning <code>ERR broken</code> from most comamnds.
- <code>CF.ISTOOFULL key</code>
Complexity: O(1)
Example: <code>CF.ISTOOFULL mykey</code>
Returns <code>1</code> if the filter is too full, returns <code>0</code> otherwise.
This command can return <code>1</code> even if you never received a
<code>ERR too full</code> from a call to <code>CF.ADD</code>.
Read the extented example in
<a>kristoff-it/zig-cuckoofilter</a>
to learn more about misusage scenarios.
- <code>CF.FIXTOOFULL key</code>
Complexity: O(1) big constant
Example: <code>CF.FIXTOOFULL mykey</code>
If you are adding and also <strong>deleting</strong> items from the filter
but in a moment of <em>congestion</em> you ended up ovferfilling the filter,
this command can help re-distribute some items to fix the situation.
It's not a command you should ever rely on because it should never
be needed if you properly sized your filter using <code>CF.SIZEFOR</code>.
Read the extented example in
<a>kristoff-it/zig-cuckoofilter</a>
to learn more about misusage scenarios.
Advanced usage
Checkout
<a>kristoff-it/zig-cuckoofilter</a>
for more information about advanced usage of Cuckoo filters and
how to deal (and most importantly, prevent) failure scenarios.
Planned Features
<ul>
<li>Advanced client-side syncrhonization
Given that now the logic is bundled in zig-cuckoofilter and that
it can now be used by any C ABI compatible target (checkout the
repo for examples in C, JS, Python and Go), combined with Streams
it would be possible to keep a client-side Cuckoo filter synced
with one in Redis, allowing clients to keep reads locally and
asyncrhonously sync with Redis to obtain new updates to the filter.</li>
</ul>
Compiling
Download the latest Zig compiler version from http://ziglang.org.
To compile for your native platform
<code>sh
$ zig build-lib -dynamic -isystem src --release-fast src/redis-cuckoofilter.zig</code>
To cross-compile
<code>sh
$ zig build-lib -dynamic -isystem src --release-fast -target x86_64-linux --library c src/redis-cuckoofilter.zig</code>
Use <code>zig targets</code> for the complete list of available targets.
License
MIT License
Copyright (c) 2019 Loris Cro
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. | []
|
https://avatars.githubusercontent.com/u/4605603?v=4 | zig-regex | tiehuis/zig-regex | 2018-02-18T00:00:07Z | A regex implementation for the zig programming language | master | 6 | 230 | 25 | 230 | https://api.github.com/repos/tiehuis/zig-regex/tags | MIT | [
"regex",
"regex-engine",
"zig"
]
| 152 | false | 2025-05-21T15:40:59Z | true | true | 0.14.0 | github | []
| An automaton-based regex implementation for <a>zig</a>.
Note: This is still a work in progress and many things still need to be done.
<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> Capture group 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> UTF-8 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> More tests (plus some automated tests/fuzzing)
<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> Add a PikeVM implementation
<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> Literal optimizations and just general performance improvements.
Usage
```zig
const debug = @import("std").debug;
const Regex = @import("regex").Regex;
test "example" {
var re = try Regex.compile(debug.global_allocator, "\w+");
<code>debug.assert(try re.match("hej") == true);
</code>
}
```
Api
Regex
<code>zig
fn compile(a: Allocator, re: []const u8) !Regex</code>
Compiles a regex string, returning any errors during parsing/compiling.
<code>zig
pub fn match(re: *Regex, input: []const u8) !bool</code>
Match a compiled regex against some input. The input must be matched in its
entirety and from the first index.
<code>zig
pub fn partialMatch(re: *Regex, input: []const u8) !bool</code>
Match a compiled regex against some input. Unlike <code>match</code>, this matches the
leftmost and does not have to be anchored to the start of <code>input</code>.
<code>zig
pub fn captures(re: *Regex, input: []const u8) !?Captures</code>
Match a compiled regex against some input. Returns a list of all matching
slices in the regex with the first (0-index) being the entire regex.
If no match was found, null is returned.
Captures
<code>zig
pub fn sliceAt(captures: *const Captures, n: usize) ?[]const u8</code>
Return the sub-slice for the numbered capture group. 0 refers to the entire
match.
<code>zig
pub fn boundsAt(captures: *const Captures, n: usize) ?Span</code>
Return the lower and upper byte positions for the specified capture group.
We can retrieve the sub-slice using this function:
<code>zig
const span = caps.boundsAt(0)
debug.assert(mem.eql(u8, caps.sliceAt(0), input[span.lower..span.upper]));</code>
References
See the following useful sources:
- https://swtch.com/~rsc/regexp/
- <a>Rust Regex Library</a>
- <a>Go Regex Library</a> | []
|
https://avatars.githubusercontent.com/u/106511?v=4 | clashos | andrewrk/clashos | 2017-02-03T22:09:14Z | multiplayer arcade game for bare metal Raspberry Pi 3 B+ | master | 1 | 228 | 20 | 228 | https://api.github.com/repos/andrewrk/clashos/tags | - | [
"aarch64",
"kernel",
"raspberry-pi",
"zig"
]
| 2,743 | false | 2025-04-23T03:28:50Z | true | false | unknown | github | []
| ClashOS
A work-in-progress multiplayer arcade game that runs directly on the
Raspberry Pi 3 B+ hardware, written entirely in <a>Zig</a>.
Current Status
"Hello World" OS using the MiniUART. ~Tested and working on real hardware.~
It has regressed on real hardware, and I haven't fixed it yet.
Building
<code>zig build</code>
Testing
QEMU
<code>zig build qemu</code>
Debugging with GDB
<code>zig build qemu -Dgdb</code>
In another terminal:
<code>gdb zig-cache/clashos-dbg -ex 'target remote localhost:1234'</code>
Sending a New Kernel Image via Serial
While the Raspberry Pi is running, you can use
<code>zig build upload -Dtty=/dev/ttyUSB0</code>
If using QEMU, use <code>zig build qemu -Dpty</code> and note the tty path.
In another terminal window, <code>cat</code> the tty path.
In yet another terminal window, you can use the <code>zig build upload</code>
command above, with the tty path provided by QEMU.
This is compatible with using GDB with QEMU, just make sure to pass
the <code>-Dgdb</code> to both <code>zig build</code> commands.
Actual Hardware
<ol>
<li>Mount an sdcard with a single FAT32 partition.</li>
<li>Copy <code>boot/*</code> to <code>/path/to/sdcard/*</code>.</li>
<li><code>zig build</code></li>
<li>Copy <code>clashos.bin</code> to <code>/path/to/sdcard/kernel7.img</code>.</li>
</ol>
For further changes repeat steps 3 and 4.
Roadmap
<ul>
<li>Interface with the file system</li>
<li>Get rid of dependency on binutils objcopy</li>
<li>Interface with the video driver</li>
<li>Get a simple joystick and button and use GPIO</li>
<li>Sound (should it be the analog or over HDMI)?</li>
<li>Make the game</li>
<li>Build arcade cabinets</li>
</ul>
Documentation
EZSync 012 USB Cable
<ul>
<li>Black: Pin 6, Ground</li>
<li>Yellow: Pin 8, BCM 14, TXD / Transmit</li>
<li>Orange: Pin 10, BCM 15, RXD / Receive</li>
</ul>
How to view the serial data
Where <code>/dev/ttyUSB0</code> is the device that represents the serial-to-USB cable:
<code>sudo screen /dev/ttyUSB0 115200 cs8</code>
Memory Layout
<code>0x0000000 ( 0 MiB) - boot entry point
0x0001000 - shortExceptionHandlerAt0x1000 function
0x0001100 - kernelMainAt0x1100 function
0x8000000 (128 MiB) - top of kernel stack, and bootloader_main function
0x8800000 (136 MiB) - top of bootloader stack</code> | []
|
https://avatars.githubusercontent.com/u/27973237?v=4 | zig-mode | ziglang/zig-mode | 2017-04-04T12:05:22Z | Zig mode for Emacs | master | 16 | 186 | 58 | 186 | https://api.github.com/repos/ziglang/zig-mode/tags | GPL-3.0 | [
"emacs",
"zig"
]
| 115 | false | 2025-05-09T04:47:27Z | false | false | unknown | github | []
| zig-mode
Syntax highlighting and automatic indentation for the <a>Zig programming
language</a> in Emacs. Requires Emacs 24.3 or later.
Installation
<a></a>
<a></a>
Simply install the <code>zig-mode</code> package via <a>NonGNU ELPA</a> or
<a>MELPA</a>.
Manual install
Alternatively, you can <code>git clone</code> the <code>zig-mode</code> repository somewhere
(e.g. under your <code>~/.emacs.d/</code>). <code>zig-mode</code> depends on
<a>reformatter</a> for
formatting buffers with <code>zig fmt</code>.
<code>reformatter</code> can be installed from MELPA or installed manually in a
similar fashion to <code>zig-mode</code>. For this method, clone the
<code>reformatter</code> git repository and add the path to the repository to
your <code>load-path</code>.
Then add the following to your <code>.emacs</code> file:
<code>elisp
(unless (version< emacs-version "24")
(add-to-list 'load-path "~/path/to/your/zig-mode/")
(autoload 'zig-mode "zig-mode" nil t)
(add-to-list 'auto-mode-alist '("\\.zig\\'" . zig-mode)))</code>
Testing
<a></a>
To run the test locally, you will need the following tools:
<ul>
<li><a>Eask</a></li>
<li><a>Make</a> (optional)</li>
</ul>
Install all dependencies and development dependencies:
<code>sh
eask install-deps --dev</code>
To test the package's installation:
<code>sh
eask package
eask install</code>
To test compilation:
<code>sh
eask compile</code>
<strong>🪧 The following steps are optional, but we recommend you follow these lint results!</strong>
The built-in <code>checkdoc</code> linter:
<code>sh
eask lint checkdoc</code>
The standard <code>package</code> linter:
<code>sh
eask lint package</code>
<em>📝 P.S. For more information, find the Eask manual at https://emacs-eask.github.io/.</em>
Optional Configuration
<code>zig-mode</code> used to enable coloration of the compilation buffer using
ANSI color codes, but this affected <em>all</em> compilation buffers, not just
zig compilation output.
If you want to restore this behavior, you can add the following snippet
to your <code>init.el</code> or <code>.emacs</code> file:
<code>elisp
(if (>= emacs-major-version 28)
(add-hook 'compilation-filter-hook 'ansi-color-compilation-filter)
(progn
(defun colorize-compilation-buffer ()
(let ((inhibit-read-only t))
(ansi-color-apply-on-region compilation-filter-start (point))))
(add-hook 'compilation-filter-hook 'colorize-compilation-buffer)))</code>
License
<code>zig-mode</code> is distributed under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 3, or (at your
option) any later version.
See the <a>LICENSE</a> file for details. | []
|
https://avatars.githubusercontent.com/u/14808551?v=4 | so_stupid_search | Lisprez/so_stupid_search | 2016-04-01T08:17:56Z | It's my honor to drive you fucking fire faster, to have more time with your Family and Sunshine.This tool is for those who often want to search for a string Deeply into a directory in Recursive mode, but not with the great tools: grep, ack, ripgrep .........every thing should be Small, Thin, Fast, Lazy....without Think and Remember too much ...一个工具最大的价值不是它有多少功能,而是它能够让你以多快的速度达成所愿...... | master | 0 | 173 | 11 | 173 | https://api.github.com/repos/Lisprez/so_stupid_search/tags | LGPL-2.1 | [
"blazing-fast",
"cargo",
"code-search",
"cpp14",
"cpp17",
"cpp20",
"ctags",
"emacs",
"fire",
"grep",
"meta-programming",
"neovim",
"nim",
"pt",
"ripgrep",
"rust",
"stupid-search",
"vim",
"zig"
]
| 6,657 | false | 2025-04-03T07:22:25Z | false | false | unknown | github | []
| <strong>SSS - so stupid search </strong>
"so stupid search" is a tool built for himself by a programmer who believes in minimalism. He always reminds himself to cherish his time and let himself spend every minute in simplicity and happiness
「so stupid search」は、ミニマリズムを信じるプログラマーが自分のために作ったツールで、いつも自分の時間を大切にし、シンプルさと幸せに毎分費やすように心がけています。
"So stupid search"는 미니멀리즘을 믿는 프로그래머가 자신을 위해 만든 도구입니다. 그는 항상 자신의 시간을 소중히 여기고 단순함과 행복 속에 매 순간을 보내도록 자신을 상기시킵니다.
«so stupid search» - это инструмент, созданный для себя программистом, который верит в минимализм. Он всегда напоминает себе, что нужно ценить свое время и позволять себе тратить каждую минуту в простоте и счастье.
"so stupid search" är ett verktyg som byggts för sig själv av en programmerare som tror på minimalism. Han påminner sig alltid om att värna om sin tid och låta sig spendera varje minut i enkelhet och lycka.
<a></a>
English Documentation
install
install from source code
1.install rust toolchain
<code>bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh</code>
2.build and install in one command
<code>bash
cargo install --git https://github.com/Lispre/so_stupid_search.git</code>
<strong>Warning</strong>
If you are living in SOME specifily area(China mainland), you should do as follow to build and install, because you are live behind GFW that network is ... ...
<blockquote>
1.Download the file
<code>bash
git clone https://github.com/Lispre/so_stupid_search.git</code>
2.Enter the directory contains file with name of "Cargo.toml" and Run command as blow:
<code>bash
cd so_stupid_search
cargo build --release</code>
3.Then you will get the executable file "so_stupid_search/target/release/sss"
4.move the executable file sss to your $PATH directory
<code>bash
sudo mv ./target/release/sss /usr/local/bin/</code>
</blockquote>
Usage
search file system
<code>bash
sss search-string start-directory</code>
filter command pipe
<code>bash
command | sss pattern-string</code>
Example
common search
<code>bash
sss "func main(" .</code>
search specified type of file
```bash
only search in kubernetes yaml files
sss -t yaml fuck_str .
```
中文文档
安装
从源代码构建安装
1.安装rust编译器
<code>bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh</code>
2.下载so_stupid_search源代码
<code>bash
git clone https://github.com/Lispre/so_stupid_search.git</code>
3.进入源码根目录进行构建
<code>bash
cd so_stupid_search
cargo build --release</code>
4.获得可执行文件 "so_stupid_search/target/release/sss"
5.将sss可执行文件复制到 $PATH 变量包含的一个目录中
<code>bash
sudo mv ./target/release/sss /usr/local/bin/</code>
6.现在你就可以像阿Q一样使用sss了 | []
|
https://avatars.githubusercontent.com/u/829407?v=4 | compiler-benchmark | nordlow/compiler-benchmark | 2017-09-13T16:28:51Z | Benchmarks compilation speeds of different combinations of languages and compilers. | master | 8 | 142 | 18 | 142 | https://api.github.com/repos/nordlow/compiler-benchmark/tags | MIT | [
"benchmark",
"c",
"compilation",
"compiler",
"cplusplus",
"cpp",
"d",
"java",
"julia",
"rust",
"vlang",
"zig"
]
| 4,531 | false | 2025-05-08T12:51:34Z | false | false | unknown | github | []
| compiler-benchmark
Benchmarks compilation speeds of different combinations of languages and
compilers. Supported languages are:
Languages with Natives Compilers
<ul>
<li><a>C</a> (using
<a><code>gcc</code></a>, <a><code>clang</code></a>,
<a><code>cproc</code></a>,
<a><code>Cuik</code></a>, and
<a><code>tcc</code></a>),</li>
<li><a>C++</a> (using <a><code>g++</code></a> and
<a><code>clang++</code></a>),</li>
<li><a>D</a> (using <code>dmd</code> <code>ldmd2</code>, and <code>gdc</code>),</li>
<li><a>Go</a> (using <code>go</code> or <code>gccgo</code>),</li>
<li><a>Swift</a> (using <code>swiftc</code>),</li>
<li><a>Rust</a> (using <code>rustc</code>),</li>
<li><a>Nim</a> (using <code>nim</code>),</li>
<li><a>Julia</a> (using <code>julia</code>),</li>
<li><a>Ada</a> (using <code>gnatgcc</code>),</li>
<li><a>Zig</a> (using <code>zig</code>), and</li>
<li><a>V</a> (using <code>v</code>),</li>
<li><a>Vox</a> (using <code>vox</code>),</li>
<li><a>C3</a> (using <code>c3c</code>),</li>
<li><a>Pareas</a> (using <code>pareas</code>),</li>
</ul>
Languages with Bytecode Compilers:
<ul>
<li><a>OCaml</a> (using <code>ocamlopt</code>),</li>
<li><a>C#</a> (using <code>mcs</code>), and</li>
<li><a>Java</a> (using <code>javac</code>).</li>
</ul>
A subset of these can be installed on Ubuntu (tested on 20.04) via the script
<code>./install-compilers-on-ubuntu-20.04.sh</code> in this repo.
Install Python 3 packages
./install-python-packages.sh
How it works
A benchmark is typically performed as
<code>./benchmark \
--function-count=$FUNCTION_COUNT \
--function-depth=$FUNCTION_DEPTH \
--run-count=5
</code>
for suitable values of <code>$FUNCTION_COUNT</code> and <code>FUNCTION_DEPTH</code> or simply
<code>./benchmark
</code>
for defaulted values of all the parameters.
A subset of languages combined with set of compilers to benchmark can be chosen
as, for instance,
<code>./benchmark --languages=C:tcc,C:gcc,C++,D:dmd,D:ldmd2,D:gdc,Rust
</code>
This will generate code into the directory <code>generated</code> and then, for each
combination of language, operation type and compiler, run the supported
benchmarks. At the end a Markdown-formatted table showing the results of the
benchmark is printed to standard output. Note that the compilation times in this
table are titled <code>Time [us/#fn]</code> meaning in unit microseconds normalized with
number of test functions generated, that is divided by <code>args.function_count *
args.function_depth</code>).
GCC and Clang doesn't perform all semantic checks for C++ (because it's too
costly). This is in contrast to D's and Rust's compilers that perform all of
them.
Sample generated code
To understand how the code generation works we can, for instance, do
<code>./benchmark --function-count=3 --function-depth=2 --run-count=5
</code>
This will, for the C language case, generate a file <code>generated/c/main.c</code> containing
```C
long add_long_n0_h0(long x) { return x + 15440; }
long add_long_n0(long x) { return x + add_long_n0_h0(x) + 95485; }
long add_long_n1_h0(long x) { return x + 37523; }
long add_long_n1(long x) { return x + add_long_n1_h0(x) + 92492; }
long add_long_n2_h0(long x) { return x + 39239; }
long add_long_n2(long x) { return x + add_long_n2_h0(x) + 12248; }
int main(<strong>attribute</strong>((unused)) int argc, <strong>attribute</strong>((unused)) char* argv[]) {
long long_sum = 0;
long_sum += add_long_n0(0);
long_sum += add_long_n1(1);
long_sum += add_long_n2(2);
return long_sum;
}
```
Compiler Object Caches
The numerical constants are randomized using a new seed upon every call. This
makes it impossible for any compiler to utilize any caching mechanism upon
successive calls with same flags that affect the source generation. The purpose
of this is to make the comparison between compilers with no or different
levels of caching more fair.
The caching of the Go reference compiler <code>go</code>, for instance, is effectively
disabled by this randomization.
Generics
For each languages <code>$LANG</code> that supports generics an additional templated source
file <code>main_t.$LANG</code> will be generated alongside <code>main.$LANG</code> equivalent to
the contents of <code>main.$LANG</code> apart from that all functions (except <code>main</code>) are
templated. This templated source will be benchmarked aswell. The column
<strong>Templated</strong> in the table below indicates whether or not the compilation is
using templated functions.
Conclusions (from sample run shown below)
TCC build speed is varstly superior because of its single-pass code-generation
architecture. Partly because parsing the C programming language that doesn’t
have to deal with forward declarations and thereby limiting the parsing (and
memory allocation) scope to a single function.
The Tiny C compiler (TCC) (<code>tcc</code>) is by a large margin, the fastest, closely
followed by the C compiler Cuik, Vox and D's <code>dmd</code>. Note that Vox is an
experimental language and Cuik is an experimental C compiler.
The performance of both GCC and Clang gets significanly worse with each new
release (currently 8, 9, 10 in the table below).
The templated (generic) C++ source checks about 3 times slower than the
non-generic one using <code>gcc-8</code> but only about 2.3 times slower for <code>gcc-10</code>. For
<code>clang++-10</code> the slowdown is only about 1.6. The corresponding slowdown for
generic D (<code>dmd</code>) is about 2.5 times. On the other hand, the generic Rust
version interestingly is processed 2-3 times faster than the non-generic
version.
Julia's JIT-compiler is (currently) very memory hungry. A maximum recommended
product of <code>function-count</code> and <code>function-depth</code> for Julia is 5000. Julia will
therefore be excluded from the benchmark when this maximum is reached.
OCaml's optimizing native compiler <code>ocamlopt</code> is very slow for large inputs and
is therefore disabled when the product of <code>function-count</code> and <code>function-depth</code>
exceeds 10000.
Sample Run on Intel Core (Tiger Lake R0) [Willow Cove] {Sunny Cove}, 10nm++
The output on a Intel Core (Tiger Lake R0) [Willow Cove] {Sunny Cove}, 10nm++
running Ubuntu 22.04 for the sample call
<code>./benchmark --function-count=200 --function-depth=200 --run-count=5
</code>
results in the following table (copied from the output at the end).
| Lang-uage | Temp-lated | Check Time [us/fn] | Compile Time [us/fn] | Build Time [us/fn] | Run Time [us/fn] | Check RSS [kB/fn] | Build RSS [kB/fn] | Exec Version | Exec Path |
| :-------: | ---------- | :----------------: | :------------------: | :----------------: | :--------------: | :---------------: | :---------------: | :----------: | :-------: |
| D | No | 5.7 (4.1x) | 14.4 (10.7x) | 16.2 (11.5x) | 46 (3.1x) | 5.0 (10.6x) | 14.7 (31.6x) | v2.107.0-beta.1-136-gc5c4def18f | dmd |
| D | No | 4.3 (3.1x) | 67.5 (50.4x) | 68.2 (48.6x) | 218 (14.6x) | 6.3 (13.5x) | 20.8 (44.8x) | 1.36.0 | ldmd2 |
| D | No | 4.7 (3.4x) | 186.6 (139.3x) | 183.8 (130.8x) | 37 (2.5x) | 4.8 (10.2x) | 19.5 (41.9x) | 11.4.0 | gdc |
| D | Yes | 17.4 (12.6x) | 29.1 (21.7x) | 30.9 (22.0x) | 45 (3.0x) | 13.8 (29.6x) | 23.8 (51.2x) | v2.107.0-beta.1-136-gc5c4def18f | dmd |
| D | Yes | 17.2 (12.5x) | 83.0 (61.9x) | 83.2 (59.2x) | 217 (14.5x) | 15.3 (32.9x) | 29.6 (63.6x) | 1.36.0 | ldmd2 |
| D | Yes | 11.0 (8.0x) | 195.8 (146.1x) | 192.6 (137.0x) | 34 (2.3x) | 13.6 (29.1x) | 29.1 (62.5x) | 11.4.0 | gdc |
| C | No | 1.4 (best) | 1.3 (best) | 1.4 (best) | 15 (best) | 0.5 (best) | 0.5 (best) | 0.9.28rc | tcc |
| C | No | 4.1 (3.0x) | 27.9 (20.8x) | 29.7 (21.1x) | 275 (18.4x) | 4.6 (10.0x) | 49.7 (106.8x) | ~master | cuik |
| C | No | 8.0 (5.8x) | 220.7 (164.7x) | 219.1 (155.9x) | 22 (1.5x) | 3.0 (6.5x) | 14.0 (30.1x) | 12.3.0 | gcc |
| C | No | 6.1 (4.4x) | 173.8 (129.7x) | 174.2 (124.0x) | 22 (1.4x) | 2.8 (6.0x) | 14.4 (30.9x) | 11.4.0 | gcc-11 |
| C | No | 8.0 (5.8x) | 221.6 (165.4x) | 221.1 (157.4x) | 22 (1.5x) | 3.0 (6.5x) | 14.0 (30.1x) | 12.3.0 | gcc-12 |
| C | No | 13.5 (9.8x) | 84.3 (62.9x) | 85.8 (61.1x) | 347 (23.2x) | 2.9 (6.1x) | 10.8 (23.3x) | 14.0.0-1 | clang |
| C | No | 13.3 (9.6x) | 81.7 (61.0x) | 83.5 (59.4x) | 183 (12.2x) | 2.2 (4.8x) | 9.7 (20.9x) | 13.0.0 | clang-13 |
| C | No | 13.6 (9.8x) | 83.8 (62.5x) | 85.7 (61.0x) | 313 (21.0x) | 2.8 (6.1x) | 10.8 (23.3x) | 14.0.0-1 | clang-14 |
| C | No | 13.9 (10.1x) | 82.1 (61.3x) | 83.9 (59.7x) | 320 (21.4x) | 2.9 (6.3x) | 10.8 (23.1x) | 15.0.7 | clang-15 |
| C | No | 14.5 (10.5x) | 86.7 (64.7x) | 87.9 (62.6x) | 257 (17.2x) | 2.8 (6.0x) | 10.9 (23.5x) | 17.0.6 | clang-17 |
| C++ | No | 18.0 (13.0x) | 229.2 (171.1x) | 231.4 (164.7x) | 27 (1.8x) | 4.8 (10.3x) | 16.8 (36.1x) | 12.3.0 | g++ |
| C++ | No | 12.7 (9.2x) | 185.4 (138.3x) | 185.0 (131.7x) | 23 (1.5x) | 4.5 (9.7x) | 14.3 (30.7x) | 11.4.0 | g++-11 |
| C++ | No | 18.2 (13.2x) | 229.4 (171.2x) | 231.5 (164.7x) | 22 (1.5x) | 4.7 (10.2x) | 16.8 (36.1x) | 12.3.0 | g++-12 |
| C++ | No | 17.3 (12.6x) | 90.6 (67.6x) | 93.3 (66.4x) | 347 (23.2x) | 3.0 (6.4x) | 10.8 (23.3x) | 14.0.0-1 | clang |
| C++ | No | 17.2 (12.5x) | 88.9 (66.4x) | 91.0 (64.8x) | 180 (12.0x) | 2.4 (5.1x) | 9.8 (21.0x) | 13.0.0 | clang-13 |
| C++ | No | 17.5 (12.7x) | 90.8 (67.8x) | 93.3 (66.4x) | 312 (20.9x) | 3.0 (6.4x) | 10.8 (23.3x) | 14.0.0-1 | clang-14 |
| C++ | No | 18.2 (13.2x) | 89.5 (66.8x) | 91.9 (65.4x) | 297 (19.9x) | 3.0 (6.5x) | 10.8 (23.3x) | 15.0.7 | clang-15 |
| C++ | No | 18.3 (13.2x) | 94.6 (70.6x) | 96.4 (68.6x) | 278 (18.6x) | 2.9 (6.2x) | 10.9 (23.5x) | 17.0.6 | clang-17 |
| C++ | Yes | 34.7 (25.2x) | 274.7 (205.0x) | 287.4 (204.5x) | 21 (1.4x) | 8.3 (17.8x) | 20.9 (45.0x) | 12.3.0 | g++ |
| C++ | Yes | 27.7 (20.1x) | 227.3 (169.6x) | 240.8 (171.4x) | 22 (1.5x) | 8.2 (17.7x) | 20.8 (44.7x) | 11.4.0 | g++-11 |
| C++ | Yes | 34.5 (25.0x) | 275.0 (205.3x) | 288.0 (205.0x) | 23 (1.5x) | 8.3 (17.8x) | 20.9 (45.0x) | 12.3.0 | g++-12 |
| C++ | Yes | 28.4 (20.6x) | 99.1 (73.9x) | 113.2 (80.6x) | 351 (23.5x) | 4.8 (10.3x) | 14.0 (30.2x) | 14.0.0-1 | clang |
| C++ | Yes | 28.3 (20.5x) | 98.3 (73.4x) | 112.4 (80.0x) | 179 (12.0x) | 4.2 (9.0x) | 13.2 (28.3x) | 13.0.0 | clang-13 |
| C++ | Yes | 28.6 (20.7x) | 98.6 (73.6x) | 113.3 (80.6x) | 347 (23.2x) | 4.8 (10.3x) | 14.0 (30.2x) | 14.0.0-1 | clang-14 |
| C++ | Yes | 29.7 (21.5x) | 98.3 (73.4x) | 112.4 (80.0x) | 319 (21.3x) | 4.9 (10.4x) | 14.2 (30.5x) | 15.0.7 | clang-15 |
| C++ | Yes | 30.5 (22.1x) | 102.9 (76.8x) | 116.8 (83.1x) | 275 (18.4x) | 4.8 (10.3x) | 14.2 (30.6x) | 17.0.6 | clang-17 |
| Ada | No | N/A | N/A | 752.0 (535.2x) | 38 (2.5x) | N/A | 31.8 (68.4x) | 12.3.0 | gnat |
| Ada | No | N/A | N/A | 755.5 (537.7x) | 40 (2.7x) | N/A | 31.8 (68.4x) | 12.3.0 | gnat-12 |
| Go | No | 8.1 (5.9x) | N/A | N/A | N/A | 4.3 (9.3x) | N/A | 1.21.6 | gotype |
| Go | No | N/A | N/A | 344.1 (244.9x) | 24 (1.6x) | 7.2 (15.5x) | 23.9 (51.3x) | 12.3.0 | gccgo-12 |
| Go | No | N/A | N/A | 113.8 (81.0x) | 57 (3.8x) | N/A | 27.5 (59.2x) | 1.21.6 | go |
| Swift | No | 429.3 (311.0x) | N/A | 679.0 (483.2x) | 913 (61.1x) | 9.3 (20.1x) | 24.2 (51.9x) | 5.9.2 | swiftc |
| Zig | No | 12.1 (8.8x) | N/A | 226.2 (161.0x) | 106 (7.1x) | 3.1 (6.7x) | 27.2 (58.4x) | 0.12.0-dev.2341+92211135f | zig |
| Zig | Yes | 14.1 (10.2x) | N/A | 232.9 (165.8x) | 78 (5.2x) | 3.5 (7.5x) | 27.7 (59.6x) | 0.12.0-dev.2341+92211135f | zig |
| Rust | No | 28.1 (20.4x) | N/A | 157.2 (111.9x) | 680 (45.5x) | 14.5 (31.2x) | 33.1 (71.1x) | 1.77.0-nightly | rustc |
| Rust | Yes | 41.4 (30.0x) | N/A | 116.2 (82.7x) | 726 (48.7x) | 16.9 (36.2x) | 26.8 (57.6x) | 1.77.0-nightly | rustc |
| Nim | No | 36.3 (26.3x) | N/A | 358.5 (255.2x) | 60 (4.0x) | 4.4 (9.4x) | sampling error | 2.0.2 | nim |
| C# | No | N/A | N/A | 15.5 (11.1x) | 349 (23.4x) | N/A | 4.7 (10.1x) | 6.12.0.200 | mcs |
| C# | No | N/A | N/A | 182.2 (129.6x) | 1477 (98.9x) | N/A | 8.8 (19.0x) | 3.9.0-6.21124.20 | csc |
| N/A | N/A | N/A | N/A | N/A | N/A | N/A | 12.6 (27.2x) | N/A | N/A |
| N/A | N/A | N/A | N/A | N/A | N/A | N/A | 17.2 (37.0x) | N/A | N/A |
| OCaml | No | N/A | N/A | 82.0 (58.3x) | 19 (1.3x) | N/A | 16.0 (34.3x) | 4.13.1 | ocamlc |
| Julia | No | N/A | N/A | 287.5 (204.6x) | N/A | N/A | 12.4 (26.6x) | 1.11.0-DEV | julia |
| Julia | Yes | N/A | N/A | 231.4 (164.6x) | N/A | N/A | 10.6 (22.7x) | 1.11.0-DEV | julia |
Sample Run on AMD Ryzen Threadripper 3960X 24-Core
The output on an AMD Ryzen Threadripper 3960X 24-Core Processor running Ubuntu
22.04 for the sample call
<code>./benchmark --function-count=200 --function-depth=200 --run-count=1
</code>
results in the following table (copied from the output at the end).
| Lang-uage | Temp-lated | Check Time [us/fn] | Compile Time [us/fn] | Build Time [us/fn] | Run Time [us/fn] | Check RSS [kB/fn] | Build RSS [kB/fn] | Exec Version | Exec Path |
| :-------: | ---------- | :----------------: | :------------------: | :----------------: | :--------------: | :---------------: | :---------------: | :----------: | :-------: |
| Vox | No | 1.5 (best) | N/A | 5.2 (3.3x) | 42 (1.2x) | 1.1 (2.8x) | 3.6 (8.1x) | master | vox |
| Vox | Yes | 2.0 (1.4x) | N/A | 6.1 (3.9x) | 65 (1.8x) | 2.0 (5.1x) | 4.4 (9.9x) | master | vox |
| D | No | 6.3 (4.2x) | 13.4 (7.4x) | 17.9 (11.4x) | 72 (2.0x) | 4.6 (11.5x) | 12.2 (27.2x) | v2.097.0-275-g357bc9d7a | dmd |
| D | No | 7.4 (5.0x) | 90.8 (49.9x) | 99.6 (63.5x) | 219 (6.2x) | 5.7 (14.3x) | 19.7 (43.8x) | 1.26.0 | ldmd2 |
| D | No | 6.4 (4.3x) | 240.5 (132.3x) | 237.5 (151.5x) | 40 (1.1x) | 4.5 (11.2x) | 19.2 (42.6x) | 10.3.0 | gdc |
| D | Yes | 12.7 (8.5x) | 21.9 (12.0x) | 25.9 (16.5x) | 64 (1.8x) | 13.0 (32.5x) | 21.4 (47.6x) | v2.097.0-275-g357bc9d7a | dmd |
| D | Yes | 14.2 (9.6x) | 102.0 (56.1x) | 110.6 (70.6x) | 302 (8.6x) | 14.9 (37.4x) | 29.3 (65.3x) | 1.26.0 | ldmd2 |
| D | Yes | 12.4 (8.3x) | 287.4 (158.0x) | 286.8 (182.9x) | 56 (1.6x) | 13.2 (33.1x) | 28.3 (63.0x) | 10.3.0 | gdc |
| C | No | 1.8 (1.2x) | 1.8 (best) | 1.6 (best) | 44 (1.3x) | 0.4 (best) | 0.4 (best) | 0.9.27 | tcc |
| C | No | 5.3 (3.5x) | N/A | N/A | N/A | 1.7 (4.2x) | N/A | unknown | cproc |
| C | No | 8.2 (5.5x) | 274.2 (150.8x) | 282.0 (179.8x) | 55 (1.6x) | 2.9 (7.4x) | 14.3 (31.9x) | 9.3.0 | gcc |
| C | No | 8.2 (5.5x) | 273.6 (150.4x) | 278.8 (177.8x) | 54 (1.5x) | 3.0 (7.5x) | 14.3 (31.8x) | 9.3.0 | gcc-9 |
| C | No | 6.0 (4.0x) | 220.4 (121.2x) | 224.9 (143.4x) | 55 (1.6x) | 2.8 (7.1x) | 14.3 (31.9x) | 10.3.0 | gcc-10 |
| C | No | 14.7 (9.9x) | 121.9 (67.0x) | 125.9 (80.3x) | 1045 (29.8x) | 1.8 (4.4x) | 9.4 (20.9x) | 10.0.0-4 | clang-10 |
| C | No | 15.6 (10.5x) | 121.7 (66.9x) | 124.7 (79.5x) | 376 (10.7x) | 1.9 (4.7x) | 9.4 (21.0x) | 11.0.0-2 | clang-11 |
| C++ | No | 20.1 (13.5x) | 290.9 (159.9x) | 293.3 (187.0x) | 42 (1.2x) | 4.4 (11.1x) | 14.4 (32.1x) | 9.3.0 | g++ |
| C++ | No | 19.9 (13.4x) | 291.9 (160.5x) | 294.6 (187.9x) | 48 (1.4x) | 4.4 (11.0x) | 14.4 (32.1x) | 9.3.0 | g++-9 |
| C++ | No | 14.9 (10.0x) | 235.8 (129.6x) | 238.4 (152.0x) | 35 (best) | 4.4 (11.1x) | 14.1 (31.3x) | 10.3.0 | g++-10 |
| C++ | No | 21.1 (14.2x) | 135.2 (74.4x) | 137.9 (87.9x) | 1022 (29.1x) | 1.9 (4.7x) | 9.5 (21.1x) | 10.0.0-4 | clang-10 |
| C++ | No | 21.8 (14.6x) | 133.8 (73.6x) | 135.3 (86.3x) | 314 (8.9x) | 2.0 (5.0x) | 9.5 (21.2x) | 11.0.0-2 | clang-11 |
| C++ | Yes | 40.0 (26.9x) | 346.4 (190.5x) | 370.5 (236.2x) | 47 (1.3x) | 7.8 (19.6x) | 23.6 (52.6x) | 9.3.0 | g++ |
| C++ | Yes | 40.0 (26.8x) | 346.3 (190.4x) | 362.8 (231.3x) | 52 (1.5x) | 7.8 (19.6x) | 23.6 (52.5x) | 9.3.0 | g++-9 |
| C++ | Yes | 31.4 (21.1x) | 285.9 (157.2x) | 309.2 (197.2x) | 45 (1.3x) | 8.0 (20.2x) | 21.9 (48.7x) | 10.3.0 | g++-10 |
| C++ | Yes | 35.0 (23.5x) | 152.1 (83.7x) | 186.4 (118.9x) | 1049 (29.9x) | 3.7 (9.2x) | 14.1 (31.4x) | 10.0.0-4 | clang-10 |
| C++ | Yes | 35.8 (24.1x) | 132.1 (72.6x) | 168.6 (107.5x) | 403 (11.5x) | 3.8 (9.6x) | 14.3 (31.9x) | 11.0.0-2 | clang-11 |
| Ada | No | N/A | N/A | 791.2 (504.5x) | 93 (2.7x) | N/A | 31.8 (70.8x) | 10.3.0 | gnat |
| Ada | No | N/A | N/A | 802.8 (511.9x) | 94 (2.7x) | N/A | 31.8 (70.8x) | 10.3.0 | gnat-10 |
| Go | No | 12.9 (8.7x) | N/A | N/A | N/A | 3.8 (9.5x) | N/A | 1.16.5 | gotype |
| Go | No | N/A | N/A | 377.3 (240.6x) | 48 (1.4x) | 6.4 (15.9x) | 24.3 (54.1x) | 10.3.0 | gccgo-10 |
| Go | No | N/A | N/A | 117.6 (75.0x) | 119 (3.4x) | N/A | 27.5 (61.1x) | 1.16.5 | go |
| Swift | No | 349.4 (234.7x) | N/A | 830.0 (529.3x) | 138 (3.9x) | 5.9 (14.9x) | 16.9 (37.5x) | 5.3.3 | swiftc |
| V | No | N/A | N/A | 17.9 (11.4x) | 451 (12.8x) | N/A | 12.1 (27.0x) | 0.2.2 | v |
| V | Yes | N/A | N/A | 19.0 (12.1x) | 402 (11.4x) | N/A | 12.6 (28.0x) | 0.2.2 | v |
| Zig | No | 62.6 (42.0x) | N/A | 284.8 (181.6x) | 831 (23.7x) | 21.7 (54.4x) | 33.6 (74.8x) | 0.8.0 | zig |
| Zig | Yes | 81.6 (54.8x) | N/A | 303.5 (193.6x) | 917 (26.1x) | 29.9 (74.9x) | 39.9 (88.7x) | 0.8.0 | zig |
| Rust | No | 126.0 (84.7x) | N/A | 412.9 (263.3x) | 1659 (47.3x) | 13.9 (34.8x) | 30.3 (67.5x) | 1.53.0-nightly | rustc |
| Rust | Yes | 140.5 (94.4x) | N/A | 258.2 (164.7x) | 1766 (50.3x) | 15.8 (39.6x) | 21.5 (48.0x) | 1.53.0-nightly | rustc |
| Nim | No | 36.6 (24.6x) | N/A | 80.3 (51.2x) | 76 (2.2x) | 4.2 (10.5x) | 8.0 (17.8x) | 1.4.6 | nim |
| C# | No | N/A | N/A | 25.1 (16.0x) | 556 (15.8x) | N/A | 4.7 (10.4x) | 6.12.0.122 | mcs |
| OCaml | No | N/A | N/A | 898.4 (572.9x) | 463 (13.2x) | N/A | 40.6 (90.5x) | 4.08.1 | ocamlopt |
| OCaml | No | N/A | N/A | 87.7 (55.9x) | 193 (5.5x) | N/A | 16.5 (36.8x) | 4.08.1 | ocamlc |
| Julia | No | N/A | N/A | 384.6 (245.2x) | N/A | N/A | 22.7 (50.6x) | 1.8.0-DEV | julia |
| Julia | Yes | N/A | N/A | 331.7 (211.5x) | N/A | N/A | 22.5 (50.0x) | 1.8.0-DEV | julia |
TODO
<ul>
<li>Add function <code>benchmark_CSharp_using_dotnet()</code> that calls <code>dotnet build</code>. On
my Ubuntu 22.04, both <code>dotnet new</code> and <code>dotnet build</code> segfaults so won’t waste
time with this for now.</li>
<li>Add language Fortran.</li>
<li>Add language Pony.</li>
<li>Sort table primarily by build time and then check time.</li>
<li>Don’t include Build Time and Build RSS columns when build op is not used.</li>
<li>Don’t include Check Time and Check RSS columns when check op is not used.</li>
</ul>
References
<ul>
<li><a>Go compilation times compared to C++, D, Rust, Pascal (cross-posted)</a></li>
<li><a>LanguageCompilationSpeed</a></li>
</ul> | []
|
https://avatars.githubusercontent.com/u/106511?v=4 | zig-window | andrewrk/zig-window | 2018-06-09T05:04:33Z | window client library | master | 8 | 125 | 11 | 125 | https://api.github.com/repos/andrewrk/zig-window/tags | - | [
"zig"
]
| 1,076 | false | 2025-05-11T22:36:09Z | true | false | unknown | github | []
| zig-window
My Vision
A window client library. It gives you an API for creating windows, possibly
fullscreen, a graphics context, and events associated with the windows, such
as mouse and keyboard input.
<ul>
<li>No dependency on libc or any C libraries</li>
<li>Cross platform:</li>
<li>X11</li>
<li>Windows</li>
<li>MacOS</li>
<li>Wayland</li>
<li>Graphics contexts:</li>
<li>Vulkan</li>
<li>DirectX</li>
<li>Metal</li>
<li>OpenGL</li>
</ul>
Current Status
It's a proof-of-concept of a Vulkan "Hello World" triangle, whose binaries
are portable across different Linux distributions, even ones that have
nonstandard dynamic linkers.
"how it works" writeup is TODO.
Building
Tested with Zig 0.7.0+479f259ea.
<code>zig build -Dtarget=x86_64-linux
patchelf --remove-needed libdummy.so.0 zig-cache/bin/static-window
./zig-cache/bin/static-window</code>
The <code>-Dtarget</code> parameter is important if you want to put the binary up for
downloading - this makes Zig target the "baseline" CPU instead of using
the fancy cool features of your native CPU.
This should work just fine on other CPU architectures though; for example you
could change <code>x86_64</code> to <code>aarch64</code> for 64-bit ARM.
Removing the external dependency on <code>patchelf</code> is TODO.
Reported to work on these systems so far:
<ul>
<li>Ubuntu</li>
<li>Debian</li>
<li>NixOS</li>
<li>Arch Linux</li>
<li>clearlinux</li>
<li>glibc-based void linux</li>
<li>musl-based void linux</li>
</ul>
Please file an issue if you find that <code>vkcube</code> from your package manager works
but binaries produced by this project do not. | []
|
https://avatars.githubusercontent.com/u/106511?v=4 | zig-vulkan-triangle | andrewrk/zig-vulkan-triangle | 2018-08-09T23:26:46Z | simple triangle displayed using vulkan, xcb, and zig | master | 2 | 124 | 15 | 124 | https://api.github.com/repos/andrewrk/zig-vulkan-triangle/tags | MIT | [
"vulkan",
"xcb",
"zig"
]
| 132 | false | 2025-04-25T17:27:30Z | true | true | 0.14.0-dev.1359+e9a00ba7f | github | [
{
"commit": "b6e589d62bc1d9070c47d73ce942168fb92624c8",
"name": "vulkan",
"tar_url": "https://github.com/andrewrk/vulkan-zig/archive/b6e589d62bc1d9070c47d73ce942168fb92624c8.tar.gz",
"type": "remote",
"url": "https://github.com/andrewrk/vulkan-zig"
},
{
"commit": "v1.3.283.tar.gz",
"name": "vulkan_headers",
"tar_url": "https://github.com/KhronosGroup/Vulkan-Headers/archive/v1.3.283.tar.gz.tar.gz",
"type": "remote",
"url": "https://github.com/KhronosGroup/Vulkan-Headers"
},
{
"commit": "89550bb2cbe85276bd1fd89d020f3bbd686937c3",
"name": "shader_compiler",
"tar_url": "https://github.com/andrewrk/shader_compiler/archive/89550bb2cbe85276bd1fd89d020f3bbd686937c3.tar.gz",
"type": "remote",
"url": "https://github.com/andrewrk/shader_compiler"
}
]
| zig-vulkan-triangle
Example of using <a>vulkan-zig</a> and
<a>shader_compiler</a> along with
libxcb to open a window and draw a triangle.
Building and Running
<code>zig build run</code>
System Configuration
On NixOS, I had to add these to my shell:
```
buildInputs = [
vulkan-loader
vulkan-validation-layers
xorg.libxcb
];
VK_LAYER_PATH="${pkgs.vulkan-validation-layers}/share/vulkan/explicit_layer.d";
``` | []
|
https://avatars.githubusercontent.com/u/16398479?v=4 | intellij-zig | ice1000/intellij-zig | 2018-03-16T16:31:40Z | The IntelliJ IDEA plugin for the Zig programming language ┗:smiley:┛ ┏:smiley:┓ ┗:smiley:┛ ┏:smiley:┓ | master | 9 | 116 | 27 | 116 | https://api.github.com/repos/ice1000/intellij-zig/tags | GPL-3.0 | [
"ide",
"integrated-development-environment",
"intellij-plugin",
"zig"
]
| 428 | false | 2025-03-18T07:07:27Z | false | false | unknown | github | []
| Zig plugin for the IntelliJ Platform
~~This is a <strong>work in progress</strong>, some features are implemented partially, there may be performance and stability problems.~~
This project is looking for new maintainers.
<a></a>
<a></a>
<a></a>
|CI|Status|
|:---:|:---:|
|CircleCI (newest with tests, linux)|<a></a>|
Screenshots
| []
|
https://avatars.githubusercontent.com/u/27973237?v=4 | sublime-zig-language | ziglang/sublime-zig-language | 2018-01-20T13:16:19Z | Zig language support for Sublime Text | master | 16 | 96 | 25 | 96 | https://api.github.com/repos/ziglang/sublime-zig-language/tags | MIT | [
"sublime",
"zig"
]
| 1,352 | false | 2025-04-22T04:08:25Z | false | false | unknown | github | []
| Zig Language
Syntax highlighting for <a>Zig</a>.
This repository serves both as the grammar for
<a>github/linguist</a> (Github's site wide
syntax highlighting) and as a standalone Sublime Text package.
The source of truth is <code>Zig.YAML-tmLanguage</code>. This file is read by linguist
directly and used as the source to compile to <code>Zig.tmLanguage</code> using
<a>PackageDev</a> from within Sublime. Do
not edit <code>Zig.tmLanguage</code> directly.
Installation
Use <a>Package control</a>.
Or add <code>Zig.tmLanguage</code> to the packages directory. On OSX This is usually
<code>~/Library/Application\ Support/Sublime\ Text\ 3/Packages/</code>
But to find the path on your machine go to <code>Preferences > Browse Packages</code> from
within Sublime Text.
TextMate Installation
This language is also compatible with TextMate's <code>.tmBundle</code> format. To install in TextMate clone or download this repository. Then rename the repository directory to <code>Zig.tmBundle</code> and double-click it to install it into TextMate. However, see <a>Zig.tmbundle</a> for dedicated TextMate support.
Local Development
Install https://github.com/SublimeText/PackageDev.
Clone or copy this repository to your local Sublime Text folder. e.g.
<code>git clone https://github.com/ziglang/sublime-zig-language.git "/Users/$USER/Library/Application Support/Sublime Text 3/Packages/Zig Language"</code>
Edit the YAML entry and use the <code>Convert (YAML, JSON, PList) to...</code> command
to generate the other entries. Sublime Text will automatically reload the plugin, showing changes in the build system, syntax highlighting, etc.
On Linux, this is located under <code>~/.config/sublime-text-3/</code>.
Build System
The included Sublime Text build system comes with a few options for configuration and defining your own build targets. See <a>here</a> for more information.
LICENSE
Provided under an MIT License | []
|
https://avatars.githubusercontent.com/u/3759175?v=4 | zig-bench | Hejsil/zig-bench | 2018-12-05T09:26:06Z | Simple benchmarking library | master | 2 | 64 | 8 | 64 | https://api.github.com/repos/Hejsil/zig-bench/tags | MIT | [
"benchmarking",
"zig",
"zig-package"
]
| 41 | false | 2025-05-13T04:06:33Z | false | false | unknown | github | []
| zig-bench
A simple benchmarking lib in Zig
```
Test [0/2] test "Debug benchmark"...
Benchmark Iterations Min(ns) Max(ns) Variance Mean(ns)
sum_slice(block=16) 100000 90 2690 243 107
sum_slice(block=32) 100000 170 1760 338 190
sum_slice(block=64) 100000 320 2340 476 352
sum_slice(block=128) 100000 630 2290 862 678
sum_slice(block=256) 100000 1270 3170 2402 1336
sum_slice(block=512) 100000 2550 8490 4835 2651
sum_reader(block=16) 100000 990 2640 1592 1039
sum_reader(block=32) 100000 1930 3890 3292 2012
sum_reader(block=64) 100000 3830 6250 6806 3962
sum_reader(block=128) 63673 7660 12830 15703 7852
sum_reader(block=256) 31967 15360 22190 31847 15641
sum_reader(block=512) 16031 30800 34690 59444 31191
Test [1/2] test "Debug benchmark generics"...
Benchmark Iterations Min(ns) Max(ns) Variance Mean(ns)
sum_vectors(vec4f16) 100000 2730 13390 3620 2775
sum_vectors(vec4f32) 100000 1289 5800 1277 1296
sum_vectors(vec4f64) 100000 1389 6870 1358 1400
sum_vectors(vec8f16) 100000 4400 9680 4613 4479
sum_vectors(vec8f32) 100000 1389 5180 1231 1400
sum_vectors(vec8f64) 100000 1390 6170 2260 1457
sum_vectors(vec16f16) 61088 8090 13980 15455 8184
sum_vectors(vec16f32) 100000 1399 4560 2069 1441
sum_vectors(vec16f64) 100000 1440 6080 1664 1475
All 2 tests passed.
Test [0/2] test "ReleaseSafe benchmark"...
Benchmark Iterations Min(ns) Max(ns) Variance Mean(ns)
sum_slice(block=16) 100000 9 3550 164 18
sum_slice(block=32) 100000 9 940 22 18
sum_slice(block=64) 100000 49 1530 66 52
sum_slice(block=128) 100000 89 1280 102 92
sum_slice(block=256) 100000 169 1690 210 171
sum_slice(block=512) 100000 319 5530 724 329
sum_reader(block=16) 100000 60 2840 180 69
sum_reader(block=32) 100000 110 3059 288 121
sum_reader(block=64) 100000 209 2810 323 224
sum_reader(block=128) 100000 400 1780 387 431
sum_reader(block=256) 100000 790 2220 681 843
sum_reader(block=512) 100000 1550 4300 3805 1669
Test [1/2] test "ReleaseSafe benchmark generics"...
Benchmark Iterations Min(ns) Max(ns) Variance Mean(ns)
sum_vectors(vec4f16) 100000 1269 3790 1799 1283
sum_vectors(vec4f32) 100000 319 1680 300 328
sum_vectors(vec4f64) 100000 319 1860 355 329
sum_vectors(vec8f16) 100000 2399 5010 5014 2420
sum_vectors(vec8f32) 100000 319 2660 641 329
sum_vectors(vec8f64) 100000 319 7740 1019 330
sum_vectors(vec16f16) 100000 4599 9970 22580 4636
sum_vectors(vec16f32) 100000 319 4310 1231 330
sum_vectors(vec16f64) 100000 429 4070 1783 439
All 2 tests passed.
Test [0/2] test "ReleaseFast benchmark"...
Benchmark Iterations Min(ns) Max(ns) Variance Mean(ns)
sum_slice(block=16) 100000 19 2840 128 21
sum_slice(block=32) 100000 19 1600 78 20
sum_slice(block=64) 100000 19 1970 74 21
sum_slice(block=128) 100000 19 1530 68 21
sum_slice(block=256) 100000 39 1250 74 44
sum_slice(block=512) 100000 59 1150 85 68
sum_reader(block=16) 100000 19 1170 21 20
sum_reader(block=32) 100000 19 1650 74 20
sum_reader(block=64) 100000 19 1250 34 20
sum_reader(block=128) 100000 19 1240 32 20
sum_reader(block=256) 100000 39 2180 177 44
sum_reader(block=512) 100000 59 2470 148 68
Test [1/2] test "ReleaseFast benchmark generics"...
Benchmark Iterations Min(ns) Max(ns) Variance Mean(ns)
sum_vectors(vec4f16) 100000 1259 8590 1678 1284
sum_vectors(vec4f32) 100000 319 1440 279 327
sum_vectors(vec4f64) 100000 319 1760 303 327
sum_vectors(vec8f16) 100000 2399 5260 1861 2417
sum_vectors(vec8f32) 100000 319 2080 434 327
sum_vectors(vec8f64) 100000 319 1710 329 328
sum_vectors(vec16f16) 100000 4599 9010 3883 4634
sum_vectors(vec16f32) 100000 319 2800 356 329
sum_vectors(vec16f64) 100000 429 1750 404 436
All 2 tests passed.
Test [0/2] test "ReleaseSmall benchmark"...
Benchmark Iterations Min(ns) Max(ns) Variance Mean(ns)
sum_slice(block=16) 100000 19 2760 247 27
sum_slice(block=32) 100000 29 5090 363 37
sum_slice(block=64) 100000 50 2640 177 63
sum_slice(block=128) 100000 90 1830 157 102
sum_slice(block=256) 100000 169 5860 733 201
sum_slice(block=512) 100000 330 3690 1560 365
sum_reader(block=16) 100000 219 1430 276 226
sum_reader(block=32) 100000 420 1870 460 432
sum_reader(block=64) 100000 819 2690 770 837
sum_reader(block=128) 100000 1629 5390 1696 1649
sum_reader(block=256) 100000 3240 9080 3240 3274
sum_reader(block=512) 76638 6469 9780 5302 6524
Test [1/2] test "ReleaseSmall benchmark generics"...
Benchmark Iterations Min(ns) Max(ns) Variance Mean(ns)
sum_vectors(vec4f16) 100000 4859 16710 5250 4902
sum_vectors(vec4f32) 100000 319 1650 326 328
sum_vectors(vec4f64) 100000 319 1470 295 327
sum_vectors(vec8f16) 100000 3980 9070 3382 4254
sum_vectors(vec8f32) 100000 319 3740 459 328
sum_vectors(vec8f64) 100000 319 4100 534 330
sum_vectors(vec16f16) 79800 6219 15130 10000 6265
sum_vectors(vec16f32) 100000 319 3340 455 330
sum_vectors(vec16f64) 100000 429 2020 454 438
All 2 tests passed.
``` | []
|
https://avatars.githubusercontent.com/u/5731661?v=4 | zig-wasm-test | meheleventyone/zig-wasm-test | 2018-11-20T22:10:38Z | A minimal Web Assembly example using Zig's build system. | master | 2 | 56 | 10 | 56 | https://api.github.com/repos/meheleventyone/zig-wasm-test/tags | - | [
"typescript",
"wasm",
"webassembly",
"zig"
]
| 29 | false | 2025-05-15T09:15:33Z | true | false | unknown | github | []
| zig-wasm-test
A minimal Web Assembly example built with Zig.
Building
To build this project with a working Zig at 0.11.0 and TypeScript install at the project root just type.
<code>zig build</code>
You need to move the resulting wasmtest.wasm file from /zig-out/lib to /www/. One has been committed if you're happy omitting this step.
For good measure you can then build the TypeScript file:
<code>cd www
tsc wasmtest.ts</code>
Running
Start the web server of your choice serving the www folder and navigate to wasmtest.html in your browser of choice. The value 7 should be output in the console. | []
|
https://avatars.githubusercontent.com/u/27973237?v=4 | docker-zig | ziglang/docker-zig | 2017-05-18T18:02:29Z | Dockerfile for zig programming language | master | 2 | 50 | 10 | 50 | https://api.github.com/repos/ziglang/docker-zig/tags | MIT | [
"docker",
"zig"
]
| 35 | false | 2025-01-16T16:56:44Z | false | false | unknown | github | []
| docker-zig
This docker image is solely for the purpose of creating the image that runs for
<a>Zig's Drone CI script</a>.
<strong>Zig makes Docker irrelevant.</strong> You probably do not need a Docker image to
build your Zig application, and you definitely do not need this one.
Usage
First, decide whether to bump the base alpine image version. Next:
<code>docker build -t ziglang/static-base:llvm15-$(uname -m)-1 . --build-arg ZIGVER=0.10.0-dev.4560+828735ac0
docker push ziglang/static-base:llvm15-$(uname -m)-1</code> | []
|
https://avatars.githubusercontent.com/u/43974899?v=4 | trOS | sjdh02/trOS | 2019-02-07T21:09:49Z | tiny aarch64 baremetal OS thingy | master | 0 | 50 | 5 | 50 | https://api.github.com/repos/sjdh02/trOS/tags | - | [
"aarch64",
"osdev",
"rpi3",
"zig"
]
| 81 | false | 2025-04-23T12:09:46Z | true | false | unknown | github | []
| trOS
trOS is a small, <a>zig</a> and assembly, aarch64 RPI3 bare metal OS thingy.
some stuff that works:
* mailbox calls
* uart0
* framebuffer (initializing/clearing/printing characters and strings)
* gpio
* mmio
stuff that is being worked on:
* SD card support (read/write)
* USB
* networking
* anything else not mentioned above
building
all you need to build is <a>zig</a> itself. grab it and run:
<code>zig build</code>
the output file will be in <code>zig-cache</code>. alternatively, you can run the following to
launch qemu (will auto-detect windows or unix):
<code>zig build qemu</code>
you can have qemu redirect to a pty as well:
<code>zig build qemu -Dpty</code>
you can start a gdb remote server:
<code>zig build qemu -Dgdb</code>
you can combine the last two:
<code>zig build qemu -Dpty -Dgdb</code>
if you want a very small binary:
```
zig build -Drelease-fast
or
zig build -Drelease-small
```
both of these produce a binary that is about ~5kb.
if you want release optimizations while still having safety checks:
<code>zig build -Drelease-safe</code>
and thats about all the build options. note that you can combine all <code>-D</code> options
with the <code>qemu</code> directive, e.g.:
<code>zig build qemu -Drelease-small</code>
will build a <code>release-small</code> binary and then run it with qemu.
4coder users
if you use the <a>4coder</a> editor, there is an included project
file you can use to open the source as well as build/run it. the file assumes
you have <code>zig</code> in your PATH. note the the 'run' functionality is a bit lacking
because the pane it opens does not accept input, though this should be less of
an inssue when USB support is available.
credit
thanks to <a>andrew kelly</a> for the build file.
thanks to <a>bzt</a> for the emmc/sd card code. | []
|
https://avatars.githubusercontent.com/u/5941194?v=4 | georgios | iguessthislldo/georgios | 2017-12-04T03:49:38Z | Hobby Operating System | master | 1 | 49 | 6 | 49 | https://api.github.com/repos/iguessthislldo/georgios/tags | NOASSERTION | [
"hobby-os",
"kernel",
"operating-system",
"osdev",
"unix",
"x86",
"x86-32",
"zig",
"ziglang"
]
| 1,638 | false | 2025-04-23T12:09:44Z | true | false | unknown | github | []
| Georgios
Georgios (Greek version of the name George, said like <em>GORE-GEE-OS</em>) is an
operating system I'm making for fun which currently targets i386/IA-32. The
purpose of this project is to serve as a learning experience.
Work in progress graphics mode:
https://user-images.githubusercontent.com/5941194/180702578-91270793-c91c-4f24-b7e1-f86bc2b48c53.mp4
Features
Working on at least some minimal level
<ul>
<li>Kernel console that supports UTF-8 (specifically the subset needed for
<a>Code page 437</a> subset) and some
basic ANSI escape codes</li>
<li>Support for multiple mounted filesystems:</li>
<li>Ext2 accessed using an ATA Driver (read only)</li>
<li>In-memory filesystem mounted at boot (read/write)</li>
<li>Basic preemptive multitasking between processes that can be loaded from ELF
files</li>
<li>ACPI shutdown using <a>ACPICA</a></li>
</ul>
Started on, but not really working yet
<ul>
<li>A graphics mode using VESA BIOS Extensions (VBE)</li>
<li>This will use <a>libx86emu</a> to
invoke the BIOS code required to switch to VBE graphics modes. This doesn't
really work yet though.</li>
<li>This can be bypassed with <code>make multiboot_vbe=true</code>, which has GRUB set a
fixed VBE graphics mode. This is how the demo above was ran. This is not
the default for a number of reasons:<ul>
<li>The major reason is the graphics are slow. This can be seen in the
demo, especially when the Apollo earthrise picture takes a moment to
get drawn on the screen.</li>
<li>It's a fixed graphics mode when the kernel starts and so nothing gets
printed to the screen until the graphical console is ready. So an error
before this wouldn't get printed, which is a problem when running on
real hardware.</li>
<li>The graphical console is mostly done but missing things like the cursor
and text rendering is a bit off.</li>
</ul>
</li>
<li>USB 2.0 stack</li>
<li>Porting real applications written in Zig and C</li>
<li>The applications currently written in Zig are "real" as in they are
compiled and ran separately from the kernel, are running in x86 ring3, and
can't take the whole system down (for the most part). The issue is they are
compiled using the freestanding target. To be able to use a Zig or C hello
world program without any modification, the standard libraries would have to be
ported and toolchains would have to be modified to target Georgios properly.</li>
<li>Freeing the OS from the need of a boot CD</li>
<li>PS/2 Mouse support</li>
<li>Can be tried out by building with <code>make mouse=true</code> and running
<code>test-mouse</code>. This isn't enabled by default becuase currently the keyboard
and mouse cross talk when being used at the same time.</li>
</ul>
Building
Building Georgios requires a Unix-like environment with:
- <a>Zig</a> 0.9.1
- Python 3
- <a>Bridle</a>
- Is a submodule, but it needs to be installed using
<code>pip install --user scripts/codegen/bridle</code>.
- GRUB2
- Requires i686 Support (<code>grub-pc-bin</code> package on Ubuntu)
- xorriso (<code>xorriso</code> package on Ubuntu)
Georgios can be built as a bootable ISO (called <code>georgios.iso</code>) by running
<code>make</code>. If installed, QEMU and Bochs can be run by running <code>make qemu</code> or <code>make bochs</code>
respectively. On Ubuntu, Bochs requires <code>apt-get install bochs bochsbios
bochs-sdl bochs-x vgabios</code>.
For the moment it assumes the existence of an IDE disk with certain files on
it.
Resources Used
<ul>
<li><a>OSDev Wiki</a><ul>
<li>Very popular, fairly large set of resources in one place, but rough
or just plain unhelpful in many places.</li>
</ul>
</li>
<li><a>The little book about OS development</a><ul>
<li>Polished, but limited intro into x86 OS development. Provided me with
the initial start.</li>
</ul>
</li>
<li><a>Intel x86 Software Development Manuals</a></li>
<li><a>xv6</a></li>
<li><a>The Design and Implementation of the 4.4 BSD Operating System</a></li>
<li><a>FYSOS: Media Storage Devices</a></li>
<li><a>UNIX Internals: The New Frontiers</a></li>
</ul> | []
|
https://avatars.githubusercontent.com/u/3759175?v=4 | zig-gc | Hejsil/zig-gc | 2018-06-11T13:35:09Z | A super simple mark-and-sweep garbage collector written in Zig. | master | 1 | 39 | 1 | 39 | https://api.github.com/repos/Hejsil/zig-gc/tags | Unlicense | [
"garbage-collector",
"zig"
]
| 21 | false | 2024-12-27T23:58:45Z | true | false | unknown | github | []
| zig-bench
A simple Garbage Collector in Zig. This GC is pretty bad, and mostly just a proof of concept.
Benchmarks
```
Benchmark Arg Mean(ns)
DirectAllocator 0 9867
DirectAllocator 1 20578
DirectAllocator 2 37061
DirectAllocator 3 10285
DirectAllocator 4 19847
DirectAllocator 5 35768
DirectAllocator 6 9291
DirectAllocator 7 18095
DirectAllocator 8 35587
Arena_DirectAllocator 0 5796
Arena_DirectAllocator 1 8054
Arena_DirectAllocator 2 10330
Arena_DirectAllocator 3 9932
Arena_DirectAllocator 4 12132
Arena_DirectAllocator 5 14381
Arena_DirectAllocator 6 10039
Arena_DirectAllocator 7 12176
Arena_DirectAllocator 8 14335
GcAllocator_DirectAllocator 0 23010
GcAllocator_DirectAllocator 1 53555
GcAllocator_DirectAllocator 2 96861
GcAllocator_DirectAllocator 3 28409
GcAllocator_DirectAllocator 4 70079
GcAllocator_DirectAllocator 5 127971
GcAllocator_DirectAllocator 6 41809
GcAllocator_DirectAllocator 7 113122
GcAllocator_DirectAllocator 8 212150
FixedBufferAllocator 0 118
FixedBufferAllocator 1 198
FixedBufferAllocator 2 338
FixedBufferAllocator 3 98
FixedBufferAllocator 4 190
FixedBufferAllocator 5 353
FixedBufferAllocator 6 97
FixedBufferAllocator 7 177
FixedBufferAllocator 8 340
Arena_FixedBufferAllocator 0 125
Arena_FixedBufferAllocator 1 220
Arena_FixedBufferAllocator 2 436
Arena_FixedBufferAllocator 3 145
Arena_FixedBufferAllocator 4 232
Arena_FixedBufferAllocator 5 401
Arena_FixedBufferAllocator 6 144
Arena_FixedBufferAllocator 7 248
Arena_FixedBufferAllocator 8 491
GcAllocator_FixedBufferAllocator 0 23160
GcAllocator_FixedBufferAllocator 1 69917
GcAllocator_FixedBufferAllocator 2 198616
GcAllocator_FixedBufferAllocator 3 85539
GcAllocator_FixedBufferAllocator 4 352586
GcAllocator_FixedBufferAllocator 5 1849736
GcAllocator_FixedBufferAllocator 6 269965
GcAllocator_FixedBufferAllocator 7 1691938
GcAllocator_FixedBufferAllocator 8 3105935
OK
All tests passed.
``` | []
|
https://avatars.githubusercontent.com/u/3759175?v=4 | zig-midi | Hejsil/zig-midi | 2018-08-17T09:04:10Z | null | master | 1 | 35 | 3 | 35 | https://api.github.com/repos/Hejsil/zig-midi/tags | MIT | [
"midi",
"zig",
"zig-library",
"zig-package"
]
| 77 | false | 2025-05-04T08:50:05Z | true | false | unknown | github | []
| 404 | []
|
https://avatars.githubusercontent.com/u/4605603?v=4 | zig-rosetta | tiehuis/zig-rosetta | 2018-08-03T05:45:25Z | Rosettacode examples in zig | master | 0 | 32 | 3 | 32 | https://api.github.com/repos/tiehuis/zig-rosetta/tags | - | [
"rosetta-code",
"zig"
]
| 123 | false | 2025-02-07T23:52:31Z | false | false | unknown | github | []
| Zig programming language examples for https://rosettacode.org.
This repo is archived and acts as a historic footnote. See the actual site
rosettacode site for updated information. | []
|
https://avatars.githubusercontent.com/u/4605603?v=4 | zligc | tiehuis/zligc | 2018-03-22T06:37:47Z | libc implementation in zig | master | 1 | 29 | 4 | 29 | https://api.github.com/repos/tiehuis/zligc/tags | NOASSERTION | [
"libc",
"zig"
]
| 1,430 | false | 2024-06-30T21:58:44Z | false | false | unknown | github | []
| A libc implementation in zig.
To build a static libc implementation:
<code>make</code>
Confirm the exported symbols with <code>readelf -s libc.a</code>.
See the <code>test/</code> directory for how to link with the generated <code>libc.a</code> vs. the
system provided version.
IMPORTANT: The provided include headers are for x86-64 linux only and are
generated from musl. If you need another (unix) platform, you can build these
using the embedded musl and replace the <code>./include</code> directory.
License
MIT Licensed.
All C header files are copied from <a>musl</a> which is
licensed under the MIT license. | []
|
https://avatars.githubusercontent.com/u/12070598?v=4 | crisp | rvcas/crisp | 2017-09-22T14:47:19Z | A Minimal Lispy Calculator | main | 1 | 26 | 2 | 26 | https://api.github.com/repos/rvcas/crisp/tags | MIT | [
"calculator",
"lisp",
"zig"
]
| 46 | false | 2025-04-05T18:36:49Z | true | false | unknown | github | []
| Crisp
A very minimal lispy calculator implemented in <a>zig</a>
Operations
<ul>
<li><code>+</code> add a sequence of numbers</li>
<li><code>(+ 1 2 3)</code></li>
<li><code>-</code> subtract a sequence of numbers</li>
<li><code>(- 3 2)</code></li>
<li><code>*</code> multiply a sequence of numbers</li>
<li><code>(* 3 5 2)</code></li>
<li><code>/</code> divide a sequence of numbers</li>
<li><code>(/ 12 4)</code></li>
<li>decimals are not supported. meaning: <code>(/ 2 4) => 0</code><ul>
<li>everything is floored</li>
</ul>
</li>
<li>divide by zero results in an error</li>
</ul> | []
|
https://avatars.githubusercontent.com/u/35096?v=4 | ziegfried | mdsteele/ziegfried | 2018-07-27T15:05:42Z | A general-purpose memory allocator for Zig | master | 0 | 26 | 0 | 26 | https://api.github.com/repos/mdsteele/ziegfried/tags | MIT | [
"zig"
]
| 34 | false | 2025-03-13T15:53:22Z | true | false | unknown | github | []
| Ziegfried
<strong>Ziegfried</strong> ("Zig-<code>free()</code>-d") is a general-purpose memory allocator for the
<a>Zig programming language</a>, loosely based on the
principles of <a>Hoard: A Scalable Memory Allocator for Multithreaded
Applications</a>
by Emery D. Berger, Kathryn S. McKinley, Robert D. Blumofe, and Paul R. Wilson,
and with some additional influence from
<a>Miser - A Dynamically Loadable Memory Allocator for Multi-Threaded
Applications</a>
by Barry Tannenbaum.
Ziegfried is still under developement.
License
Ziegfried is made available under the
<a>MIT License</a>. | []
|
https://avatars.githubusercontent.com/u/4605603?v=4 | zig-lua | tiehuis/zig-lua | 2018-05-24T07:26:44Z | zig interfacing with lua example | master | 0 | 24 | 2 | 24 | https://api.github.com/repos/tiehuis/zig-lua/tags | MIT | [
"lua",
"zig"
]
| 317 | false | 2024-04-20T00:00:21Z | true | false | unknown | github | []
| Example of embedding the lua interpreter in a zig program.
Some things that would be cool to do:
- get translate-c parsing all the macros in the header files correctly
- longjmp error handling example case
- get <a>zligc</a> far enough along to avoid
needing to pull in the libc dependency.
Build
<code>zig build</code> | []
|
https://avatars.githubusercontent.com/u/4605603?v=4 | zig-raytrace | tiehuis/zig-raytrace | 2017-10-12T08:07:43Z | simple raytracer in zig | master | 1 | 19 | 2 | 19 | https://api.github.com/repos/tiehuis/zig-raytrace/tags | MIT | [
"zig"
]
| 127 | false | 2025-04-01T20:32:36Z | false | false | unknown | github | []
| A simple raytracer and jpeg image writer in Zig.
Rewritten based on https://github.com/ssloy/tinyraytracer.
Dependencies
<ul>
<li><a>Zig</a></li>
</ul>
Example
| []
|
https://avatars.githubusercontent.com/u/744026?v=4 | xxhash | andreiamatuni/xxhash | 2018-06-09T13:59:26Z | xxhash for zig | master | 0 | 19 | 3 | 19 | https://api.github.com/repos/andreiamatuni/xxhash/tags | - | [
"hash",
"xxhash",
"zig"
]
| 12 | false | 2025-02-06T04:08:31Z | false | false | unknown | github | []
| xxhash
a pure zig implementation of <a>xxhash</a>
usage
see test/test.zig for usage examples
preliminary benchmarks:
all benchmarks run on Broadwell Intel Core i7 3.1Ghz:
| load size | zig | c (reference) | go (cespare) |
| --------- | ------------- | ------------- | ------------- |
| 8B | 2013.66 MB/s | 6467.59 MB/s | 353.81 MB/s |
| 64B | 4029.037 MB/s | 3537.34 MB/s | 2551.29 MB/s |
| 128B | 6199.02 MB/s | 5576.20 MB/s | 4292.74 MB/s |
| 4K | 12587.76 MB/s | 12540.50 MB/s | 12126.35 MB/s | |
benchmark code is in the test folder | []
|
https://avatars.githubusercontent.com/u/6039952?v=4 | zunicode | gernest/zunicode | 2018-11-03T16:33:16Z | null | master | 2 | 18 | 4 | 18 | https://api.github.com/repos/gernest/zunicode/tags | MIT | [
"unicode",
"zig",
"ziglang"
]
| 470 | false | 2025-02-03T15:47:45Z | true | false | unknown | github | []
| zunicode
<a></a>
unicode library for ziglang. | [
"https://github.com/kivikakk/koino"
]
|
https://avatars.githubusercontent.com/u/9454576?v=4 | deque.zig | emekoi/deque.zig | 2018-12-24T05:14:32Z | a lock free chase-lev deque for zig | master | 0 | 17 | 1 | 17 | https://api.github.com/repos/emekoi/deque.zig/tags | MIT | [
"concurrent",
"deque",
"lock-free",
"zig"
]
| 20 | false | 2024-12-28T00:58:38Z | true | false | unknown | github | []
| <em>deque.zig</em>
a lock free chase-lev deque for zig.
usage
```zig
const std = @import("std");
const deque = @import("deque");
const AMOUNT: usize = 100000;
const Task = struct {
const Self = @This();
stealer: deque.Stealer(usize, 32),
data: [AMOUNT]usize = [_]usize{0} ** AMOUNT,
<code>fn task(self: *Self) void {
while (self.stealer.steal()) |i| {
defer std.testing.expectEqual(i, self.data[i]);
self.data[i] += i;
}
}
fn verify(self: Self) void {
for (self.data[0..]) |*i, idx| {
std.testing.expectEqual(idx, i.*);
}
}
</code>
};
pub fn main() !void {
var slice = try std.heap.direct_allocator.alloc(u8, 1 << 24);
var fba = std.heap.ThreadSafeFixedBufferAllocator.init(slice);
var alloc = &fba.allocator;
<code>var d = try deque.Deque(usize, 32).new(alloc);
defer d.deinit();
var i: usize = 0;
const worker = d.worker();
while (i < AMOUNT) : (i += 1) {
try worker.push(i);
}
var threads: [4]*std.Thread = undefined;
var task = Task{
.stealer = d.stealer(),
};
for (threads) |*thread|
thread.* = try Thread.spawn(&task, Task.task);
for (threads) |thread|
thread.wait();
task.verify();
</code>
}
``` | []
|
https://avatars.githubusercontent.com/u/4605603?v=4 | zig-ryu | tiehuis/zig-ryu | 2018-08-01T10:13:14Z | Zig port of https://github.com/ulfjack/ryu | master | 1 | 17 | 6 | 17 | https://api.github.com/repos/tiehuis/zig-ryu/tags | - | [
"zig"
]
| 318 | false | 2025-01-24T17:22:12Z | false | false | unknown | github | []
| Conversion of https://github.com/ulfjack/ryu to <a>zig</a>.
Install
<code>git clone --recurse-submodules https://github.com/tiehuis/zig-ryu</code>
Benchmarks
Requires <code>sh</code>, <code>make</code>, <code>cmake</code>, <code>c++</code>, <code>zig</code>
<code>./build.sh
./bench-reference # reference timing
./bench-zig # zig timing</code>
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> Make more idiomatic
<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> Add f16 variant
<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> Add f128 variant (Use partial table set)
<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> Add specified precision argument (current errol does this after but this is
slows things down a fair bit).
<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> Benchmark against current float printing code (memory
consumption/performance). | []
|
https://avatars.githubusercontent.com/u/3759175?v=4 | hacky-zig-repl | Hejsil/hacky-zig-repl | 2018-12-18T17:52:56Z | null | master | 0 | 16 | 2 | 16 | https://api.github.com/repos/Hejsil/hacky-zig-repl/tags | MIT | [
"repl",
"zig"
]
| 15 | false | 2024-05-03T10:34:59Z | true | false | unknown | github | []
| hacky-zig-repl
Just a small wrapper program that provides a repl for the <a>Zig</a> programming language. | []
|
https://avatars.githubusercontent.com/u/748913?v=4 | docker-zig | euantorano/docker-zig | 2018-10-07T18:11:21Z | A docker image for Zig based upon Alpine Linux 3.16. | main | 1 | 15 | 3 | 15 | https://api.github.com/repos/euantorano/docker-zig/tags | BSD-3-Clause | [
"docker-image",
"zig"
]
| 56 | false | 2025-05-11T21:51:40Z | false | false | unknown | github | []
| Zig
A docker image for <a>Zig</a> based upon Alpine Linux 3.16.
Using this image
Building an executable
<code>docker run -v $PWD:/app euantorano/zig:0.9.1 build-exe hello.zig</code>
Available tags
There are two variants of tags provided by this repository - release tags such as <code>0.9.1</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 bash script (<code>build.sh</code>) is ran by GitHub actions nightly in order to check for new versions and to then build and push images for them. | []
|
https://avatars.githubusercontent.com/u/6039952?v=4 | time | gernest/time | 2018-11-12T16:13:45Z | null | master | 0 | 15 | 5 | 15 | https://api.github.com/repos/gernest/time/tags | MIT | [
"time",
"zig",
"ziglang"
]
| 330 | false | 2024-09-18T05:57:44Z | true | false | unknown | github | []
| time
<code>time</code> for ziglang | [
"https://github.com/jcalabro/uscope"
]
|
https://avatars.githubusercontent.com/u/744026?v=4 | strings | andreiamatuni/strings | 2018-06-05T21:01:54Z | strings for zig | master | 2 | 14 | 3 | 14 | https://api.github.com/repos/andreiamatuni/strings/tags | - | [
"string",
"string-distance",
"string-manipulation",
"string-search",
"zig"
]
| 502 | false | 2025-02-06T04:06:55Z | false | false | unknown | github | []
| strings
strings for zig
check out the test/test.zig file for examples
to run all the tests:
<code>$ git clone https://github.com/clownpriest/strings
$ cd strings
$ zig test test/test.zig</code> | []
|
https://avatars.githubusercontent.com/u/3759175?v=4 | pokemon-randomizer | Hejsil/pokemon-randomizer | 2017-12-26T23:50:20Z | A Pokémon Rom randomizer tool written in Zig | master | 11 | 13 | 0 | 13 | https://api.github.com/repos/Hejsil/pokemon-randomizer/tags | Unlicense | [
"pokemon",
"romhacking",
"zig"
]
| 696 | false | 2023-04-30T02:42:49Z | true | false | unknown | github | []
| pokemon-randomizer
This project is no longer maintained and most of the code has been migrated to the <a>TM35-Metronome</a> project, which aims to be a set of simple tools for hacking Pokémon roms.
A Pokémon Rom randomizer tool written in Zig
For now, this project exists for me to test out the <a>Zig</a>
programming language and its features.
Supported games
Each Pokémon game exists in multiple different languages. The reason this is important is that different languages have different data layouts. The Japanese version of Pokémon Emerald might not work with the randomizer even though a US version does.
| Version: | International (O) | English/USA (E) |
|-------------|--------------------|--------------------|
| Red | | |
| Blue | | |
| Green | | |
| Yellow | | |
| Gold | | |
| | | |
| Gold | | |
| Silver | | |
| Crystal | | |
| | | |
| Ruby | | :heavy_check_mark: |
| Sapphire | | :heavy_check_mark: |
| Emerald | | :heavy_check_mark: |
| Fire Red | | :heavy_check_mark: |
| Leaf Green | | :heavy_check_mark: |
| | | |
| Diamon | | :heavy_check_mark: |
| Pearl | | :heavy_check_mark: |
| Platinum | | :heavy_check_mark: |
| Heart Gold | | :heavy_check_mark: |
| Soul Silver | | :heavy_check_mark: |
| | | |
| Black | :heavy_check_mark: | |
| White | :heavy_check_mark: | |
| Black 2 | :heavy_check_mark: | |
| White 2 | :heavy_check_mark: | |
Build
The randomizer relies on libraries which are included as git submodules. You,
therefore, need to clone with <code>--recursive</code>, in order to get these libraries on
clone.
The repo contains both the Pokémon randomizer, but also a few tools used to make
development of the randomizer a little simpler.
Here are the different build commands:
<ul>
<li><code>zig build randomizer</code> builds the randomizer (default).</li>
<li><code>zig build tools</code> builds the tools.</li>
<li><code>zig build test</code> runs all tests.</li>
<li><code>zig build all</code> builds everything and runs all tests.</li>
</ul>
Resources
Useful links with information on the structure of roms, or where data exists in different Pokémon games.
Roms
<ul>
<li><a>Gameboy Advance / Nintendo DS / DSi - Technical Info</a></li>
<li><a>Pan Doc (Gb info)</a></li>
<li><a>Nds formats</a></li>
</ul>
Gen 1
Gen 2
Gen 3
<ul>
<li><a>Pokémon Emerald Offsets</a></li>
</ul>
Gen 4
<ul>
<li><a>HGSS File System</a></li>
<li><a>HG/SS Mapping File Specifications</a></li>
<li><a>HG/SS Pokemon File Specifications</a></li>
<li><a>HG/SS Encounter File Specification</a></li>
</ul>
Gen 5
<ul>
<li><a>BW2 File System</a></li>
<li><a>BW Trainer data</a></li>
<li><a>BW Move data</a></li>
</ul>
All Gens
<ul>
<li><a>Bulbapedia on Pokemon Data Structures</a></li>
<li><a>Pokemon Game Disassemblies</a></li>
</ul> | []
|
https://avatars.githubusercontent.com/u/4605603?v=4 | zig-sdl2 | tiehuis/zig-sdl2 | 2018-07-17T09:10:36Z | SDL2 bindings for Zig | master | 0 | 13 | 3 | 13 | https://api.github.com/repos/tiehuis/zig-sdl2/tags | - | [
"sdl",
"zig"
]
| 41 | false | 2024-11-21T08:14:38Z | false | false | unknown | github | []
| DEPRECATED: This is no longer needed since Zig added specific C-pointer types for translated code.
I recommend using C import directly. If there is any issue with the automatic translation process, you can
make an issue on the main zig compiler repository and we can fix upstream.
Minimal zig wrapper over SDL2.
For now, the standard SDL naming conventions are used but these will be changed
in the future to use zig namespacing.
The only difference between this package and <code>@cImport(@cInclude("SDL.h"))</code> is
fixing and correcting single-pointer entries and completing macro definitions
that are otherwise untranslatable.
Example
<code>use @import("src/index.zig");
pub fn main() u8 {
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) != 0) {
SDL_Log(c"failed to initialized SDL\n");
return 1;
}
defer SDL_Quit();
var renderer: *SDL_Renderer = undefined;
var window: *SDL_Window = undefined;
if (SDL_CreateWindowAndRenderer(640, 480, SDL_WINDOW_SHOWN, &window, &renderer) != 0) {
SDL_Log(c"failed to initialize window and renderer\n");
return 1;
}
defer SDL_DestroyRenderer(renderer);
defer SDL_DestroyWindow(window);
SDL_SetWindowTitle(window, c"zig-sdl");
_ = SDL_SetRenderDrawColor(renderer, 0, 64, 128, 255);
_ = SDL_RenderClear(renderer);
_ = SDL_RenderPresent(renderer);
SDL_Delay(3000);
return 0;
}
</code>
Todo
<ul>
<li>Clean up remaining arguments to take single-item pointers and non-nullables
where applicable.</li>
<li>Convert c_int return codes to bool where applicable.</li>
<li>Potentially namespace functions to <code>sdl.</code> instead of the current <code>SDL_</code>.</li>
</ul> | []
|
https://avatars.githubusercontent.com/u/4605603?v=4 | zig-gameboy | tiehuis/zig-gameboy | 2017-06-10T22:51:28Z | A gameboy emulator in zig | master | 0 | 13 | 1 | 13 | https://api.github.com/repos/tiehuis/zig-gameboy/tags | MIT | [
"emulator",
"zig"
]
| 31 | false | 2023-11-01T02:21:02Z | true | false | unknown | github | []
| NOTE: This isn't complete.
Get
<code>git clone --recursive https://github.com/tiehuis/zig-gameboy
</code>
Build
<code>zig build
</code>
Dependencies
<ul>
<li>SDL2</li>
</ul> | []
|
https://avatars.githubusercontent.com/u/4605603?v=4 | zig-benchmarks-game | tiehuis/zig-benchmarks-game | 2017-10-27T09:22:19Z | The Computer Language Benchmarks Game in Zig | master | 0 | 12 | 5 | 12 | https://api.github.com/repos/tiehuis/zig-benchmarks-game/tags | - | [
"benchmarks",
"zig"
]
| 67 | false | 2022-08-21T18:16:13Z | true | false | unknown | github | []
| <a>The Computer Language Benchmarks Game</a> in Zig.
<code>zig build
./run</code>
Dependencies
<ul>
<li>zig (master branch)</li>
<li>bash</li>
<li>pcre</li>
<li>gmp</li>
</ul>
NOTE: Running the full set of tests will use about 1GiB of hard drive space. Run
<code>zig build clean</code> to clear all build artifacts. | []
|
https://avatars.githubusercontent.com/u/45124880?v=4 | tm35-nds | TM35-Metronome/tm35-nds | 2018-11-19T07:41:55Z | A library for working with Nintendo DS roms | master | 0 | 11 | 0 | 11 | https://api.github.com/repos/TM35-Metronome/tm35-nds/tags | MIT | [
"nintendo-ds",
"rom-hacking",
"romhacking",
"zig"
]
| 30 | false | 2025-02-04T11:10:32Z | true | false | unknown | github | []
| tm35-nds
A library for reading and writing Nintendo DS roms. | []
|
https://avatars.githubusercontent.com/u/106511?v=4 | advent-of-code | andrewrk/advent-of-code | 2018-12-01T06:42:23Z | https://adventofcode.com | master | 0 | 9 | 3 | 9 | https://api.github.com/repos/andrewrk/advent-of-code/tags | - | [
"zig"
]
| 84 | false | 2025-01-25T08:37:01Z | false | false | unknown | github | []
| Solutions for <a>Advent of Code</a> in the <a>Zig
Programming Language</a>. | []
|
https://avatars.githubusercontent.com/u/2234630?v=4 | ZigZag | connectFree/ZigZag | 2018-08-22T16:49:15Z | Noise Framework implementation in Zig Language for use in EVER/IP and WireGuard | master | 0 | 9 | 1 | 9 | https://api.github.com/repos/connectFree/ZigZag/tags | - | [
"crypto",
"cryptography",
"ever",
"ever-ip",
"everip",
"noise",
"noise-protocol",
"noise-protocol-framework",
"security",
"wireguard",
"zig"
]
| 50 | false | 2024-10-04T04:25:30Z | false | false | unknown | github | []
| ZigZag
<a>Noise Framework</a> implementation in <a>Zig Language</a> for use in EVER/IP and WireGuard.
implementation
ZigZag is currently tracking against <a>Noise spec revision 34</a>. | []
|
https://avatars.githubusercontent.com/u/4605603?v=4 | zig-ctags | tiehuis/zig-ctags | 2017-10-20T09:55:57Z | ctags definition for zig | master | 0 | 8 | 1 | 8 | https://api.github.com/repos/tiehuis/zig-ctags/tags | MIT | [
"ctags",
"zig"
]
| 1 | false | 2023-02-06T09:05:20Z | false | false | unknown | github | []
| Copy the contents of this file to your <code>.ctags</code> file.
<code>https://raw.githubusercontent.com/tiehuis/zig-ctags/master/ctags.zig >> ~/.ctags</code> | []
|
https://avatars.githubusercontent.com/u/4963613?v=4 | zigenv | d2verb/zigenv | 2018-12-30T17:43:44Z | env tool for ziglang | master | 0 | 7 | 2 | 7 | https://api.github.com/repos/d2verb/zigenv/tags | MIT | [
"zig",
"ziglang"
]
| 18 | false | 2025-01-14T14:05:35Z | false | false | unknown | github | []
| <blockquote>
<span class="bg-yellow-100 text-yellow-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-yellow-900 dark:text-yellow-300">WARNING</span>
This repository is no longer maintained. You can use <a>zvm</a> or other tools to manage your Zig versions nowadays.
</blockquote>
What's this?
zigenv is a tool to manage multiple zig versions.
Install
zigenv is installed by running one of the following commands in your terminal.
You can install this via the command-line with either <code>curl</code>, <code>wget</code> or another similar tool.
| Method | Command |
| :-------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <strong>curl</strong> | <code>sh -c "$(curl -fsSL https://raw.githubusercontent.com/d2verb/zigenv/master/zigenv-init.sh)" && . $HOME/.zigenv/zigenv-init.sh && zigenv install 0.13.0 && zigenv change 0.13.0</code> |
| <strong>wget</strong> | <code>sh -c "$(wget -O- https://raw.githubusercontent.com/d2verb/zigenv/master/zigenv-init..sh)" && . $HOME/.zigenv/zigenv-init.sh && zigenv install 0.13.0 && zigenv change 0.13.0</code> |
| <strong>fetch</strong> | <code>sh -c "$(fetch -o - https://raw.githubusercontent.com/d2verb/zigenv/master/zigenv-init.sh)" && . $HOME/.zigenv/zigenv-init.sh && zigenv install 0.13.0 && zigenv change 0.13.0</code> |
Usage
Install new zig version.
<code>$ zigenv install builds # version master
$ zigenv install 0.3.0 # version 0.3.0</code>
Change current zig version.
<code>$ zigenv change builds # version master
$ zigenv change 0.3.0 # version 0.3.0</code>
Show help message.
<code>$ zigenv help
Usage: zigenv <command> [<args>]
Some useful zigenv commands are:
change Change current zig version
install Install a zig version
uninstall Uninstall a specific zig version
version Show the current zig version
versions List all zig versions available to zigenv</code>
License
<a>The MIT License</a> | []
|
https://avatars.githubusercontent.com/u/8798829?v=4 | Seal | suirad/Seal | 2018-11-26T07:07:54Z | An allocator that wraps another allocator and detects if memory is leaked after usage | master | 0 | 7 | 0 | 7 | https://api.github.com/repos/suirad/Seal/tags | MIT | [
"leak-detection",
"zig",
"ziglang"
]
| 4 | false | 2024-12-27T23:30:58Z | false | false | unknown | github | []
| Seal
Allocator wrapping leak detector for Zig
TODO: Documentation, Usage, & Examples; See tests | []
|
https://avatars.githubusercontent.com/u/183309?v=4 | zig.kak | adrusi/zig.kak | 2018-06-01T22:35:35Z | Zig language support for kakoune | master | 0 | 5 | 3 | 5 | https://api.github.com/repos/adrusi/zig.kak/tags | MIT | [
"kakoune",
"plugin",
"zig"
]
| 6 | false | 2021-09-23T09:47:05Z | false | false | unknown | github | []
| 404 | []
|
https://avatars.githubusercontent.com/u/3759175?v=4 | zig-crc | Hejsil/zig-crc | 2018-01-12T15:05:58Z | null | master | 0 | 5 | 1 | 5 | https://api.github.com/repos/Hejsil/zig-crc/tags | MIT | [
"crc",
"zig",
"zig-library",
"zig-package"
]
| 37 | false | 2024-09-13T12:24:10Z | false | false | unknown | github | []
| 404 | []
|
https://avatars.githubusercontent.com/u/6039952?v=4 | semver | gernest/semver | 2018-11-08T14:24:00Z | null | master | 2 | 4 | 1 | 4 | https://api.github.com/repos/gernest/semver/tags | MIT | [
"semver",
"zig",
"ziglang"
]
| 45 | false | 2021-01-07T02:49:30Z | true | false | unknown | github | []
| semver
<a></a>
semantic versioning for zig. This allows you to parse and compare semantic version strings.
usage
```
const semver = @import("src/main.zig");
const warn = @import("std").debug.warn;
test "parse version string to a struct" {
const version = try semver.parse("v1.2.3-pre+meta");
warn("\n{}\n", version);
}
test "compare two version strings" {
const versionSample = struct {
x: []const u8,
y: []const u8,
};
const version_list = []versionSample{
versionSample{ .x = "1.2.3", .y = "3.2.1" },
<code> // you can prefix the version string with v, it is supported.
versionSample{ .x = "v5.2.3", .y = "v3.2.1" },
};
warn("\n");
for (version_list) |v| {
const cmp = try semver.compare(v.x, v.y);
switch (cmp) {
semver.Comparison.LessThan => {
warn("{} < {}\n", v.x, v.y);
},
semver.Comparison.Equal => {
warn("{} == {}\n", v.x, v.y);
},
semver.Comparison.GreaterThan => {
warn("{} > {}\n", v.x, v.y);
},
else => unreachable,
}
}
</code>
}
// $ zig test example.zig
// Test 1/2 parse version string to a struct...
// Version{ .major = 1, .minor = 2, .patch = 3, .pre_release = pre, .build = meta }
// OK
// Test 2/2 compare two version strings...
// 1.2.3 < 3.2.1
// v5.2.3 > v3.2.1
// OK
// All tests passed.
``` | []
|
https://avatars.githubusercontent.com/u/8798829?v=4 | zRc | suirad/zRc | 2018-11-20T06:35:56Z | Pointer Reference counting in Zig | master | 0 | 4 | 1 | 4 | https://api.github.com/repos/suirad/zRc/tags | MIT | [
"reference-counting",
"shared-ptr",
"zig",
"ziglang"
]
| 3 | false | 2020-10-27T22:34:13Z | false | false | unknown | github | []
| zRc
Pointer Reference counting in Zig | []
|
https://avatars.githubusercontent.com/u/3759175?v=4 | sab | Hejsil/sab | 2019-01-04T13:23:42Z | null | master | 1 | 4 | 0 | 4 | https://api.github.com/repos/Hejsil/sab/tags | MIT | [
"cli",
"command-line-tool",
"zig"
]
| 55 | false | 2025-05-08T07:01:57Z | true | false | unknown | github | []
| sab (Spinners And Bars)
A simple program for printing spinners and bars to stdout.
```
Usage: sab [OPTION]...
sab will draw bars/spinners based on the values piped in through
stdin.
To draw a simple bar, simply pipe a value between 0-100 into sab:
echo 35 | sab
====
You can customize your bar with the '-s, --steps' option:
echo 35 | sab -s ' ,-,='
===-
<code>sab</code> has two ways of drawing bars, which can be chosen with the <code>-t, --type</code> option:
echo 50 | sab -s ' ,|,='
=====
echo 55 | sab -s ' ,|,='
=====|
echo 50 | sab -s ' ,|,=' -t mark-center
====|
echo 55 | sab -s ' ,|,=' -t mark-center
=====|
To draw a simple spinner, simply set the length of the bar to 1
and set max to be the last step:
echo 2 | sab -l 1 -M 3 -s '/,-,\,|'
\
sab will draw multible lines, one for each line piped into it.
echo -e '0\n1\n2\n3' | sab -l 1 -M 3 -s '/,-,\,|'
/
-
\
|
Options:
-h, --help print this message to stdout
-l, --length the length of the bar (default: 10)
-m, --min minimum value (default: 0)
-M, --max maximum value (default: 100)
-s, --steps a comma separated list of the steps used to draw the bar (default: ' ,=')
-t, --type the type of bar to draw (default: normal)
``` | [
"https://github.com/Hejsil/lemonbar-maker"
]
|
https://avatars.githubusercontent.com/u/4605603?v=4 | zig-dlmalloc | tiehuis/zig-dlmalloc | 2018-01-20T01:09:19Z | Work in progress port of dlmalloc-2.8.6 to Zig | master | 0 | 4 | 0 | 4 | https://api.github.com/repos/tiehuis/zig-dlmalloc/tags | MIT | [
"zig"
]
| 77 | false | 2021-05-09T06:22:21Z | false | false | unknown | github | []
| A <a>zig</a> implementation of dlmalloc. | []
|
https://avatars.githubusercontent.com/u/8798829?v=4 | uMutex | suirad/uMutex | 2018-11-16T01:30:59Z | Platform Independant Mutex for the Zig programming language | master | 0 | 4 | 1 | 4 | https://api.github.com/repos/suirad/uMutex/tags | MIT | [
"atomics",
"mutex",
"mutex-lock",
"zig",
"zig-lang",
"ziglang"
]
| 7 | false | 2021-04-01T19:02:01Z | false | false | unknown | github | []
| uMutex
Platform Independant Mutex for the Zig language
See <code>example.zig</code> for example of usage. | []
|
https://avatars.githubusercontent.com/u/7611409?v=4 | nucleOS | abelleisle/nucleOS | 2018-12-10T23:58:56Z | The nucleOS Operating System | x86 | 0 | 2 | 1 | 2 | https://api.github.com/repos/abelleisle/nucleOS/tags | GPL-3.0 | [
"arm",
"arm-cortex-m7",
"assembly",
"c",
"rtos",
"stm32",
"stm32h743zi",
"zig",
"ziglang"
]
| 7,673 | false | 2024-01-20T18:50:58Z | false | false | unknown | github | []
| NucleOS
What is this?
nucleOS is my rendition of a operating system (OS) that's both architecture and board agnostic.
Features
None at the moment, check back later :)
Directory Structure
<ul>
<li><code>boot</code> - Basic bootloader or bootup sequence code</li>
<li><code>kernel</code> - The kernel itself. Only handles kernel tasks, no hardware drivers, etc..:</li>
<li>Task scheduling</li>
<li>Timers/callbacks</li>
<li>Priviledge management</li>
<li>Memory management</li>
<li>IPC</li>
<li>
<code>system</code> - The system code used to create a "distro" of sorts. Hardware initializtion, entrypoint from bootloader, linker script generation, initramfs, file system loader, etc..
</li>
<li>
<code>docs</code> - NucleOS documentation (augmented with code docs)
</li>
<li><code>examples</code> - Example system code that is used to provide examples (and test) the use of NucleOS</li>
</ul>
Building
NucleOS uses a root <code>build.zig</code> to package and build NucleOS how the user feels. It can either be used to expose just the kernel to the user, or build a system image (with or without packaged bootloader). | []
|
https://avatars.githubusercontent.com/u/127971?v=4 | zig-unicode | daurnimator/zig-unicode | 2018-11-25T14:40:19Z | A Zig unicode library | master | 1 | 2 | 0 | 2 | https://api.github.com/repos/daurnimator/zig-unicode/tags | - | [
"unicode",
"zig"
]
| 9 | false | 2022-09-18T20:09:08Z | true | false | unknown | github | []
| A <a>Zig</a> unicode library
Status
This project is in its infancy.
Aims
<ul>
<li>Provide the functionality of <a>unistring</a> </li>
<li>Provide the functionality of <a>libidn2</a></li>
<li>Provide primitives required for <a>PRECIS</a></li>
<li>Do all the above by parsing the <a>official Unicode data tables</a> using compiletime/runtime agnostic functions</li>
</ul> | []
|
https://avatars.githubusercontent.com/u/5731661?v=4 | aoc-2018-zig | meheleventyone/aoc-2018-zig | 2018-12-01T14:05:40Z | My solutions to the Advent of Code 2018 written in Zig. | master | 0 | 2 | 0 | 2 | https://api.github.com/repos/meheleventyone/aoc-2018-zig/tags | - | [
"advent-of-code-2018",
"zig",
"ziglang"
]
| 88 | false | 2019-04-24T01:49:25Z | false | false | unknown | github | []
| aoc-2018-zig
My solutions to the Advent of Code 2018 written in Zig. | []
|
https://avatars.githubusercontent.com/u/6039952?v=4 | matrix | gernest/matrix | 2018-10-29T20:23:30Z | null | master | 0 | 1 | 0 | 1 | https://api.github.com/repos/gernest/matrix/tags | MIT | [
"zig",
"ziglang"
]
| 711 | false | 2022-01-23T04:42:57Z | false | false | unknown | github | []
| matrix
Port of useful go library and utilities to zig.
package | status
--------|--------
image | WIP
unicode | WIP | []
|
https://avatars.githubusercontent.com/u/3759175?v=4 | zig-bf | Hejsil/zig-bf | 2018-03-07T11:51:05Z | null | master | 0 | 1 | 0 | 1 | https://api.github.com/repos/Hejsil/zig-bf/tags | Unlicense | [
"brainfuck",
"zig"
]
| 8 | false | 2023-01-04T09:55:18Z | false | false | unknown | github | []
| zig-bf | []
|
https://avatars.githubusercontent.com/u/30243134?v=4 | posix-implementations | Summertime/posix-implementations | 2018-11-05T01:48:31Z | Implementations of POSIX utilities in various languages | master | 0 | 1 | 0 | 1 | https://api.github.com/repos/Summertime/posix-implementations/tags | Unlicense | [
"hacktoberfest",
"language",
"nim",
"posix",
"zig"
]
| 13 | false | 2024-08-31T15:34:11Z | false | false | unknown | github | []
| Posix Implementations
This repo is meant to serve as a comparison of various languages in doing relatively simple real-world tasks, by implementing in each language, the <a>"POSIX" standard utilities</a>
The goal is to have a modern maintained implementation of each utility, for each popular programming language (if practical!)
Languages
<ul>
<li>Nim : ./nimix</li>
<li>Zig : ./pozig</li>
<li>Raku Perl 6 : ./rakix</li>
<li>Your favorite language! (we welcome contributions!)</li>
</ul> | []
|
https://avatars.githubusercontent.com/u/4605603?v=4 | zig-cli-experiment | tiehuis/zig-cli-experiment | 2018-04-01T03:41:24Z | Experiment in how to handle the cli interface for zig | master | 0 | 1 | 0 | 1 | https://api.github.com/repos/tiehuis/zig-cli-experiment/tags | MIT | [
"cli",
"zig"
]
| 106 | false | 2020-10-27T23:50:34Z | true | false | unknown | github | []
| Experimenting with how we can structure the cli of the zig compiler and its
associated sub-commands.
The current method is quite unwieldy and I'd like to see a clean implementation
for the self-hosted compiler.
We will probably pull out any useful argument parsing into a library/file maybe
in std depending on if its useful enough. | []
|
https://avatars.githubusercontent.com/u/1832671?v=4 | hello-zig | mpiannucci/hello-zig | 2018-12-10T00:02:30Z | Test project for integrating zig with ios, android, macos, etc | master | 0 | 1 | 0 | 1 | https://api.github.com/repos/mpiannucci/hello-zig/tags | - | [
"ios",
"xcode",
"zig"
]
| 279 | false | 2021-12-05T23:50:23Z | true | false | unknown | github | []
| Hello Zig
Attempt at getting a zig library compiled for use on ios and other platforms
Building
Using the zig build script (DOESNT WORK FOR IOS YET):
<code>bash
IPHONEOS_DEPLOYMENT_TARGET=9.0 zig build</code>
Manually build for ios:
<code>bash
bash build_ios_fat_lib.sh</code>
Then open <code>Hello Zig/HelloZig.xcproject</code> and build for ios from there
NOTES
<ul>
<li>The build script wont work cross compiling for ios, but <code>build-lib</code> directly does.. no idea why yet, looks like a linker issue. </li>
<li>Use https://github.com/mpiannucci/zig until the changes I made to enable ios support are pushed upstream</li>
</ul> | []
|
https://avatars.githubusercontent.com/u/3768010?v=4 | advent-of-code-2018 | ManDeJan/advent-of-code-2018 | 2018-12-02T19:59:04Z | https://adventofcode.com/2018 | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/ManDeJan/advent-of-code-2018/tags | - | [
"advent-of-code",
"advent-of-code-2018",
"zig"
]
| 2 | false | 2018-12-03T12:14:00Z | false | false | unknown | github | []
| 404 | []
|
https://avatars.githubusercontent.com/u/23312691?v=4 | blockchain | lavrd/blockchain | 2017-12-23T22:55:32Z | PoW blockchain implementation | main | 0 | 0 | 0 | 0 | https://api.github.com/repos/lavrd/blockchain/tags | MIT | [
"blockchain",
"blockchain-demo",
"blockchain-demos",
"blockchain-technology",
"demo",
"demo-app",
"example",
"explanation",
"p2p",
"p2p-network",
"pow",
"proof-of-work",
"simple",
"udp",
"zig",
"ziglang"
]
| 168 | false | 2024-08-07T05:14:03Z | true | false | unknown | github | []
| Blockchain
Simple blockchain implementation for demo purposes.
Usage
See <a>make targets</a> for available commands.
```shell
PORT=33400 GENESIS=00000000000000000000000000000000c4a55b5a7d0d89586e37238ca05362389e0dd85157d8652bd24fc483f66c22c0000000000000000000000000000000000000000000000000000000000000000003068fab900100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 \
make run
MINING=1 NODES=127.0.0.1:33400 GENESIS=00000000000000000000000000000000c4a55b5a7d0d89586e37238ca05362389e0dd85157d8652bd24fc483f66c22c0000000000000000000000000000000000000000000000000000000000000000003068fab900100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 \
make run
```
Or you can use predefined commands:
<code>shell
make run_ln
make run_fn</code>
Docker
```shell
make build_docker
-it to use ctrl+c
docker run --rm -it blockchain
```
```shell
make build_docker && docker run --rm -it -e PORT=33400 -e GENESIS=00000000000000000000000000000000c4a55b5a7d0d89586e37238ca05362389e0dd85157d8652bd24fc483f66c22c0000000000000000000000000000000000000000000000000000000000000000003068fab900100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 \
--name light-node --net host blockchain
docker run --rm -it -e MINING=1 -e NODES=127.0.0.1:33400 -e GENESIS=00000000000000000000000000000000c4a55b5a7d0d89586e37238ca05362389e0dd85157d8652bd24fc483f66c22c0000000000000000000000000000000000000000000000000000000000000000003068fab900100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 \
--name full-node --net host blockchain
```
Or you can use predefined commands:
<code>shell
make run_docker_ln
make run_docker_fn</code>
Graph
In order to generate blockchain graph use following command:
<code>shell
make gen_graph</code>
Example
Troubleshooting
To test UDP server use following command: <code>echo "test" | nc -u -w 1 127.0.0.1 44600</code>. | []
|
https://avatars.githubusercontent.com/u/107689?v=4 | doomsday | jshholland/doomsday | 2016-05-16T12:11:44Z | null | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/jshholland/doomsday/tags | BSD-3-Clause | [
"date",
"zig"
]
| 23 | false | 2023-07-08T22:34:54Z | true | false | unknown | github | []
| Doomsday
Doomsday is a small utility that uses Conway's <a>Doomsday</a> method to
compute the day of the week of a given day. | []
|
https://avatars.githubusercontent.com/u/1266011?v=4 | advent-of-code | danprince/advent-of-code | 2017-12-03T14:07:27Z | 🎄 Solutions to puzzles from Advent of Code | master | 1 | 0 | 0 | 0 | https://api.github.com/repos/danprince/advent-of-code/tags | - | [
"advent-of-code",
"clojure",
"golang",
"julia",
"nim",
"rust",
"zig"
]
| 926 | false | 2024-12-09T04:39:49Z | false | false | unknown | github | []
| 404 | []
|
https://avatars.githubusercontent.com/u/4605603?v=4 | advent-of-code-2018 | tiehuis/advent-of-code-2018 | 2018-12-02T00:50:54Z | https://adventofcode.com/2018 | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/tiehuis/advent-of-code-2018/tags | - | [
"zig"
]
| 20 | false | 2018-12-04T05:54:45Z | false | false | unknown | github | []
| Solutions for <a>Advent of Code 2018</a> in the <a>Zig
Programming Language</a>. | []
|
https://avatars.githubusercontent.com/u/6039952?v=4 | zson | gernest/zson | 2018-11-10T11:59:21Z | null | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/gernest/zson/tags | - | [
"json",
"zig",
"ziglang"
]
| 21 | false | 2020-10-27T22:39:49Z | true | false | unknown | github | []
| zson
json for zig. | []
|
https://avatars.githubusercontent.com/u/6039952?v=4 | znet | gernest/znet | 2018-11-10T18:50:54Z | null | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/gernest/znet/tags | - | [
"http",
"http2",
"networking",
"url",
"zig",
"ziglang"
]
| 15 | false | 2018-11-13T14:41:18Z | true | false | unknown | github | []
| zig networking | []
|
https://avatars.githubusercontent.com/u/6039952?v=4 | baki | gernest/baki | 2018-11-10T22:31:12Z | null | master | 0 | 0 | 0 | 0 | https://api.github.com/repos/gernest/baki/tags | MIT | [
"markdown",
"zig",
"ziglang"
]
| 180 | false | 2020-10-27T22:34:49Z | true | false | unknown | github | []
| <em>markdown</em> for zig. | []
|
https://avatars.githubusercontent.com/u/460371?v=4 | aoc | wooky/aoc | 2018-12-07T06:46:14Z | Advent of Code solutions | master | 4 | 0 | 0 | 0 | https://api.github.com/repos/wooky/aoc/tags | Unlicense | [
"ada",
"advent-of-code",
"advent-of-code-2016",
"advent-of-code-2017",
"advent-of-code-2018",
"advent-of-code-2019",
"advent-of-code-2020",
"advent-of-code-2021",
"advent-of-code-2022",
"advent-of-code-2023",
"adventofcode",
"cpp",
"nim",
"zig",
"ziglang"
]
| 1,227 | false | 2024-12-17T05:23:14Z | false | false | unknown | github | []
| 404 | []
|
https://avatars.githubusercontent.com/u/11783095?v=4 | awesome-zig | nrdmn/awesome-zig | 2019-08-12T18:50:22Z | null | master | 21 | 1,294 | 87 | 1,294 | https://api.github.com/repos/nrdmn/awesome-zig/tags | - | [
"awesome-list",
"zig",
"ziglang"
]
| 57 | false | 2025-05-21T21:23:50Z | false | false | unknown | github | []
| Awesome Zig
Algorithms and data structures
<ul>
<li><a>BarabasGitHub/LZig4</a> Implementing lz4 in zig.</li>
<li><a>DutchGhost/ArrayVec</a> An array with a vector feeling in Zig</li>
<li><a>emekoi/deque.zig</a> a lock free chase-lev deque for zig</li>
<li><a>kristoff-it/zig-cuckoofilter</a> Production-ready Cuckoo Filters for any C ABI compatible target.</li>
<li><a>marijnfs/zigtimsort</a> TimSort implementation for Zig</li>
<li><a>Sahnvour/zig-containers</a> A container library for Zig.</li>
<li><a>Srekel/zig-sparse-set</a> Sparse sets for zig, supporting both SOA and AOS style</li>
<li><a>v1zix/zig-string</a> Strings for Zig</li>
</ul>
Allocators
<ul>
<li><a>dbandstra/zig-hunk</a> Basic stack allocator for Zig</li>
<li><a>fengb/zee_alloc</a> tiny Zig allocator primarily targeting WebAssembly</li>
<li><a>mdsteele/ziegfried</a> A general-purpose memory allocator for Zig</li>
<li><a>suirad/Seal</a> An allocator that wraps another allocator and detects if memory is leaked after usage</li>
</ul>
Audio
<ul>
<li><a>dbandstra/zang</a> Audio synthesis for Zig</li>
<li><a>dbandstra/zig-wav</a></li>
<li><a>Hejsil/zig-midi</a></li>
</ul>
Bootables
<ul>
<li><a>AndreaOrru/zen</a> Experimental operating system written in Zig</li>
<li><a>andrewrk/clashos</a> multiplayer arcade game for bare metal Raspberry Pi 3 B+</li>
<li><a>andrewrk/HellOS</a> "hello world" x86 kernel example</li>
<li><a>DorianXGH/Lukarnel</a> A microkernel in zig with rust microservices</li>
<li><a>iguessthislldo/georgios</a> Hobby Operating System</li>
<li><a>jzck/kernel-zig</a> 💾 hobby x86 kernel zig</li>
<li><a>liampwll/zig-efi-os</a></li>
<li><a>markfirmware/zig-bare-metal-microbit</a> Bare metal microbit program written in zig</li>
<li><a>markfirmware/zig-bare-metal-raspberry-pi</a> Bare metal raspberry pi program written in zig</li>
<li><a>MasterQ32/RetrOS</a> A retro-style gaming console running on bare x86 metal written in Zig</li>
<li><a>nrdmn/uefi-examples</a> UEFI examples in Zig</li>
<li><a>nrdmn/uefi-paint</a> UEFI-bootable touch paint app</li>
<li><a>SamTebbs33/pluto</a> An x86 kernel written in Zig</li>
<li><a>sjdh02/trOS</a> tiny aarch64 baremetal OS thingy</li>
<li><a>tralamazza/embedded_zig</a> minimal Zig embedded ARM example (STM32F103 blue pill)</li>
<li><a>yvt/zig-armv8m-test</a> Example Zig-based app for Armv8-M + TrustZone</li>
<li><a>ZeeBoppityZagZiggity/ZBZZ.OS</a> An operating system built with RISCV and Zig</li>
</ul>
Compilers and interpreters
<ul>
<li><a>CurtisFenner/zsmol</a> The new Smol compiler and reference.</li>
<li><a>squeek502/zua</a> An implementation of Lua 5.1 in Zig, for learning purposes</li>
<li><a>Vexu/bog</a> Small, strongly typed, embeddable language.</li>
</ul>
Database
<ul>
<li><a>kristoff-it/redis-cuckoofilter</a> Hashing-function agnostic Cuckoo filters for Redis</li>
<li><a>kristoff-it/zig-okredis</a> Zero-allocation Client for Redis 6+</li>
<li><a>leroycep/sqlite-zig</a></li>
<li><a>vrischmann/zig-cassandra</a> Client for Cassandra 2.1+</li>
</ul>
Editor plugins
<ul>
<li><a>ice1000/intellij-zig</a> The IntelliJ IDEA plugin for the Zig programming language ┗😃┛ ┏😃┓ ┗😃┛ ┏😃┓</li>
<li><a>isaachier/ztags</a> ctags implementation for Zig written in Zig</li>
<li><a>Tetralux/sublime-zig</a> My own, more lightweight, syntax highlighting for the Zig Programming Language.</li>
<li><a>ziglang/sublime-zig-language</a> Zig language support for Sublime Text</li>
<li><a>ziglang/vscode-zig</a> Zig language support for VSCode</li>
<li><a>ziglang/zig-mode</a> Zig mode for Emacs</li>
<li><a>ziglang/zig.vim</a> Vim configuration for Zig</li>
<li><a>zigtools/zls</a> Zig LSP implementation + Zig Language Server</li>
</ul>
Emulators
<ul>
<li><a>emekoi/c8</a> chip 8 emulator in zig</li>
<li><a>fengb/fundude</a> Gameboy emulator: Zig -> wasm</li>
<li><a>GrooveStomp/chip8-zig</a> CHIP-8 emulator in Zig</li>
<li><a>isaachier/gbemu</a> Zig Game Boy emulator</li>
<li><a>sourgrasses/fishnchips</a> [WIP] 🐟 CHIP-8 emulator implemented in Zig for leeeearning</li>
<li><a>sourgrasses/ichigo</a> [WIP] 🍓 Virtual Boy emulator</li>
<li><a>Srekel/zag</a> Game dev project written in Zig and C</li>
<li><a>tiehuis/zig-gameboy</a> A gameboy emulator in zig</li>
</ul>
Game tools and libraries
<ul>
<li><a>danielabbott/Game-Engine</a></li>
<li><a>emekoi/ziglet</a> a small zig game library</li>
<li><a>kristianhasselknippe/zig-game-engine</a> Learning zig through game engine</li>
<li><a>TM35-Metronome/metronome</a> A set of tools for modifying and randomizing Pokémon games</li>
<li><a>TM35-Metronome/tm35-nds</a> A library for working with Nintendo DS roms</li>
<li><a>user00e00/sudokuinzig</a></li>
<li><a>wendigojaeger/ZigGBA</a> Work in progress SDK for creating Game Boy Advance games using Zig programming language.</li>
</ul>
Games
<ul>
<li><a>Akuli/curses-minesweeper</a> Minesweeper game written in curses with zig</li>
<li><a>andrewrk/clashos</a> multiplayer arcade game for bare metal Raspberry Pi 3 B+</li>
<li><a>andrewrk/tetris</a> A simple tetris clone written in zig programming language.</li>
<li><a>dbandstra/oxid</a> Arcade style game written in Zig</li>
<li><a>fabioarnold/snake-zig</a></li>
<li><a>Stenodyon/blink</a> A game about building logic with lasers</li>
<li><a>thejoshwolfe/legend-of-swarkland</a> Hack-n-slash roguelike inspired by NetHack</li>
<li><a>tiehuis/zstack</a> Line-race tetris mode in Zig</li>
<li><a>kooparse/zalgebra</a> Linear algebra library for games and real-time computer graphics.</li>
</ul>
GUI
<ul>
<li><a>andrewrk/zig-mandelbrot-gl</a> mandelbrot set in zig</li>
<li><a>andrewrk/zig-sdl</a> self-contained SDL2 package for Zig</li>
<li><a>andrewrk/zig-vulkan-triangle</a> simple triangle displayed using vulkan, glfw, and zig</li>
<li><a>cshenton/learnopengl</a> https://learnopengl.com tutorials ported to zig</li>
<li><a>dbandstra/zig-pcx</a> Load and save PCX images in Zig</li>
<li><a>ifreund/river</a> dynamic wayland compositor that takes inspiration from dwm and bspwm</li>
<li><a>Nelarius/weekend-raytracer-zig</a> A Zig implementation of the "Ray Tracing in One Weekend" book</li>
<li><a>SpexGuy/Zig-Gltf-Display</a> A program that displays glTF files using Vulkan, written in Zig.</li>
<li><a>tiehuis/zig-raytrace</a> simple raytracer in zig</li>
<li><a>tiehuis/zig-sdl2</a> SDL2 bindings for Zig</li>
<li><a>winksaville/zig-3d-soft-engine</a> An attempt to create a 3D engine in software using zig.</li>
</ul>
Misc libraries
<ul>
<li><a>BraedonWooding/Lazy-Zig</a> Linq in Zig</li>
<li><a>DutchGhost/maybeuninit</a> MaybeUninit in Zig.</li>
<li><a>emekoi/log.zig</a> a thread-safe logging library for zig.</li>
<li><a>gernest/time</a></li>
<li><a>kprotty/zap</a> A collection of zig libraries which provide interfaces over the system for writing high performance applications</li>
<li><a>mlarouche/zigimg</a> Zig library for reading and writing different image formats</li>
<li><a>ziglibs/known-folders</a> Provides access to well-known folders across several operating systems</li>
</ul>
Network
<ul>
<li><a>connectFree/ZigZag</a> Noise Framework implementation in Zig Language for use in EVER/IP and WireGuard</li>
<li><a>ducdetronquito/h11</a> I/O-free HTTP/1.1 implementation inspired by hyper/h11</li>
<li><a>euantorano/ip.zig</a> A Zig library for working with IP Addresses</li>
<li><a>lun-4/zigdig</a> naive dns client library in zig</li>
<li><a>lun-4/ziget</a> simple wget in zig without libc</li>
<li><a>marler8997/netpunch</a> Outbound proxy protocol</li>
<li><a>mstroecker/zig-robotstxt</a> Lightweight docker image for serving a disallow robots.txt file using the zig programming language.</li>
<li><a>Vexu/routez</a> Http server for Zig</li>
<li><a>Vexu/zuri</a> URI parser for Zig</li>
<li><a>remeh/statsd-zig</a> Basic DogStatsD UDP server</li>
</ul>
System tools
<ul>
<li><a>pbui-project/pbui-main</a> BSD/Linux core utilities written in Zig</li>
<li><a>hspak/brightnessztl</a> A CLI to control device backlight</li>
<li><a>thejoshwolfe/hexdump-zip</a> produce an annotated hexdump of a zipfile</li>
</ul>
Other
<ul>
<li><a>andersfr/zig-lsp</a> Language Server Protocol for Zig</li>
<li><a>belse-de/zig-tut</a> A collection of small projects and tutorials to learn ZIG; may it be inspiration for others as well.</li>
<li><a>donpdonp/zootdeck</a> Zootdeck Fediverse GTK Desktop Reader</li>
<li><a>fengb/zig-protobuf</a></li>
<li><a>gernest/base32</a> base32 encoding/decoding for ziglang</li>
<li><a>gernest/hoodie</a> pure zig language server with swagger and bling bling</li>
<li><a>Hejsil/zig-gc</a> A super simple mark-and-sweep garbage collector written in Zig.</li>
<li><a>hspak/geteltorito-zig</a> geteltorito re-write in Zig</li>
<li><a>lun-4/zig-docsearch</a> search over zig stdlib doc comments (with rudimentary html gen)</li>
<li><a>MasterQ32/ZigPaint</a> A simple paint application written in Zig. Used to create an OpenGL loader/wrapper and a minimal UI system.</li>
<li><a>meta-leap/langserv</a> LSP implementation lib plus demo / dummy language server showcasing usage (WIP)</li>
<li><a>momumi/x86-zig</a> library for assembling x86 in zig (WIP)</li>
<li><a>nrdmn/ilo_license_key</a> iLO license key library</li>
<li><a>vegecode/svd2zig</a> Convert System View Description (svd) files to Zig headers for baremetal development</li>
<li><a>zigtools/zpm</a> Unofficial Zig package manager</li>
<li><a>Sobeston/ziglearn</a> Zig learning resources</li>
<li><a>mqttiotstuff/iotmonitor</a> Zig MQTT IotMonitor tools, save time to monitor mqtt agents or devices</li>
</ul>
Parser
<ul>
<li><a>darithorn/zig-toml</a> A TOML parser written in Zig</li>
<li><a>ducdetronquito/hppy</a> The happy HTML parser ᕕ( ᐛ )ᕗ</li>
<li><a>gernest/url</a></li>
<li><a>goto-bus-stop/ziguid</a> GUID parsing/stringifying with zig</li>
<li><a>Hejsil/zig-clap</a> Simple command line argument parsing library</li>
<li><a>kivikakk/libpcre.zig</a> Bindings to libpcre for Perl-compatible regular expressions</li>
<li><a>kivikakk/koino</a> CommonMark/GitHub Flavored Markdown parser and HTML renderer</li>
<li><a>m-r-hunt/tjp</a></li>
<li><a>prostomarkeloff/zigini</a> Simple, small (~220 loc) library for parsing .INI files in Zig.</li>
<li><a>tiehuis/zig-regex</a> A regex implementation for the zig programming language</li>
<li><a>tiehuis/zig-ryu</a> Zig port of https://github.com/ulfjack/ryu</li>
<li><a>Vexu/zuri</a> URI parser for Zig</li>
<li><a>vi/zigmkv</a> [wip] Matroska/webm (mkv) parser in Zig</li>
<li><a>winksaville/zig-parse-args</a> Parse command line arguments.</li>
<li><a>winksaville/zig-parse-number</a> Implement ParseNumber which can parse any TypeId.Int or TypeId.Float.</li>
<li><a>demizer/markzig</a> Pure Zig Markdown Parser</li>
</ul>
Web
<ul>
<li><a>andrewrk/lua-in-the-browser</a> using zig to build lua for webassembly</li>
<li><a>fengb/fundude</a> Gameboy emulator: Zig -> wasm</li>
<li><a>fengb/zee_alloc</a> tiny Zig allocator primarily targeting WebAssembly</li>
<li><a>gernest/url</a></li>
<li><a>kivikakk/htmlentities.zig</a> HTML5 entity data.</li>
<li><a>meheleventyone/zig-wasm-test</a> A minimal Web Assembly example using Zig's build system.</li>
<li><a>shritesh/zig-wasm-dom</a> Zig + WebAssembly + JS + DOM</li>
<li><a>shritesh/zigfmt-web</a> zig fmt on the web</li>
<li><a>Vexu/routez</a> Http server for Zig</li>
</ul> | []
|
https://avatars.githubusercontent.com/u/68711141?v=4 | pluto | ZystemOS/pluto | 2019-03-22T10:49:28Z | An x86 kernel written in Zig | develop | 34 | 641 | 28 | 641 | https://api.github.com/repos/ZystemOS/pluto/tags | - | [
"hacktoberfest",
"kernel",
"operating-system",
"x86",
"zig"
]
| 2,907 | false | 2025-05-21T08:34:40Z | true | false | unknown | github | []
| Pluto
<a></a>
Pluto is a kernel written almost entirely in <a>Zig</a> and supports x86, with aarch64 and x64 backends being planned.
Goals
<ul>
<li><strong>Should be written in Zig as much as possible</strong>. Assembly should only be used where required for functionality or performance reasons.</li>
<li><strong>Light and performant</strong>. The kernel should be usable both on embedded and desktop class CPUs, made possible by it being lightweight and modular.</li>
<li><strong>Basic utilities will be written in Zig</strong>. This includes a basic text editor and shell, and will be part of the filesystem external to the kernel itself.</li>
<li><strong>Easy to port</strong>. The kernel is oblivious to the underlying architecture, meaning that ports only need to implement the defined interface and they should work without a hitch.</li>
</ul>
All of these goals will benefit from the features of Zig.
Build
Requires a master build of Zig (<a>downloaded</a> or <a>built from source</a>) <em>xorriso</em> and the grub tools (such as <em>grub-mkrescue</em>). A <em>qemu-system</em> binary compatible with your chosen target is required to run the kernel (e.g. <em>qemu-system-i386</em>).
<code>Shell
zig build</code>
Run
<code>Shell
zig build run</code>
or if you want to wait for a gdb connection:
<code>Shell
zig build debug-run</code>
Debug
Launch a gdb-multiarch instance and connect to qemu.
<code>Shell
zig build debug</code>
Unit testing
Run the unit tests.
<code>Shell
zig build test</code>
Runtime testing
Run the runtime tests.
<code>Shell
zig build rt-test -Dtest-mode=<MODE></code>
Available test modes:
<ul>
<li><code>None</code>: This is the default, this will run the OS normally.</li>
<li><code>Initialisation</code>: Run the OS's initialisation runtime tests to ensure the OS is properly set up.</li>
<li><code>Panic</code>: Run the panic runtime test.</li>
</ul>
Options
<ul>
<li><code>-D[build-mode]=</code>: Boolean (default <code>false</code>).</li>
<li><strong>build</strong>: Build a certain build mode (<em>release-safe</em>, <em>release-fast</em>, <em>release-small</em>). Don't set in order to use the <em>debug</em> build mode.</li>
<li><strong>test</strong>: Test a certain build mode (<em>release-safe</em>, <em>release-fast</em>, <em>release-small</em>). Don't set in order to use the <em>debug</em> build mode.</li>
<li><code>-Dtarget=</code>: String (default <code>i386-freestanding</code>). The standard target options for building with zig. Currently supported targets:</li>
<li><code>i386-freestanding</code></li>
<li><code>-Ddisable-display</code>: Boolean (default <code>false</code>)</li>
<li>This disables the display output of QEMU.</li>
</ul>
Contribution
We welcome all contributions, be it bug reports, feature suggestions or pull requests. We follow the style mandated by zig fmt so make sure you've run <code>zig fmt</code> on your code before submitting it.
We also like to order a file's members (public after non-public):
<ol>
<li>imports</li>
<li>type definitions</li>
<li>constants</li>
<li>variables</li>
<li>inline functions</li>
<li>functions</li>
<li>entry point/init function</li>
</ol>
More styling information is available on the <a>wiki</a> | []
|
https://avatars.githubusercontent.com/u/62312094?v=4 | zigimg | zigimg/zigimg | 2019-12-29T22:52:29Z | Zig library for reading and writing different image formats | master | 43 | 607 | 100 | 607 | https://api.github.com/repos/zigimg/zigimg/tags | MIT | [
"bitmap",
"bmp",
"image",
"image-processing",
"netpbm",
"pcx",
"png",
"png-decoder",
"zig",
"zig-library",
"zig-package"
]
| 1,100 | false | 2025-05-21T20:54:56Z | true | true | unknown | github | []
| Zig Image library
This is a work in progress library to create, process, read and write different image formats with <a>Zig</a> programming language.
<a></a>
Install & Build
This library uses zig nominated <a>2024.11.0-mach</a>. To install using <a><code>zigup</code></a>:
<code>sh
zigup 0.14.0-dev.2577+271452d22</code>
Use zigimg in your project
How to add to your project:
As a submodule
<ol>
<li>Clone this repository or add as a submodule</li>
<li>Add to your <code>build.zig</code>
<code>pub fn build(b: *std.Build) void {
exe.root_module.addAnonymousModule("zigimg", .{ .root_source_file = b.path("zigimg.zig") });
}</code></li>
</ol>
Through the package manager
<ol>
<li>Run this command in your project folder to add <code>zigimg</code> to your <code>build.zig.zon</code></li>
</ol>
<code>sh
zig fetch --save git+https://github.com/zigimg/zigimg.git</code>
<ol>
<li>Get the module in your <code>build.zig</code> file</li>
</ol>
```zig
const zigimg_dependency = b.dependency("zigimg", .{
.target = target,
.optimize = optimize,
});
exe.root_module.addImport("zigimg", zigimg_dependency.module("zigimg"));
```
After you are done setting up, you can look at the user guide below.
Test suite
To run the test suite, checkout the <a>test suite</a> and run
<ol>
<li>Checkout zigimg</li>
<li>Go back one folder and checkout the <a>test suite</a> </li>
<li>Run the tests with <code>zig build</code>
<code>zig build test</code></li>
</ol>
Supported image formats
| Image Format | Read | Write |
| ------------- |:-------------:|:--------------:|
| ANIM | ❌ | ❌ |
| BMP | ✔️ (Partial) | ✔️ (Partial) |
| Farbfeld | ✔️ | ✔️ |
| GIF | ✔️ | ❌ |
| ICO | ❌ | ❌ |
| IFF | ✔️ | ❌ |
| JPEG | ✔️ (Partial) | ❌ |
| PAM | ✔️ | ✔️ |
| PBM | ✔️ | ✔️ |
| PCX | ✔️ | ✔️ |
| PGM | ✔️ (Partial) | ✔️ (Partial) |
| PNG | ✔️ | ✔️ (Partial) |
| PPM | ✔️ (Partial) | ✔️ (Partial) |
| QOI | ✔️ | ✔️ |
| SGI | ✔️ | ❌ |
| SUN | ✔️ | ❌ |
| TGA | ✔️ | ✔️ |
| TIFF | ✔️ (Partial) | ❌ |
| XBM | ❌ | ❌ |
| XPM | ❌ | ❌ |
BMP - Bitmap
<ul>
<li>version 4 BMP</li>
<li>version 5 BMP</li>
<li>24-bit RGB read & write</li>
<li>32-bit RGBA read & write</li>
<li>Doesn't support any compression</li>
</ul>
GIF - Graphics Interchange Format
<ul>
<li>Support GIF87a and GIF89a</li>
<li>Support animated GIF with Netscape application extension for looping information</li>
<li>Supports interlaced</li>
<li>Supports tiled and layered images used to achieve pseudo true color and more.</li>
<li>The plain text extension is not supported</li>
</ul>
IFF - InterchangeFileFormat
<ul>
<li>Supports 1-8 bit, 24 bit, HAM6/8, EHB ILBM files</li>
<li>Supports uncompressed, byterun 1 & 2 (Atari) compressed ILBM files</li>
<li>Supports PBM (Deluxe Paint DOS) encoded files</li>
<li>Supports ACBM (Amiga Basic) files</li>
<li>Color cycle chunks are ignored</li>
<li>Mask is not supported (skipped)</li>
</ul>
JPEG - Joint Photographic Experts Group
<ul>
<li>8-bit baseline and progressive</li>
</ul>
PAM - Portable Arbitrary Map
Currently, this only supports a subset of PAMs where:
* The tuple type is official (see <code>man 5 pam</code>) or easily inferred (and by extension, depth is 4 or less)
* All the images in a sequence have the same dimensions and maxval (it is technically possible to support animations with different maxvals and tuple types as each <code>AnimationFrame</code> has its own <code>PixelStorage</code>, however, this is likely not expected by users of the library)
* Grayscale,
* Grayscale with alpha
* Rgb555
* Rgb24 and Rgba32
* Bgr24 and Bgra32
* Rgb48 and Rgba64
PBM - Portable Bitmap format
<ul>
<li>Everything is supported</li>
</ul>
PCX - ZSoft Picture Exchange format
<ul>
<li>Support monochrome, 4 color, 16 color and 256 color indexed images</li>
<li>Support 24-bit RGB images</li>
</ul>
PGM - Portable Graymap format
<ul>
<li>Support 8-bit and 16-bit grayscale images</li>
<li>16-bit ascii grayscale loading not tested</li>
</ul>
PNG - Portable Network Graphics
<ul>
<li>Support all pixel formats supported by PNG (grayscale, grayscale+alpha, indexed, truecolor, truecolor with alpha) in 8-bit or 16-bit.</li>
<li>Support the mininal chunks in order to decode the image.</li>
<li>Can write all supported pixel formats but writing interlaced images is not supported yet.</li>
</ul>
PPM - Portable Pixmap format
<ul>
<li>Support 24-bit RGB (8-bit per channel)</li>
<li>Missing 48-bit RGB (16-bit per channel)</li>
</ul>
QOI - Quite OK Image format
<ul>
<li>Imported from https://github.com/MasterQ32/zig-qoi with blessing of the author</li>
</ul>
SGI - Silicon Graphics Image
<ul>
<li>Supports 8-bit, RGB (24/48-bit), RGBA(32/64-bit) files</li>
<li>Supports RLE and uncompressed files</li>
</ul>
SUN - Sun Raster format
<ul>
<li>Supports 1/8/24/32-bit files</li>
<li>Supports uncompressed & RLE files</li>
<li>Supports BGR/RGB encoding</li>
<li>TIFF/IFF/Experimental encoding is not supported</li>
</ul>
TGA - Truevision TGA format
<ul>
<li>Supports uncompressed and compressed 8-bit grayscale, indexed with 16-bit and 24-bit colormap, truecolor with 16-bit(RGB555), 24-bit or 32-bit bit depth.</li>
<li>Supports reading version 1 and version 2</li>
<li>Supports writing version 2</li>
</ul>
TIFF - Tagged Image File Format
What's supported:
<ul>
<li>bilevel, grayscale, palette and RGB(A) files</li>
<li>most <em>baseline</em> tags</li>
<li>Raw, LZW, Deflate, PackBits, CCITT 1D files</li>
<li>big-endian (MM) and little-endian (II) files should both be decoded fine</li>
</ul>
What's missing:
<ul>
<li>Tile-based files are not supported</li>
<li>YCbCr, CMJN and CIE Lab files are not supported</li>
<li>JPEG, CCITT Fax 3 / 4 are not supported yet</li>
</ul>
Notes
<ul>
<li>Only the first IFD is decoded</li>
<li>Orientation tag is not supported yet</li>
</ul>
Supported Pixel formats
<ul>
<li><strong>Indexed</strong>: 1bpp (bit per pixel), 2bpp, 4bpp, 8bpp, 16bpp</li>
<li><strong>Grayscale</strong>: 1bpp, 2bpp, 4bpp, 8bpp, 16bpp, 8bpp with alpha, 16bpp with alpha</li>
<li><strong>Truecolor</strong>: RGB332, RGB555, RGB565, RGB24 (8-bit per channel), RGBA32 (8-bit per channel), BGR555, BGR24 (8-bit per channel), BGRA32 (8-bit per channel), RGB48 (16-bit per channel), RGBA64 (16-bit per channel)</li>
<li><strong>float</strong>: 32-bit float RGBA, this is the neutral format.</li>
</ul>
User Guide
Design philosophy
zigimg offers color and image functionality. The library is designed around either using the convenient <code>Image</code> (or <code>ImageUnmanaged</code>) struct that can read and write image formats no matter the format.
Or you can also use the image format directly in case you want to extract more data from the image format. So if you find that <code>Image</code> does not give you the information that you need from a PNG or other format, you can use the PNG format albeit with a more manual API that <code>Image</code> hide from you.
<code>Image</code> vs <code>ImageUnmanaged</code>
<code>Image</code> bundle a memory allocator and <code>ImageUnmanaged</code> does not. Similar to <code>std.ArrayList()</code> and <code>std.ArrayListUnmanaged()</code> in Zig standard library. For all the examples we are going to use <code>Image</code> but it is similar with <code>ImageUnmanaged</code>.
Read an image
It is pretty straightforward to read an image using the <code>Image</code> struct.
From a file
You can use either a file path
```zig
const std = @import("std");
const zigimg = @import("zigimg");
pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
defer _ = gpa.deinit();
<code>const allocator = gpa.allocator();
var image = try zigimg.Image.fromFilePath(allocator, "my_image.png");
defer image.deinit();
// Do something with your image
</code>
}
```
or a <code>std.fs.File</code> directly
```zig
const std = @import("std");
const zigimg = @import("zigimg");
pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
defer _ = gpa.deinit();
<code>const allocator = gpa.allocator();
var file = try std.fs.cwd().openFile(file_path, .{});
defer file.close();
var image = try zigimg.Image.fromFile(allocator, file);
defer image.deinit();
// Do something with your image
</code>
}
```
From memory
```zig
const std = @import("std");
const zigimg = @import("zigimg");
const image_data = @embedFile("test.bmp");
pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
defer _ = gpa.deinit();
<code>const allocator = gpa.allocator();
const image = try zigimg.Image.fromMemory(allocator, image_data[0..]);
defer image.deinit();
// Do something with your image
</code>
}
```
Accessing pixel data
For a single image, they are two ways to get access to the pixel data.
Accessing a specific format directly
You can access the pixel data directly using <code>Image.pixels</code>. <code>pixels</code> is an union of all supported pixel formats.
For RGB pixel formats, just use the pixel format enum value and addresss the data directly.
```zig
pub fn example() void {
// [...]
// Assuming you already have an image loaded
<code>const first_pixel = image.pixels.rgb24[0];
</code>
}
```
For grayscale formats, you need to use .value to get the grayscale value. It can also contain the alpha value if you use the grayscale with alpha.
```zig
pub fn example() void {
// [...]
// Assuming you already have an image loaded
<code>const first_pixel = image.pixels.grayscale8Alpha[0];
const grayscale = first_pixel.value;
const alpha = grayscale.alpha;
</code>
}
```
For indexed formats, you need to first access the union value then either the indices or the palette. The palette color are stored in the <code>Rgba32</code> pixel format.
```zig
pub fn example() void {
// [...]
// Assuming you already have an image loaded
<code>const first_color_palette = image.pixels.indexed8.palette[0];
const first_pixel = image.pixels.indexed8.indices[0];
</code>
}
```
If you want to know the current pixel format use <code>Image.pixelFormat()</code>.
Using the color iterator
You can use the iterator to get each pixel as the universal <code>Colorf32</code> pixel format. (32-bit floating ploint RGBA)
```zig
pub fn example() void {
// [...]
// Assuming you already have an image loaded
<code>const color_it = image.iterator();
while (color_it.next()) |color| {
// Do something with color
}
</code>
}
```
Accessing animation frames
In the case of an <code>Image</code> containing multiple frames, you can use <code>Image.animation</code> to get access to the animation information. Use <code>Image.animation.frames</code> to access each indivial frame. Each frame contain the pixel data and a frame duration in seconds (32-bit floating point).
<code>Image.pixels</code> will always point to the first frame of an animation also.
```zig
pub fn example() void {
// [...]
// Assuming you already have an image loaded
<code>const loop_count = image.animation.loop_count;
for (image.animation.frames) |frame| {
const rgb24_data = frame.pixels.rgb24;
const frame_duration = frame.duration;
}
</code>
}
```
Get raw bytes for texture transfer
<code>Image</code> has helper functions to help you get the right data to upload your image to the GPU.
```zig
pub fn example() void {
// [...]
// Assuming you already have an image loaded
<code>const image_data = image.rawBytes();
const row_pitch = image.rowByteSize();
const image_byte_size = image.imageByteSize();
</code>
}
```
Detect image format
You can query the image format used by a file or a memory buffer.
From a file
You can use either a file path
```zig
const std = @import("std");
const zigimg = @import("zigimg");
pub fn main() !void {
const image_format = try zigimg.Image.detectFormatFromFilePath(allocator, "my_image.png");
<code>// Will print png
std.log.debug("Image format: {}", .{image_format});
</code>
}
```
or a <code>std.fs.File</code> directly
```zig
const std = @import("std");
const zigimg = @import("zigimg");
pub fn main() !void {
var file = try std.fs.cwd().openFile("my_image.gif", .{});
defer file.close();
<code>const image_format = try zigimg.Image.detectFormatFromFile(allocator, file);
// Will print gif
std.log.debug("Image format: {}", .{image_format});
</code>
}
```
From memory
```zig
const std = @import("std");
const zigimg = @import("zigimg");
const image_data = @embedFile("test.bmp");
pub fn main() !void {
const image_format = try zigimg.Image.detectFormatFromMemory(allocator, image_data[0..]);
<code>// Will print bmp
std.log.debug("Image format: {}", .{image_format});
</code>
}
```
Write an image
Each 3 functions to write an image take a union of encoder options for the target format. To know the actual options you'll need to consult the source code. The active tag of the union determine the target format, not the file extension.
Write to a file path
```zig
pub fn example() !void {
// [...]
// Assuming you already have an image loaded
<code>try image.writeToFilePath("my_new_image.png", .{ .png = .{} });
// Or with encoder options
try image.writeToFilePath("my_new_image.png", .{ .png = .{ .interlaced = true } });
</code>
}
```
Write to <code>std.fs.File</code>
```zig
pub fn example() !void {
// [...]
// Assuming you already have an image loaded and the file already created
<code>try image.writeToFile(file, .{ .bmp = .{} });
</code>
}
```
Write to a memory buffer
Ensure that you have enough place in your buffer before calling <code>writeToMemory()</code>
```zig
pub fn example() !void {
// [...]
// Assuming you already have an image loaded and the buffer already allocated
<code>try image.writeToMemory(buffer[0..], .{ .tga = .{} });
</code>
}
```
Create an image
Use <code>Image.create()</code> and pass the width, height and the pixel format that you want.
```zig
const std = @import("std");
const zigimg = @import("zigimg");
pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
defer _ = gpa.deinit();
<code>const allocator = gpa.allocator();
var image = try zigimg.Image.create(allocator, 1920, 1080, .rgba32);
defer image.deinit();
// Do something with your image
</code>
}
```
Interpret raw pixels
If you are not dealing with a image format, you can import your pixel data using <code>Image.fromRawPixels()</code>. It will create a copy of the pixels data. If you want the image to take ownership or just pass the data along to write it to a image format, use <code>ImageUnmanaged.fromRawPixelsOwned()</code>.
Using <code>fromRawPixel()</code>:
```zig
const std = @import("std");
const zigimg = @import("zigimg");
pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
defer _ = gpa.deinit();
<code>const allocator = gpa.allocator();
const my_raw_pixels = @embedData("raw_bgra32.bin");
var image = try zigimg.Image.fromRawPixels(allocator, 1920, 1080, my_raw_pixels[0..], .bgra32);
defer image.deinit();
// Do something with your image
</code>
}
```
Using <code>fromRawPixelsOwned()</code>:
```zig
const std = @import("std");
const zigimg = @import("zigimg");
pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
defer _ = gpa.deinit();
<code>const allocator = gpa.allocator();
const my_raw_pixels = @embedData("raw_bgra32.bin");
var image = try zigimg.ImageUnmanaged.fromRawPixelsOwned(1920, 1080, my_raw_pixels[0..], .bgra32);
// Do something with your image
</code>
}
```
Use image format directly
In the case you want more direct access to the image format, all the image formats are accessible from the <code>zigimg</code> module. However, you'll need to do a bit more manual steps in order to retrieve the pixel data.
```zig
const std = @import("std");
const zigimg = @import("zigimg");
pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
defer _ = gpa.deinit();
<code>const allocator = gpa.allocator();
const image_data = @embedFile("windows_rgba_v5.bmp");
var stream_source = std.io.StreamSource{ .const_buffer = std.io.fixedBufferStream(image_data) };
var bmp = zigimg.formats.bmp.BMP{};
const pixels = try bmp.read(allocator, &stream_source);
defer pixels.deinit(allocator);
std.log.info("BMP info header: {}", .{bmp.info_header});
</code>
}
```
For the curious, the program above generate the following output:
<code>info: BMP info header: src.formats.bmp.BitmapInfoHeader{ .v5 = src.formats.bmp.BitmapInfoHeaderV5{ .header_size = 124, .width = 240, .height = 160, .color_plane = 1, .bit_count = 32, .compression_method = src.formats.bmp.CompressionMethod.bitfields, .image_raw_size = 153600, .horizontal_resolution = 2835, .vertical_resolution = 2835, .palette_size = 0, .important_colors = 0, .red_mask = 16711680, .green_mask = 65280, .blue_mask = 255, .alpha_mask = 4278190080, .color_space = src.formats.bmp.BitmapColorSpace.srgb, .cie_end_points = src.formats.bmp.CieXyzTriple{ .red = src.formats.bmp.CieXyz{ ... }, .green = src.formats.bmp.CieXyz{ ... }, .blue = src.formats.bmp.CieXyz{ ... } }, .gamma_red = 0, .gamma_green = 0, .gamma_blue = 0, .intent = src.formats.bmp.BitmapIntent.graphics, .profile_data = 0, .profile_size = 0, .reserved = 0 } }</code>
Convert between pixel formats
You can use <code>Image.convert()</code> to convert between pixel formats. It will allocate the new pixel data and free the old one for you. It supports conversion from and to any pixel format. When converting down to indexed format, no dithering is done.
```zig
pub fn example() !void {
// [...]
// Assuming you already have an image loaded
<code>try image.convert(.float32);
</code>
}
```
PixelFormatConverter
If you prefer, you can use <code>PixelFormatConverter</code> directly.
```zig
pub fn example(allocator: std.mem.Allocator) !void {
const indexed2_pixels = try zigimg.color.PixelStorage.init(allocator, .indexed2, 4);
defer indexed2_pixels.deinit(allocator);
<code>// [...] Setup your indexed2 pixel data
const bgr24_pixels = try zigimg.PixelFormatConverter.convert(allocator, &indexed2_pixels, .bgr24);
defer bgr24_pixels.deinit(allocator);
</code>
}
```
OctTreeQuantizer
If you prefer more granular control to create an indexed image, you can use the <code>OctTreeQuantizer</code> directly.
```zig
pub fn example(allocator: std.mem.Allocator) !void {
const image_data = @embedFile("windows_rgba_v5.bmp");
<code>var image = try zigimg.Image.fromMemory(allocator, image_data[0..]);
defer image.deinit();
var quantizer = zigimg.OctTreeQuantizer.init(allocator);
defer quantizer.deinit();
var color_it = image.iterator();
while (color_it.next()) |pixel| {
try quantizer.addColor(pixel);
}
var palette_storage: [256]zigimg.color.Rgba32 = undefined;
const palette = quantizer.makePalette(255, palette_storage[0..]);
const palette_index = try quantizer.getPaletteIndex(zigimg.color.Rgba32.initRgba(110, 0, 0, 255));
</code>
}
```
Get a color from a HTML hex string
You can get a color from a HTML hex string. The alpha component is always last. It also supports the shorthand version.
```zig
pub fn example() !void {
const rgb24 = try zigimg.color.Rgb24.fromHtmlHex("#123499");
const rgba32 = try zigimg.color.Rgba32.fromHtmlHex("FF000045");
<code>const red_rgb24 = try zigimg.color.Rgb24.fromHtmlHex("#F00");
const blue_rgba32 = try zigimg.clor.Rgba32.fromHtmlHex("#00FA");
</code>
}
```
Predefined colors
You can access predefined colors for any pixel format using <code>Colors()</code>.
```zig
const std = @import("std");
const zigimg = @import("zigimg");
pub fn main() !void {
const red_float32 = zigimg.Colors(zigimg.color.Colorf32).Red;
const blue_rgb24 = zigimg.Colors(zigimg.color.Rgb24).Blue;
}
```
Color management & color space
While zigimg does not support ICC profile yet (see #36) it does support a variety of color models and color spaces. All color space and color model are done in 32-bit floating point. So if you are not using <code>Colorf32</code> / <code>float32</code> as your pixel format, you'll need to convert to that format first.
The following device-dependent color model are supported:
* HSL (Hue, Saturation, Luminance)
* HSV (Hue, Saturation, Value) or also known as HSB (Hue, Saturation, Brightness)
* CMYK (Cyan-Magenta-Yellow-Black)
The following device-inpendent color spaces are supported, with or without alpha:
* CIE XYZ
* CIE Lab
* CIE LCh(ab), the cylindral representation of CIE Lab
* CIE Luv
* CIE LCh(uv), the cylindral representation of CIE Luv
* <a>HSLuv</a>, a HSL representation of CIE LCh(uv) which is a cylindrical representation of CIE Luv color space
* <a>Oklab</a>
* Oklch, the cylindrical representation of Oklab
Convert between linear and gamma-corrected color
All color space transformation are done assuming a linear version of the color. To convert between gamma-converted and linear, you need to use any RGB colorspace and then call <code>toGamma()</code> or <code>toLinear()</code>, in this example I'm using both <code>sRGB</code> and <code>BT709</code> (aka Rec.709).
You can use either the accurate version or the fast version. For example the sRGB transfer function is linear below a threshold and an exponent curve above the threshold but the fast version will use the approximate exponent curve for the whole range.
```zig
pub fn example(linear_color: zigimg.color.Colorf32) {
const gamma_srgb = zigimg.color.sRGB.toGamma(linear_color);
const gamma_bt709 = zigimg.color.BT709.toGammaFast(linear_color);
<code>const linear_srgb = zigimg.color.sRGB.toLinearFast(gamma_srgb);
const linear_bt709 = zigimg.color.BT709.toLinear(gamma_bt609);
</code>
}
```
Convert a single color to a different color space
To convert to a device independant color space, you need first to use a reference RGB color space. Usually the most common for computer purposes is <code>sRGB</code>. Then each RGB colorspace has functions to convert from and to various color spaces. They support both non-alpha and alpha of the color space.
To a color space:
<code>zig
pub fn example(linear_color: zigimg.color.Colorf32) void {
const xyz = zigimg.color.sRGB.toXYZ(linear_color);
const lab_alpha = zigimg.color.sRGB.toLabAlpha(linear_color);
const lch_ab = zigimg.color.sRGB.toLCHab(linear_color);
const luv_alpha = zigimg.color.sRGB.toLuvAlpha(linear_color);
const lch_uv = zigimg.color.sRGB.toLCHuv(linear_color);
const hsluv = zigimg.color.sRGB.toHSLuv(linear_color);
const oklab = zigimg.color.sRGB.toOklab(linear_color);
const oklch = zigimg.color.sRGB.toOkLCh(linear_color);
}</code>
When converting from a color space to a RGB color space, you need to specify if you want the color to be clamped inside the RGB colorspace or not because the resulting color could be outside of the RGB color space.
<code>zig
pub fn example(oklab: zigimg.color.Oklab) {
const linear_srgb_clamped = zigimg.color.sRGB.fromOklab(oklab, .clamp);
const linear_srgb = zigimg.color.sRGB.fromOklab(oklab, .none);
}</code>
Convert a slice of color to a different color space
Converting each pixel individually will be tedious if you want to use image processing on the CPU. Almost all color space conversion offer
an slice in-place conversion or a slice copy conversion. The in-place will reuse the same memory but interpret the color data differently. When you are conversion from a color space to a RGB color space, you need to specify if you want clamping or not.
Those conversions are only available with the alpha version of each color space.
```zig
pub fn exampleInPlace(linear_srgb_image: []zigimg.color.Colorf32) void {
const slice_lab_alpha = zigimg.color.sRGB.sliceToLabAlphaInPlace(linear_srgb_image);
<code>// Do your image manipulation in CIE L*a*b*
// Convert back to linear sRGB
_ = zigimg.color.sRGB.sliceFromLabAlphaInPlace(slice_lab_alpha, .clamp);
// or without clamping
_ = zigimg.color.sRGB.sliceFromLabAlphaInPlace(slice_lab_alpha, .none);
</code>
}
pub fn exampleCopy(allocator: std.mem.Allocator, linear_srgb_image: []const zigimg.color.Colorf32) ![]zigimg.color.Colorf32 {
const slice_oklab_alpha = try zigimg.color.sRGB.sliceToOklabCopy(allocator, linear_srgb_image);
<code>// Do your image manipulatioon in Oklab
// Convert back to linear sRGB
return try zigimg.color.sRGB.sliceFromOklabCopy(allocator, slice_oklab_alpha, .clamp);
// Or without clamping
return try zigimg.color.sRGB.sliceFromOklabCopy(allocator, slice_oklab_alpha, .none);
</code>
}
```
Convert between some cylindrical representation
CIE Lab, CIE Luv and Oklab have cylindrical representation of their color space, each color has functions to convert from and to the cylindrical version.
```zig
pub fn example() void {
const lab = zigimg.color.CIELab{ .l = 0.12, .a = -0.23, .b = 0.56 };
const luv_alpha = zigimg.color.CIELuvAlpha { .l = 0.4, .u = 0.5, .v = -0.2, .alpha = 0.8 };
const oklab = zigimg.color.Oklab{ .l = 0.67, .a = 0.1, .b = 0.56 };
<code>const lch_ab = lab.toLCHab();
const lch_uv_alpha = luv_alpha.toLCHuvAlpha();
const oklch = oklab.toOkLCh();
const result_lab = lch_ab.toLab();
const result_luv_alpha = lch_uv_alpha.toLuvAlpha();
const result_oklab = oklch.toOklab();
</code>
}
```
Convert color between RGB color spaces
To convert a single color, use the <code>convertColor()</code> function on the <code>RgbColorspace</code> struct:
<code>zig
pub fn example(linear_color: zigimg.color.Colorf32) void {
const pro_photo_color = zigimg.color.sRGB.convertColor(zigimg.color.ProPhotoRGB, linear_color);
}</code>
If you want to convert a whole slice of pixels, use <code>convertColors()</code>, it will apply the conversion in-place:
<code>zig
pub fn example(linear_image: []zigimg.color.Colorf32) void {
const adobe_image = zigimg.color.sRGB.convertColors(zigimg.color.AdobeRGB, linear_image);
}</code>
If the target RGB colorspace have a different white point, it will do the <a>chromatic adapdation</a> for you using the Bradford method.
Predefined RGB color spaces
Here the list of predefined RGB color spaces, all accessible from <code>zigimg.color</code> struct:
<ul>
<li><code>BT601_NTSC</code></li>
<li><code>BT601_PAL</code></li>
<li><code>BT709</code></li>
<li><code>sRGB</code></li>
<li><code>DCIP3.Display</code></li>
<li><code>DCIP3.Theater</code></li>
<li><code>DCIP3.ACES</code></li>
<li><code>BT2020</code></li>
<li><code>AdobeRGB</code></li>
<li><code>AdobeWideGamutRGB</code></li>
<li><code>ProPhotoRGB</code></li>
</ul>
Predefined white points
All predefined white point are accessed with <code>zigimg.color.WhitePoints</code>. All the standard illuminants are defined there.
Create your own RGB color space
You can create your own RGB color space using <code>zigimg.color.RgbColorspace.init()</code>. Each coordinate is in the 2D version of the CIE xyY color space.
If you don't care about linear and gamma conversion, just ignore those functions in the init struct.
```zig
fn myColorSpaceToGamma(value: f32) f32 {
return std.math.pow(f32, value, 1.0 / 2.4);
}
fn myColorSpaceToLinear(value: f32) f32 {
return std.math.pow(f32, value, 2.4);
}
pub fn example() void {
pub const my_color_space = zigimg.color.RgbColorspace.init(.{
.red = .{ .x = 0.6400, .y = 0.3300 },
.green = .{ .x = 0.3000, .y = 0.6000 },
.blue = .{ .x = 0.1500, .y = 0.0600 },
.white = zigimg.color.WhitePoints.D50,
.to_gamma = myColorSpaceToGamma,
.to_gamma_fast = myColorSpaceToGamma,
.to_linear = myColorSpaceToLinear,
.to_linear_fast = myColorSpaceToLinear,
});
}
``` | [
"https://github.com/ATTron/astroz",
"https://github.com/Harry-Heath/micro",
"https://github.com/Khitiara/imaginarium",
"https://github.com/PhantomUIx/core",
"https://github.com/SinclaM/ray-tracer-challenge",
"https://github.com/capy-ui/capy",
"https://github.com/chadwain/zss",
"https://github.com/deckarep/CosmicInvaders",
"https://github.com/griush/CoreX",
"https://github.com/hexops/mach",
"https://github.com/ndrean/mandelbrot",
"https://github.com/nfginola/vk-zig",
"https://github.com/rockorager/libvaxis",
"https://github.com/zenith391/Stella-Dei"
]
|
https://avatars.githubusercontent.com/u/475362?v=4 | polygon_coverage_planning | ethz-asl/polygon_coverage_planning | 2019-04-10T15:35:33Z | Coverage planning in general polygons with holes. | master | 14 | 585 | 163 | 585 | https://api.github.com/repos/ethz-asl/polygon_coverage_planning/tags | GPL-3.0 | [
"boustrophedon",
"cleaning",
"coverage",
"drone",
"mapping",
"mav",
"navigation",
"obstacles",
"path",
"photogrammetry",
"planning",
"polygon",
"robotics",
"ros",
"uav",
"zag",
"zig"
]
| 1,172 | false | 2025-05-21T05:45:51Z | false | false | unknown | github | []
| polygon_coverage_planning
This package contains implementations to compute coverage patterns and shortest paths in general polygon with holes.
Please cite our <a>accompanying publication</a> when using it.
<code>Bähnemann, Rik, et al.
"Revisiting boustrophedon coverage path planning as a generalized traveling salesman problem."
Field and Service Robotics. Springer, Singapore, 2021.</code>
<a>Watch the application video</a>:
<a></a>
Installation on Ubuntu 20.04 and ROS noetic
Install <a>ROS noetic</a>.
Install <a>mono</a>.
Create a workspace and download the package.
<code>cd ~
mkdir -p catkin_ws/src
cd catkin_ws
catkin init
catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release
catkin config --extend /opt/ros/noetic
cd src
git clone [email protected]:ethz-asl/polygon_coverage_planning.git</code>
Install all <a>remaining dependencies</a>:
<code>cd polygon_coverage_planning/install
./prepare-jenkins-slave.sh</code>
Finally, build the workspace.
<code>catkin build</code>
Getting Started
The package has a ROS interface for shortest path planning and coverage planning.
First source your workspace to execute any of the nodes.
<code>source ~/catkin_ws/devel/setup.bash</code>
Coverage Planning
<code>roslaunch polygon_coverage_ros coverage_planner.launch</code>
The polygon can be set via
- ROS <a>service</a> call <code>rosservice call /coverage_planner/set_polygon</code>
- ROS <a>parameter</a> <code>/coverage_planner/polygon</code> or
- RVIZ Polygon Tool as in the video above.
The plan is generated via
- ROS <a>service</a> call <code>rosservice call /coverage_planner/plan_path</code> or
- clicking start and goal points using the RVIZ clicked_point tool as in the video above.
The resulting waypointlist is published as <a>geometry_msgs/PoseArray</a> on topic <code>/waypoint_list</code>.
To publish the waypoint list
- call <code>rosservice call /coverage_planner/publish_path_points</code> or
- set <code>publish_plan_on_planning_complete: true</code> in <a>coverage.yaml</a>
Euclidean Shortest Path Planning
<code>roslaunch polygon_coverage_ros shortest_path_planner.launch</code>
Setting the polygon and planning the path is the same as for Coverage Planning.
Licensing
This repository is subject to GNU General Public License version 3 or later due to its dependencies.
CGAL dependencies
The underlying (exact) geometric operations rely on <a>CGAL 5.0.3</a> which is restricted by GNU General Public License version 3 or later.
In particular the dependencies are:
- Algebraic Foundations (LGPL)
- 2D and 3D Linear Geometry Kernel (LPGL)
- 2D Polygon (LPGL)
- Geometric Object Generators (LPGL)
- STL Extensions (LGPL)
- 2D Triangulation (GPL)
- 2D Regularized Boolean Set-Operations (GPL)
- 2D Straight Skeleton and Polygon Offsetting (GPL)
- 2D Arrangement (GPL), see also
<code>Fogel, Efi, Dan Halperin, and Ron Wein. CGAL arrangements and their applications: A step-by-step guide. Vol. 7. Springer Science & Business Media, 2012.</code>
<code>Bungiu, Francisc, et al. "Efficient computation of visibility polygons." arXiv preprint arXiv:1403.3905 (2014).</code>
GTSP solver
The underlying optimization uses the <a>memetic solver</a> presented in
<code>Gutin, Gregory, and Daniel Karapetyan.
"A memetic algorithm for the generalized traveling salesman problem."
Natural Computing 9.1 (2010): 47-60.</code>
It is free of charge for non-commercial purposes only. | []
|
https://avatars.githubusercontent.com/u/45520026?v=4 | zap | kprotty/zap | 2019-07-23T16:50:25Z | An asynchronous runtime with a focus on performance and resource efficiency. | blog | 2 | 519 | 20 | 519 | https://api.github.com/repos/kprotty/zap/tags | MIT | [
"asynchronous",
"io",
"networking",
"performance",
"runtime",
"rust",
"scheduler",
"unix",
"windows",
"zig"
]
| 8,598 | false | 2025-05-20T21:56:51Z | false | false | unknown | github | []
| zap <a></a> <a></a>
A collection of resource efficient tools for writing scalable software.
Design Goals
This project explicitly makes an effort to optimize for resource efficiency and customizability when possible as opposed to the more standard goal of performance and ease of use. This has two simultaneous, but sometimes conflicting, meanings:
<ul>
<li>In order to achieve resource efficiency, maximum performance or ease of use may be sacrificed when reasonable.</li>
<li>Optimizing for resource efficiency should not completely neglect performance and ease of use as these are practically important.</li>
</ul>
The term "resource efficiency" here refers to using the least amount of system resources (i.e. Compute, Memory, IO, etc.) to achieve similar functionality. This often includes tricks such as caching computed values, using special CPU instructions, favoring intrusively provided memory and amortizing synchronization or syscalls.
Aligning with the <a>Zen of Ziglang</a>, this should aid in easing the ability to program software which utilizes the hardware better on average than before.
License
Licensed under either of <a>Apache License, Version
2.0</a> or <a>MIT license</a> at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in this crate by you, as defined in the Apache-2.0 license, shall
be dual licensed as above, without any additional terms or conditions.
| []
|
https://avatars.githubusercontent.com/u/14085211?v=4 | Reia | Quaint-Studios/Reia | 2019-11-10T03:11:24Z | RPG game action-adventure MMO built with Godot, Rust, and Zig. | master | 11 | 446 | 21 | 446 | https://api.github.com/repos/Quaint-Studios/Reia/tags | AGPL-3.0 | [
"3d",
"3d-game",
"action-game",
"adventure",
"crossplatform",
"desktop",
"fantasy",
"game",
"godot",
"godot4",
"mmo",
"mmorpg",
"mobile-game",
"multiplayer",
"rpg",
"rust-game",
"singleplayer",
"story",
"video-game",
"zig"
]
| 759,543 | false | 2025-05-22T02:26:21Z | false | false | unknown | github | []
| <a></a>
<a></a>
<a></a>
Reia
Explore endless worlds and embark on a magical adventure of a lifetime! Reia is an action-adventure RPG, also open-source. Play offline or online with friends, or login for an MMO experience! Create and explore worlds, manage your own economy and products, and restore Reia's world via the story. Choose the way you want to play.
Info
<blockquote>
<strong>Website:</strong> Visit the website over at <a>https://www.playreia.com</a>.
<strong>Discord:</strong> Our Discord server is now finally more open! <a>Join our Discord now</a>. ❤️
<strong>Sustenet:</strong> Visit <a>https://github.com/Quaint-Studios/Sustenet</a> to see the netcode designed specifically for this project and made in Rust & Zig.
<strong>Jobs:</strong> Check out the list of <a>jobs</a> for this project. You can also visit the <a>jobs page</a> on our website to learn more information.
</blockquote>
Table of Contents
<ol>
<li><a>Roadmap</a></li>
<li><a>Contributing</a></li>
<li><a>About this Project</a>
<ol>
<li><a>Overview</a></li>
<li><a>Play the way you want</a></li>
<li><a>Why this project was created</a></li>
<li><a>Lore</a>
<ol>
<li><a>Realms</a></li>
<li><a>Combat Statuses</a></li>
<li><a>Ascension</a></li>
<li><a>Rough Story</a></li>
</ol>
</li>
<li><a>Gameplay</a>
<ol>
<li><a>Overview</a></li>
</ol>
</li>
</ol>
</li>
<li><a>FAQs</a></li>
</ol>
Contributing
If there's anything in the <a>Roadmap</a> you want to work on then here's how you can help.
<ol>
<li>Create an issue specifically for that task.</li>
<li>Fork the repository.</li>
<li>
Create a branch with the following format:
<ul>
<li>❌ makosai</li>
<li>❌ makosai/change-the-layout-of-buttons</li>
<li>✔️ makosai/main-menu</li>
<li>✔️ makosai/keybindings</li>
<li>✔️ makosai/multiplayer</li>
<li>✔️ makosai/art</li>
</ul>
<blockquote>
<strong>a.</strong> Your username/the-root-focus where the root focus is something that you could build upon in the future.
<strong>b.</strong> You can add more art, you can improve the multiplayer, there will sometimes be more keybindings, and the main-menu may change over time.
<strong>c.</strong> It shouldn't be overly specific either.
3. Follow the existing commit patterns:
- ❌ fix the attack state
- ❌ Fixed the attack state
- ❌ Fix the attack state (missing period)
- ✔️ Fix the attack state.
- ✔️ Update the Main Menu UI.
- ✔️ Change the player speed.
- ✔️ Read the player position on load.
- ✔️ Remove the ability to walk.
The length of the commit doesn't matter. Just don't go overboard. If it's a long commit the summarize it and then put the rest of the information in the description of the commit.
5. Create a pull-request and done!
</blockquote>
</li>
</ol>
About this Project
Overview
Reia is an open-source oRPG where four Ethereals, the deities of this world have a conflict. One of them, their sister, is Reia herself. This universe is a world where magic is capable, that includes your standard elements and more. Every Ethereal can create their own realm, what would be the equivalent of a giant planet that continues to grow in size as they consume ether from their surroundings & other realms. Player-owned floating islands, raids of varying sizes (even server-wide raids), Bosses, PvP zones, and custom mini-games!
Play the way you want
We want you to be able to focus on whatever sort of content you choose to. Whether that's the story, the combat, playing or the economy and getting rich. And it doesn't end there. Customize your own Island, explore Infinite Dungeons, and do so much more! That's the vision.
Why this project was created
One of the main reasons why this project exists is to provide you with a game that you can have fun in. Another reason is a way to get myself outside of my 20 years of experience in programming. Migrating from Unity into Godot head first was definitely an experience. And making shaders, scripts, and art have all been an enjoyable process in the Godot engine. I'll have to say, going forward will be a fun ride. Wish both me and this project luck! And be sure to check out the <a>website</a>.
Lore
Realms
In this world are the Ethereals. These entities are the equivalent of deities. They create their own realms and govern them according to their unique gifts. When a realm is created, the Ethereal that rules over it can use the energy within the realm to form occupants. These occupants can become anything; mindless zombies or being of free will -- including a love or hate for their creator.
Combat Statuses
A realm can be ruled in several ways at this stage; neutrally, passively, aggressively, and defensively. This determines how fast the realm will grow.
In a neutral realm, the Ethereal keeps their size as is. This prevents them from growing rapidly. But, it's not impossible. The realm can still grow by absorbing pure ether from the void, an area of emptiness between realms.
A passive realm will passively take energy from both the void and neighboring realms. Both of these options are still slow. This still poses some risk. Taking from other realms is considered hostile and can spark wars. Compared to taking ether from the void, siphoning from neighboring realms is much faster but still slow.
An aggressive realm is one that actively attacks other realms. When realms are at war with each other, they can send invasions. Ether can be stole from the realm itself, occupants, and directly from the Ethereal when at war. This can result in killing an Ethereal.
There's an instance where a realm may be under attack by an aggressive realm. This realm can take a defensive stance where any invader can have their occupants taken in as food, absorbing their ether and making the Ethereal's realm stronger.
But there's another way that doesn't involve any conflicts. Instead, it involves collaboration. Ethereals can choose to merge. Thsi s where two Ethereals come to an agreement for cohabitation. Their realms merge and they become one being. Their consciousness' are still separate and they can always split their body. But they are now existing as one being. A single Ethereal. Just 3 times as strong. Their abilities increase this much as a result of the merge itself, it ends up pulling in more ether, increasing their power in the process.
Realm States
A realm has four states: faulted, normal, stimulated, and ascended. These determine how much the realm has matured via absorbing ether. A faulted state is a realm that is below the average strength. Normal realms are those that have naturally grown larger by absorbing the empty space around it. It factors in age. A stimulated realm is one that has chosen a path that accelerates its growth, such as attacking or defending. Lastly, an ascended realm is one that has been stimulated enough to have two times as much ether equal to that of their normal state.
Ascension
When a realm ascends, a phenomenon occurs. Two, four during a merge, new occupants are created in that realm and become Ethereals. These occupants will have free will, no matter what. These new Ethereals eventually take on a physical shape. The form they take on is typically a humanoid one. But it's not an explicit decision. Nor is it a permanent one. It's a preference and identity.
Each newborn Ethereal will have a unique power at birth but can still use ether to perform basic elemental <em>magic</em>.
Once the children become teenagers, aging every 100 years, or a rate of 1:100, they're taught how to make their own realms. They aren't particularly age-restricted in this process. But their energy to do so is usually enough at this stage. A prodigy could make a realm at birth. <em>Much like how a 2 year old could be the world's greatest mathematician.</em> Ridiculously unlikely, but not entirely impossible!
Once the children make their own realm, they move out of their parents' realm and transfer to their new home. At this point, they can make their own choices on how they'd like to govern. This includes how they choose to grow their realms & what type of occupants they may have.
Rough Story
The game instantly throws the player in an intense situation. Once they login for the first time, they're presented with a "Delve into the deep..." button that pulses and a "Sleep for a while longer." button. Immediately, this lets you know that your choices changes your outcome.
Sleeping for a while longer just allows the player to play as Reia and view how she interacted with her realm's occupants. It also depicts how much they loved and worshiped her. There's no conflict during this timeline. It's just extra story.
Delving into the deep starts the Nightmare of Reia. Reia, much like in the initial login view, is posted up on a hill. The player zooms into her, getting into the standard 3rd person perspective. They player will also be allowed to use all of Reia's abilities. Giving them her full arsenal. But the skill bar will only have a limited amount of abilities. Changing abilities is possible, but not something told to the player since they have no real need for it. The sky turns dark and a fleet of enemy occupants can be seen raining down from the sky. They seem like small meteors. But when a larger one lands, along with a large tower crashing down, she knows what's happening. She's being invaded by one of her siblings.
After the player finishes fending off the invasion, the vision backs out, a clock can be seen, it spins forward in time, it zooms in again, Reia can be seen fighting ferociously, time speeds up again, Reia can be seen in her crystal, it zooms out and the player wakes up in 1st person. They're panting, get out of bed, and walk up to a mirror where character customization now happens.
It should be noted that every outcome can be replayed and alternate choices can be played through without creating a new account. But, in reality, you're still stuck with your real choices. This process is just to allow you to experience alternate possibilities and unlock items from them as well.
Gameplay
Overview
You play as an occupant of Reia's realm. One of your main tasks is to find spirits that are fragments of Reia. They possess unique elements and can be leveled up. Your individual levels and your spirit level are separate. But your individual levels can have an impact on your spirit form. There are player-owned floating islands where you can customize them & govern them with trainable NPCs. Upgradeable gear with replacable parts is also a feature for versaility in combat. Players can sell books, music, and in-game goods (skins) in a marketplace. This allows people to have a way to creatively express themselves and gives their island a way to act as an actual store. There are endless open-world areas that are procedurally generated. Puzzles and mini-games are also included, with mini-games potentially being player-created. Day night cycles & regions means that certain cities will have different time zones. This overview is very roughly written, but more will be added eventually.
FAQs
What's the progress on Reia?
<ol>
<li>
What's left to do?
We actually have a <a>roadmap</a>! It's taking time because it's self-funded so we can give it the love and passion it deserves.
</li>
<li>
What features are currently being developed?
Oh, where do I start?
How about the not-so-technical stuff first. We're working on designing new locations for you to explore, drawing pretty art with awesome colors to make you drool, a Map system, a new UI system, and a custom quest system so you get intricate questing much like <em>Old School Runescape</em> and other great titles!
Now for the slightly technical side of things -- our tech stack! We're using Godot-Zig to prepare ourselves for high-performant situations, we're designing our our own <a>networking solution</a>, we're working on implementing Turso into Zig so we can support Databases both offline and offline, we're also developing and contributing to Godot Supabase for authentication. And obviously, GDScript for the bulk of the game!
</li>
<li>
Are there upcoming alpha or beta tests?
Yep! There's no date yet. But you can <a>subscribe</a> to our newsletter to get notified. We know how annoying emails can get. So you can always decide what you want to hear and how frequent! We respect that.
</li>
<li>
Are there any planned expansions or DLCs?
Ooo... This is something we're excited about. We obviously want to monitize the game but we also want the barrier for entry to be low. You can read more about it in our <a>Monetization README</a>.
How is multiplayer and singleplayer handled in Reia?
<ol>
<li>Will this be online or offline?</li>
</ol>
Reia will be both! You have three options:
<ul>
<li>Play on the main server with your friends and family, leveling up and questing together or on your own.</li>
<li>Adventure solo, enjoying an offline experience. Start a brand new character locally or clone your online character to your computer, continuing solo.</li>
<li>Use your local characters to host your own private server, playing with a small group of friends. Or join existing private servers to try out modded versions of the game.</li>
</ul>
</li>
<li>
If I migrate my online character to my local machine, can I migrate it back online?
Sadly, no. And there's a good reason for this. Once the character is on your local machine, you're free to edit your currency and many other things. This means you're free to cheat. Go ahead! Just do it locally. Have fun.
</li>
<li>
Will migrating from online to offline delete my online character?
No. While it's a one-way migration, the migration doesn't delete your online character. So you can take your online progress to offline mode but you can't take your offline progress back to the main online game.
</li>
<li>
Can I use my offline characters on all private servers?
Private servers are just like the official servers. They can choose whether to force you to use a character that has only ever been online on either their server or the main servers, one that's only ever been on their servers alone, or they can allow all types of characters.
</li>
</ol>
How will mods work in Reia?
<ol>
<li>
What type of mods are there?
There are two types of mods: Server and Local. Just keep in mind when you're playing offline, you are the server. But there are different categories.
</li>
<li>
So what are the cetegories of mods?
<strong>Gameplay Mods</strong> (Server): These mods can alter game mechanics, add new features, or change existing ones. Examples include altered combat systems, harder or easier content, additional minigames, or new events.
<strong>Visual Mods</strong> (Server, Local): This can These mods focus on the aesthetics of the game. They can include new character skins, improved textures, custom animations, and enhanced visual effects.
<strong>Content Mods</strong> (Server): These mods add new content to the game, such as new characters, items, weapons, and locations. They can also include new storylines, quests, or expansions to the existing game world.
<strong>Quality of Life Mods</strong> (Server): These mods aim to improve the overall user experience by adding features like better inventory management, enhanced user interfaces, or tracking tools.
<strong>Utility Mods</strong> (Local): These mods provide additional tools and functionalities, such as mod management systems, debugging tools, or performance optimizers.
<strong>Sound Mods</strong> (Server, Local): These mods can change or enhance the game's audio, including new soundtracks, sound effects, or voiceovers.
<blockquote>
<em>This entire mod section is still in progress. So some things may be added and removed. Like a category for lore or other things.</em>
</blockquote>
</li>
<li>
How do I install mods in Reia?
You can do so via our <a>Mod.io</a> page or in-game since we integrate Mod.io in the Godot Engine too! It's still under construction so you'll have to login to access it.
</li>
<li>
Are there any restrictions on the type of mods I can use?
As of right now, no. But, there are some smart people out there. I'm sure someone will find something that needs a rule. Other than that, have fun with the mods. They're locked down in a way that we try not to make them influence other people's gameplay too much.
</li>
<li>
Are theyre any restrictions on the type of modes I can submit?
Nothing explicit and nothing that infringes on someone else's copyrights. That should cover everything. But, just like the previous question, someone is bound to eventually cause this rule to change.
</li>
<li>
Can mods be used in both online and offline modes?
In the second FAQ item for this section, it covers where you can use each mod type. So yeah, you can use them in those areas!
</li>
</ol> | []
|
https://avatars.githubusercontent.com/u/13424259?v=4 | kernel-zig | jzck/kernel-zig | 2019-05-10T23:12:21Z | :floppy_disk: hobby x86 kernel zig | master | 2 | 430 | 15 | 430 | https://api.github.com/repos/jzck/kernel-zig/tags | - | [
"kernel",
"x86",
"zig"
]
| 175 | false | 2025-04-28T03:27:02Z | true | false | unknown | github | []
| hobby kernel in zig
WARNING: this project was written for zig 0.5, it doesn't compile for future versions
features
<ul>
<li>80x25 frame buffer</li>
<li>ps2 keyboard driver</li>
<li>terminal console</li>
<li>lspci</li>
<li>x86</li>
<li>MMU</li>
<li>interrupts</li>
<li>pit timer</li>
<li>scheduler</li>
<li>time slice preemption with round robin</li>
<li>sleep()</li>
<li>block()/unblock()</li>
<li>Storage</li>
<li>IDE ATA driver (in progress)</li>
</ul>
dependencies
<ul>
<li><a>ziglang</a> 0.5.0</li>
</ul>
compiling
<code>zig build</code> compiles and links the multiboot kernel (without a bootloader)
running
<ul>
<li><code>./qemu.sh start</code></li>
<li><code>./qemu.sh monitor</code></li>
<li><code>./qemu.sh quit</code></li>
<li><code>gdb</code> (see provided <code>.gdbinit</code>)</li>
</ul>
Notes
interrupt call chain
<code>interrupt</code> -> <code>idt[n]</code> -> <code>isrN</code> -> <code>isrDispatch</code> -> <code>handlers[n]</code> (default <code>unhandled()</code>)
References
<ul>
<li>zig microkernel: https://github.com/AndreaOrru/zen</li>
<li>scheduling tutorial: https://wiki.osdev.org/Brendan%27s_Multi-tasking_Tutorial</li>
<li>booting/paging/interrupts: https://os.phil-opp.com/</li>
</ul> | []
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.