avatar_url
stringlengths
47
116
name
stringlengths
1
46
full_name
stringlengths
7
60
created_at
stringdate
2016-04-01 08:17:56
2025-05-20 11:38:17
description
stringlengths
0
387
default_branch
stringclasses
44 values
open_issues
int64
0
4.93k
stargazers_count
int64
0
78.2k
forks_count
int64
0
3.09k
watchers_count
int64
0
78.2k
tags_url
stringlengths
0
94
license
stringclasses
27 values
topics
listlengths
1
20
size
int64
0
4.82M
fork
bool
2 classes
updated_at
stringdate
2018-11-13 14:41:18
2025-05-22 08:23:54
has_build_zig
bool
2 classes
has_build_zig_zon
bool
2 classes
zig_minimum_version
stringclasses
50 values
repo_from
stringclasses
3 values
dependencies
listlengths
0
38
readme_content
stringlengths
0
437k
dependents
listlengths
0
21
https://avatars.githubusercontent.com/u/3405886?v=4
ziglisp
tubo28/ziglisp
2023-08-28T11:08:32Z
A Lisp interpreter written in Zig
main
2
3
1
3
https://api.github.com/repos/tubo28/ziglisp/tags
MIT
[ "zig" ]
1,587
false
2024-08-19T06:48:52Z
true
false
unknown
github
[]
Ziglisp A yet another Lisp interpreter written in Zig. Disclaimer: the author make it for his own learning Zig purposes, so the quality is just that. Usage <ul> <li><code>zig run src/main.zig</code> to start REPL.</li> <li><code>zig run src/main.zig -- src/examples/mergesort.scm</code> to evaluate file.</li> </ul> ``` $ zig run src/main.zig <blockquote> <blockquote> <blockquote> (print '(hello world)) </blockquote> </blockquote> </blockquote> print: (hello world) (hello world) <blockquote> <blockquote> <blockquote> ``` </blockquote> </blockquote> </blockquote> <code>$ cat src/examples/y-comb.scm (let ((f (lambda (fib) (lambda (n) (cond ((= n 0) 0) ((= n 1) 1) (1 (+ (fib (- n 1)) (fib (- n 2)))))))) (y (lambda (f) ((lambda (x) (f (lambda (m) ((x x) m)))) (lambda (x) (f (lambda (m) ((x x) m)))))))) ((y f) 10)) ; The 10th fibonacci number $ zig run src/main.zig -- src/examples/y-comb.scm 55</code> Developed under Zig version 0.12.0-dev.789+e6590fea1. Features Data types <ul> <li>Cons cell</li> <li>Function</li> <li>Number (<code>i64</code>)</li> <li>Symbol (<code>[]const u8</code>)</li> </ul> Built-in functions and special forms Basically respecting <a>R5RS Scheme</a>. <ul> <li>Functions</li> <li><code>*</code></li> <li><code>+</code></li> <li><code>-</code></li> <li><code>&lt;</code></li> <li><code>=</code></li> <li><code>and</code></li> <li><code>car</code></li> <li><code>cdr</code></li> <li><code>cons</code></li> <li><code>list</code></li> <li><code>modulo</code></li> <li><code>null?</code></li> <li><code>or</code></li> <li><code>print</code></li> <li><code>quotient</code></li> <li>Special forms:</li> <li><code>begin</code></li> <li><code>cond</code></li> <li><code>define</code></li> <li><code>if</code></li> <li><code>lambda</code></li> <li><code>let</code></li> <li><code>quote</code></li> </ul> Additionally see <a>builtin.scm</a>. TODOs <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> Lambda. <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> Macro syntax. <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> Represent environment by tree structure. <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> GC. License <a>MIT</a>
[]
https://avatars.githubusercontent.com/u/680789?v=4
tif
rupurt/tif
2023-08-29T01:08:15Z
Lightning fast tabular diffs, patches and merges for larger than memory datasets
main
0
3
0
3
https://api.github.com/repos/rupurt/tif/tags
MIT
[ "csv", "diff", "relational-model", "table-diff", "zig" ]
17
false
2024-12-02T01:18:30Z
true
true
unknown
github
[ { "commit": "f49b94700e0761b7514abdca0e4f0e7f3f938a93.tar.gz", "name": "clap", "tar_url": "https://github.com/Hejsil/zig-clap/archive/f49b94700e0761b7514abdca0e4f0e7f3f938a93.tar.gz.tar.gz", "type": "remote", "url": "https://github.com/Hejsil/zig-clap" } ]
Tif Lightning fast tabular <a>diffs</a>, <a>patches</a> and <a>merges</a> for larger than memory datasets. Usage <code>shell tif test/fixtures/people.csv test/fixtures/people_reverse.csv</code> <code>shell tif [-h] [-r &lt;READBUFFER&gt;] [-c &lt;COLBUFFER&gt;] [-m &lt;MAXCOLUMNS&gt;] &lt;PATH1&gt; &lt;PATH1&gt;</code> ```shell tif -h -h, --help Display this help and exit. <code>-r, --readbuffer &lt;READBUFFER&gt; Number of bytes to use as a buffer. Default: 65536 -c, --colbuffer &lt;COLBUFFER&gt; Number of bytes to use as a column buffer. Default: 4096 -m, --maxcolumns &lt;MAXCOLUMNS&gt; Maximum number of columns in a record. Default: 512 &lt;PATH1&gt; The base path &lt;PATH1&gt; The path to compare </code> ``` How <code>tif</code> produces differences over datasets by generating a <a>literal</a>, <a>logical</a> and <a>physical</a> layer for the given inputs. Diffs are produced according to the <a>Daff tabular diff specification</a>. Development This project assumes you have already <a>installed nix</a> <ol> <li>Start a Nix devshell</li> </ol> <code>shell nix develop -c $SHELL</code> <ol> <li>Build and run with the zig toolchain</li> </ol> <code>shell zig build run -- test/fixtures/people.csv test/fixtures/people_reverse.csv</code> License <code>tif</code> is released under the <a>MIT license</a>
[]
https://avatars.githubusercontent.com/u/2567177?v=4
biscuit-zig
malcolmstill/biscuit-zig
2023-09-27T23:45:58Z
Biscuit implementation for zig
master
0
3
0
3
https://api.github.com/repos/malcolmstill/biscuit-zig/tags
Apache-2.0
[ "zig", "zig-package" ]
143
false
2024-11-16T15:02:57Z
false
false
unknown
github
[]
biscuit-zig <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> The implementation is WIP and should not be used in production </blockquote> Zig implementation of https://www.biscuitsec.org/ Usage Authorizing a token ```zig var biscuit = try Biscuit.fromBytes(allocator, token, root_public_key); defer biscuit.deinit(); var authorizer = try biscuit.authorizer(); defer authorizer.deinit(); var errors = std.ArrayList(AuthorizerError).init(allocator); defer errors.deinit(); try authorizer.authorize(&amp;errors); ``` Attenuating a token ```zig var biscuit = try Biscuit.fromBytes(allocator, token, root_public_key); defer biscuit.deinit(); var authorizer = try biscuit.authorizer(); defer authorizer.deinit(); var errors = std.ArrayList(AuthorizerError).init(allocator); defer errors.deinit(); try authorizer.authorize(&amp;errors); ```
[]
https://avatars.githubusercontent.com/u/43040593?v=4
sillylisp
dantecatalfamo/sillylisp
2023-09-24T20:25:23Z
A sort-of-a-lisp extracted from a previous project.
master
0
3
1
3
https://api.github.com/repos/dantecatalfamo/sillylisp/tags
MIT
[ "config", "configuration-language", "lisp", "zig" ]
15
false
2024-10-06T17:26:05Z
true
false
unknown
github
[]
sillylisp A sort-of-a-lisp extracted from a previous project. Originally intended to be used as a configuration language. Designed to be easy to grok and fast. It doesn't have a garbage collector but instead frees everything when the environment is destroyed. Uses lists instead of cons cells internally. Supports lambdas, special forms, recursion, debugging, tracing, defining functions and variables, etc. Building <code>zig zig build</code> Running <code>zig zig build run</code> This will open an interactive REPL. Usage ```zig const std = @import("std"); const environment = @import("environment.zig"); pub fn main() !void { var gpa = std.heap.GeneralPurposeAllocator(.{ .enable_memory_limit = true }){}; var allocator = gpa.allocator(); const stdin = std.io.getStdIn().reader(); const stdout = std.io.getStdOut().writer(); var env = try environment.Environment.init(allocator); defer env.deinit(); <code>var expression = "(+ 1 2 3)" const result = try env.load(expression); try result.toString(stdout); try stdout.print("\n", .{}); </code> } ```
[]
https://avatars.githubusercontent.com/u/24609692?v=4
llvm-ir-zig
seyhajin/llvm-ir-zig
2024-01-19T22:42:06Z
🚀 A minimal example to create and execute a LLVM IR module in Zig.
master
0
3
0
3
https://api.github.com/repos/seyhajin/llvm-ir-zig/tags
MIT
[ "linux", "llvm", "llvm-ir", "macos", "windows", "zig", "zig-package" ]
4
false
2024-11-09T09:43:49Z
true
false
unknown
github
[]
LLVM IR module in Zig A minimal example to create and execute a LLVM IR module in Zig. Install First of all, you need to install <a>LLVM</a> and <a>Zig</a> according to your system. Windows with <a>Scoop</a> <code>batch scoop install llvm zig</code> <blockquote> <span class="bg-yellow-100 text-yellow-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-yellow-900 dark:text-yellow-300">WARNING</span> untested </blockquote> with <a>Chocolatey</a> <code>batch choco install llvm zig</code> <blockquote> <span class="bg-yellow-100 text-yellow-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-yellow-900 dark:text-yellow-300">WARNING</span> untested </blockquote> Linux <code>batch apt-get install llvm zig</code> <blockquote> <span class="bg-yellow-100 text-yellow-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-yellow-900 dark:text-yellow-300">WARNING</span> untested </blockquote> MacOS with <a>Homebrew</a> <code>bash brew install llvm zig</code> <blockquote> [!TIP] Tested successfully with LLVM 17.0.6 and Zig 0.11+. </blockquote> Clone <code>bash git clone https://github.com/seyhajin/llvm-ir-zig</code> Alternatively, download <a>zip</a> from Github repository and extract wherever you want. Build &amp; Run <blockquote> <span class="bg-blue-100 text-blue-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-blue-900 dark:text-blue-300">NOTE</span> For simplicity, the program uses LLVM's dynamic libraries installed in your environment. </blockquote> Build and run program : <code>bash zig build run</code> <strong>Output:</strong> <code>Hello, world! sum(2, 3)=5</code> LLVM IR Module LLVM IR module equivalent of: ```C int sum(int a, int b) { return a + b; } void main() { printf("Hello, world!\nsum(2, 3)=%d\n", sum(2, 3)); } ```
[]
https://avatars.githubusercontent.com/u/29401356?v=4
zig-brainfuck
Lancern/zig-brainfuck
2024-02-08T07:40:19Z
Brainfuck JIT interpreter written in Zig
master
0
3
0
3
https://api.github.com/repos/Lancern/zig-brainfuck/tags
MIT
[ "brainfuck", "brainfuck-compiler", "brainfuck-interpreter", "jit", "zig" ]
14
false
2024-06-08T01:19:29Z
true
false
unknown
github
[]
zig-brainfuck This is a toy project that helps me learn Zig programming language. This project implements a <a>Brainfuck</a> interpreter with Just-In-Time (JIT) compilation. <blockquote> <span class="bg-blue-100 text-blue-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-blue-900 dark:text-blue-300">NOTE</span> This project is still in a very early development phase. </blockquote> Build <code>bash zig build</code> The executable file can be found at <code>zig-out/bin/zig-brainfuck</code> after build. Run <blockquote> <span class="bg-blue-100 text-blue-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-blue-900 dark:text-blue-300">NOTE</span> Currently this project only implements an AST-traversal interpreter. </blockquote> <code>bash zig-brainfuck input.bf</code> <code>input.bf</code> is the path to the input Brainfuck source code file. LICENSE This project is open-sourced under the <a>MIT License</a>.
[]
https://avatars.githubusercontent.com/u/1920783?v=4
zig-plugin
konomae/zig-plugin
2024-01-04T14:04:46Z
A proto WASM plugin for Zig.
main
0
3
2
3
https://api.github.com/repos/konomae/zig-plugin/tags
MIT
[ "zig", "ziglang" ]
157
false
2025-03-15T05:43:45Z
false
false
unknown
github
[]
Zig plugin <a>Zig</a> WASM plugin for <a>proto</a>. Installation Add the following to <code>.prototools</code>. <code>toml [plugins] zig = "github://konomae/zig-plugin"</code> Configuration Zig plugin does not support configuration. Hooks Zig plugin does not support hooks. Contributing Build the plugin: <code>shell cargo build --target wasm32-wasip1</code> Test the plugin by running <code>proto</code> commands. <code>shell proto install zig-test proto versions zig-test</code>
[]
https://avatars.githubusercontent.com/u/6328046?v=4
argz
ceyhunkerti/argz
2023-08-22T17:57:21Z
command line argument parser for zig
main
0
3
0
3
https://api.github.com/repos/ceyhunkerti/argz/tags
-
[ "argument-parser", "cli", "zig" ]
10,105
false
2025-02-16T20:26:57Z
true
true
unknown
github
[]
argz: CLI application helper for Zig Supports: <ul> <li>Subcommands <code>app sub1 sub2</code></li> <li>Input options for primitive types <code>string</code> <code>integer</code> <code>boolean</code></li> <li>Chained options for boolean types <code>-abc</code> is same as <code>-a -b -c</code></li> <li>Flags for on/off behavior types</li> <li>Typed arguments</li> <li>Builtin and customizable help system</li> <li>Hooks for attaching user functions to specified locations.</li> </ul> Installation Use zig fetch --save to pull a version of the library into your <code>build.zig.zon</code>. (This requires at least Zig 0.11.) <code>sh zig fetch --save "https://github.com/ceyhunkerti/argz/archive/refs/tags/0.0.1.tar.gz"</code> Then in your <code>build.zig</code> file ```zig ... const argz = b.dependency("argz", .{ .target = target, .optimize = optimize, }); exe.root_module.addImport("argz", argz.module("argz")); ... ``` To access help, add <code>-h</code> or <code>--help</code> option. This will print the attached help for the current command. See <a>examples/help.zig</a>
[ "https://github.com/ceyhunkerti/oracle_tocsv" ]
https://avatars.githubusercontent.com/u/125233599?v=4
sycl2023-app
zigzap/sycl2023-app
2023-04-24T08:11:50Z
SYCL 2023 Survey Demo App
master
0
3
1
3
https://api.github.com/repos/zigzap/sycl2023-app/tags
MIT
[ "demo-app", "rest-api", "zap", "zig" ]
763
false
2024-05-29T09:09:22Z
true
true
unknown
github
[ { "commit": "refs", "name": "zap", "tar_url": "https://github.com/zigzap/zap/archive/refs.tar.gz", "type": "remote", "url": "https://github.com/zigzap/zap" } ]
SYCL 2023 Demo App This is the demo survey app I used at the <a>SYCL 2023</a> conference in Vancouver. It is provided as is. Some of it, especially the CSS situation of the admin frontend, is a mess. <strong>NOTE</strong> The app won't start without a <code>passwords.txt</code> file present in its cwd. For that reason, I've provided one. The survey frontend At http://localhost:5000/frontend/ , you can take part in the survey. The admin console If you go to http://localhost:5000/admin/, you can use <code>demo</code> as username and password. The meaning of the buttons is as follows: <ul> <li>SAVE DATA TO TAPE: will make the server save the state of all participants into a file <code>participants.timestamp.json</code>.</li> <li>DOWNLOAD: lets you download the state of all participants in JSON format to your local machine.</li> <li>SHOW ME THE STATS: will show the results</li> </ul>
[]
https://avatars.githubusercontent.com/u/3109144?v=4
zodo
unixzii/zodo
2023-07-11T15:45:16Z
A minimalist CLI todo list.
main
0
3
0
3
https://api.github.com/repos/unixzii/zodo/tags
MIT
[ "cli", "minimal", "todolist", "tools", "zig" ]
11
false
2023-07-28T02:32:39Z
true
false
unknown
github
[]
zodo A minimalist CLI todo list. Usage ``` Usage: zodo [command] [options] Commands: add [contents] Add a todo item rm [item_id] Remove a todo item ls List all the todo items ``` Install Via GitHub Releases Go to <a>release page</a>, click on <code>Assets</code> at the bottom to show the binary files available for downloading. Build Locally Prerequisite: <ul> <li>Zig 0.10.0 or newer</li> </ul> Clone this repository and run the commands below: <code>shell cd zodo zig build</code> The build artifact is at <code>./zig-out/bin</code> directory. To build in release mode, run <code>zig build -Drelease-small=true</code>. FAQ Where is the database file? The database file is <code>.zodo_db</code> at your home directory. This is the only file created by <code>zodo</code>, you can safely delete it when the program no longer used. Why is the database file getting larger and larger? The database is stored as an append-only journal file. For performance considerations, existing record lines will not be touched once appended. As a benefit, all your history data are preserved in the journal file, and you can view it with any text editor. In the future, we can provide a command to prune your database by reconstructing the whole journal file. License MIT
[]
https://avatars.githubusercontent.com/u/112193680?v=4
prism
nitrogenez/prism
2023-08-21T09:05:40Z
All about colors
main
0
3
0
3
https://api.github.com/repos/nitrogenez/prism/tags
BSD-3-Clause
[ "color", "colors", "colorspace", "utility", "utility-library", "zig", "zig-lib", "zig-library", "ziglang" ]
91
false
2025-01-23T19:21:33Z
true
true
unknown
github
[]
Table of Contents <ul> <li><a>Table of Contents</a></li> <li><a>Description</a></li> <li><a>Why Prism?</a></li> <li><a>Usage</a></li> <li><a>Building</a></li> <li><a>Contributing</a></li> <li><a>Colorspace Support</a><ul> <li><a>Meaning</a></li> </ul> </li> <li><a>License</a></li> </ul> Description Prism is a utility library for managing colors and colorspaces written in Zig. Why Prism? Prism is a lightweight and performant piece of software powered by math. Zig's comptime optimizations coupled with static typing allows for a huge performance gain compared to other languages like C++, C#, Java, etc. Usage Prism requires zig <code>0.14.0-dev.2577+271452d22</code> to compile. First, fetch the library into your project using: <code>bash $ zig fetch --save https://github.com/nitrogenez/prism</code> This will fetch the latest commit from the master branch. Next, you should add the following to your build.zig: <code>zig const prism = b.dependency("prism", .{}); my_mod.addImport("prism", prism.module("prism"));</code> Contributing All the files must be formatted and linted with <code>zig fmt</code>. The code must be consistent and clean. If needed, use <code>// zig fmt: off</code> and <code>// zig fmt: on</code>. If you are willing to make Prism better (or worse), you may follow the instructions: <ol> <li><a>Fork Prism</a></li> <li>Create a new branch using git, e.g <code>git checkout -b feat/myfeat</code></li> <li>Write your dream code</li> <li>Add your changes and make a commit:</li> <li><code>git add src/my_cool_change.zig</code></li> <li><code>git commit -m "me code"</code></li> <li><a>Open a merge request</a></li> <li>Wait for any contributor to review your code</li> <li>Go get some tea, because the review may take a while</li> <li>Make changes if requested by a reviewer as described previousely</li> <li>You're GTG, enjoy your profile pic in a contributors list :)</li> </ol> Colorspace Support | NAME | STATE | | ---- | ----------- | | CMYK | <strong>FULL</strong> | | HSI | <strong>FULL</strong> | | HSL | <strong>FULL</strong> | | LAB | <strong>FULL</strong> | | YIQ | <strong>FULL</strong> | | HSV | <strong>FULL</strong> | | RGB | <strong>FULL</strong> | | XYZ | <strong>FULL</strong> | | LUV | <strong>FULL</strong> | Legend <ul> <li><strong>NAME</strong> - Name of the colorspace</li> <li><strong>STATE</strong> - Colorspace support state</li> <li><strong>FULL</strong> - A full-featured colorspace support (conversion to and from RGB or anything else)</li> <li><strong>PARTIAL</strong> - It kinda works, but is lacking functionality (only data type / acknowledged)</li> <li><strong>NO</strong> - No support at all</li> <li><strong>TODO</strong> - Planned and is yet to be implemented</li> </ul> License Prism is licensed under a 3-clause BSD ("New" or "Revised") License. See <a>LICENSE</a> to learn more.
[]
https://avatars.githubusercontent.com/u/54639968?v=4
zsync
AlphaTechnolog/zsync
2023-11-26T11:52:31Z
Merge two folders fast and simple
main
0
3
0
3
https://api.github.com/repos/AlphaTechnolog/zsync/tags
-
[ "folders", "fs", "merging", "simple", "std", "zig" ]
4
false
2024-05-06T05:16:37Z
true
false
unknown
github
[]
ZSync ZSync is a little tool made in zig, which given two folders paths merges the content recursively of the source to the dest, so given the next command: <code>sh zsync ./{a,b}</code> zsync will merge the content of a into b by checking recursively the struct of the a folder. Installation <code>sh git clone https://github.com/alphatechnolog/zsync.git cd zsync zig build -Doptimize=ReleaseFast install -Dvm755 ./zig-out/bin/zsync /bin</code> Usage Perform: <code>sh zsync</code> Todo <br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Better error handling? <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> Better logging <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> Faster arguments parsing <br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Speed up the merging algorithm
[]
https://avatars.githubusercontent.com/u/558581?v=4
zig-ocr-neural-network
MadLittleMods/zig-ocr-neural-network
2023-10-05T04:39:25Z
A from scratch neural network implementation in Zig, trained against the MNIST dataset to recognize handwritten digits.
main
0
3
0
3
https://api.github.com/repos/MadLittleMods/zig-ocr-neural-network/tags
-
[ "deep-learning", "machine-learning", "mnist", "mnist-handwriting-recognition", "neural-network", "ocr", "zig" ]
116
false
2024-10-18T12:54:55Z
true
true
unknown
github
[ { "commit": "8b0154bea5121208826f0f0c864029e8b0e81446.tar.gz", "name": "zshuffle", "tar_url": "https://github.com/hmusgrave/zshuffle/archive/8b0154bea5121208826f0f0c864029e8b0e81446.tar.gz.tar.gz", "type": "remote", "url": "https://github.com/hmusgrave/zshuffle" } ]
Basic OCR example using a neural network against the MNIST dataset <blockquote> [!TIP] If you are looking for a neural network library that you can include in your project, I've created a library based on this project -&gt; https://github.com/MadLittleMods/zig-neural-networks </blockquote> A from scratch neural network implementation in Zig, trained against the MNIST dataset to recognize handwritten digits. A lot of the phrasing and concepts are taken from the resources linked in the <a><em>developer notes</em></a>. I'm just trying to piece together all of those resources into something that works and is understandable to me as I learn. Major kudos to Sebastian Lague, 3Blue1Brown, The Independent Code (Omar Aflak), and Samson Zhang for their excellent resources. And a special shoutout to Hans Musgrave (<a>@hmusgrave</a>) for the immense amount of help to get my head around these concepts as I got stuck through this process. Setup Download and extract the MNIST dataset from http://yann.lecun.com/exdb/mnist/ to a directory called <code>data/</code> in the root of this project. Here is a copy-paste command you can run: ```sh Make a data/ directory mkdir data/ &amp;&amp; cd data/ &amp;&amp; Download the MNIST dataset curl -O http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz &amp;&amp; curl -O http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz &amp;&amp; curl -O http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz &amp;&amp; curl -O http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz &amp;&amp; Unzip the files gunzip *.gz ``` Building and running Tested with Zig 0.11.0 With the OCR example, on my machine, I can complete 1 epoch of training in ~1 minute which gets to 94% accuracy and creeps to 97% after a few more epochs (60k training images, 10k test images): <code>sh $ zig build run-mnist_ocr debug: Created normalized data points. Training on 60000 data points, testing on 10000 debug: Here is what the first training data point looks like: ┌──────────┐ │ Label: 5 │ ┌────────────────────────────────────────────────────────┐ │ │ │ │ │ │ │ │ │ │ │ ░░░░░░░░▒▒▓▓▓▓░░▓▓████▒▒ │ │ ░░░░▒▒▓▓▓▓████████████▓▓██████▒▒ │ │ ░░████████████████████▒▒▒▒▒▒░░░░ │ │ ░░██████████████▓▓████ │ │ ▒▒▓▓▒▒██████░░ ░░▓▓ │ │ ░░░░▓▓██▒▒ │ │ ▓▓██▓▓░░ │ │ ░░▓▓██▒▒ │ │ ░░████▓▓▒▒░░ │ │ ▒▒██████▒▒░░ │ │ ░░▓▓████▓▓░░ │ │ ░░▒▒████▓▓ │ │ ██████▒▒ │ │ ░░▓▓▓▓██████░░ │ │ ░░▓▓██████████▓▓ │ │ ░░▒▒████████████▒▒ │ │ ░░▒▒████████████▒▒░░ │ │ ░░▓▓████████████▒▒░░ │ │ ░░▓▓████████████▓▓░░ │ │ ▓▓████████▓▓▓▓░░ │ │ │ │ │ │ │ └────────────────────────────────────────────────────────┘ debug: epoch 0 batch 0 3s -&gt; cost 331.64265899045563, accuracy with 100 test points 0.11 debug: epoch 0 batch 5 4s -&gt; cost 242.16033395427667, accuracy with 100 test points 0.56 debug: epoch 0 batch 10 5s -&gt; cost 155.62913461977217, accuracy with 100 test points 0.7 debug: epoch 0 batch 15 5s -&gt; cost 118.45908401769115, accuracy with 100 test points 0.75 [...]</code> Other examples Simple animal example This is a small dataset that I made up to test the neural network. There are only 2 arbitrary features (x and y) where the labeled data points (fish and goat) occupy distinct parts of the graph. Since there are only 2 input features (which means 2 dimensions), we can easily graph the neural network's decision/classification boundary. It's a good way to visualize the neural network and see how it evolves while training. This example produces an image called <code>simple_xy_animal_graph.ppm</code> every 1,000 epochs showing the decision/classification boundary. <code>sh $ zig build run-simple_xy_animal_sample</code> Barebones XOR example There is also a barebones XOR example which just trains a neural network to act like a XOR ("exclusive or") gate. <code>sh $ zig build run-xor</code> Testing <code>sh $ zig build test --summary all</code> Dev notes See the <a><em>developer notes</em></a> for more information.
[]
https://avatars.githubusercontent.com/u/16236219?v=4
asteroids
dylanlangston/asteroids
2023-12-05T01:33:07Z
A twist on the classic game where asteroids bounce off the walls.
main
0
3
1
3
https://api.github.com/repos/dylanlangston/asteroids/tags
MIT
[ "asteroids", "asteroids-game", "game-jam", "raylib", "zig" ]
4,543
false
2024-11-07T01:57:45Z
true
true
unknown
github
[ { "commit": "6094869e3e845e90e1e8ae41b98e889fb3e13e78.tar.gz", "name": "raylib", "tar_url": "https://github.com/raysan5/raylib/archive/6094869e3e845e90e1e8ae41b98e889fb3e13e78.tar.gz.tar.gz", "type": "remote", "url": "https://github.com/raysan5/raylib" } ]
<a> </a> <a></a> <a></a> <a></a> <a></a> <a></a> <a></a> <a></a> Asteroid Arena is a twist on the classic game with an expanded world where asteroids bounce off the walls. Try to keep up as the amount of asteroids increases the more you destroy. Also watch out for rogue aliens!! This <a>Mobile First</a> <a>Progressive Web App</a> is a submission to the 2023 <em>Raylib Slo-Jam</em> event hosted on <a>itch.io</a>, It was created by <a>@dylanlangston</a> using the following: - <a>Zig</a> - <a>raylib</a> via <a>raylib-Zig</a> - <a>Emscripten</a> - <a>Binaryen</a> - <a>Svelte</a> - <a>TypeScript</a> - <a>TailwindCSS</a> What's raylib Slo-Jam? <blockquote> The goal of <a>raylib Slo-Jam</a> is to have participants all make the same kind of game, using raylib and not be rushed by short time constraints. The focus is on quality and polish, not scope and features. We want you to make the best game you can based on the theme. Everyone who participates in the jam will be building the classic arcade game: <strong>Asteroids</strong> </blockquote> <a></a> Getting Started <em>This repository includes a <a>devcontainer.json</a> to get up and running quickly with a full-featured development environment in the cloud!</em>[^local-development] Clone <ol> <li>Clone this repository: <code>git clone https://github.com/dylanlangston/asteroids.git</code></li> <li>Change directories into the newly created <code>./asteroids</code> folder. Then initialize the submodules: <code>git submodule update --init --recursive</code></li> </ol> Debug Locally: <ol> <li>If you haven't already, install Zig version 0.11.0 using the <a>instructions here</a>.</li> <li>Configure you build environment for Raylib using the appropriate <a>instructions</a> for you platform.</li> <li>Finally, to start the game run the command <code>zig build run</code>. Alternatively run the <strong><em>Debug</em></strong> task in VSCode.</li> </ol> Build for Web: <ol> <li>Complete steps to <strong>Clone</strong> and <strong>Debug Locally</strong> above first.</li> <li>Change directories into the <code>./asteroids</code> folder. Build the zig portion of the game using command <code>zig build -Dtarget=wasm32-emscripten</code>. Alternatively run the <strong><em>Build Web</em></strong> task in VSCode.</li> <li>If you haven't already, install NodeJS LTS from <a>here</a> (or your preferred source).</li> <li>Change directories into the <code>./asteroids/src/asteroids-website</code> folder. Then install the required node packages using <code>npm install</code>.</li> <li>Build the web version by running the command <code>npm run build</code>. You can find the generated static site in the <code>./asteroids/src/asteroids-website/build</code> folder.</li> </ol> Localizing: This application is fully localized into English, French, and Spanish. It should be possible to support any language using a Latin Character set. The following steps can be used to translate the application: <em>Localizating the Zig portion:</em> 1. Open the <code>./src/Locales/</code> folder. Copy an existing locale <code>.zig</code> file and rename it to the appropriate language name. For example "german.zig". 2. Edit the new file by translating the strings to the choosen language (i.e. - German). 3. Open the <code>./src/Localelizer.zig</code> file. Add your new language to the <strong>Locales</strong> enum, take note of the order for later. Then update the <strong>Localelizer.get</strong> function to handle the new enum. The changes should look something like this: <code>zig pub const Localelizer = struct { pub inline fn get(locale: Locales) Locale { switch (locale) { Locales.german =&gt; { return @import("./Locales/german.zig").german; }, } } }; pub const Locales = enum(usize) { ... german, };</code> <em>Localizating the Web portion:</em> 1. Open the <code>./src/asteroids-website/src/locales</code> folder. Copy an existing locale <code>.json</code> file and rename it to the appropriate language name. For example "de.json". 2. Edit the new file by translating the strings to the choosen language (i.e. - German). 3. Open the <code>./src/asteroids-website/static/manifests</code> folder. Copy an existing <code>manifest.json</code> file and rename it to the appropriate language name (i.e. - "de.manifest.json"). 4. Edit the new manifest file and translate the appropriate strings to the choosen language (i.e. - German). <a>Read more about the manifest.json format here.</a> 5. Open the <code>./src/asteroids-website/src/lib/localizer.ts</code> file. Add your new language to the <strong>Locales</strong> enum, ensure the order is the same as the Zig enums you updated earlier. Update the <strong>LocaleGroup.LocalePrefixes</strong> array with the new enum and the language prefix (the file name from step 1). The changes should look something like this: ```TypeScript export enum Locales { ... german, } class LocaleGroup { public static readonly LocalePrefixes = [ { key: Locales.german, value: "de" }, ]; } ``` Credits | Font | Source | License | |:---- |:------:| -------:| | <em>Hyperspace</em> | https://www.fontspace.com/hyperspace-font-f18038 | Freeware, Non-Commercial | | <em>Two Lines</em> | https://www.fontspace.com/2-lines-font-f14541 | Freeware, Non-Commercial | | Palette | Source | |:-------:|:------:| | <em>AKC12</em> | https://lospec.com/palette-list/akc12 | | Sound | Creator | Tool | Copy/Paste | License | |:-------:|:------:|:---:|:---------- |:-------:| | <em><a>Acceleration</a></em> | <a>miajohnson99</a> | <a>Chiptone</a> | <code>eNpjYig-PkOQgcFIngEIOhkZGBrq3RknMTEzvGH6X_-_ntXIGCTRUH_GB5WeEYldPE0NQjOsYzcynghi_7eHiMBowgJ8vG2nQbR3-ClGZDNhdv4HQ0cHixAGegIAUKwyuw..</code> | Creative Commons (by) Attribution | | <em><a>Alien Explosion</a></em> | <a>miajohnson99</a> | <a>Chiptone</a> | <code>eNpjYig-PkOQieOMAQODHOvaOwwMDfUMDPNY-pmm8_2vV4pmEZBgYAAJnvGB0HdU_HVB9GNVHSMQnWG4-CiI7jEP7wPRaWpHHEA00zp2I-OJDAwKjM-lny4FiVxT3nkPbPx_e4hRMJoZXYCPt-00iPYOP8UIMRMiPiMSqg4MI1XmRzHQEwAAYv454w..</code> | Creative Commons (by) Attribution | | <em><a>Alien Pew</a></em> | <a>miajohnson99</a> | <a>Chiptone</a> | <code>eNpjYig-PkOQgeWMQ8MpBjBoqGdgmMTUxiDH-r_eN4nFyBgieMYHQk-22HwXRDNqZ20E0TnqkTtBtHDe73kgOk0Nasg6diPjiQwMjEy8up4HQSIv1XbeA8v8t4cogdHM6AJ8vG2nQbR3-ClGZDNnRELVgWGkCsRNdAMAw4g3_g..</code> | Creative Commons (by) Attribution | | <em><a>Explosion</a></em> | <a>miajohnson99</a> | <a>Chiptone</a> | <code>eNpjYig-PkOQkSNNi4Hh6953dxgYGuoZGJJZH7P-4_pfrxTNIiDBwAASPOODSs-IxC6epnbEAUQzrmM3Mp7IwKDA-t8eIgOjGdAFmNEF-HjbToNo7_BTjBAzUe38D4amcqlpDPQEADcqNn8.</code> | Creative Commons (by) Attribution | | <em><a>Hit Wall</a></em> | <a>miajohnson99</a> | <a>Chiptone</a> | <code>eNpjYig-PkOQgeW_vlcrAxg01DMwlDHwM9kx_q__b898zRkieMYHQj9WNdsHomdEoorD6DQ1qCHr2I2MJ4LY_-0hIjCasAAfb9tpEO0dfooR2UyYnf_B0NEhOJmBngAA6yE0Wg..</code> | Creative Commons (by) Attribution | | <em><a>Med Explosion</a></em> | <a>miajohnson99</a> | <a>Chiptone</a> | <code>eNpjYig-PkOQg-O_MgND7X8GIGioZ2CYxDSD-R_X_3q9WAYjY4jgGR9UekYkdvE0tSMOIJpxHbuR8USQ2H97iAyMJizAx9t2GkR7h59ihJiJaud_MHTWdkhgoCcAAKqnNQY.</code> | Creative Commons (by) Attribution | | <em><a>Pew</a></em> | <a>miajohnson99</a> | <a>Chiptone</a> | <code>eNpjYig-PkOQie2_vcFeAYkmBQaGhnp3RmaGcOaVLP_ra-IZjIwZGECCZ3wg9BGF3OMg-poz6zZkcRidpgahGdaxGxlPBDKZeHU9D4JEXqrtvAeimf7bQ5TAaGZ0AT7ettMg2jv8FCOymTMioerAMFKF15eBngAATc423A..</code> | Creative Commons (by) Attribution | | <em><a>Small Explosion</a></em> | <a>miajohnson99</a> | <a>Chiptone</a> | <code>eNpjYig-PkOQgSNNjoGh9j8DEDTUMzCEM59j_Mf1v_6_PYORMUTwjA8qPSMSu3iaGtSQdexGxhNBbKAhYBEYTViAj7ftNIj2Dj_FiGwmzM7_YFhl8iCKgZ4AACVNNOI.</code> | Creative Commons (by) Attribution | | Music | Creator | Tool | Link | License | |:-------:|:------:|:---:|:----:|:-------:| | <em><a>Background</a></em> | <a>miajohnson99</a> | <a>BeepBox</a> | <a>Background</a> | Creative Commons (by) Attribution | | <em><a>Game Over</a></em> | <a>miajohnson99</a> | <a>BeepBox</a> | <a>Game Over</a> | Creative Commons (by) Attribution | | <em><a>Title Screen</a></em> | <a>miajohnson99</a> | <a>BeepBox</a> | <a>Title Screen</a> | Creative Commons (by) Attribution | All the included textures were created using <a>Piskel</a> and can be found in the <a><code>Piskel</code></a> folder. They are licensed as Creative Commons (by) Attribution. [^local-development]: For local development check out <a>Dev Containers</a> and <a>DevPod</a>.
[]
https://avatars.githubusercontent.com/u/32912555?v=4
tetris-raylib
candrewlee14/tetris-raylib
2024-01-11T22:33:10Z
Tetris clone built with Raylib
main
0
3
0
3
https://api.github.com/repos/candrewlee14/tetris-raylib/tags
MIT
[ "c", "raylib", "tetris", "zig" ]
6,850
false
2024-12-19T19:45:16Z
true
true
unknown
github
[ { "commit": "03ff864087a3ca46a60cd64ef709650cd8d824f5.tar.gz", "name": "raylib", "tar_url": "https://github.com/raysan5/raylib/archive/03ff864087a3ca46a60cd64ef709650cd8d824f5.tar.gz.tar.gz", "type": "remote", "url": "https://github.com/raysan5/raylib" } ]
Tetris-Raylib I made for this for <a>Coding Challenges</a>'s Tetris challenge. I wanted to try hot reloading in C through recompiling &amp; reloading the core game logic as a shared library. Being a big Zig fan, I decided to use Zig's build system to enable doing this in debug mode, but compile it all statically in release modes. If you hit the 'R' key in-game in a debug build, the game will reload but the state will be retained. My final goal was getting this to run on the Steam Deck, which in the end worked wonderfully (see <a>tweet</a>)! Features <ul> <li>Working Tetris game</li> <li>Supports Linux &amp; Macos</li> <li>Keyboard &amp; Mouse + Controller Support</li> <li>Music &amp; Sound Effects</li> <li>Windowed &amp; Fullscreen Modes</li> </ul> Setup <ul> <li>You'll need Zig, which you can get <a>here</a>. I'm currently using the latest nightly: <code>0.12.0-dev.2139+e025ad7b4</code>. This includes a C compiler with <code>zig cc</code>!</li> <li>You will also need the Raylib development library dependencies. See the <em>Working on {YOUR OS}</em> sections of Raylib's <a>wiki</a>.</li> </ul> Now you're ready to go! To run a debug build, run: <code>bash zig build run</code> To run a release build, run: <code>bash zig build -Doptimize=ReleaseSafe run</code> You can run in fullscreen mode with the <code>--fullscreen</code> flag. <code>zig build run -- --fullscreen</code> <blockquote> This image was made for the purposes of a colorful screenshot, ignore all the gaps :) </blockquote>
[]
https://avatars.githubusercontent.com/u/11783357?v=4
podpad
SeedyROM/podpad
2023-10-29T06:20:44Z
Table based synthesizer/sequencer
main
0
3
0
3
https://api.github.com/repos/SeedyROM/podpad/tags
-
[ "audio", "dsp", "sequencer", "synthesizer", "zig" ]
106
false
2025-02-15T13:12:40Z
true
true
unknown
github
[ { "commit": "587205c11bfd88d515408209ca4b1c271e9f5db9.tar.gz", "name": "sdl", "tar_url": "https://github.com/Beyley/SDL/archive/587205c11bfd88d515408209ca4b1c271e9f5db9.tar.gz.tar.gz", "type": "remote", "url": "https://github.com/Beyley/SDL" }, { "commit": "18a1df5a3ef8afa0782c419b153a21...
podpad 🎛️ podpad is a simple synthesizer and sequencer built with Zig and SDL2 (SDL3 soon). Example https://github.com/SeedyROM/podpad/assets/11783357/cf163150-0b23-40c3-9edc-ab91ba4cc05f Building <ul> <li>Windows:<ul> <li>Just run <code>zig build</code> and you should be good to go.</li> </ul> </li> <li>Linux and MacOS:<ul> <li>Make sure you have SDL2 and it's development libraries installed.</li> <li>Run <code>zig build</code>. </li> </ul> </li> </ul>
[]
https://avatars.githubusercontent.com/u/3642427?v=4
meta-zig
nateglims/meta-zig
2023-06-05T15:35:13Z
A Yocto Layer to build Zig recipes
master
1
3
0
3
https://api.github.com/repos/nateglims/meta-zig/tags
MIT
[ "yocto", "zig", "ziglang" ]
5
false
2025-04-08T09:53:19Z
false
false
unknown
github
[]
Dependencies URI: https://github.com/kraj/meta-clang.git branch: mickledore Patches Please submit changes via Pull Request Maintainer: nateglims Table of Contents I. Adding the meta-zig layer to your build II. Misc I. Adding the meta-zig layer to your build Run 'bitbake-layers add-layer meta-zig' II. Misc Add to distro/local conf: <code>editor-config LLVM_TARGETS_TO_BUILD = "AArch64;AMDGPU;ARM;AVR;BPF;Hexagon;Lanai;Mips;MSP430;NVPTX;PowerPC;RISCV;Sparc;SystemZ;VE;WebAssembly;X86;XCore"</code> III. TODO <br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Host Build <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> zig on Target <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> Cross/Canadian <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> Vendor LLVM to match zig required version <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> CI
[]
https://avatars.githubusercontent.com/u/5464072?v=4
zig-yaml
nektro/zig-yaml
2023-02-28T04:16:17Z
null
main
1
3
1
3
https://api.github.com/repos/nektro/zig-yaml/tags
MIT
[ "zig", "zig-package" ]
21
false
2025-05-21T20:33:40Z
true
false
unknown
github
[]
zig-yaml <a></a> <a></a> <a></a> <a></a> Zig bindings for <a>libyaml</a>.
[ "https://github.com/sytranvn/arkanoid", "https://github.com/tulilirockz/dough" ]
https://avatars.githubusercontent.com/u/499599?v=4
kcov
liyu1981/kcov
2024-01-09T04:48:17Z
a fork of kcov, for better covering zig/c/cpp, with same usage as kcov
kcov-zig
0
3
0
3
https://api.github.com/repos/liyu1981/kcov/tags
GPL-2.0
[ "coverage", "kcov", "zig" ]
2,718
true
2024-07-10T15:11:40Z
true
true
unknown
github
[]
A fork of <code>kcov</code> for better covering Zig This is a rather than naive fork of wonderful <code>kcov</code> for better supporting Zig projects. It adds the ability to auto recognize Zig's <code>unreachable</code> and <code>@panic</code> for auto ignoring. Here is a screenshot of auto ignoring <code>unreachable</code>. Here is another screenshot of auto ignoring <code>@panic</code>. It also adds the ability in c/c++ source file of using <code>/* no-cover */</code> to mark a line to be ignored. Here is a screenshot of manual ignoring by placing <code>/* no-cover */</code> in c source file. Usage There is no change of original <code>kcov</code> usage, it will just work. Please follow the below original Kcov README. But how can I get the binary? The best way is to compile from source. It can be done as follows (you will need <code>cmake</code>, <code>ninja</code>, <code>llvm@&gt;16</code> as I tried) <code>git clone https://github.com/liyu1981/kcov.git cd kcov mkdir build cd build CC="clang" CXX="clang++" cmake -G Ninja .. ninja</code> after building is done. The binary is at <code>build/src/kcov</code>. Copy somewhere and use it. (Or you can download a copy of Apple Silicon version binary from the release section.) File Support <ul> <li>for Zig, support source file with <code>.zig</code> extension.</li> <li>for C/C++, support source file with <code>.c/.cpp/.cc</code> extension.</li> </ul> Original Kcov Readme <a></a> <a></a> <a></a> <a></a> <a></a> <em>kcov</em> Kcov is a FreeBSD/Linux/OSX code coverage tester for compiled languages, Python and Bash. Kcov was originally a fork of <a>Bcov</a>, but has since evolved to support a large feature set in addition to that of Bcov. Kcov, like Bcov, uses DWARF debugging information for compiled programs to make it possible to collect coverage information without special compiler switches. For a video introduction, <a>look at this presentation from SwedenCPP</a> Installing Refer to the <a>INSTALL</a> file for build instructions, or use our official Docker images: <ul> <li><a>kcov/kcov</a> for releases since v31.</li> </ul> How to use it Basic usage is straight-forward: <code>kcov /path/to/outdir executable [args for the executable]</code> <em>/path/to/outdir</em> will contain lcov-style HTML output generated continuously while the application runs. Kcov will also write cobertura- compatible XML output and generic JSON coverage information and can easily be integrated in various CI systems. Filtering output It's often useful to filter output, since e.g., /usr/include is seldom of interest. This can be done in two ways: <code>kcov --exclude-pattern=/usr/include --include-pattern=part/of/path,other/path \ /path/to/outdir executable</code> which will do a string-comparison and include everything which contains <em>part/of/path</em> or <em>other/path</em> but exclude everything that has the <em>/usr/include</em> string in it. <code>kcov --include-path=/my/src/path /path/to/outdir executable kcov --exclude-path=/usr/include /path/to/outdir executable</code> Does the same thing, but with proper path lookups. Merging multiple kcov runs Kcov can also merge the results of multiple earlier runs. To use this mode, call kcov with <code>--merge</code>, an output path and one or more paths to an earlier run, e.g., <code>kcov --merge /tmp/merged-output /tmp/kcov-output1 /tmp/kcov-output2 kcov --merge /tmp/merged-output /tmp/kcov-output* # With a wildcard</code> Use from continuous integration systems kcov is easy to integrate with <a>travis-ci</a> together with <a>coveralls.io</a> or <a>codecov.io</a>. It can also be used from Jenkins, <a>SonarQube</a> and <a>GitLab CI</a>. Refer to <ul> <li><a>coveralls</a> for details about travis-ci + coveralls, or</li> <li><a>codecov</a> for details about travis-ci + codecov</li> <li><a>jenkins</a> for details about how to integrate in Jenkins</li> <li><a>sonarqube</a> for how to use kcov and sonarqube together</li> <li><a>gitlab</a> for use with GitLab</li> </ul> More information kcov is written by Simon Kagstrom <a>&#115;&#105;&#109;&#111;&#110;&#46;&#107;&#97;&#103;&#115;&#116;&#114;&#111;&#109;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;</a> and more information can be found at <a>the web page</a>
[]
https://avatars.githubusercontent.com/u/206480?v=4
typed.zig
karlseguin/typed.zig
2023-04-01T09:20:40Z
Tagged union that can represent many different types
master
0
3
0
3
https://api.github.com/repos/karlseguin/typed.zig/tags
MIT
[ "zig", "zig-library" ]
266
false
2025-01-30T00:41:10Z
true
false
unknown
github
[]
Typed.zig A tagged union type that can represent many different types. Similar to <code>std.json.Value</code>, but supports more types and has more functionality. typed.Value <code>typed.Value</code> is a union defined with the following tags: <code>zig null, bool: bool, i8: i8, i16: i16, i32: i32, i64: i64, i128: i128, u8: u8, u16: u16, u32: u32, u64: u64, u128: u128, f32: f32, f64: f64, string: []const u8, map: typed.Map, array: typed.Array, time: typed.Time, date: typed.Date, timestamp: typed.Timestamp,</code> There are a number of ways to create a <code>typed.Value</code>: ```zig const v1 = typed.Value{.i64 = 9001}; defer v1.deinit(); // safe to call even for non-allocating types // Values that map to a typed.Array or typed.Map require allocation const v2 = try typed.new(allocator, [_]bool{true, false}); defer v2.deinit(); // or created from an optional std.json.Value const v3 = try typed.fromJson(allocator, json_value); defer v3.deinit(); ``` <code>typed.new</code> will map arrays and slices to <code>typed.Array</code> which is an alias for <code>std.ArrayList(typed.Value)</code>. This requires allocation. <code>typed.new</code> will map structs to a <code>typed.Map</code> which is a wrapper around <code>std.StringHashMap(typed.Value)</code>. This requires allocation. It is always safe to call <code>deinit()</code> on a value, even if the underlying value required no allocations. You can, of course, access the underlying value by accessing the tag, e.g. <code>const power = value.i64</code>. Alternatively, <code>value.get(TYPE)</code> can be used to conditionally get a value. If <code>TYPE</code> is the wrong type, <code>null</code> is returned. <code>value.strictGet(TYPE)</code> will return an error if <code>TYPE</code> is wrong.
[]
https://avatars.githubusercontent.com/u/50797868?v=4
zig-buddy2
maolonglong/zig-buddy2
2023-10-12T16:01:16Z
🧿 A simple buddy memory allocation library.
main
0
3
1
3
https://api.github.com/repos/maolonglong/zig-buddy2/tags
MIT
[ "allocator", "buddy", "buddy-system", "zig" ]
19
false
2024-12-10T04:38:15Z
true
false
unknown
github
[]
Buddy Memory Allocation <a></a> <a></a> A simple buddy memory allocation library. Inspired by <ul> <li><a>cloudwu/buddy</a></li> <li><a>wuwenbin/buddy2</a></li> <li><a>Buddy memory allocation (伙伴内存分配器)</a></li> <li><a>伙伴分配器的一个极简实现</a></li> </ul>
[]
https://avatars.githubusercontent.com/u/71951273?v=4
nix-zig-packager
garrisonhh/nix-zig-packager
2023-09-18T15:36:22Z
package zig 0.11.0+ projects for nix
master
0
3
0
3
https://api.github.com/repos/garrisonhh/nix-zig-packager/tags
-
[ "nix", "nix-flake", "nix-packages", "zig", "zig-package" ]
8
false
2023-09-21T19:27:43Z
false
false
unknown
github
[]
nix-zig-packager are you annoyed with zig 0.11.0 incompatibility with nix? me too! this is a fix before the zig compiler people figure it out (which I'm sure they will) adding to your flake this flake provides an overlay which provides <code>buildZig11Package</code>. here's a simple flake to build a zig project for <code>x86_64-linux</code>: <em>unfortunately, you will still need to use the <code>--impure</code> flag for this to work</em> ```nix { inputs.zig-packager.url = github:garrisonhh/nix-zig-packager; outputs = { self, nixpkgs, zig-packager, ... }: let system = "x86_64-linux"; <code> pkgs = (import nixpkgs) { inherit system; overlays = [ zig-packager.overlays.default ]; }; in { packages.${system}.default = pkgs.buildZig11Package { src = self; inherit system; }; }; </code> } ```
[]
https://avatars.githubusercontent.com/u/1356248?v=4
testz
srjilarious/testz
2023-12-05T13:54:26Z
A testing library for zig
main
0
3
0
3
https://api.github.com/repos/srjilarious/testz/tags
MIT
[ "zig", "zig-package" ]
666
false
2025-03-21T23:09:29Z
true
true
0.14.0
github
[]
Overview Testz is a testing library for zig that provides some extra features compared to the built in unit testing. <ul> <li>Color output with both a verbose mode and non-verbose mode</li> <li> A non-verbose mode, where each test shows as a symbol for passed, skipped, or failed: </li> <li> In verbose mode, you can see the name of each test run and how long it took to run. </li> <li> In both cases a test run summary lets you know how many tests ran and the overall time. </li> <li> Easy filtering by group tag or test name itself </li> <li> Making it easier to set a breakpoint and debug a single test. </li> <li> Provides a test runner utility function with argument parsing for a default use case. </li> <li> Has a test discovery helper that searches for tests by finding public functions in a passed in module, allowing tests to be skipped by prepending <code>skip_</code> to the start of the function name. </li> <li> Stack traces of relevant code only </li> <li>Skips stack frames from <code>testz</code> itself as well as <code>main</code> where the test runner is called.</li> <li>Stack traces provide context lines around the stack frame.</li> </ul> Testz runners are just another executable you setup in your <code>build.zig</code>, with the library providing a number of helpers to make it as easy as possible to create tests. Debugging is simple since you can run your debugger just like with any normal flat executable and use the built in filtering to narrow down what test or set of tests gets run. Example Check the example program under <code>example/</code> with a main program and a separate test program. Test module A module of tests looks like: ```zig const std = @import("std"); const testz = @import("testz"); pub fn allowNonTestzErrorsTest() !void { const mem = try std.heap.page_allocator.alloc(u8, 10); defer std.heap.page_allocator.free(mem); try testz.expectEqual(true, true); } pub fn alwaysFailTest() !void { try testz.fail(); } pub fn successTest() !void { try testz.expectEqual(12, 12); try testz.expectEqualStr("hello", "hello"); try testz.expectNotEqual(10, 20); try testz.expectNotEqualStr("hello", "world"); try testz.expectTrue(true); try testz.expectFalse(false); } pub fn skip_Test() !void { // nothing to see here. } ``` The test functions are simply any public function in a module you pass into <code>discoverTests</code>. The <code>testz</code> library has a number of <code>expectXYZ</code> functions you can use to make assertions in your code. If one fails, <code>testz</code> will capture the name of the failed test, error message, and stack trace (with contextual lines). Test Runner This is a test runner program using the built-in <code>testzRunner</code> method that you could use in your project, which handles standard argument parsing. It also shows test discovery by passing in modules as groups to the <code>discoverTests</code> method. ```tests/main.zig const std = @import("std"); const testz = @import("testz"); const DiscoveredTests = testz.discoverTests(.{ testz.Group{ .name = "Expect Tests", .tag = "expect", .mod = @import("./expect_tests.zig") }, testz.Group{ .name = "Misc Tests", .tag = "misc", .mod = @import("./misc_tests.zig") } }); pub fn main() !void { try testz.testzRunner(DiscoveredTests); } ``` The function <code>testsz.discoverTests</code>, takes a tuple of either direct module <code>@import</code>s, or <code>testz.Group</code> structs, which contain a group name and tag for filtering as well as the module to scan for test functions. A <code>build.zig</code> Setup Run <code>zig fetch --save https://github.com/srjilarious/testz</code> to add <code>testz</code> as a dependency in your <code>build.zig.zon</code> file. Next, in your <code>build.zig</code>, you would create a new exe for your tests and add: <code>zig const testzMod = b.dependency("testz", .{}); [...] testsExe.root_module.addImport("testz", testzMod.module("testz"));</code> See the project under <code>example/</code> for how this looks in a simple dummy project. Planned Features The library has all of the initial features I set out to implement. Feel free to open an issue or open a PR if there is a feature you'd like to see! Roadmap / Ideas <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> Capture number of assertions in each test
[]
https://avatars.githubusercontent.com/u/112365626?v=4
codemirror-mode-zig
imkylecat/codemirror-mode-zig
2024-01-01T08:43:17Z
Zig codemirror mode
main
0
3
0
3
https://api.github.com/repos/imkylecat/codemirror-mode-zig/tags
MIT
[ "codemirror", "npm", "zig" ]
20
false
2025-01-24T06:18:28Z
false
false
unknown
github
[]
<a></a>
[]
https://avatars.githubusercontent.com/u/5425986?v=4
building-x-in-y
martinothamar/building-x-in-y
2023-06-08T10:27:36Z
Repository where I experiment and build various systems for learning purposes (mostly low-level)
main
1
3
1
3
https://api.github.com/repos/martinothamar/building-x-in-y/tags
MIT
[ "csharp", "learning", "learning-by-doing", "rust", "zig" ]
571
false
2024-07-10T18:18:20Z
false
false
unknown
github
[]
Building X in Y This is a repository where I experment with languages and programming across a variety of topics for learning purposes <ul> <li>Datastructures and algorithms</li> <li>Systems/lowlevel programming</li> <li>Distributed systems</li> <li>Databases</li> <li>Anything high performance</li> </ul> Currently interesting in learning more about the following languages <ul> <li>Rust</li> <li>Zig</li> <li>C#</li> <li>Go</li> </ul> The code is organized such that the top level folders are topics, and first level subfolders are per programming language. Example (<code>git ls-tree -r --name-only HEAD | tree --fromfile</code>): <code>├── dsa │ ├── c │ │ ├── seqlock-queue │ │ │ ├── Makefile │ │ │ └── ... │ │ └── spsc │ │ ├── Makefile │ │ └── ... │ ├── rust │ │ ├── Cargo.toml │ │ ├── Makefile │ │ ├── ... │ └── zig │ ├── Makefile │ ├── build.zig │ ├── ...</code> Topics <ul> <li><a>Datastructures and algorithms (DSA)</a> - including some leetcode</li> <li><a>HTTP server</a> - HTTP server from scratch</li> <li><a>Monte Carlo simulations</a> - simulating a premier league season 100k times. SIMD, performance engineering</li> <li><a>Calculation Engine</a> - calculatione engine with a builder API for creating formulas while doing vectorized calculations over columns of data</li> <li><a>fly.io Gossip Glomers</a> - distributed systems challengers centered around gossip protocols and consensus</li> <li><a>Todo API</a> - production-ready setup for apps/APIs in various languages</li> </ul> Notes <a>Some notes here</a>
[]
https://avatars.githubusercontent.com/u/2906836?v=4
match-finder
artronics/match-finder
2023-09-14T23:33:00Z
A fuzzy finder library written in zig
main
0
3
1
3
https://api.github.com/repos/artronics/match-finder/tags
-
[ "fuzzy-finder", "fzf", "string-matching", "zig" ]
494
false
2025-03-09T23:15:45Z
true
false
unknown
github
[]
MatchFinder A fuzzy finder similar to <a>fzf-native-vim</a> but with different scoring algorithm. <strong>NOTE:</strong> This is not a CLI tool but a library. Search term The search term is backward compatible with fzf. ``` foo -&gt; fuzzy 'foo -&gt; exact ^foo -&gt; prefix-exact foo$ -&gt; suffix-exact !foo -&gt; inverse-exact !^foo -&gt; inverse-prefix-exact !foo$ -&gt; inverse-suffix-exact // Note that OR has precedence over AND foo ^bar baz$ -&gt; (and (and foo ^bar) baz$) 'foo | !bar !baz$ | !^bax -&gt; (and (or 'foo !bar) (or !baz$ !^bax)) ``` Usage See <code>main.zig</code> tests for more examples. ```zig test "example usage" { const a = testing.allocator; <code>const texts = &amp;[_][]const u8{ "unique", "foo", "foobar", "barfoo", "$order^^^", "xyz_", "abxy", "$order^", "$order^^" }; var matcher = MatchFinder.init(a, texts); defer matcher.deinit(); { const or_bin = try matcher.search("unique | foo"); defer a.free(or_bin); try expect(or_bin.len == 4); const and_bin = try matcher.search("foo bar"); defer a.free(and_bin); try expect(and_bin.len == 2); const or_and = try matcher.search("foo foo | bar"); defer a.free(or_and); try expect(or_and.len == 3); } </code> } ```
[]
https://avatars.githubusercontent.com/u/155343329?v=4
honey
honey-lang/honey
2024-01-01T04:51:42Z
The official repository for the Honey programming language.
master
2
3
0
3
https://api.github.com/repos/honey-lang/honey/tags
AGPL-3.0
[ "language", "scripting", "zig", "ziglang" ]
866
false
2025-04-14T07:41:22Z
true
true
0.14.0
github
[ { "commit": "refs", "name": "clap", "tar_url": "https://github.com/Hejsil/zig-clap/archive/refs.tar.gz", "type": "remote", "url": "https://github.com/Hejsil/zig-clap" } ]
honey honey is a small, embeddable scripting language written in Zig. At its core, honey takes inspiration from languages like Zig, JavaScript/TypeScript, Rust, and Elixir. It's designed to be a simple and easy to use language with a high ceiling for power users. Performance is a key goal of honey, and it's designed to be as fast as possible. Benchmarks will be provided in the future. building honey can be built using this simple command: <code>zig build -Doptimize=ReleaseFast</code> examples accumulator Like JavaScript, honey supports <code>let</code> and <code>const</code> bindings. It also supports the continue expression (<code>i += 1</code> in this case) from Zig. ```zig const ITERATIONS = 100; // while loop form while(i &lt; ITERATIONS): (i += 1) { @println("Iterations: ", i); } // for loop (exclusive) for (0..ITERATIONS) |i| { let doubled = i * 2; @println("Iterations Doubled: ", doubled); } // for loop (inclusive) for (0...ITERATIONS) |i| { let tripled = i * 3; @println("Iterations Tripled: ", tripled); } ```
[]
https://avatars.githubusercontent.com/u/1973?v=4
oblique
will/oblique
2023-02-20T15:35:30Z
a random oblique strategy
main
0
3
0
3
https://api.github.com/repos/will/oblique/tags
-
[ "nix", "oblique-strategies", "zig" ]
27
false
2024-12-12T13:36:12Z
true
true
unknown
github
[]
404
[]
https://avatars.githubusercontent.com/u/32912555?v=4
xv6-riscv-zig
candrewlee14/xv6-riscv-zig
2023-08-22T22:28:05Z
xv6-riscv + Zig
main
0
3
1
3
https://api.github.com/repos/candrewlee14/xv6-riscv-zig/tags
NOASSERTION
[ "operating-systems", "riscv", "xv6", "xv6-riscv", "zig" ]
17,952
false
2025-02-03T04:52:48Z
true
false
unknown
github
[]
xv6-riscv-zig This compiles the xv6-riscv project with the Zig build system, and supports incrementally swapping out C code for Zig code. There are examples of kernel code and user programs using both C and Zig. Can build on Linux, OSX, and even Windows with only these system dependencies: - Zig 0.12 (<a>download here</a>) - QEMU Usage To run the kernel in QEMU, run: <code>bash zig build -fqemu</code> To run the kernel in QEMU with GDB, run: <code>bash zig build -fqemu -Dgdb</code> For GDB, you'll need <code>gdb-multiarch</code>. Then you can run <code>gdb-multiarch -x ./.gdbinit.tmpl-riscv</code>. Adding a User Program Simply add a C or Zig file that has a <code>main</code> to the <code>src/user/</code> folder. Then add it to the <code>user_progs</code> array in <code>build.zig</code>. <code>zig const user_progs = [_]Prog{ .{ .type = &lt;YOUR PROGRAM LANGUAGE&gt;, .name = &lt;YOUR PROGRAM NAME&gt; }, // &lt;- new program .{ .type = .zig, .name = "pbz" }, .{ .type = .c, .name = "pb" }, ... };</code> See the user programs pb (<a>C source</a>) vs. pbz (<a>Zig source</a>) for examples. Original README xv6 is a re-implementation of Dennis Ritchie's and Ken Thompson's Unix Version 6 (v6). xv6 loosely follows the structure and style of v6, but is implemented for a modern RISC-V multiprocessor using ANSI C. ACKNOWLEDGMENTS xv6 is inspired by John Lions's Commentary on UNIX 6th Edition (Peer to Peer Communications; ISBN: 1-57398-013-7; 1st edition (June 14, 2000)). See also https://pdos.csail.mit.edu/6.1810/, which provides pointers to on-line resources for v6. The following people have made contributions: Russ Cox (context switching, locking), Cliff Frey (MP), Xiao Yu (MP), Nickolai Zeldovich, and Austin Clements. We are also grateful for the bug reports and patches contributed by Takahiro Aoyagi, Silas Boyd-Wickizer, Anton Burtsev, carlclone, Ian Chen, Dan Cross, Cody Cutler, Mike CAT, Tej Chajed, Asami Doi, eyalz800, Nelson Elhage, Saar Ettinger, Alice Ferrazzi, Nathaniel Filardo, flespark, Peter Froehlich, Yakir Goaron, Shivam Handa, Matt Harvey, Bryan Henry, jaichenhengjie, Jim Huang, Matúš Jókay, John Jolly, Alexander Kapshuk, Anders Kaseorg, kehao95, Wolfgang Keller, Jungwoo Kim, Jonathan Kimmitt, Eddie Kohler, Vadim Kolontsov, Austin Liew, l0stman, Pavan Maddamsetti, Imbar Marinescu, Yandong Mao, Matan Shabtay, Hitoshi Mitake, Carmi Merimovich, Mark Morrissey, mtasm, Joel Nider, Hayato Ohhashi, OptimisticSide, Harry Porter, Greg Price, Jude Rich, segfault, Ayan Shafqat, Eldar Sehayek, Yongming Shen, Fumiya Shigemitsu, Cam Tenny, tyfkda, Warren Toomey, Stephen Tu, Rafael Ubal, Amane Uehara, Pablo Ventura, Xi Wang, WaheedHafez, Keiichi Watanabe, Nicolas Wolovick, wxdao, Grant Wu, Jindong Zhang, Icenowy Zheng, ZhUyU1997, and Zou Chang Wei. The code in the files that constitute xv6 is Copyright 2006-2022 Frans Kaashoek, Robert Morris, and Russ Cox. ERROR REPORTS Please send errors and suggestions to Frans Kaashoek and Robert Morris (kaashoek,rtm@mit.edu). The main purpose of xv6 is as a teaching operating system for MIT's 6.1810, so we are more interested in simplifications and clarifications than new features. BUILDING AND RUNNING XV6 You will need a RISC-V "newlib" tool chain from https://github.com/riscv/riscv-gnu-toolchain, and qemu compiled for riscv64-softmmu. Once they are installed, and in your shell search path, you can run "make qemu".
[]
https://avatars.githubusercontent.com/u/20820?v=4
drtl
jiripospisil/drtl
2023-06-20T21:11:19Z
Yet another tldr client written in Zig
master
0
3
0
3
https://api.github.com/repos/jiripospisil/drtl/tags
MIT
[ "tldr", "tldr-client", "zig", "ziglang" ]
1,755
false
2025-01-03T17:03:50Z
true
false
unknown
github
[]
drtl Yet another <a>tldr</a> client. Written mostly as an exercise to try Zig. The client doesn't maintain a local database of tldr pages but rather embeds all of them in the binary. Installation ``` On Arch Linux paru -Sy drtl-bin ``` You can also just use the <a>prebuilt binaries</a> or build it yourself. Usage ``` Usage: drtl Prints tldr page for the given name. Pages are split into several categories (android, common, linux, osx, sunos, and windows). If you want a page for a specific category, use "category/name". Options: -h, --help print this help -v, --version print version -l, --list list all pages ``` Building from Source Tested with <a>Zig</a> <code>0.11.0-dev.3726+8fcc28d30</code>. <code>./update_pages.bash # Optionally update tldr pages zig build</code> License MIT
[]
https://avatars.githubusercontent.com/u/6811788?v=4
zig_emscripten_threads
permutationlock/zig_emscripten_threads
2023-09-20T13:59:14Z
A toy example showing Zig threads working in Emscripten
main
0
3
0
3
https://api.github.com/repos/permutationlock/zig_emscripten_threads/tags
-
[ "emscripten", "threads", "zig" ]
7
false
2025-04-13T23:30:59Z
true
false
unknown
github
[]
Zig threads in Emscripten A toy example showing Zig threads working in the browser with Emscripten. Currently requires the standard library patch <a>#19287</a>. Also, there are issues with allocators in Emscripten release builds when not using the <code>emcc</code> flag <code>-s USE_OFFSET_CONVERTER</code>, see <a>here</a>. A go webserver is provided to host the Emscripten app with cross-origin isolation turned on. Threading in Emscripten uses the experimental shared memory browser features which can only run in pages with cross-origin isolation. To build and host the application: <code>Shell zig build --sysroot [emsdk]/upstream/emscripten go run server.go</code> Then go to <a>http://127.0.0.1:8083</a> in a browser to hopefully see the printout and no console errors.
[]
https://avatars.githubusercontent.com/u/24381727?v=4
YAME
j0nimost/YAME
2023-07-26T05:15:11Z
Yet Another Math Expression Parser
main
0
2
0
2
https://api.github.com/repos/j0nimost/YAME/tags
-
[ "mathparser", "pratt-parser", "zig" ]
4
false
2023-11-01T17:12:07Z
false
false
unknown
github
[]
YAME Yet Another Math Expression Parser. Inspiration Learning How Different Parsers work, In this case the Pratt Parser How To <ul> <li>Install Zig version 0.10.1 : https://ziglang.org/learn/getting-started/</li> <li>Run <code>zig run main.zig</code></li> </ul> Author John Nyingi
[]
https://avatars.githubusercontent.com/u/23142073?v=4
wgsl-preprocessor
jrachele/wgsl-preprocessor
2023-06-18T02:40:00Z
Shader preprocessor for WGSL, written in Zig
main
0
2
0
2
https://api.github.com/repos/jrachele/wgsl-preprocessor/tags
MIT
[ "bevy", "mach", "preprocessor", "shaders", "wgsl", "zig" ]
14
false
2023-06-24T20:08:31Z
true
false
unknown
github
[]
WGSL Preprocessor Does what it says on the tin. Written in Zig. Inspired by Bevy's preprocessor. Features Import other files using the <code>#import</code> directive <em>shader.wgsl</em>: ```wgsl import "other_shader.wgsl" var b = 10; ``` <em>other_shader.wgsl</em>: <code>wgsl var a = 5;</code> <em>Result</em>: ```wgsl var a = 5; var b = 10; ``` <code>#if</code> directives with conditions at shader compile time <code>zig // ... somewhere in your Zig code const processed_wgsl = ShaderPreprocessor.process("conditional.wgsl", .{ .conditions = .{ .full_screen = global.config.full_screen, .mouse_captured = false, .foo = true, } });</code> <em>conditional.wgsl</em>: ```wgsl if full_screen var screen_dims = vec2(1920, 1080); else var screen_dims = vec2(1280, 720); endif @compute @workgroup_size(8, 8, 1) fn main() { #if mouse_captured // Do something #endif <code>#if foo // Do something else #endif </code> } ``` Constants to inject into the shader at compile time using <code>#(constant_ident)</code> <code>zig // ... somewhere in your Zig code const processed_wgsl = ShaderPreprocessor.process("constants.wgsl", .{ .constants = .{ .workgroup_x = app.config.workgroup_size, .workgroup_y = app.config.workgroup_size, } });</code> <em>constants.wgsl</em>: <code>wgsl @compute @workgroup_size(#(workgroup_x), #(workgroup_y), 1) fn main() { }</code> Removing comments and whitespace There are options available for removing comments and whitespace: <code>zig // ... somewhere in your Zig code const processed_wgsl = ShaderPreprocessor.process("comment.wgsl", .{ .options = .{ .remove_comments = true, .remove_whitespace = true, } });</code> <em>comment.wgsl</em>: ```wgsl var a = 1; /<em> * This is a block comment * </em>/ var b = 2; // This is a line comment // Here's another var c = 3; // Comment at the end! ``` <em>Result with only remove_comments = true</em>: ```wgsl var a = 1; var b = 2; var c = 3; ``` <em>Result with both remove_comments = true and remove_whitespace = true</em>: <code>wgsl var a = 1;var b = 2;var c = 3;</code> Dependencies <ul> <li>Mecha - parser combinator library</li> </ul>
[]
https://avatars.githubusercontent.com/u/16154204?v=4
baurinum
bauripalash/baurinum
2023-04-29T03:46:24Z
Simple and Lightweight (Prototype) BigNum Library for C
main
0
2
0
2
https://api.github.com/repos/bauripalash/baurinum/tags
MIT
[ "bigint", "bignum", "bignumber", "c", "mathematics", "zig", "ziglang" ]
46
false
2023-07-17T05:27:30Z
false
false
unknown
github
[]
baurinum 🐢 <strong>Simple and somewhat fast prototype bignum library written in C and Zig</strong> <blockquote> Simplicity over speed </blockquote> Why There exists many optimized production grade <code>bignum</code> libraries, but why create own? You might ask. This project has been started as a part of <a>CPank</a>, the interpreter for pankti programming language to provide a small and minimal bignum library for internal usage of Cpank, but I have decided to move out the project to its own separate repository. The Cpank uses baurinum's C version, before than it uses to use GNU GMP and MPFR library but those libraries are huge, my interpreter binary's size went from 397KB size to 2490KB in an instant; plus, it is really a hassle to install GMP and MPFR for usage with MSVC and Visual Studio, so I decided to write my own minimal bignum library. This project is heavily inspired from books such as Handbook of Applied Cryptography and importantly elementary school books. I am getting also inspired from the awesome library <a>tommath</a>. After the Cpank was deprecated in favour of <code>neopank</code>, cpank counterpart written in Zig, I developed a Zig version of this Library. The <code>C</code> version can be found at the <code>c</code> subdirectory, while the <code>zig</code> version can be found on the <code>zig</code> subdirectory. Building (C Version) This project doesn't depend on any external libraries, just the c standard library, the project is written with C11 standard, you will need a C11 compatiable to build the project, most modern compilers such as GCC, Clang, MSVC would do the job, on *nix systems or on windows MSYS2, just run <code>make</code> and it will build it instantly, for MSVC you might need to create special scripts, mostly 1 or 2 lines do the job. Building (Zig Version) Just install the latest master build from zig's official site and install it, then just run <code>zig build</code> or <code>make</code> License MIT ⚠️ Motto Simplicity over Speed
[]
https://avatars.githubusercontent.com/u/12962448?v=4
zig-central
star-tek-mb/zig-central
2023-02-10T11:53:09Z
Package registry/index for zig
master
0
2
0
2
https://api.github.com/repos/star-tek-mb/zig-central/tags
MIT
[ "package-manager", "zig" ]
13
false
2023-07-28T03:10:05Z
false
false
unknown
github
[]
Overview <code>zig-central</code> - is a package registry for zig. https://central.decoy.uz Status Status early alpha development TODO <ul> <li> Check for zig package manager compatibility </li> <li> Show package dependency if any (scan <code>build.zig.zon</code>) </li> <li> Show available artifacts (static/shared library) or modules of dependency </li> <li> Version history (based on tags?) </li> <li> Search, pagination </li> <li> Compute hash of package (we can borrow algorithm from zig source code, but i want a zig cli for computing hash) </li> <li> Rewrite in Zig? :-) </li> </ul>
[]
https://avatars.githubusercontent.com/u/40660493?v=4
ZDSM
0x4c756e61/ZDSM
2024-01-27T13:42:31Z
⚡ Blazingly fast ⚡ and efficient implementation of the BDSM protocol, ZDSM prioritizes speed and modularity. Monitor your server's health with minimal impact and enjoy a modular design for easy customization ⚙️.
main
8
2
0
2
https://api.github.com/repos/0x4c756e61/ZDSM/tags
AGPL-3.0
[ "foss", "servermonitoring", "zig", "ziglang" ]
52
false
2024-09-10T15:14:04Z
true
true
unknown
github
[ { "commit": "refs", "name": "zap", "tar_url": "https://github.com/edyu/zap/archive/refs.tar.gz", "type": "remote", "url": "https://github.com/edyu/zap" } ]
⚡ZDSM ⚡ - Zig Implementation of BDSM Protocol ZDSM is a ⚡blazingly fast ⚡ and efficient implementation of the BDSM (Basic Data Server Monitoring) protocol. It is designed to monitor your server's health with minimal impact, focusing on speed and modularity. Key Features <ul> <li><strong>⚡Blazingly Fast ⚡:</strong> ZDSM ensures swift and responsive server monitoring.</li> <li><strong>Efficient Implementation:</strong> Minimal impact on server resources for optimal performance.</li> <li><strong>Modular Design:</strong> Easily customizable with a pluging system. (not yet available)</li> <li><strong>BDSM Protocol:</strong> Implements the BDSM protocol for simple server monitoring.</li> </ul> Getting Started Prerequisites <ul> <li><strong>Linux Compatibility:</strong> Currently, ZDSM does not support Windows due to underlying library limitations. If you need to run ZDSM on Windows, you can use the Windows Subsystem for Linux (WSL), but please note that this may incur a performance cost.</li> <li><strong>Glibc Dependency:</strong> Ensure that your system uses the GNU implementation of the C library (Glibc). If your system relies on a different libc implementation, you will need to compile ZDSM manually to ensure compatibility.</li> </ul> Installation Automatic Installation For a quick and automated installation, you can use the following one-liner in your terminal. This command will download and execute the installation script: <code>bash sh &lt;(curl -sSf https://raw.githubusercontent.com/0x454d505459/ZDSM/main/install.sh)</code> Quick note: make sure you always check the scripts before executing them Manual Installation <ol> <li><strong>Get the Latest Release:</strong></li> <li> Download the latest <a>release</a> or compile it yourself. </li> <li> <strong>Set Execute Permission:</strong> </li> <li> Make sure the binary has the execute permission: <code>bash chmod +x zdsm</code> </li> <li> <strong>Move Binary to /usr/bin:</strong> </li> <li> Move the binary to the <code>/usr/bin</code> directory: <code>bash sudo mv zdsm /usr/bin</code> </li> <li> <strong>Run ZDSM:</strong> </li> <li> You can now run ZDSM by executing the following command in your terminal: <code>bash zdsm</code> </li> <li> <strong>Optional: Create Your Service File:</strong> </li> <li>If needed, you may want to create your own service file based on your system's requirements.</li> </ol> Usage To retrieve information from your server, you'll need a client that supports the new BDSM protocol. As of now, the official client is undergoing a complete rewrite and is not yet available.However, if necessary, an adapted version of the old client has been modified to use the new protocol. You can find this version available in <a>this fork</a>. In the meantime, you can still query the server using tools like <code>curl</code> or <code>xh</code> in your terminal. Here's an example using <code>curl</code>: <code>bash curl -H "Authorization: Bearer &lt;your-password&gt;" http://localhost:3040/api</code> Replace <code>&lt;your-password&gt;</code> with your actual server password. Configuration You can customize your ZDSM server by editing the following environment variables. <ul> <li><strong>PORT (Default: 3040):</strong></li> <li> Set the port on which the ZDSM server will run. </li> <li> <strong>SERVER_NAME (Default: "Unnamed server"):</strong> </li> <li> Provide a name for your server. </li> <li> <strong>PASSWORD (Default: "admin"):</strong> </li> <li>Set the password for server authentication.</li> </ul> Additionally, ZDSM follows a specific configuration lookup order: <ol> <li><strong>Look for <code>.env</code> File:</strong></li> <li> ZDSM first looks for a file named <code>.env</code> next to the executable. If found, it will use the configuration from this file. </li> <li> <strong>Fallback to Environment Variables:</strong> </li> <li> If no <code>.env</code> file is found, ZDSM will check for the specified environment variables. You can set these directly in your environment. </li> <li> <strong>Default Configuration:</strong> </li> <li>If neither an <code>.env</code> file nor environment variables are provided, ZDSM will fallback to the hardcoded configuration.</li> </ol> Compiling If you prefer to compile ZDSM from source for various reasons, follow these steps: <ol> <li><strong>Clone the Project:</strong></li> <li> Clone the ZDSM project from the GitHub repository: <code>bash git clone https://github.com/0x454d505459/ZDSM.git</code> </li> <li> <strong>Build the Project:</strong> </li> <li> Navigate to the project directory and run the build step using Zig: <code>bash cd ZDSM zig build</code> </li> <li> <strong>Locate the Binary:</strong> </li> <li>After the build process completes, you can find the ZDSM binary in the following path: <code>bash zig-out/bin/ZDSM</code></li> </ol> Contributing Feel free to contribute to the development of ZDSM by opening issues or pull requests on the GitHub repository. License This project is licensed under the <a>AGPLv3 license</a>
[]
https://avatars.githubusercontent.com/u/380158?v=4
kdev-zig
frmdstryr/kdev-zig
2023-10-21T20:08:45Z
KDevelop plugin which provides Zig language support.
master
0
2
0
2
https://api.github.com/repos/frmdstryr/kdev-zig/tags
LGPL-2.1
[ "editor", "ide", "kdevelop", "kdevelop-plugin", "zig" ]
463
true
2025-04-24T09:34:50Z
false
false
unknown
github
[]
Zig Language Support plugin This a plugin for <a>KDevelop</a> that adds language support for Zig. It uses zig's builtin parser via a library. Features <ul> <li>Syntax error messages</li> <li>Syntax highlighting of structs, fns, enums. Rainbow colored local vars</li> <li>Goto decl, view doc comments on hover.</li> <li>Highlight usages on hover, lookup uses of fns, vars, etc..</li> <li>Resolve imports from zig std lib and user defined packages</li> <li>Evalutate some comptime expressions (enum switches, if exprs, basic math exprs)</li> <li>Basic typed fn resolution for fns that return structs or typed params (still WIP)</li> <li>Hints for type mismatches, missing args, invalid enum/struct fields, etc..</li> </ul> Screenshots Resolving basic math expressions The following shows it is able to resolve methods of a USBCDC driver using zig's builtin buffered writer to print. Compiling First, build and install kdevelop from source so the test libraries are availble. Build kdev-zig You must have zig installed somewhere where FindZig.cmake will find it (eg ".local/bin"). To build use: <code>mkdir build cd build cmake -G ninja -DBUILD_TESTING=OFF .. ninja install</code> Use <code>zig test duchain/kdevzigastparser.zig</code> to run zig tests. Comple with <code>BUILD_TESTING=ON</code> and run the <code>duchaintest</code> for kdev-zig tests. This may require require a locally built KDevelop for it to find the test dependencies. In case you run into problems/crashing with it use <code>ninja uninstall</code> to remove it. To enable debug logging set the following env var. <code>bash export QT_LOGGING_RULES="kdevelop.languages.zig.duchain.debug=true;"</code> Running <blockquote> Note: Make sure you have a file assoication setup for zig in "File associations" or it will not parse files. In KDE Plasma add a new entry<code>text/x-zig</code> for all <code>*.zig</code> files. </blockquote> Build and install, set the zig file association, and then run KDevelop. Versions kdev-zig currently supports zig 0.12.0, 0.13.0, and 0.14.0 however due to ast changes in zig it cannot support all versions at once. <ul> <li>For zig <code>0.14.0</code> use the master branch</li> <li>For zig <code>0.12.0</code> and <code>0.13.0</code> use the kdev-zig <code>v0.13.0</code> tag. </li> </ul> License It was forked from kdev-rust and borrows code from kdev-python so licensed under the GPL.
[]
https://avatars.githubusercontent.com/u/5464072?v=4
zig-iso-3166-countrys
nektro/zig-iso-3166-countrys
2023-11-02T01:53:10Z
Zig package for ISO 3166 Country Codes
master
0
2
0
2
https://api.github.com/repos/nektro/zig-iso-3166-countrys/tags
0BSD
[ "zig", "zig-package" ]
8
false
2025-05-21T20:33:21Z
true
false
unknown
github
[]
zig-iso-3166-countrys <a></a> <a></a> <a></a> <a></a> ISO 3166 Country Codes https://www.iso.org/iso-3166-country-codes.html
[]
https://avatars.githubusercontent.com/u/13823329?v=4
zigterpreter
aryanrsuri/zigterpreter
2023-06-02T04:34:36Z
Writing monkey lang interpreter in zig
master
0
2
0
2
https://api.github.com/repos/aryanrsuri/zigterpreter/tags
MIT
[ "c", "monkey", "monkey-lang", "monkey-language", "zig" ]
30
false
2025-04-04T02:26:47Z
true
false
unknown
github
[]
Zigterpreter (0.0.26) Making a monkey lang interpreter in zig From the book Writing an interpreter in go [https://interpreterbook.com/] The author Thorsten Ball is smart, I reccomend buying the book to support his work Working on chapter 2 currently, in the pratt parser If you have any code reccomendations based on what you see, please let me know as I am simply learning Zig (not an expert) Would love recomendations specifically on the Zig code specifically not so much the implementation of the interpreter if that makes sense LICENCE: MIT
[]
https://avatars.githubusercontent.com/u/25630273?v=4
mazes-wasm
verdog/mazes-wasm
2023-04-27T00:40:29Z
Maze generator ported from a native sdl2/zig app to wasm
main
0
2
0
2
https://api.github.com/repos/verdog/mazes-wasm/tags
-
[ "zig" ]
86,137
false
2024-10-12T23:15:43Z
true
false
unknown
github
[]
Maze generator in zig/SDL2 ported to run in the browser/WASM. Try it out at https://dogspluspl.us/mazeme! Building Use zig 0.11.0. First, update submodules: <code>git submodule update --init</code> Then: <code>zig build</code> or <code>zig build -Drelease-fast</code>
[]
https://avatars.githubusercontent.com/u/102580937?v=4
libgitz
terrablue/libgitz
2023-02-17T23:42:35Z
libgit2 with the build system replaced by zig
master
1
2
0
2
https://api.github.com/repos/terrablue/libgitz/tags
NOASSERTION
[ "git", "libgit2", "zig", "ziglang" ]
34,894
true
2024-11-24T20:45:26Z
true
true
unknown
github
[ { "commit": "f9e15eb744879e87257fc7413749c94924ae5b2e.tar.gz", "name": "http_parser", "tar_url": "https://github.com/terrablue/http_parser/archive/f9e15eb744879e87257fc7413749c94924ae5b2e.tar.gz.tar.gz", "type": "remote", "url": "https://github.com/terrablue/http_parser" }, { "commit": "...
This is a fork of <a>libgit2</a>, packaged for Zig. Vendored dependencies have been extracted to their own repositories, and the build system has been replaced with <code>build.zig</code>. Original README follows: libgit2 - the Git linkable library | Build Status | | | ------------ | - | | <strong>main</strong> branch CI builds | <a></a> | | <strong>v1.5 branch</strong> CI builds | <a></a> | | <strong>v1.4 branch</strong> CI builds | <a></a> | | <strong>Nightly</strong> builds | <a></a> <a></a> | <code>libgit2</code> is a portable, pure C implementation of the Git core methods provided as a linkable library with a solid API, allowing to build Git functionality into your application. Language bindings like <a>Rugged</a> (Ruby), <a>LibGit2Sharp</a> (.NET), <a>pygit2</a> (Python) and <a>NodeGit</a> (Node) allow you to build Git tooling in your favorite language. <code>libgit2</code> is used to power Git GUI clients like <a>GitKraken</a> and <a>gmaster</a> and on Git hosting providers like <a>GitHub</a>, <a>GitLab</a> and <a>Azure DevOps</a>. We perform the merge every time you click "merge pull request". <code>libgit2</code> is licensed under a <strong>very permissive license</strong> (GPLv2 with a special Linking Exception). This basically means that you can link it (unmodified) with any kind of software without having to release its source code. Additionally, the example code has been released to the public domain (see the <a>separate license</a> for more information). Table of Contents <ul> <li><a>Using libgit2</a></li> <li><a>Quick Start</a></li> <li><a>Getting Help</a></li> <li><a>What It Can Do</a></li> <li><a>Optional dependencies</a></li> <li><a>Initialization</a></li> <li><a>Threading</a></li> <li><a>Conventions</a></li> <li><a>Building libgit2 - Using CMake</a><ul> <li><a>Building</a></li> <li><a>Installation</a></li> <li><a>Advanced Usage</a></li> <li><a>Compiler and linker options</a></li> <li><a>MacOS X</a></li> <li><a>Android</a></li> <li><a>MinGW</a></li> </ul> </li> <li><a>Language Bindings</a></li> <li><a>How Can I Contribute?</a></li> <li><a>License</a></li> </ul> Using libgit2 Most of these instructions assume that you're writing an application in C and want to use libgit2 directly. If you're <em>not</em> using C, and you're writing in a different language or platform like .NET, Node.js, or Ruby, then there is probably a "<a>language binding</a>" that you can use to take care of the messy tasks of calling into native code. But if you <em>do</em> want to use libgit2 directly - because you're building an application in C - then you may be able use an existing binary. There are packages for the <a>vcpkg</a> and <a>conan</a> package managers. And libgit2 is available in <a>Homebrew</a> and most Linux distributions. However, these versions <em>may</em> be outdated and we recommend using the latest version if possible. Thankfully libgit2 is not hard to compile. Quick Start <strong>Prerequisites</strong> for building libgit2: <ol> <li><a>CMake</a>, and is recommended to be installed into your <code>PATH</code>.</li> <li><a>Python</a> is used by our test framework, and should be installed into your <code>PATH</code>.</li> <li>C compiler: libgit2 is C90 and should compile on most compilers.</li> <li>Windows: Visual Studio is recommended</li> <li>Mac: Xcode is recommended</li> <li>Unix: gcc or clang is recommended.</li> </ol> <strong>Build</strong> <ol> <li>Create a build directory beneath the libgit2 source directory, and change into it: <code>mkdir build &amp;&amp; cd build</code></li> <li>Create the cmake build environment: <code>cmake ..</code></li> <li>Build libgit2: <code>cmake --build .</code></li> </ol> Trouble with these steps? Read our <a>troubleshooting guide</a>. More detailed build guidance is available below. Getting Help <strong>Chat with us</strong> <ul> <li>via IRC: join <a>#libgit2</a> on <a>libera</a>.</li> <li>via Slack: visit <a>slack.libgit2.org</a> to sign up, then join us in <code>#libgit2</code></li> </ul> <strong>Getting Help</strong> If you have questions about the library, please be sure to check out the <a>API documentation</a>. If you still have questions, reach out to us on Slack or post a question on <a>StackOverflow</a> (with the <code>libgit2</code> tag). <strong>Reporting Bugs</strong> Please open a <a>GitHub Issue</a> and include as much information as possible. If possible, provide sample code that illustrates the problem you're seeing. If you're seeing a bug only on a specific repository, please provide a link to it if possible. We ask that you not open a GitHub Issue for help, only for bug reports. <strong>Reporting Security Issues</strong> Please have a look at SECURITY.md. What It Can Do libgit2 provides you with the ability to manage Git repositories in the programming language of your choice. It's used in production to power many applications including GitHub.com, Plastic SCM and Azure DevOps. It does not aim to replace the git tool or its user-facing commands. Some APIs resemble the plumbing commands as those align closely with the concepts of the Git system, but most commands a user would type are out of scope for this library to implement directly. The library provides: <ul> <li>SHA conversions, formatting and shortening</li> <li>abstracted ODB backend system</li> <li>commit, tag, tree and blob parsing, editing, and write-back</li> <li>tree traversal</li> <li>revision walking</li> <li>index file (staging area) manipulation</li> <li>reference management (including packed references)</li> <li>config file management</li> <li>high level repository management</li> <li>thread safety and reentrancy</li> <li>descriptive and detailed error messages</li> <li>...and more (over 175 different API calls)</li> </ul> As libgit2 is purely a consumer of the Git system, we have to adjust to changes made upstream. This has two major consequences: <ul> <li>Some changes may require us to change provided interfaces. While we try to implement functions in a generic way so that no future changes are required, we cannot promise a completely stable API.</li> <li>As we have to keep up with changes in behavior made upstream, we may lag behind in some areas. We usually to document these incompatibilities in our issue tracker with the label "git change".</li> </ul> Optional dependencies While the library provides git functionality without the need for dependencies, it can make use of a few libraries to add to it: <ul> <li>pthreads (non-Windows) to enable threadsafe access as well as multi-threaded pack generation</li> <li>OpenSSL (non-Windows) to talk over HTTPS and provide the SHA-1 functions</li> <li>LibSSH2 to enable the SSH transport</li> <li>iconv (OSX) to handle the HFS+ path encoding peculiarities</li> </ul> Initialization The library needs to keep track of some global state. Call <code>git_libgit2_init(); </code> before calling any other libgit2 functions. You can call this function many times. A matching number of calls to <code>git_libgit2_shutdown(); </code> will free the resources. Note that if you have worker threads, you should call <code>git_libgit2_shutdown</code> <em>after</em> those threads have exited. If you require assistance coordinating this, simply have the worker threads call <code>git_libgit2_init</code> at startup and <code>git_libgit2_shutdown</code> at shutdown. Threading See <a>threading</a> for information Conventions See <a>conventions</a> for an overview of the external and internal API/coding conventions we use. Building libgit2 - Using CMake Building <code>libgit2</code> builds cleanly on most platforms without any external dependencies. Under Unix-like systems, like Linux, *BSD and Mac OS X, libgit2 expects <code>pthreads</code> to be available; they should be installed by default on all systems. Under Windows, libgit2 uses the native Windows API for threading. The <code>libgit2</code> library is built using <a>CMake</a> (version 2.8 or newer) on all platforms. On most systems you can build the library using the following commands <code>$ mkdir build &amp;&amp; cd build $ cmake .. $ cmake --build . </code> Alternatively you can point the CMake GUI tool to the CMakeLists.txt file and generate platform specific build project or IDE workspace. If you're not familiar with CMake, <a>a more detailed explanation</a> may be helpful. Running Tests Once built, you can run the tests from the <code>build</code> directory with the command <code>$ ctest -V </code> Alternatively you can run the test suite directly using, <code>$ ./libgit2_tests </code> Invoking the test suite directly is useful because it allows you to execute individual tests, or groups of tests using the <code>-s</code> flag. For example, to run the index tests: <code>$ ./libgit2_tests -sindex </code> To run a single test named <code>index::racy::diff</code>, which corresponds to the test function <a><code>test_index_racy__diff</code></a>: <code>$ ./libgit2_tests -sindex::racy::diff </code> The test suite will print a <code>.</code> for every passing test, and an <code>F</code> for any failing test. An <code>S</code> indicates that a test was skipped because it is not applicable to your platform or is particularly expensive. <strong>Note:</strong> There should be <em>no</em> failing tests when you build an unmodified source tree from a <a>release</a>, or from the <a>main branch</a>. Please contact us or <a>open an issue</a> if you see test failures. Installation To install the library you can specify the install prefix by setting: <code>$ cmake .. -DCMAKE_INSTALL_PREFIX=/install/prefix $ cmake --build . --target install </code> Advanced Usage For more advanced use or questions about CMake please read <a>https://cmake.org/Wiki/CMake_FAQ</a>. The following CMake variables are declared: <ul> <li><code>CMAKE_INSTALL_BINDIR</code>: Where to install binaries to.</li> <li><code>CMAKE_INSTALL_LIBDIR</code>: Where to install libraries to.</li> <li><code>CMAKE_INSTALL_INCLUDEDIR</code>: Where to install headers to.</li> <li><code>BUILD_SHARED_LIBS</code>: Build libgit2 as a Shared Library (defaults to ON)</li> <li><code>BUILD_TESTS</code>: Build the unit and integration test suites (defaults to ON)</li> <li><code>USE_THREADS</code>: Build libgit2 with threading support (defaults to ON)</li> </ul> To list all build options and their current value, you can do the following: <code># Create and set up a build directory $ mkdir build $ cmake .. # List all build options and their values $ cmake -L </code> Compiler and linker options CMake lets you specify a few variables to control the behavior of the compiler and linker. These flags are rarely used but can be useful for 64-bit to 32-bit cross-compilation. <ul> <li><code>CMAKE_C_FLAGS</code>: Set your own compiler flags</li> <li><code>CMAKE_FIND_ROOT_PATH</code>: Override the search path for libraries</li> <li><code>ZLIB_LIBRARY</code>, <code>OPENSSL_SSL_LIBRARY</code> AND <code>OPENSSL_CRYPTO_LIBRARY</code>: Tell CMake where to find those specific libraries</li> <li><code>LINK_WITH_STATIC_LIBRARIES</code>: Link only with static versions of system libraries</li> </ul> MacOS X If you want to build a universal binary for Mac OS X, CMake sets it all up for you if you use <code>-DCMAKE_OSX_ARCHITECTURES="i386;x86_64"</code> when configuring. Android Extract toolchain from NDK using, <code>make-standalone-toolchain.sh</code> script. Optionally, crosscompile and install OpenSSL inside of it. Then create CMake toolchain file that configures paths to your crosscompiler (substitute <code>{PATH}</code> with full path to the toolchain): <code>SET(CMAKE_SYSTEM_NAME Linux) SET(CMAKE_SYSTEM_VERSION Android) SET(CMAKE_C_COMPILER {PATH}/bin/arm-linux-androideabi-gcc) SET(CMAKE_CXX_COMPILER {PATH}/bin/arm-linux-androideabi-g++) SET(CMAKE_FIND_ROOT_PATH {PATH}/sysroot/) SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) </code> Add <code>-DCMAKE_TOOLCHAIN_FILE={pathToToolchainFile}</code> to cmake command when configuring. MinGW If you want to build the library in MinGW environment with SSH support enabled, you may need to pass <code>-DCMAKE_LIBRARY_PATH="${MINGW_PREFIX}/${MINGW_CHOST}/lib/"</code> flag to CMake when configuring. This is because CMake cannot find the Win32 libraries in MinGW folders by default and you might see an error message stating that CMake could not resolve <code>ws2_32</code> library during configuration. Another option would be to install <code>msys2-w32api-runtime</code> package before configuring. This package installs the Win32 libraries into <code>/usr/lib</code> folder which is by default recognized as the library path by CMake. Please note though that this package is meant for MSYS subsystem which is different from MinGW. Language Bindings Here are the bindings to libgit2 that are currently available: <ul> <li>C++<ul> <li>libqgit2, Qt bindings <a>https://projects.kde.org/projects/playground/libs/libqgit2/repository/</a></li> </ul> </li> <li>Chicken Scheme<ul> <li>chicken-git <a>https://wiki.call-cc.org/egg/git</a></li> </ul> </li> <li>D<ul> <li>dlibgit <a>https://github.com/s-ludwig/dlibgit</a></li> </ul> </li> <li>Delphi<ul> <li>GitForDelphi <a>https://github.com/libgit2/GitForDelphi</a></li> <li>libgit2-delphi <a>https://github.com/todaysoftware/libgit2-delphi</a></li> </ul> </li> <li>Erlang<ul> <li>Geef <a>https://github.com/carlosmn/geef</a></li> </ul> </li> <li>Go<ul> <li>git2go <a>https://github.com/libgit2/git2go</a></li> </ul> </li> <li>GObject<ul> <li>libgit2-glib <a>https://wiki.gnome.org/Projects/Libgit2-glib</a></li> </ul> </li> <li>Guile<ul> <li>Guile-Git <a>https://gitlab.com/guile-git/guile-git</a></li> </ul> </li> <li>Haskell<ul> <li>hgit2 <a>https://github.com/jwiegley/gitlib</a></li> </ul> </li> <li>Java<ul> <li>Jagged <a>https://github.com/ethomson/jagged</a></li> <li>Git24j <a>https://github.com/git24j/git24j</a></li> </ul> </li> <li>Javascript / WebAssembly ( browser and nodejs )<ul> <li>WASM-git <a>https://github.com/petersalomonsen/wasm-git</a></li> </ul> </li> <li>Julia<ul> <li>LibGit2.jl <a>https://github.com/JuliaLang/julia/tree/master/stdlib/LibGit2</a></li> </ul> </li> <li>Lua<ul> <li>luagit2 <a>https://github.com/libgit2/luagit2</a></li> </ul> </li> <li>.NET<ul> <li>libgit2sharp <a>https://github.com/libgit2/libgit2sharp</a></li> </ul> </li> <li>Node.js<ul> <li>nodegit <a>https://github.com/nodegit/nodegit</a></li> </ul> </li> <li>Objective-C<ul> <li>objective-git <a>https://github.com/libgit2/objective-git</a></li> </ul> </li> <li>OCaml<ul> <li>ocaml-libgit2 <a>https://github.com/fxfactorial/ocaml-libgit2</a></li> </ul> </li> <li>Parrot Virtual Machine<ul> <li>parrot-libgit2 <a>https://github.com/letolabs/parrot-libgit2</a></li> </ul> </li> <li>Perl<ul> <li>Git-Raw <a>https://github.com/jacquesg/p5-Git-Raw</a></li> </ul> </li> <li>Pharo Smalltalk<ul> <li>libgit2-pharo-bindings <a>https://github.com/pharo-vcs/libgit2-pharo-bindings</a></li> </ul> </li> <li>PHP<ul> <li>php-git2 <a>https://github.com/RogerGee/php-git2</a></li> </ul> </li> <li>Python<ul> <li>pygit2 <a>https://github.com/libgit2/pygit2</a></li> </ul> </li> <li>R<ul> <li>gert <a>https://docs.ropensci.org/gert</a></li> <li>git2r <a>https://github.com/ropensci/git2r</a></li> </ul> </li> <li>Ruby<ul> <li>Rugged <a>https://github.com/libgit2/rugged</a></li> </ul> </li> <li>Rust<ul> <li>git2-rs <a>https://github.com/rust-lang/git2-rs</a></li> </ul> </li> <li>Swift<ul> <li>SwiftGit2 <a>https://github.com/SwiftGit2/SwiftGit2</a></li> </ul> </li> <li>Tcl<ul> <li>lg2 <a>https://github.com/apnadkarni/tcl-libgit2</a></li> </ul> </li> <li>Vala<ul> <li>libgit2.vapi <a>https://github.com/apmasell/vapis/blob/master/libgit2.vapi</a></li> </ul> </li> </ul> If you start another language binding to libgit2, please let us know so we can add it to the list. How Can I Contribute? We welcome new contributors! We have a number of issues marked as <a>"up for grabs"</a> and <a>"easy fix"</a> that are good places to jump in and get started. There's much more detailed information in our list of <a>outstanding projects</a>. Please be sure to check the <a>contribution guidelines</a> to understand our workflow, and the libgit2 <a>coding conventions</a>. License <code>libgit2</code> is under GPL2 <strong>with linking exception</strong>. This means you can link to and use the library from any program, proprietary or open source; paid or gratis. However, if you modify libgit2 itself, you must distribute the source to your modified version of libgit2. See the <a>COPYING file</a> for the full license text.
[]
https://avatars.githubusercontent.com/u/1839807?v=4
wasm-hot-loading
Corendos/wasm-hot-loading
2023-06-19T15:43:54Z
WASM Module hotloading in native apps
master
0
2
0
2
https://api.github.com/repos/Corendos/wasm-hot-loading/tags
MIT
[ "cpp", "native", "wasm", "zig" ]
11,962
false
2024-09-17T15:11:37Z
false
false
unknown
github
[]
Wasm Hot-loading sample This directory contains a proof-of-concept of Wasm module hot-loading in native apps. It's composed of three main parts: * The sample core * The sample Wasm module * The server serving the Wasm module The Sample Core The sample core is responsible to wrap the Wasm Module into a C++ usable interface. The code for that is under the <code>whl</code> namespace and in the <code>whl/</code> sub-folder. It also contains convenience wrapper for the Wasm runtime we use, <a>wasm3</a>. It simply wraps the C interface in C++ classes. The Wasm module The Wasm module is available in the <code>wasm/zig/</code> sub-folder. It's written in the <a>Zig</a> programming language because of its first-class support of Wasm. The server In the <code>server/</code> subfolder, there is a very basic python server used to serve the Wasm module compiled from Zig sources. More details in the associated <a>README</a>. How to build Cloning the repository First, when cloning this repository, don't forget to get the submodules as well. If you're first cloning the repository you can do so with: <code>bash git clone git@github.com:Corendos/wasm-hot-loading.git --recursive</code> If you forgot, you can always fetch the submodules afterwards with: <code>bash git submodules update --init --recursive</code> Dependencies The required dependencies are: * <a>CMake</a> - Any version &gt;= 3.19 will work and you'll get an error message otherwise. * <a>Zig</a> - Zig is a pre-1.0 language so it's moving fast. This sample was tested with version <code>0.12.0-dev.1744+f29302f91</code>. * <a>Go</a> - Go language (This is a transitive dependency of BoringlSSL). Building the Sample Core You can build the sample CLI with: ```bash Configure the project cmake -Bbuild -DCMAKE_BUILD_TYPE=Debug . Build the sample cmake --build build --target sample --parallel ``` Alternatively, you can build all the targets with: <code>bash cmake --build build --target all --parallel</code> Running the sample The sample is a CLI executable and includes an usage string. Here is its content: ``` Wasm hot-loading sample Usage: ./build/bin/sample [OPTIONS] Options: -h,--help Print this help message and exit --module-url TEXT The URL of the Wasm module to load --key TEXT:FILE REQUIRED The Public key to use to verify Wasm module integrity --stack-size UINT:SIZE [b, kb(=1024b), ...] The size of the stack that will be allocated for the module instance ``` Building the sample Wasm module To build the sample Wasm module, you simply have to run the following command: ```bash Go to the module source directory cd wasm/zig Build it, optionally compiling it in ReleaseSmall mode zig build -Drelease= ``` This will produce the <code>zig-out/bin/module.wasm</code> artifact that will ultimately be served by the Python Flask application. Running the local server If not already done, initialize a virtualenv locally and install the dependencies using the <code>requirements.txt</code> file. Then, activate this virtual environment. Alternatively, if you know what you are doing, you can install the dependencies in the global Python interpreter environment. To run the Python Flask server, first update the <code>server/config.json</code> file if needed and then run the Flask app with: <code>bash cd server flask --app server run</code> Step-by-Step tutorial If you want to see results quickly, here is a fully detailed process of everything required to test this sample: ```bash Assuming your current directory is the root of the repository Create a Python3 virtual environment python3 -m venv venv Activate this environment source ./venv/bin/activate Install Python deps pip install -r requirements.txt Go the the Wasm sample module directory cd wasm/zig/ Build the module zig build -Drelease=true Go back to repository root cd ../.. Configure C++ project cmake -Bbuild -DCMAKE_BUILD_TYPE=Debug . Build C++ sample cmake --build build --target sample --parallel # /!\ In another terminal /!\ cd server Start Flask app with default config flask --app server run # /!\ In antoher terminal /!\ Launch the sample with Flask URL and default public key ./build/bin/sample --module-url http://127.0.0.1:5000/wasm/module.wasm --key certs/pubkey.pem ``` This should run the sample and print some message originating from the Wasm module. How it works First of all, we need to define the <code>Scheduler</code> notion. A <code>Scheduler</code> is the main building-block of this sample design. It has two roles: * Executing tasks once at a specific time or repeatedly at specific intervals. * Handling messages The <code>Scheduler</code> type is a template class with two templates, the type of message it can handle and the type of message handler it can notify. Generally speaking, the message handle is also a template class using the message type, so we are closer to having only one template type. A <code>Scheduler</code> executes scheduled tasks and message handler on a unique thread, ensuring a mono-threaded context. This is a strong guarantee as it enable us to avoid any synchronization primitives in the part of the code we know are running in the context of a Scheduler. In this sample, we have two separate <code>Scheduler</code>. The "global" <code>Scheduler</code> whose role is to handle all the "default" messages and the "Sample" <code>Scheduler</code> whose role is to handle all the messages and tasks that will ultimately be handled/run in Wasm code. The <code>whl::GlobalMessageType</code> and <code>whl::GlobalMessage</code> types represent the messages that the "Global" <code>Scheduler</code> can handle and the <code>whl::SampleMessageType</code> and <code>whl::SampleMessage</code> types represent the messages that the "Sample" <code>Scheduler</code> can handle. They have their counterparts declared in the Zig code as well and they need to stay in sync. If you take a look at the code (more specifically the <a><code>whl/src/whl/sample_module.cpp</code></a> file), you can see that the <code>SampleModule</code> class handles all the interaction with the Wasm Module and is handling messages sent to the "Sample" <code>Scheduler</code>. It's also exposing the "Global" <code>Scheduler</code> through a <code>Sender</code> interface so that the Wasm Module can send messages to it. Finally, all of this logic is wrapped in the <code>whl::WasmHotLoading</code> class (defined in <a><code>platform/bridge/cpp/wasm_hot_loading.cpp</code></a>), so that's easy to use from any platform (more details on that later). On top of that, a default Wasm module is embedded inside the built binary. It's generated from the Zig code in the <code>wasm/zig</code> folder and declared as an array literal in the <code>whl/include/whl/default_sample_module.hpp</code> file. To generate this file, I wrote a small Python script that can be found in <code>scripts/convert.py</code>. It's documented and pretty straightforward. This let us fallback to a known and tested module implementation if needed. Running it on and Android device Such a sample would not be complete if there wasn't something out of the ordinary. To show that this solution is multi-platform, I integrated it inside an Android app. It relies on a fork of <a>djinni</a> to generate bindings for Java and Objective-C. In the previous section, I talked about the <code>whl::WasmHotLoading</code> class. In practice, this class is an interface exposed in Java and Objective-C with an implementation in C++. This way, we can use the class seamlessly in a CLI app or Android app. This interface is defined using Djinni's Interface Definition Language (<a>IDL</a>) in the <code>djinni/whl.djinni</code> file. This file contains some comment to help you understand how it's supposed to be used. If you want to update this schema, you will need to regenerate the bindings using the <code>scripts/run_djinni.sh</code> script. Otherwise, the default version is committed with this repository and should work out-of-the box. To see the application in action, simply open the Android project in the <code>platform/android</code> folder and build it.
[]
https://avatars.githubusercontent.com/u/145422627?v=4
http.zig
crispy-strawberry/http.zig
2023-12-21T11:10:12Z
An HTTP/1.1 compliant client and server in Zig
main
0
2
0
2
https://api.github.com/repos/crispy-strawberry/http.zig/tags
Apache-2.0
[ "http", "tcp", "zig", "ziglang" ]
51
false
2023-12-28T18:16:09Z
true
true
unknown
github
[]
http.zig Creating an HTTP/1.1 compliant server in Zig. Using Let's look at how to use the <code>http</code> package in your own project. <ul> <li>Run the following command inside your project root - <code>zig fetch git+https://github.com/crispy-strawberry/http.zig#main --save=http</code></li> <li>Open <code>build.zig</code> add the following lines - ```zig const http = b.dependency("http", .{ .target = target, .optimize = optimize, });</li> </ul> exe.addModule("http", http.module("http")); <code>+ Enjoy!</code>zig const std = @import("std"); const http = @import("http"); const Server = http.Server; pub fn main() !void { var server = Server.init(allocator, .{ .reuse_port = true, }); defer server.deinit(); <code>try server.listen(std.net.Address.initIp4([_]u8{ 127, 0, 0, 1 }, 8000)); while (true) { try server.accept(); } </code> } ``` Options provided by the library The library provides two options to change the default settings. 1. Firstly, it provides <code>REQ_SIZE</code> to choose the max size of the request stored on the stack. Default is 4kb. 2. It also provides an option to choose the max size in bytes of the HTTP method. For example, <code>GET</code> is 3 bytes and <code>POST</code> is 4 bytes. The default maximum size for methods is 24 bytes. To change these, you can do - <code>zig const http = b.dependency("http", .{ .target = target, .optimize = optimize, .REQ_SIZE = @as(usize, 2048), .MAX_METHOD_SIZE = @as(u16, 32), });</code> License The library is dual licensed under <code>MPL-2.0</code> or <code>APACHE-2.0</code>. Choose at your own discretion. Contributing Please make pull requests to https://codeberg.org/crispy-strawberry/http.zig
[]
https://avatars.githubusercontent.com/u/129234716?v=4
beachdemo-astro.zig
beachglasslabs/beachdemo-astro.zig
2023-07-03T21:17:25Z
Netflix clone in Zig, Astro, AlpineJS, and HtmX.
master
0
2
1
2
https://api.github.com/repos/beachglasslabs/beachdemo-astro.zig/tags
-
[ "alpinejs", "astro", "htmx", "zig" ]
2,444
true
2025-01-27T11:26:11Z
true
true
unknown
github
[ { "commit": "refs", "name": "zap", "tar_url": "https://github.com/zigzap/zap/archive/refs.tar.gz", "type": "remote", "url": "https://github.com/zigzap/zap" } ]
beachdemo astro - netflix clone in This is based on <a>beachdemo.zig</a> with the addition of <a>Astro</a> for template composition. This particular project is written in ZAAX (Zig/Zap Astro Alpinejs htmX :stuck_out_tongue_winking_eye:): To test it out: 1. <code>git clone git@github.com:beachglasslabs/beachdemo-astro.zig.git</code> 2. <code>npm install</code> to install npm packages 3. <code>cp env.oauth.sample.json env.oauth.json</code> and then optionally fill out the oauth2 information from <a>github</a> and <a>google</a> 4. <code>npm run dev</code> to start the server 5. go to <a>http://localhost:3000</a> on your browser
[]
https://avatars.githubusercontent.com/u/40350332?v=4
Xjournal
Chanyon/Xjournal
2023-03-27T08:03:06Z
static website generated tool
main
0
2
1
2
https://api.github.com/repos/Chanyon/Xjournal/tags
MIT
[ "blog", "simple", "tool", "zig", "ziglang" ]
4,051
false
2024-10-17T20:56:01Z
true
true
unknown
github
[ { "commit": "5a681b4a34eb5f2c9dec37645f7742a61ffa9b76.tar.gz", "name": "httpz", "tar_url": "https://github.com/karlseguin/http.zig/archive/5a681b4a34eb5f2c9dec37645f7742a61ffa9b76.tar.gz.tar.gz", "type": "remote", "url": "https://github.com/karlseguin/http.zig" }, { "commit": "e0f1a961a2...
静态博客生成工具 使用方式 <ul> <li>git clone &amp;&amp; cd Xjournal</li> <li>zig build run</li> <li>./zig-out/bin/xj.exe new content</li> <li>./zig-out/bin/xj.exe build =&gt; output ./zig-out/bin/dist</li> <li>./zig-out/bin/xj.exe serve -p 3000</li> </ul> blog效果
[]
https://avatars.githubusercontent.com/u/12645379?v=4
RBDOOM-3-BFG
reeFridge/RBDOOM-3-BFG
2023-11-30T17:27:49Z
An ongoing effort to port RBDOOM-3-BFG parts to Zig
feature/ztech_common-init
4
2
0
2
https://api.github.com/repos/reeFridge/RBDOOM-3-BFG/tags
GPL-3.0
[ "rbdoom3bfg", "zig" ]
70,904
true
2025-05-17T21:56:14Z
false
false
unknown
github
[]
<code>`` ____ ____ ____ _____ ____ ______ ______ / __ \ / __ ) / __ \ ____ ____ ____ ___ |__ / / __ ) / ____// ____/ / /_/ // __ |/ / / // __ \ / __ \ / __</code><strong> \ /<em> &lt; / __ |/ /<em> / / __ / </em>, <em>// /</em>/ // /<em>/ // /</em>/ // /_/ // / / / / /</em></strong>/ // /<em>/ // __/ / /</em>/ / /<em>/ |</em>|/<strong><em>_</em>//</strong><strong><em>/ _</em></strong>/ _<strong><em>//</em>/ /<em>/ /</em>//</strong><strong>//_____//<em>/ _</em></strong>/ ``` RBDOOM-3-BFG Readme - https://github.com/RobertBeckebans/RBDOOM-3-BFG Download it from the <a>RBDOOM-3-BFG Mod DB Page</a> <a target="_blank"></a> For discussions join the id Tech 4 Discord: https://discord.gg/Q3E9rUFnnP , #rbdoom3bfg Table of Contents This file contains the following sections: <ol> <li><a>About the Port</a></li> <li><a>".plan"</a></li> <li><a>May or may not ".plan"</a></li> <li><a>Renderer Features Explained</a></li> <li><a>TrenchBroom Mapping Support</a></li> <li><a>General Notes</a></li> <li><a>License</a></li> <li><a>Getting the Source Code </a></li> <li><a>Compiling on Windows</a></li> <li><a>Compiling on Linux</a></li> <li><a>Compiling on macOS</a></li> <li><a>Installation</a></li> <li><a>New Console Variables</a></li> <li><a>Known Issues</a></li> <li><a>Bug Reports</a></li> <li><a>FAQ</a></li> </ol> About the Port <a name="about"></a> <code>RBDOOM-3-BFG is a modernization effort of DOOM-3-BFG.</code> RBDOOM-3-BFG is based on DOOM-3-BFG and the goal of this port is to bring DOOM-3-BFG up to latest technology in 2023 making it closer to Doom 2016 while still remaining a DOOM 3 port regarding the gameplay. I started this project in 2012 and focused on making this code being future proof so other cool projects can build interesting things on top of it without the need to fix a lot of stuff first. Over 40 people all over the world contributed cool patches. Some results are: Gaming / Graphics Related <ul> <li>DX12 / Vulkan support through NVRHI (NVIDIA Rendering Hardware Interface) (thanks to Stephen Pridham for major porting effort)</li> <li>Physically Based Rendering using GGX Cook-Torrence as in other modern engines (UE4, Unity) and 3D authoring tools like Blender 3.x or Adobe Substance</li> <li>Baked Global Illumination using Irradiance Volumes and Image Based Lighting that fix the pitch black areas</li> <li>Soft shadows using a fat shadow mapping atlas: <ul> <li>All 3 light types (point, spot, parallel/sun) are supported which means parallel lights (sun) use scene independent cascaded shadow mapping.</li> </ul> </li> <li>True internal 64 bit HDR lighting with filmic ACES tone mapping and gamma-correct rendering in linear RGB space</li> <li>Temporal Antialiasing (TAA) as a cheap alternative for MSAA and that works well with HDR and also improves PBR lighting</li> <li>Filmic post process effects like Chromatic Aberration and Dithering</li> <li>Screen Space Ambient Occlusion used to only dim down the Global Illumination contribution like in the Frostbite engine</li> <li>Bink video playback through libbinkdec (thanks to Daniel Gibson) or FFmpeg (thanks to Carl Kenner)</li> <li>Cinematic sequences can be skipped (thanks to Biel Bestué de Luna)</li> <li>Netcode fixes to allow multiplayer sessions to friends with +connect (manual port forwarding required)</li> </ul> Programming and Code Quality <ul> <li>Flexible build system using CMake allowing to add optional features like FFmpeg for videos or OpenAL for sound</li> <li>Linux support for both GCC and Clang with a proper SDL 2 OS layer including gamepad support</li> <li>Win64 support and Visual Studio support up to VS 2019-2022</li> <li>macOS support (updated in 2023 thanks to Stephen Saunders)</li> <li>OpenAL Soft sound backend primarily developed for Linux but works on Windows as well</li> <li>Sourcecode cleanup using the Artistic Style C++ beautifier to ensure the Git diffs and logs are clean</li> <li>Fixed tons of warnings using the Clang compiler</li> <li>Fast compile times using precompiled header support which allows to compile the entire engine and builtin tools in less than 30 seconds on a Ryzen 9</li> <li>Although not really supported but runs on exotic hardware like MIPS64, PPC64, ARM64 and E2K architectures</li> <li>Updated idRenderLog with new markers to support RenderDoc and Nvidia's Nsight</li> </ul> Modding Support RBDOOM-3-BFG allows mod editing and has many tiny fixes so custom content can be put into mod directories and the engine accepts it like vanilla Doom 3. <ul> <li>TrenchBroom Mapping Support - see more information in the TrenchBroom section</li> <li>New PBR related material keywords like basecolormap, normalmap, rmaomap</li> <li>invertGreen( normalmap.png ) material keyword to allow flipping the Y-Axis for tangent space normal maps </li> <li>glTF2 .glb model support for static and skinned models (thanks to Harrie van Ginneken)</li> <li>Added back dmap and aas compilers as <code>standalone rbdmap.exe</code> tool (thanks to Pat Raynor) and improved them to work with TrenchBroom and Blender</li> <li>Changed dmap to support compiling maps straight from glTF2 .glb models instead of .map files using a new polygon based workflow</li> <li>Wavefront OBJ model support to make it easier getting static models from Blender/Maya/3D Studio Max into TrenchBroom</li> <li>Added in-engine Flash debugging tools and new console variables</li> <li>Added support for Mikkelsen tangent space standard for new assets (thanks to Stephen Pridham)</li> <li>Bumped the static vertex cache limit of 31 MB to roughly ~ 128 MB to help with some custom models and maps by the Doom 3 community</li> <li>com_showFPS bigger than 1 uses ImGui to show more detailed renderer stats like the original console prints with r_speeds</li> <li>.png .exr .hdr image support</li> <li>.ogg sound file support</li> <li>.pk4 archive support</li> <li>Reworked virtual filesystem so .resources and .pk4 archives in mod directories have a higher priority than in base/</li> <li>Native C++ AI &amp; Weapons framework instead of Doomscript in the IcedHellfire mod by Justin Marshall (<code>mods/icedhellfire</code> Git branch)</li> </ul> If you want to start mod from a directory, you should first specify your mod directory adding the following command to the launcher: "+set fs_game modDirectoryName" so it would end up looking like: RBDoom3BFG +set fs_game modDirectoryName IMPORTANT: RBDOOM-3-BFG does not support old Doom 3 modifications that include sourcecode modifications in binary form (.dll) You can fork RBDOOM-3-BFG and create a new renamed binary that includes all required C++ game code modifications. ".plan" <a name="plan"></a> If you want to see what is planned or in progress in a Trello/Kanban style manner look here: <a>RBDOOM-3-BFG projects</a> Short term goals: * Node based Imgui particle editor * Flash support through Adobe Animate or Blender * Raytracing for accelerating the probe baking and optionally adding realtime global illumination May or may not ".plan" <a name="plan2"></a> <ul> <li>Replace traditional multipass forward shading with a faster forward+ solution</li> <li><a>Volumetric Lighting</a></li> <li>ReSTIR or some other realtime path tracing</li> <li>Optional alternative collision detection and physics with PhysX 5 or Jolt</li> </ul> Renderer Features Explained <a name="render"></a> Physically Based Rendering Implementing Physically Based Rendering (PBR) in Doom 3 is a challenge and comes with a few compromises because the Doom 3 content was designed to work with the hardware constraints in 2004 and that even meant to run on a Geforce 3. The light rigs aren't made for PBR but it is possible to achieve good PBR lighting even with the old content by tweaking the light formulars with a few good magic constants. However I also want to support the modding scene to allow them to create brand new PBR materials made with Substance Designer/Painter or other modern tools so multiple rendering paths have been implemented. PBR allows artists to create textures that are based on real world measured color values and they look more or less the same in any renderer that follows the PBR guidelines and formulars. <strong><em>RBDOOM-3-BFG only supports the standard PBR Roughness/Metallic workflow.</em></strong> Adding PBR is a requirement to make the new content look the same in RBDOOM-3-BFG as in Blender 3.x with Cycles or Eevee and Substance Designer. PBR became the standard material authoring since 2014. With RBDOOM-3-BFG modders can work with modern tools and expect that their content looks as expected. The PBR implementation is restricted to standard PBR using the Roughness/Metallic workflow for now. Specialized rendering paths for skin, clothes and vegetation will be in future releases. PBR Texture format In Doom 3 a classic simple materials looks like this: ``` textures/base_wall/snpanel2rust { qer_editorimage textures/base_wall/snpanel2rust.tga bumpmap textures/base_wall/snpanel2_local.tga diffusemap textures/base_wall/snpanel2rust_d.tga specularmap textures/base_wall/snpanel2rust_s.tga } ``` It's usually rendered with Blinn-Phong specular with a fixed specular exponent. Specularmaps are more or less Gloss maps. In RBDOOM-3-BFG it uses the PBR GGX Cook-Torrence formular and you can vary the roughness along the material like in other modern engines and you usually define a texture with the _rmao suffix. RMAO Image Channels | Description :----------------------------- | :------------------------------------------------ Red | Roughness Green | Metalness Blue | Ambient Occlusion Example material: ``` models/mapobjects/materialorb/orb { qer_editorimage models/mapobjects/pbr/materialorb/substance/metal04_basecolor.png basecolormap models/mapobjects/pbr/materialorb/substance/metal04_basecolor.png normalmap models/mapobjects/pbr/materialorb/substance/metal04_normal.png rmaomap models/mapobjects/pbr/materialorb/substance/metal04_rmao.png } ``` The engine will also look for _rmao.[png/tga] overrides for old materials and if it finds those it will render them using a better PBR path. Old school specularmaps also go through a GGX pipeline but the roughness is estimated from the glossmap. The Ambient Occlusion will be mixed with the Screen Space Ambient Occlusion and will only affect indirect lighting contributed by the environment probes. Baked Global Illumination using Irradiance Volumes and Image Based Lighting <em>To achieve the typical PBR look from an artistic point of view it also means to that it is necessary to add indirect lighting. Doom 3 and even Doom 3 BFG had no indirect lighting.</em> Doom 3 BFG is a big game. Doom 3, Resurrection of Evil and Lost Missions sum up to 47 big single player levels with an average of ~60 - 110 BSP portal areas or let's call them rooms / floors. Each room can have up to 50 shadow casting lights and most of them are point lights. I needed a good automatic solution that fixes the pitch black areas without destroying the original look and feel of the game. I also needed to add environment probes for each room so PBR materials can actually reflect the environment. So RBDOOM-3-BFG comes with 2 systems to achieve this and both are automatic approaches so everything can be achieved in a reasonable amount of time. The first system are environment probes which are placed into the center of the rooms. They can also be manually tweaked by adding env_probe entities in the maps. They use L4 spherical harmonics for diffuse reflections and GGX convolved mip maps for specular reflections. The second system refines this by using a light grid for each room which provides a sort of a localized/improved version of the surrounding light for each corner of the room. Irradiance Volumes aka Light Grids RBDOOM-3-BFG 1.3.0 brings back the Quake 3 light grid but this time the grid points feature spherical harmonics encoded as octahedrons and it can be evaluated per pixel. This means it can be used on any geometry and serves as an irradiance volume. Unlike Quake 3 this isn't radiosity which is limited to diffuse only reflections. The diffuse reflectivity is built using all kinds of incoming light: diffuse, specular and emissive (sky, light emitting GUIs, VFX). Lightgrids can be baked after loading the map and by typing: <code>bakeLightGrids [&lt;switches&gt;...] &lt;Switches&gt; limit[num] : max probes per BSP area (default 16384) bounce[num] : number of bounces or number of light reuse (default 1) grid( xdim ydim zdim ) : light grid size steps into each direction (default 64 64 128)</code> This will generate a <strong><em>.lightgrid</em></strong> file next to your .map file and it will also store a light grid atlas for each BSP area under <strong><em>env/maps/</em></strong> Limit is 16384 by default and means the maximum number of light grid points in a single light grid. Quake 3 had one light grid that streched over the entire map and distributed lighting every 64 x 64 x 128 units by default. If the maps were too big then q3map2 made the default grid size broader like 80 x 80 x 144, 96 x 96 x 160 and so on until the maximum number of light grid points was reached. The Quake 3 approach wouldn't work with Doom 3 because the maps are too big and it would result in up to 800k probes for some maps or the grid density would very coarse. RBDOOM-3-BFG uses the bounding size of the BSP portal areas and puts smaller light grids into those BSP areas. This way we can maintain a good grid density and avoid wasting storage because of light grid points that are in empty space. <blockquote> But what is an Irradiance Volume or Light Grid exactly? </blockquote> It tells each model or lit pixel how the indirect diffuse lighting is coming from any direction. The Probulator page by Yuri O'Donnell has some good examples: Left: The captured view using a panorama layout. Right: The Diffuse lighting using Level 4 Spherical Harmonics aka Irradiance. Now think of this for each of the grid points in RBDOOM-3-BFG. If a model is placed between those probes the lighting will be interpolated by the nearest 8 grid points similar like in Quake 3. Quake 3 only stored the dominant light direction, the average light color of that direction and an ambient color term for each grid point. In RBDOOM-3-BFG you basically can have the diffuse lighting information for <strong>any</strong> world space direction instead. This is a way more advanced technique. Image Based Lighting and Environment Probes Environment probes supplement the light grids. While light grids provide diffuse lighting information the signal isn't good enough to provide plausible specular light reflections. This is where environment probes are needed. If a level designer doesn't put any env_probe entities into a map then they are automatically distributed through the map using the BSP area bounds and placed in the center of them. Environment probes can be computed after loading the map and by typing: <code>bakeEnvironmentProbes</code> This will generate EXR files in <strong><em>env/maps/</em></strong>. The environment probes use an octahedron encoding and the specular mipmaps are convolved using the Split Sum Approximation by Brian Karris [Epic 2013]. Convolving the environment probes is done on the CPU using the id Tech 5 multi threading code so it will consume all your available cores. For artists this basically means if you increase the roughness in your material then you increase the mip map level of the environment probe it samples light from and it gets blurier. Fallback for Missing Data If you haven't downloaded the additional baked light data from the <a>RBDOOM-3-BFG ModDB Page</a> and just run RBDOOM-3-BFG.exe with the required DLLs (or you built it yourself) it will use an internal fallback. RBDOOM-3-BFG.exe has one prebaked environment probe that is compiled into the executable. It's the light data from the Mars City 1 lobby in the screenshot above. Using this data for the entire game is inacurrate but a better compromise than using a fixed global light direction and some sort of Rim lighting hack like in version 1.2.0. The default irradiance / radiance data gives the entire game a warmer look and it fits for being on Mars all the time. Some Examples of Indirect Lighting Single spot light render with direct lighting only Single spot light render causing indirect light bounce using the new irradiance light grid in RBDOOM-3-BFG combined with SSAO <code>Raytraced</code> reference in Blender 2.83 with Cycles raytracing Left: No global illumination. Ambient is pitch black like in original Doom 3. Right: Extra ambient pass for global illumination with r_forceAmbient 0.5. Filmic Post Processing If you enable it with r_useFilmicPostProcessing 1 then you play DOOM 3 BFG the optics of a Zack Snyder movie. It adds chromatic abberation and filmic dithering using Blue Noise. The effect is heavy and is usually aimed in Film production to mix real camera footage with CG generated content. Dithering demonstration: left side is quantized to 3 bits for each color channel. Right side is also only 3 bits but dithered with chromatic Blue Noise. The interesting fact about the dithering here is shown in the upper debug bands. The first top band is the original signal. The second shows just 8 blocks and if you dither the those blocks with Blue Noise then it is close to the original signal which is surprising. TrenchBroom Mapping Support <a name="trenchbroom"></a> <strong><em>The goal of the TrenchBroom support is to make mapping for RBDOOM-3-BFG as easy as for Quake 1.</em></strong> Mapping for Doom 3 BFG using TrenchBroom requires an extended unofficial build that is bundled with the official RBDOOM-3-BFG 7z package. You can find the customized TrenchBroomBFG version under tools/trenchbroom/. More information about this custom TrenchBroomBFG and the source code is here: https://github.com/RobertBeckebans/TrenchBroomBFG Doom 3 BFG also requires some extensions in order to work with TrenchBroom. The Quake 1/2/3 communities already adopted the Valve 220 .map format in the BSP compilers and I did the same with dmap in RBDOOM-3-BFG. TrenchBroomBFG speficic Changes <ul> <li>idMapFile and dmap were changed to support the Valve 220 .map format to aid mapping with TrenchBroom</li> <li>Added exportFGD <code>[nomodels]</code> console command which exports all def/*.def entityDef declarations to base/_tb/fgd/ as Forge Game Data files. TrenchBroom has native support to read those files https://developer.valvesoftware.com/wiki/FGD. If the nomodels argument is not given then it will also export all needed models by entity declarations to base/_tb/ as Wavefront OBJ files.</li> <li>Support <strong><em>angles</em></strong> keyword again for TrenchBroom like in Quake 3</li> <li>Added cmd convertMapToValve220 <code>&lt;map&gt;</code></li> <li>Added cmd exportImagesToTrenchBroom which decompresses and saves all .bimage images to _tb/*.png files</li> <li>Added cmd exportModelsToTrenchBroom which saves all .base|.blwo|.bmd5mesh models to _tb/*.obj files</li> </ul> General Notes <a name="notes"></a> A short summary of the file layout: Directory | Description :--------------------------------- | :------------------------------------------------ RBDOOM-3-BFG/base/ | Doom 3 BFG media directory ( models, textures, sounds, maps, etc. ) RBDOOM-3-BFG/neo/ | RBDOOM-3-BFG source code ( renderer, game code for multiple games, OS layer, etc. ) RBDOOM-3-BFG/build/ | Build folder for CMake RBDOOM-3-BFG/tools/runtimedeps | Visual Studio C++ Redistributables if you have problems to start the engine or the tools RBDOOM-3-BFG/tools/trenchbroom | TrenchBroomBFG level editor customized for DOOM 3 and RBDOOM-3-BFG RBDOOM-3-BFG/tools/darkradiant | DarkRadiant level editor with an additional config for RBDOOM-3-BFG RBDOOM-3-BFG/tools/bfgpakexlorer | BFG Resource File Manager by George Kalampokis aka Mr.GK RBDOOM-3-BFG/tools/optick-profiler | Optick is a super-lightweight C++ profiler for Games The GPL 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. You can purchase Doom 3 BFG Edition from GOG (DRM Free): https://www.gog.com/game/doom_3_bfg_edition Or the game can be purchased from Steam (with DRM): http://store.steampowered.com/app/208200/ Steam The Doom 3 BFG Edition GPL Source Code release does not include functionality for integrating with Steam. This includes roaming profiles, achievements, leaderboards, matchmaking, the overlay, or any other Steam features. Bink Video playback The RBDOOM-3-BFG Edition GPL Source Code release includes functionality for rendering Bink Videos through FFmpeg or libbinkdec. License <a name="license"></a> See LICENSE.md for the GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 ADDITIONAL TERMS: The Doom 3 BFG Edition 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 Doom 3 BFG Edition GPL 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. See LICENSE_EXCEPTIONS.md for all parts of the code that are not covered by the GPL. Getting the Source Code <a name="source"></a> This project's GitHub.net Git repository can be checked out through Git with the following instruction set: <code>&gt; git clone --recursive https://github.com/RobertBeckebans/RBDOOM-3-BFG.git DoomCode </code> Existing repositories can be updated manually: <code>&gt; git submodule update --init --recursive </code> Compiling on Windows <a name="compile_windows"></a> <ol> <li> Download and install the Visual Studio 2022 Community Edition. </li> <li> Download and install the latest CMake and make sure cmake.exe is added to your global or user PATH. </li> <li> Download and install the latest Vulkan SDK from LunarG: https://www.lunarg.com/vulkan-sdk/ You can skip this step if you compile with DX12 only by adding -DUSE_VULKAN=OFF to the CMake options. </li> <li> Generate the VS2022 projects using CMake by doubleclicking a matching configuration .bat file in the <code>DoomCode/neo/</code> folder. Recommended in this case is <code>cmake-vs2022-win64-no-ffmpeg.bat</code> </li> <li> Use the VS2022 solution to compile what you need: <code>DoomCode/build/RBDoom3BFG.sln</code> </li> </ol> Optional if you want to use FFmpeg <ol> <li> Download ffmpeg-4.2.2-win64-shared.zip from https://github.com/advancedfx/ffmpeg.zeranoe.com-builds-mirror/releases </li> <li> Extract the FFmpeg DLLs to your current build directory under RBDOOM-3-BFG/build/ </li> </ol> Compiling on and Running on Linux <a name="compile_linux"></a> <ol> <li> Go to https://github.com/microsoft/DirectXShaderCompiler/releases/tag/v1.8.2405 and download the DXC binaries for Linux and put them into your local PATH. E.g. Unpack linux_dxc_2024_05_24.x86_64.tar.gz to <code>~/.local</code> and make <code>~/.local/bin/dxc</code> as executable with chmod +x As an alternative you can add <code>-DDXC_CUSTOM_PATH=&lt;path-to-dxc-binary&gt;</code> to the CMake options. </li> <li> You need the following dependencies in order to compile RBDoom3BFG with all features: On Debian or Ubuntu: <code>&gt; sudo apt install cmake libsdl2-dev libopenal-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libvulkan-dev libncurses-dev </code> On Fedora <code>&gt; sudo dnf install cmake clang SDL2-devel openal-devel compat-ffmpeg4-devel ncurses-devel vulkan-devel </code> On ArchLinux <code>&gt; sudo pacman -S sdl2 cmake openal ffmpeg </code> On openSUSE <code>&gt; sudo zypper install cmake libSDL2-devel openal-soft-devel </code> You don't need FFmpeg to be installed. You can turn it off by adding -DFFMPEG=OFF and -DBINKDEC=ON to the CMake options. It is enabled by default because the bundled libbinkdec is slow during development if compiled for Debug mode. </li> <li> Checkout the source code into a new <code>DoomCode</code> directory <code>&gt; git clone --recursive https://github.com/RobertBeckebans/RBDOOM-3-BFG.git DoomCode </code> </li> <li> Generate the Makefiles using CMake: <code>&gt; cd DoomCode/neo/ &gt; ./cmake-linux-release.sh </code> </li> <li> Compile the engine and tools in <code>DoomCode/build/</code> with <code>&gt; make -j&lt;number of your cores&gt; </code> </li> <li> Copy the base folder of your <code>Steam/steamapps/common/DOOM 3 BFG Edition/base/</code> over to <code>DoomCode/base/</code> See also <a>Installation</a> </li> <li> [<code>OPTIONAL</code>] Download https://www.moddb.com/mods/rbdoom-3-bfg/downloads/rbdoom-3-bfg-130 and unpack it over your <code>DoomCode/</code> folder and then run in <code>DoomCode/</code> <code>&gt; git checkout . </code> With this the local git files are newer for the files that have the same names. </li> <li> Copy <code>DoomCode/build/RBDoom3BFG</code> to <code>DoomCode/</code> </li> <li> Start the game in <code>DoomCode/</code> </li> </ol> Compiling on macOS <a name="compile_macos"></a> <ol> <li> Download and install Homebrew (https://brew.sh) for single architecture builds or MacPorts (https://www.macports.org/install.php) for universal architecture builds on macOS Big Sur or later. </li> <li> You need the following dependencies in order to compile RBDoom3BFG with all features: <code>&gt; brew install cmake sdl2 openal-soft ffmpeg (for single arch libraries only) or &gt; sudo port install cmake libsdl2 +universal openal-soft +universal (for universal arch libraries) </code> You don't need FFmpeg to be installed. You can turn it off by adding -DFFMPEG=OFF and -DBINKDEC=ON to the CMake options. For debug builds FFmpeg is enabled by default because the bundled libbinkdec is slow during development if compiled for Debug mode. For release, retail and universal builds FFmpeg is disabled and libbinkdec is enabled by default. The Vulkan SDK 1.3.231.1 or later must be installed and can be obtained from https://vulkan.lunarg.com/sdk/home#mac </li> <li> Generate the Makefiles using CMake: For command line builds: <code>&gt; cd neo/ &gt; ./cmake-macos-release.sh </code> For Xcode builds: <code>&gt; cd neo/ &gt; ./cmake-xcode-release.sh or &gt; ./cmake-xcode-universal.sh (universal build on macOS Big Sur / Xcode 12.2 or later) </code> Xcode release and universal builds now automatically package the executable into a macOS app bundle, defining an Info.plist file and copying the base directory and custom icon into the application bundle's Contents/Resources folder. This is controlled by adding -DMACOSX_BUNDLE=ON to the CMake options. For single architecture builds (debug, release, retail) the default openal-soft paths are set for Homebrew, while for universal builds the default paths are set for MacPorts. The single architecture build scripts are now portable and automatically detect Homebrew's openal-soft path prefix for x86 and Apple Silicon. The universal build script remains portable since MacPorts uses the same openal-soft installation path on x86 and Apple Silicon. </li> <li> Compile RBDOOM-3-BFG targets: For command line builds: <code>&gt; cd ../build &gt; make </code> For Xcode builds double click on <code>DoomCode/xcode-\&lt;buildtype\&gt;/RBDoom3BFG.xcodeproj</code> and start the build. The generated Xcode project file is pre-configured with the correct targets and build settings. </li> </ol> Installation <a name="installation"></a> For 99% of all users: <ol> <li>Download the newest version from the <a>RBDOOM-3-BFG ModDB Page</a> </li> </ol> <a target="_blank"></a> There are usually 2 kinds of RBDOOM-3-BFG packages. The Full and the Lite version. With the Full version you have the Win64 binaries, the baked environment probes and lightgrid data for all BFG single player maps like RBDOOM-3-BFG-1.3.0.42-<code>full</code>-win64-20211030-git-b4e0366.7z (6.18 GB download). The Lite version has the <code>lite</code> in the filename like RBDOOM-3-BFG-1.5.1.2-lite-win64-20230523-git-39ae120.7z. Those packages don't ship with the precomputed light data but have everything else needed to run the mod and the tools like the custom TrenchBroom build. <ol> <li> Make a new <code>DoomBFG</code> folder </li> <li> Copy <code>base/</code> from your Steam Doom 3 BFG folder into <code>DoomBFG</code> </li> <li> Download the RBDOOM-3-BFG 1.3.0 full package from the RBDOOM-3-BFG ModDB page and extract it over <code>DoomBFG</code> </li> <li> Do the same with the newest version version which acts like a patch </li> </ol> This should also work fine with your GOG installation. The following instructions are primarily intented for <code>Linux</code> users and all hackers on other operating systems. Linux users are advised the compile the engine from the Github source code and to put the <code>base/</code> data from the retail game into the <code>DoomCode/base/</code> directory. On Linux and macOS the easiest way to install is with SteamCMD: https://developer.valvesoftware.com/wiki/SteamCMD. See the description on https://developer.valvesoftware.com/wiki/SteamCMD#Linux (macOS is directly below that) on how to install SteamCMD on your system. You won't have to create a new user. Then you can download Doom 3 BFG with <code>&gt; ./steamcmd.sh +@sSteamCmdForcePlatformType windows +login &lt;YOUR_STEAM_LOGIN_NAME&gt; +force_install_dir ./doom3bfg/ +app_update 208200 validate +quit </code> (replace with your steam login name) When it's done you should have the normal windows installation of Doom 3 BFG in ./doom3bfg/ and the needed files in ./doom3bfg/base/ That number is the "AppID" of Doom 3 BFG; if you wanna use this to get the data of other games you own, you can look up the AppID at https://steamdb.info/ NOTE that we've previously recommended using download_depot in the Steam console to install the game data. That turned out to be unreliable and result in broken, unusable game data. So use SteamCMD instead, as described above. Alternatively with the GOG installer, you can use Wine to install the game. See https://winehq.org/download for details on how to install wine for Linux and macOS. Once Wine is installed and configured on your system install Doom 3 BFG edition using the downloaded installers from gog.com: <code>&gt; wine setup_doom_3_bfg_1.14_\(13452\)_\(g\).exe </code> (there will be several .exe files from GOG, make sure all of them are in the same directory) Once this is complete, by default you can find your Doom 3 BFG <code>base/</code> directory at <code>.wine/drive_c/GOG\ Games/DOOM\ 3\ BFG/base</code>. Note that you may want to create a autoexec.cfg file in the <code>DoomCode/base/</code> directory with the following content: <ul> <li>set sys_lang "english"</li> </ul> This will ensure the game and its menus are in english and don't default to something else. Alternatives include: <ul> <li>set sys_lang "english"</li> <li>set sys_lang "french"</li> <li>set sys_lang "german"</li> <li>set sys_lang "italian"</li> <li>set sys_lang "japanese"</li> <li>set sys_lang "spanish"</li> </ul> On macOS the RBDoom3BFG executable will also search for game data within an app bundle's Contents/Resources/base folder, and as a last resort, within the absolute path /Applications/RBDoom3BFG.app/Contents/Resources/base. In addition, if you want the game to be standalone without dependencies on pre-installed dynamic libs, you can use macdylibbundler to bundle all external dylib dependencies into the app bundle (see https://github.com/auriamg/macdylibbundler or simply install via "brew install dylibbundler" or "sudo port install dylibbundler"). For example, the following command will copy all external dylib dependencies to the Contents/libs directory of the game's app bundle and adjust the rpaths within the RBDoom3BFG executable and copied dylibs. <code>&gt; dylibbundler -od -b -x RBDoom3BFG.app/Contents/MacOS/RBDoom3BFG -d RBDoom3BFG.app/Contents/libs/ </code> After running dylibbundler you may need to re-sign the modified executable and dylibs if planning to run on <strong>Apple Silicon</strong> machines. Newer versions of dylibbundler now do this automatically. The output of dylibbundler will indicate which executable and dylibs (if any) require re-signing. This code signing step is not needed for x86-based Macs. <code>&gt; codesign -s - --force RBDoom3BFG.app/Contents/libs/lib&lt;modified-by-dylibbundler&gt;.dylib ... &gt; codesign -s - --force RBDoom3BFG.app/Contents/MacOS/RBDoom3BFG </code> New Console Variables and Commands <a name="console"></a> Gaming Related Name | Description :--------------------------------------| :------------------------------------------------ r_graphicsAPI | Default DX12, can be either DX12 or Vulkan on Windows r_antiAliasing | Different Anti-Aliasing modes r_exposure [0 .. 1] | Default 0.5, controls brightness and affects HDR -&gt; sRGB Rec. 709 exposure key. This is what you change in the video brightness options r_useSSAO [0 .. 1] | Use Screen Space Ambient Occlusion to darken the corners in the scene and give it more depth r_forceAmbient | Default 0.5, controls additional brightness by Global Illumination r_useFilmicPostFX [0, 1] | Apply several post process effects to mimic a filmic look r_useCRTPostFX [0 .. 2] | CRT monitor/TV filter r_renderMode [0 .. 7] | Default 0 = Doom 3, 1 = Commodore 64, 2 = Commodore 64 Highres, 3 = Amstrad CPC, 4 = Amstrad CPC Highres, 5 = Sega Genesis, 6 = Sega Genesis Highres, 7 = Sony PSX Modding Support Name | Description :--------------------------------------| :------------------------------------------------ dmap mapfile | Command: Compiles a .map to its corresponding BSP .proc, Collision .cm files and Area Awareness System (AI navigation) .aas files. Just type dmap to list all options dmap <code>[glview]</code> mapfile | DMap option that exports the BSP areas and portals to .obj for debugging purposes bakeEnvironmentProbes | Command after loading a map. Captures all env_probe entities and stores them to disc bakeLightGrids [<code>&lt;switches&gt;</code>...] | <code>&lt;Switches&gt;</code> limit[num] : max probes per BSP area (default 16384) bounce[num] : number of bounces or number of light reuse (default 1) grid( xdim ydim zdim ) : light grid size steps into each direction (default 64 64 128) exportScriptEvents | Command: Generates a new script/doom_events.script that reflects all registered class events in the idClass C++ system. The gamecode still needs to be extended to add the original comments of the events exportFGD <code>[nomodels]</code> | Command: Exports all entity defs to base/_tb/<em>.fgd for usage in convertMapToValve220 <code>&lt;map&gt;</code> | exportImagesToTrenchBroom | Command: Decompresses and saves all TB relevant .bimage images to base/_tb/</em>.png files exportModelsToTrenchBroom | Command: Saves all binarized models to base/_tb/<em>.obj files convertMapToValve220 <code>&lt;map&gt;</code> | Command: Saves </em>_valve220.map version of the given map. This makes it editable with TrenchBroomBFG. convertMapQuakeToDoom <code>&lt;map&gt;</code> | Command: Expects a Quake 1 .map in the Valve220 format and does some Doom 3 specific fixes makeZooMapForModels | Command: Makes a Source engine style zoo map with mapobject/models like .blwo, .base et cetera and saves it to maps/zoomaps/zoo_models.map. This helps mappers to get a good overview of the trememdous amount of custom models available in Doom 3 BFG by sorting them into categories and arranging them in 3D. It also filters models so that only modular models are picked that can be reused in new maps. exportEntityDefsToBlender | Command: Exports all entity and model defs to base/_bl/entities.json for usage in Blender before loading a map. exportMapToOBJ | Command: Convert .map file to .obj/.mtl swf_show | Cvar: Draws the bounding box of instanced Flash sprites in red and their names makeMaterials <code>&lt;folder&gt;</code> | Command: Make a .mtr file based on PBR naming conventions Known Issues <a name="issues"></a> <ul> <li>Some lights cause shadow acne with shadow mapping or look off ("Peter panning" problem).</li> <li>Some shadows in the original campaigns might almost disappear due to bad light properties like light center near outside of the bounding box. This has been partially fixed by patching those light entities.</li> </ul> Bug Reports <a name="reports"></a> The best way for telling about a bug is by submitting a bug report at our GitHub bug tracker page: <code>https://github.com/RobertBeckebans/RBDOOM-3-BFG/issues?state=open </code> If you want to report an issue with the game, you should make sure that your report includes all information useful to characterize and reproduce the bug. <ul> <li>Search on Google</li> <li>Include the computer's hardware and software description ( CPU, RAM, 3D Card, distribution, kernel etc. )</li> <li>If appropriate, send a console log, a screenshot, an strace ..</li> <li>If you are sending a console log, make sure to enable developer output:</li> </ul> <blockquote> RBDoom3BFG.exe +set developer 1 +set logfile 2 </blockquote> You can find your qconsole.log on Windows in C:\Users\\Saved Games\id Software\RBDOOM 3 BFG\base\ FAQ <a name="faq"></a> <strong>Q</strong>: Why bother with DOOM-3-BFG in 2021? <strong>A</strong>: It is fun, period. Doom 3 is from 2004 but it is still an impressive and entertaining game. In 2011 id Software added many results from the development of Rage like its own Flash SWF and ActionScript 2 interpreter, proper support for gamepads and widescreens. It also combines the gamecode for Doom 3 and its missionpacks and runs it in a seperate thread and it has many multithreaded rendering optimizations. DOOM-3 and DOOM-3-BFG are some of the most transparent games available where you can open all files and inspect how the game was built. Unlike Quake 1-3, DOOM-3-BFG shipped with all level .map sources for 47 single player maps. There is plenty of stuff you can learn from it like solid run &amp; gun core gameplay, AI, animations, client/server multiplayer, level design or simple and elegant engine design. <strong>Q</strong>: Why bother with DOOM-3-BFG in 2023? <strong>A</strong>: The engine compiles faster than opening a project in Unity. Maybe you just appreciate that it doesn't require more than 300 MB of RAM and 1024 MB of VRAM while running a complex game like Doom 3. <strong>Q</strong>: Can I use this engine to make a commercial game? <strong>A</strong>: You can but don't bother me to give you free support and you probably should use Unreal Engine 4/5. I am a full time game developer and usually don't have time for any free support. I recommend that you have moderate C++ skills even if you are an artist. Technical designers (coders who became artists) might benefit most from this engine. Keep in mind that the GPL license will lock you out of the console markets because you can't use proprietary APIs covered by NDAs. However you can sell your game on Steam without problems. Some people already work on total conversions and there is a community on the id Tech 4 Discord server where you can ask questions and get some support: https://discord.gg/Q3E9rUFnnP <strong>Q</strong>: How do I know what code you've changed? <strong>A</strong>: Apart from the Git log diffs, you can look for <code>// RB</code> in the source code. Many other contributors commented their changes in the same way. I enforced the usage of Astyle in this project which also makes it alot easier to compare it against other ports of DOOM-3-BFG. Simply format the other ports with Astyle like I do in neo/astyle-code.bat and you can compare the code easily in WinMerge or KDiff3. <strong>Q</strong>: How do I open the .resource files? <strong>A</strong>: If you install this package you can start the engine, open the console and run exec extract_resources.cfg. This will create a basedev/ folder next to your base/ folder with the indidividual files like .mtr materials or .def entity declarations.
[]
https://avatars.githubusercontent.com/u/78605863?v=4
winpaste
sergeypdev/winpaste
2024-02-04T13:49:32Z
Simple CLI tool that prints clipboard contents to stdout on Windows
master
0
2
0
2
https://api.github.com/repos/sergeypdev/winpaste/tags
-
[ "cli", "clipboard", "neovim", "utility", "windows", "zig" ]
11
false
2024-02-09T15:42:52Z
true
true
unknown
github
[]
Windows has clip.exe, but doesn't have paste.exe. This tool aims to remedy that situation. I use it as a neovim clipboard provider on windows like this: <code>lua if vim.fn.has "win32" == 1 then vim.g.clipboard = { name = "WindowsClipboard", copy = { ['+'] = 'clip.exe', ['*'] = 'clip.exe', }, paste = { ['+'] = 'winpaste.exe', ['*'] = 'winpaste.exe', }, cache_enabled = 0, } end</code> Building <ol> <li>Install <a>zig 0.12</a></li> <li>run <code>zig build -Doptimize=ReleaseSafe</code></li> </ol> Exe will be in zig-out/bin/winpaste.exe
[]
https://avatars.githubusercontent.com/u/65933340?v=4
AI2001_Category-Source_Code-SC-Zig
seanpm2001/AI2001_Category-Source_Code-SC-Zig
2023-07-17T23:05:34Z
🧠️🖥️2️⃣️0️⃣️0️⃣️1️⃣️💾️📜️ The sourceCode:Zig category for AI2001, containing Zig programming language datasets
AI2001_Category-Source_Code-SC-Zig_Main-dev
0
2
1
2
https://api.github.com/repos/seanpm2001/AI2001_Category-Source_Code-SC-Zig/tags
GPL-3.0
[ "ai", "ai-2001", "ai-2001-dataset", "ai-2001-development", "ai2001", "ai2001-dataset", "ai2001-development", "artificial-intelligence", "dataset", "gpl3", "gplv3", "md", "r-language", "rmarkdown-language", "source-code-dataset", "txt", "zig", "zig-lang", "zig-language", "zig-sc...
2,564
false
2023-07-18T23:13:09Z
false
false
unknown
github
[]
<a>AI2001</a> data sets Category: Source Code Subcategory (SC): Zig This dataset is under development/coming soon. <strong>🌱️ This <a><code>README.md</code></a> file is a major stub and need significant expansion</strong> <strong>File version:</strong> <code>1 (2023, Monday, July 17th at 05:16 pm PST)</code>
[]
https://avatars.githubusercontent.com/u/22214853?v=4
zig-scram
NefixEstrada/zig-scram
2023-08-21T17:42:28Z
SCRAM implmementation for Zig (both client and server) (RFC 5802)
main
2
2
1
2
https://api.github.com/repos/NefixEstrada/zig-scram/tags
AGPL-3.0
[ "rfc-5802", "sasl", "sasl-scram", "scram", "zig" ]
39
false
2024-06-07T04:53:29Z
true
true
unknown
github
[]
zig-scram SCRAM implmementation for Zig (both client and server) (RFC 5802) Based on <a>https://github.com/xdg-go/scram</a> and <a>https://github.com/star-tek-mb/pgz/blob/master/src/auth.zig</a> Missing features <ul> <li>SASLPrep (Only ASCII allowed right now!)</li> <li>Channel binding</li> <li>Extensions support</li> </ul> TODO before first release <ul> <li>Rename allocator -&gt; alloc</li> <li>Add examples for both full client and server</li> <li>State machine + step</li> <li>Refactor everything with allocators on the functions, not on the structs</li> <li>Make the nonce generator functions, not arguments when calling the functions</li> <li>Create the Error type</li> <li>Allocator less usage:</li> </ul> <code>zig const Example = struct { st: State = .{}, pub fn hash(bytes: []const u8, dest: []u8) void { var st: Keccak = .{}; st.update(bytes); st.final(dest); } pub fn update(keccak: *Keccak, bytes: []const u8) void { keccak.st.absorb(bytes); } pub fn final(keccak: *Keccak, dest: []u8) void { keccak.st.pad(); keccak.st.squeeze(dest[0..]); } fn write(keccak: *Keccak, bytes: []const u8) usize { keccak.update(bytes); return bytes.len; } };</code>
[]
https://avatars.githubusercontent.com/u/11620521?v=4
smlstr
sonro/smlstr
2023-07-21T15:43:33Z
Small Zig library for working with small unallocated strings
main
0
2
0
2
https://api.github.com/repos/sonro/smlstr/tags
MIT
[ "library", "string", "string-manipulation", "strings", "zig" ]
97
false
2024-06-25T10:11:22Z
true
true
0.13.0
github
[]
smlstr - archived The problem this library solved has a more elegant solution in the Zig Standard Library. See <a><code>BoundedArray(u8, N)</code></a>.
[]
https://avatars.githubusercontent.com/u/49339966?v=4
zig-ini
AnErrupTion/zig-ini
2023-06-22T09:30:24Z
.ini parser for Zig
dev
0
2
0
2
https://api.github.com/repos/AnErrupTion/zig-ini/tags
MIT
[ "ini", "ini-parser", "zig" ]
2,130
true
2023-07-09T19:02:40Z
true
false
unknown
github
[]
zig-ini This library is meant to simplify reading .ini files in Zig. For examples on usage, check out <code>example.zig</code>. The main purpose of this library is to aid in using git config files, but it can potentially be applied anywhere that needs to work with .ini files
[]
https://avatars.githubusercontent.com/u/59152884?v=4
frr
Vexcited/frr
2023-10-08T23:10:28Z
[WORK IN PROGRESS]: A bytecode interpreter for French pseudocode, specifications are from the lessons I had at the IUT of Limoges.
main
0
2
0
2
https://api.github.com/repos/Vexcited/frr/tags
-
[ "french", "interpreter", "language", "pseudocode", "pseudocode-interpreter", "school", "zig" ]
25
false
2024-08-27T11:15:34Z
true
false
unknown
github
[]
<code>frr</code> <blockquote> <code>frr</code> stands for <strong>FR</strong>ench interprete<strong>R</strong>. </blockquote> Install Windows No binary is released for now, please see the <a>BUILD</a> section below. Linux and macOS No binary is released for now, please see the <a>BUILD</a> section below. Usage Running <code>frr</code> will give you the usage instructions. <code>console $ frr Utilisation: frr &lt;destination/fichier/script.fr&gt;</code> You can find examples in the <a><code>examples</code></a> directory. Documentation Since this language is based on pseudocode, and pseudocode doesn't have any specification, we have to make sure we all use the same syntax. Here, I used the syntax my school uses but yours may be different. If it slightly differs (like a builtin function name is named differently) you can <a>open an issue</a> and explain what's different to help me implement aliases. Let's start with a summary of the syntax. When it's checked in front of it means it's implemented. <br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> <a>Comments</a> <br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> <a>Variable types</a> <br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> <a>Variable declaration</a> <br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> <a>Built-in functions</a> <br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> <a>afficher</a> <br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> <a>saisir</a> Comments To write a comment, use the <code>#</code> character. It'll make the rest of the line a comment. ```fr This is a comment. afficher "Hello World" # This is also a comment. ``` This is the only way to make a comment. There's no way to make a comment like <code>/* ... */</code>. So multi-line comments should be written like this: ```fr Start to write your comment on a line then start a write another comment to continue your comment. ``` Variable types When you define a variable, you have to define its type. Here are the available types. Those types are <strong>case sensitive</strong>, so always in lowercase. | Type | Alias in C (or Python) | | -------------------------- | ---------------------- | | <code>entier</code> | <code>int</code> | | <code>réel</code> | <code>float</code> | | <code>caractère</code> (alias: <code>car</code>) | <code>char</code> | | <code>chaîne</code> | <code>str</code> in Python | | <code>booléen</code> | <code>bool</code> in Python | Variable declaration When you're writing a function, a procedure or a program you <strong>must</strong> declare any variable you're going to use. This is happening right after the <code>début</code> keyword. To initiate a "variable declaration block" using the <code>avec</code> keyword. <code>fr programme Déclarations début # You can declare a variable on the same line as `avec`. avec in_line: entier a : entier # By the way, spacing is not important. b : réel # And indentation is not important either. c : chaîne # Works d : chaîne # Also works e : booléen f, g, h : caractère # You can also declare multiple variables on the same line. # Same as above -&gt; f, g, h : car fin Déclarations</code> <strong>Note that if you're not using any variable in your program, you don't need to declare any.</strong> And so, you don't need to use the <code>avec</code> keyword and you can just start writing your code. Built-in functions <code>afficher</code> To print something in the console, use the <code>afficher</code> keyword. Note that <strong>there's no newline at the end of the printed text</strong>. So if you want to print a newline, you have to do it manually. ```fr This is the "official" way to do it. afficher "Hello, World!\n" Otherwise, those also work. afficher("Hello, World!") afficher ("Hello, World!") ``` You can pass multiple arguments to <code>afficher</code>. Each argument will be printed with a space between them. <code>fr afficher "Hello", "World!" # &gt;&gt;&gt; Hello World!</code> You can also pass variables, expressions. <code>fr username &lt;- "Vexcited" afficher "Hello " + username # &gt;&gt;&gt; Hello Vexcited afficher "Réponse:", 21 * 2 # &gt;&gt;&gt; Réponse: 42</code> Passing a boolean will print <code>vrai</code> or <code>faux</code>. ```fr afficher vrai # &gt;&gt;&gt; vrai afficher faux # &gt;&gt;&gt; faux So you can print conditions like this: afficher "Yes ?", vrai = vrai # &gt;&gt;&gt; Yes ? vrai ``` <code>saisir</code> To get user input, use the <code>saisir</code> keyword. <code>fr avec username : chaîne saisir username</code> <code>saisir</code> will <strong>always cast the input to the type of the variable you're assigning it to</strong>. If the input can't be casted to the type of the variable, the interpreter will throw an error. ```fr avec age : entier saisir age If you enter "21", <code>age</code> will be equal to 21. If you enter "21.5", <code>age</code> will be equal to 21. If you enter "Hello", the interpreter will throw an error. ``` ```fr avec x : réel saisir x If you enter "21", <code>x</code> will be equal to 21.0. If you enter "21.5", <code>x</code> will be equal to 21.5. If you enter "Hello", the interpreter will throw an error. ``` Build <code>frr</code> is made with <a>Zig</a>. \ The version of Zig used in this project is <code>0.12.0-dev.2858+7230b68b3</code>. ```bash Clone the project if not already done. git clone https://github.com/Vexcited/frr cd frr Build and run the binary directly. zig build run -- ./examples/hello-world.fr Or you can simply build... zig build ...then execute the binary manually. ./zig-out/bin/frr ./examples/hello-world.fs ``` Resources <ul> <li><a>Build a simple interpreter</a> : <code>frr</code> was written in TypeScript before using this guide as reference to understand how a language is made using AST ;</li> <li><a>Crafting Interpreters</a> : a guide I used as reference to build the current version of <code>frr</code> where I learned how bytecode interpreters were made ;</li> <li><a><code>jwmerrill/zig-lox</code></a>: an implementation of the Lox programming language (from Crafting Interpreters) in Zig. Very helpful to use as reference since I am learning Zig at the same time as writing this language ;</li> <li><a>Algorithm Lessons from <code>cril.univ-artois.fr</code></a> to know a bit more about how other universities are understanding pseudocode in their lessons.</li> </ul>
[]
https://avatars.githubusercontent.com/u/87811650?v=4
zigjector
Storm99999/zigjector
2023-11-13T20:52:53Z
A DLL Injector, written in Zig.
main
0
2
0
2
https://api.github.com/repos/Storm99999/zigjector/tags
MIT
[ "dll", "dll-injection", "dll-injector", "zig" ]
3
false
2023-11-25T23:29:33Z
false
false
unknown
github
[]
zigjector A DLL Injector, written in Zig.
[]
https://avatars.githubusercontent.com/u/74600205?v=4
DES
JungerBoyo/DES
2023-05-07T16:20:36Z
DES encryption/decryption cli tool written in zig
main
0
2
1
2
https://api.github.com/repos/JungerBoyo/DES/tags
-
[ "cli", "clitool", "des", "example", "learn", "zig" ]
5
false
2024-05-23T22:39:28Z
true
false
unknown
github
[]
404
[]
https://avatars.githubusercontent.com/u/25585136?v=4
zitertools
DanikVitek/zitertools
2023-12-09T18:28:17Z
zig iterators
main
0
2
0
2
https://api.github.com/repos/DanikVitek/zitertools/tags
MIT
[ "comptime", "functional", "functional-programming", "iterators", "itertools", "itertools-library", "rust-inspired", "zig" ]
100
true
2025-04-27T20:51:28Z
true
true
unknown
github
[]
Zig Itertools A toy iterator package for <a>zig</a>. Check the tests for examples. This package is heavily based on rust's <code>std::iter</code> module. Usage To use this package, use the zig package manager. For example in your build.zig.zon file, put: <code>zig .{ .name = "app", .version = "0.1.0", .dependencies = .{ .zitertools = .{ .url = "https://github.com/DanikVitek/zitertools/archive/$COMMIT_YOU_WANT_TO_USE.tar.gz", }, }, }</code> When running zig build now, zig will tell you you need a hash for the dependency and provide one. Put it in you dependency so it looks like: <code>zig .{ .zitertools = .{ .url = "https://github.com/DanikVitek/zitertools/archive/$COMMIT_YOU_WANT_TO_USE.tar.gz", .hash = "$HASH_ZIG_GAVE_YOU", }, }</code> With the dependency in place, you can now put the following in your build.zig file: <code>zig // This will create a `std.build.Dependency` which you can use to fetch // the `zitertools` module. The first argument is the dependency name. It // should be the same as the one you used in build.zig.zon. const zitertools = b.dependency("zitertools", .{}); // This will create a module which you can use in your zig code. The first // argument is the name you want your module to have in your zig code. It // can be anything you want. In your zig code you can use `@import` with // the same name to use it. The second argument is a module. You can // fetch it from the dependency with its `module` method. This method // takes one argument which is the name of the module. This time, the // name is the one the `zitertools` package uses. It must be exactly the // same string as below: "zitertools". The reason for needing this name is // that some packages can expose multiple modules. Therefor, you need to // specify which one you want. This package only exposes one module though, // so it will always be the same. exe.addModule("zitertools", zitertools.module("zitertools"));</code> In the above change <code>exe</code> to whatever CompileStep you are using. For an executable it will probably be exe, but <code>main_tests</code> or lib are also common. With the build file in order, you can now use the module in your zig source. For example: <code>``zig const std = @import("std"); // If you named the module something else in</code>build.zig<code>, use the other name here // E.g. if in</code>build.zig<code>your did</code>exe.addModule("foobar", zitertools.module("zitertools"));<code>// Then use</code>const zitertools = @import("foobar");` here. const zitertools = @import("zitertools"); pub fn main() void { var iter = zitertools.range(@as(u32, 0), 5); std.debug.print("{s}\n", .{ @typeName(zitertools.Item(@TypeOf(iter))) }); // Output: u32 std.debug.print("{?}\n", .{ iter.next()) }; // Output: 0 std.debug.print("{?}\n", .{ iter.next()) }; // Output: 1 std.debug.print("{?}\n", .{ iter.next()) }; // Output: 2 std.debug.print("{?}\n", .{ iter.next()) }; // Output: 3 std.debug.print("{?}\n", .{ iter.next()) }; // Output: 4 std.debug.print("{?}\n", .{ iter.next()) }; // Output: null } ``` Check the tests for more examples on how to use this package.
[]
https://avatars.githubusercontent.com/u/108661125?v=4
AdventOfCode
Frost-Phoenix/AdventOfCode
2023-12-01T11:48:56Z
My Advent of Code solutions
main
0
0
0
0
https://api.github.com/repos/Frost-Phoenix/AdventOfCode/tags
-
[ "advent-of-code", "python", "zig" ]
166
false
2025-03-17T13:41:51Z
false
false
unknown
github
[]
AdventOfCode
[]
https://avatars.githubusercontent.com/u/23038785?v=4
zigini
rhaeguard/zigini
2023-07-14T07:04:14Z
ini file parser for zig for learning purposes
main
0
0
0
0
https://api.github.com/repos/rhaeguard/zigini/tags
-
[ "ini", "iniparser", "zig", "ziglang" ]
5
false
2024-01-14T11:39:32Z
false
false
unknown
github
[]
zigini experimental ini file parser for zig. example: ```zig pub fn main() anyerror!void { var inifile = try IniFile.parse("./examples/example_1.ini", std.heap.page_allocator); defer inifile.deinit(); <code>var result = inifile.get("owner", "name"); std.log.info("result : {s}", .{result.?}); </code> } ```
[]
https://avatars.githubusercontent.com/u/63153493?v=4
DS-Algo
muthhukumar/DS-Algo
2023-06-23T12:28:49Z
Implementation of Data structures and Algorithms in Rust, Zig, Go and Typescript
main
10
0
0
0
https://api.github.com/repos/muthhukumar/DS-Algo/tags
MIT
[ "algorithms", "data-structures", "golang", "leetcode-solutions", "rust", "typescript", "zig" ]
1,218
false
2024-09-17T16:40:29Z
false
false
unknown
github
[]
Data Structures and Algorithms WIP
[]
https://avatars.githubusercontent.com/u/106715298?v=4
zigpng
imalexlee/zigpng
2023-10-18T07:38:11Z
PNG decoding library for Zig
main
0
0
0
0
https://api.github.com/repos/imalexlee/zigpng/tags
MIT
[ "image", "png", "png-decoder", "zig", "zig-lang", "zig-library", "ziglang" ]
10,496
false
2024-08-07T13:14:04Z
true
false
unknown
github
[]
PNG Decoder in Zig This project is a PNG decoding library written in Zig. Current testing still ongoing! Table of Contents <ul> <li><a>Installation</a></li> <li><a>Usage</a></li> <li><a>Contributing</a></li> <li><a>License</a></li> </ul> Installation To use this project, you need to have Zig installed on your system. Follow the instructions on the <a>official Zig website</a> to install Zig. Usage I will add more detailed usage examples once decoder is stable. Contributing Contributions are welcome. If you find a bug or want to add a feature, please open an issue or submit a pull request. License This project is licensed under the MIT License. Future Plans <ul> <li>Add encoding</li> <li>Progressive loading support</li> <li>Interlacing support</li> <li>Improve performance and memory usage</li> </ul> Contact If you have any questions or need help, please open an issue or contact me directly. References <ul> <li><a>Zig Documentation</a></li> <li><a>PNG Specification</a></li> </ul>
[]
https://avatars.githubusercontent.com/u/60897190?v=4
logger
Remy2701/logger
2023-06-17T19:24:31Z
Pretty logging library for zig!
main
0
0
0
0
https://api.github.com/repos/Remy2701/logger/tags
-
[ "logging", "zig" ]
28
false
2023-06-17T19:25:16Z
true
false
unknown
github
[]
Logger A pretty logging library for zig. This library depends on the <a>ansi</a> library and the <a>timestamp</a> library (which uses libC). Installation Clone this repository in your libs folder. <code>sh git clone --recursive https://github.com/Remy2701/logger</code> Then add the following line in the <code>build.zig</code>: ```zig const logger = @import("libs/logger/build.zig"); pub fn build(b: *Build) !void { ... exe.addModule("logger", logger.module(b)); try logger.link(exe); } ``` Usage ```zig const std = @import("std"); const logger = @import("logger"); pub fn main() !void { // Set the log level logger.level = logger.Level.Debug; <code>// If set to true, it will exit with 0, otherwise with 1 logger.clean_exit = true; logger.debugFull("Title", .{}, "{s}", .{"This is a debug message!"}); logger.infoFull("Title", .{}, "{s}", .{"This is an information!"}); logger.warnFull("Title", .{}, "{s}", .{"This is a warning!"}); logger.errFull("Title", .{}, "{s}", .{"This is an error!"}); logger.fatalFull("Title", .{}, "{s}", .{"This is a fatal error!"}); // Other alternatives (won't run because of the `fatalFull`) logger.debug("Title", .{}); logger.info("Title", .{}); logger.warn("Title", .{}); logger.err("Title", .{}); logger.fatal("Title", .{}); </code> } ``` The ansi and timestamp libraries are also accessible from the logger module like so: <code>zig const logger = @import("logger"); const ansi = logger.ansi; const timestamp = logger.timestamp;</code>
[]
https://avatars.githubusercontent.com/u/1885938?v=4
zig125
sarvex/zig125
2023-04-26T05:25:56Z
Trying to complete 125 projects from in Zig
main
1
0
0
0
https://api.github.com/repos/sarvex/zig125/tags
-
[ "zig" ]
28
false
2024-06-04T10:01:45Z
false
false
unknown
github
[]
Zig Trying to complete 125 projects from in Zig Numbers <strong>Find PI to the Nth Digit</strong> – Enter a number and have the program generate PI up to that many decimal places. Keep a limit to how far the program will go. <strong>Fibonacci Sequence</strong> – Enter a number and have the program generate the Fibonacci sequence to that number or to the Nth number. <strong>Prime Factorization</strong> – Have the user enter a number and find all Prime Factors (if there are any) and display them. <strong>Next Prime Number</strong> – Have the program find prime numbers until the user chooses to stop asking for the next one. <strong>Find Cost of Tile to Cover W x H Floor</strong> – Calculate the total cost of tile it would take to cover a floor plan of width and height, using a cost entered by the user. <strong>Mortgage Calculator</strong> – Calculate the monthly payments of a fixed term mortgage over given Nth terms at a given interest rate. Also figure out how long it will take the user to pay back the loan. <strong>Change Return Program</strong> – The user enters a cost and then the amount of money given. The program will figure out the change and the number of quarters, dimes, nickels, pennies needed for the change. <strong>Binary to Decimal and Back Converter</strong> – Develop a converter to convert a decimal number to binary or a binary number to its decimal equivalent. <strong>Calculator</strong> – A simple calculator to do basic operators. Make it a scientific calculator for added complexity. <strong>Unit Converter (temp, currency, volume, mass and more)</strong> – Converts various units between one another. The user enters the type of unit being entered, the type of unit they want to convert to and then the value. The program will then make the conversion. <strong>Alarm Clock</strong> – A simple clock where it plays a sound after X number of minutes/seconds or at a particular time. <strong>Distance Between Two Cities</strong> – Calculates the distance between two cities and allows the user to specify a unit of distance. This program may require finding coordinates for the cities like latitude and longitude. <strong>Credit Card Validator</strong> – Takes in a credit card number from a common credit card vendor (Visa, MasterCard, American Express, Discoverer) and validates it to make sure that it is a valid number (look into how credit cards use a checksum). <strong>Tax Calculator</strong> – Asks the user to enter a cost and either a country or state tax. It then returns the tax plus the total cost with tax. <strong>Dijkstra’s Algorithm</strong> – Create a program that finds the shortest path through a graph using its edges. Text <strong>Reverse a String</strong> – Enter a string and the program will reverse it and print it out. <strong>Pig Latin</strong> – Pig Latin is a game of alterations played on the English language game. To create the Pig Latin form of an English word the initial consonant sound is transposed to the end of the word and an ay is affixed (Ex.: "banana" would yield anana-bay). Read Wikipedia for more information on rules. <strong>Count Vowels</strong> – Enter a string and the program counts the number of vowels in the text. For added complexity have it report a sum of each vowel found. <strong>Check if Palindrome</strong> – Checks if the string entered by the user is a palindrome. That is that it reads the same forwards as backwards like “racecar” <strong>Count Words in a String</strong> – Counts the number of individual words in a string. For added complexity read these strings in from a text file and generate a summary. <strong>Text Editor</strong> – Notepad style application that can open, edit, and save text documents. Add syntax highlighting and other features. <strong>RSS Feed Creator</strong> – A program which can read in text from other sources and put it in RSS or Atom news format for syndication. <strong>Post it Notes Program</strong> – A program where you can add text reminders and post them. You can have the program also add popup reminders. <strong>Quote Tracker (market symbols etc)</strong> – A program which can go out and check the current value of stocks for a list of symbols entered by the user. The user can set how often the stocks are checked and the program can show green up and red down arrows to show which direction the stock value has moved. <strong>Guestbook / Journal</strong> – A simple application that allows people to add comments or write journal entries. It can allow comments or not and timestamps for all entries. Could also be made into a shout box. <strong>News Ticker and Game Scores</strong> – A program which sits on your desktop and aggregates news and game scores from various sources on the net. It then scrolls them across the screen on regular intervals. <strong>Fortune Teller (Horoscope)</strong> – A program that checks your horoscope on various astrology sites and puts them together for you each day. <strong>Vigenere / Vernam / Ceasar Ciphers</strong> – Functions for encrypting and decrypting data messages. Then send them to a friend. <strong>Random Gift Suggestions</strong> – Enter various gifts for certain people when you think of them. When its time to give them a gift (xmas, birthday, anniversary) it will randomly pick one and perhaps places you can get it. <strong>Text to HTML Generator</strong> – Converts text files into web HTML files and stylizes them. Great for making online documentation of standard text documentation. <strong>CD Key Generator</strong> – Generates a unique key for your applications to use based on some arbitrary algorithm that you can specify. Great for software developers looking to make shareware that can be activated. <strong>Regex Query Tool</strong> – A tool that allows the user to enter a text string and then in a separate control enter a regex pattern. It will run the regular exp<strong><em>*ression against the source text and return any matches or flag errors in the regular exp</em></strong>*ression. Networking <strong>FTP Program</strong> – A file transfer program which can transfer files back and forth from a remote web sever. <strong>Get Atomic Time from Internet Clock</strong> – This program will get the true atomic time from an atomic time clock on the Internet. There are various clocks across the world. Do a search for a list of them. <strong>Chat Application (IRC or MSN Style)</strong> – Create a chat application that can create simple chat rooms like on Internet Relay Chat (IRC) or a more direct chatting style like MSN. For added complexity, create your own protocol to facilitate this chatting. <strong>Fetch Current Weather</strong> – Get the current weather for a given zip/postal code. <strong>P2P File Sharing App</strong> – Create a program like LimeWire, FrostWire, Bearshare, or a torrent style application. <strong>Port Scanner</strong> – Enter an IP address and a port range where the program will then attempt to find open ports on the given computer by connecting to each of them. On any successful connections mark the port as open. <strong>Mail Checker (POP3 / IMAP)</strong> – The user enters various account information include web server and IP, protocol type (POP3 or IMAP) and the application will check for email on several accounts at a given interval. <strong>Packet Sniffer</strong> – A utility program that will read packets coming in and out of the machine along with related information like destination and payload size. <strong>Country from IP Lookup</strong> – Enter an IP address and find the country that IP is registered in. <strong>Whois Search Tool</strong> – Enter an IP or host address and have it look it up through whois and return the results to you. <strong>Zip / Postal Code Lookup</strong> – Enter a zip or postal code and have it return which city/cities that are in that zip code. <strong>Remote Login</strong> – Create a remote desktop style application which can see and control the remote computer (given you have permissions). It may require the use of your own private network and a second computer to test with. <strong>Site Checker with Time Scheduling</strong> – An application that attempts to connect to a website or server every so many minutes or a given time and check if it is up. If it is down, it will notify you by email or by posting a notice on screen. <strong>Small Web Server</strong> – A simple web server that can serve HTML files that contain Javascript and other forms of non-code executing code. Added complexity would be to try and implement streaming video, create a server-side language, or serve up other stream types. <strong>Web Bot</strong> – An automated program which carries out tasks on the web including checking websites, page scraping, and summarization of data or web posting. Classes <strong>Product Inventory Project</strong> – Create an application which manages an inventory of products. Create a product class which has a price, id, and quantity on hand. Then create an inventory class which keeps track of various products and can sum up the inventory value. <strong>Movie Store</strong> – Manage video rentals and controls when videos are checked out, due to return, overdue fees and for added complexity create a summary of those accounts which are overdue for contact. <strong>Airline / Hotel Reservation System</strong> – Create a reservation system which books airline seats or hotel rooms. It charges various rates for particular sections of the plane or hotel. Example, first class is going to cost more than coach. Hotel rooms have penthouse suites which cost more. Keep track of when rooms will be available and can be scheduled. <strong>Student Grade Book Application</strong> – Keep track of students (with a student class that has their name, average, and scores) in a class and their grades. Assign their scores on tests and assignments to the students and figure out their average and grade for the class. For added complexity put the students on a bell curve. <strong>Bank Account Manager</strong> - Create a class called “Account” which will be an abstract class for three other classes called “CheckingAccount”, “SavingsAccount” and “BusinessAccount”. Manage credits and debits from these accounts through an ATM style program. <strong>Library Catalog</strong> – Create a book class with a title, page count, ISBN and whether or not it is checked out or not. Manage a collection of various books and allow the user to check out books or return books. For added complexity generate a report of those books overdue and any fees. Also allow users to put books on reserve. <strong>Patient / Doctor Scheduler</strong> – Create a patient class and a doctor class. Have a doctor that can handle multiple patients and setup a scheduling program where a doctor can only handle 16 patients during an 8 hr work day. <strong>Recipe Creator and Manager</strong> – Create a recipe class with ingredients and a put them in a recipe manager program that organizes them into categories like deserts, main courses or by ingredients like chicken, beef, soups, pies etc. <strong>Image Gallery</strong> – Create an image abstract class and then a class that inherits from it for each image type. Put them in a program which displays them in a gallery style format for viewing. <strong>Class to Handle Large Numbers</strong> – We know that the basic data types like integer, long, double, and floats only go so far. Create a class that can manage extremely large numbers like those used in space exploration. <strong>Chart Making Class / API</strong> – Create a class, or a set of classes, that generates bar charts, pie charts, histograms, and scatter plot charts. For added complexity, make this a service where people can connect to a web server, supply information and it returns a chart image for them in gif or jpg format. <strong>Shape Area and Perimeter Classes</strong> – Create an abstract class called “Shape” and then inherit from it other shapes like diamond, rectangle, circle, triangle etc. Then have each class override the area and perimeter functionality to handle each shape type. <strong>Matrix Class</strong> – A class to manage matrices. Add, subtract and multiple matrices. <strong>Flower Shop Ordering To Go</strong> – Create a flower shop application which deals in flower objects and use those flower objects in a bouquet object which can then be sold. Keep track of the number of objects and when you may need to order more. <strong>Vending Machine</strong> – Create an application which takes money and dispenses various types of candy or other item. The user enters a number and letter sequence, like D9, and have it return an instance of “Item” which of the proper type. Example when they press D9 it will return a type of candy bar which is an instance of Mr. GoodBar. <strong>Josephus Problem</strong> – Create a program which links together various node objects and then every Nth object is removed until you have one object left. This last object is the sole survivor. Look it up on Google under “Josephus Algorithm” <strong>Family Tree Creator</strong> – Create a class called “Person” which will have a name, when they were born and when (and if) they died. Allow the user to create these Person classes and put them into a family tree structure. Print out the tree to the screen. Threading <strong>Create A Progress Bar for Downloads</strong> – Create a progress bar for applications that can keep track of a download in progress. The progress bar will be on a separate thread and will communicate with the main thread using delegates. <strong>Download Manager</strong> – Allow your program to download various files and each one is downloading in the background on a separate thread. The main thread will keep track of the other thread’s progress and notify the user when downloads are completed. <strong>Chat Application (remoting style)</strong> – Create a chat application which allows you to connect directly to another computer by their IP through the use of remoting and allow your “server” application handle multiple incoming connections. <strong>Bulk Thumbnail Creator</strong> – Picture processing can take a bit of time for some transformations. Especially if the image is large. Create an image program which can take hundreds of images and converts them to a specified size in the background thread while you do other things. For added complexity, have one thread handling re-sizing, have another bulk renaming of thumbnails etc. Web <strong>WYSIWG (What you see is what you get) Editor</strong> – Create an editor online which allows people to move around elements, create tables, write text, set colors etc for web pages without having to know HTML. Think Dreamweaver or FrontPage but for online sites. If you need an example check out the DIC page used to create a post. <strong>Web Browser with Tabs</strong> – Create a small web browser that allows you to navigate the web and contains tabs which can be used to navigate to multiple web pages at once. For simplicity don’t worry about executing Javascript or other client side code. <strong>Page Scraper</strong> – Create an application which connects to a site and pulls out all links, or images, and saves them to a list. For added complexity, organize the indexed content and don’t allow duplicates. Have it put the results into an easily searchable index file. <strong>File Downloader</strong> – An application which can download various objects on a page including video streams or all files on a page. Great for pages with a lot of download links. <strong>Telnet Application</strong> – Create an application which can telnet into servers across the internet and run basic commands. <strong>Online White Board</strong> – Create an application which allows you and friends to collaborate on a white board online. Draw pictures, write notes and use various colors to flesh out ideas for projects. For added complexity try building in picture tubes. <strong>Bandwidth Monitor</strong> – A small utility program that tracks how much data you have uploaded and downloaded from the net during the course of your current online session. See if you can find out what periods of the day you use more and less and generate a report or graph that shows it. <strong>Bookmark Collector and Sorter</strong> – An application that you can put online for people to upload bookmarks to, have it sort them, remove duplicates and export the entire list as a Firefox/IE/Safari bookmark file. For added complexity see if you can group the bookmark items into various folders. <strong>Password Safe</strong> – A program which keeps track of passwords for sites or applications and encrypts them with a key so that no one can read them. <strong>Media Player Widget for iGoogle</strong> – Create an iGoogle gadget which can play various song lists from your computer as well as share one song daily. Perhaps let people look up which songs you have listened to lately. <strong>Text Based Game Like Utopia</strong> – Create a simple text based RPG like Utopia where you can create a civilization, gather resources, forge alliances, cast spells and more on a turn based system. See if you can dominate the kingdom. <strong>Scheduled Auto Login and Action</strong> – Make an application which logs into a given site on a schedule and invokes a certain action and then logs out. This can be useful for checking web mail, posting regular content, or getting info for other applications and saving it to your computer. <strong>E-Card Generator</strong> – Make a site that allows people to generate their own little e-cards and send them to other people. Can use flash or not. Use a picture library and perhaps insightful mottos or quotes. <strong>Content Management System</strong> – Create a content management system (CMS) like Joomla, Drupal, PHP Nuke etc. Start small and allow for the addition of modules/addons later. <strong>Template Maker</strong> – Make a site or application which allows the user to enter in various color codes, elements, dimensions and constructs a template file for a particular application like PHPBB, Invision Board, MySpace, Bebo, etc. <strong>CAPTCHA Maker</strong> – Ever see those images with letters a numbers when you signup for a service and then asks you to enter what you see? It keeps web bots from automatically signing up and spamming. Try creating one yourself for online forms. If you use PHP, take a look at the image functions of GD. Files <strong>Quiz Maker</strong> – Make an application which takes various questions form a file, picked randomly, and puts together a quiz for students. Each quiz can be different and then reads a key to grade the quizzes. <strong>Quick Launcher</strong> – A utility program that allows the user to assign various programs to icons on a toolbar. Then by clicking the buttons they can quickly launch the programs with parameters etc. Much like Windows quick launch. <strong>File Explorer</strong> – Create your own windows explorer program but with added features, better searching, new icons and other views. <strong>Sort File Records Utility</strong> – Reads a file of records, sorts them, and then writes them back to the file. Allow the user to choose various sort style and sorting based on a particular field. <strong>Add Transactions In File and Find Averages</strong> – Read in a file of financial transactions, group them into accounts, add up fields or find averages or apply credits and debits to each account. <strong>Create Zip File Maker</strong> – The user enters various files from different directories and maybe even another computer on the network and the program transfers them and zips them up into a zip file. For added complexity, apply actual compression to the files. <strong>PDF Generator</strong> – An application which can read in a text file, html file or some other file and generates a PDF file out of it. Great for a web based service where the user uploads the file and the program returns a PDF of the file. <strong>Bulk Renamer and Organizer</strong> – This program will take a series of files and renames them with a specific filename filter entered by the user. For instance if the user enters myimage###.jpg it will rename all files with a “minimum” of three numbers like “myimage001.jpg”, “myimage145.jpg” or even “myimage1987.jpg” since 1987 has at least three numbers. <strong>Mp3 Tagger</strong> – Modify and add ID3v1 tags to MP3 files. See if you can also add in the album art into the MP3 file’s header as well as other ID3v2 tags. <strong>Log File Maker</strong> – Make an application which logs various statistics in response to given events. This can be something that logs what an application does, what the system is doing, when something like a file changes etc. <strong>Excel Spreadsheet Exporter</strong> – Create an online application which can read in a file and create an Excel Spreadsheet to export back. This can be through CVS or other file formats. For added complexity, see if you can create formula fields as well. <strong>RPG Character Stat Creator</strong> – Make a program which will randomly create a character’s stats based on several rules set forth by the user. Have it generate a class, gender, strength/magic/dexterity points, and extra abilities or trades. Have it save it to a file which can then be printed out by a dungeon master. <strong>Image Map Generator</strong> – Image maps are those images on the web that have multiple hover points that link to different pages. Such images may include maps or splash pages. See if you can make one where the user specifies an image, clicks hotspots in the image and specify links. It will then generate the HTML code to a file that the user can then copy and paste into their website to make the image map. <strong>File Copy Utility</strong> – Create a utility that can do bulk file copying and backups of other files. <strong>Code Snippet Manager</strong> – Another utility program that allows coders to put in functions, classes or other tidbits to save for use later. Organized by the type of snippet or language the coder can quickly look up code. For extra practice try adding syntax highlighting based on the language. <strong>Versioning Manager</strong> – Create your own versioning system for code files. Users are forced to check out items and lock items during reading and writing so that a group of programmers are not accidentally overwriting code files on one another. Databases <strong>SQL Query Analyzer</strong> – A utility application which a user can enter a query and have it run against a local database and look for ways to make it more efficient. <strong>Remote SQL Tool</strong> – A utility that can execute queries on remote servers from your local computer across the Internet. It should take in a remote host, user name and password, run the query and return the results. <strong>Baseball / Other Card Collector</strong> – Create an online application for keeping track of a collection of cards. Let the user enter all cards in a set, check off which ones they have, which ones they need and generate lists of cards they are looking for. For extra complexity, have it sum up sets and generate reports on how close they are of completing sets or the current value of a set. <strong>Report Generator</strong> – Create a utility that generates a report based on some tables in a database. Generates a sales reports based on the order/order details tables or sums up the days current database activity. <strong>Database Backup Script Maker</strong> – A program which reads a database’s objects, relationships, records and stored procedures and creates a .sql file which can then be imported into another database or kept as a backup file to rebuild the database with. <strong>Event Scheduler and Calendar</strong> – Make an application which allows the user to enter a date and time of an event, event notes and then schedule those events on a calendar. The user can then browse the calendar or search the calendar for specific events. For added complexity, allow the application to create reoccurrence events that reoccur every day, week, month, year etc. <strong>Budget Tracker</strong> – Write an application that keeps track of a household’s budget. The user can add expenses, income, and recurring costs to find out how much they are saving or losing over a period of time. For added complexity allow the user to specify a date range and see the net flow of money in and out of the house budget for that time period. <strong>Address Book</strong> – Keep track of various contacts, their numbers, emails and little notes about them like a Rolodex in the database. For extra complexity, allow the user to connect to a website publish their address book based on specific options the user has set. <strong>TV Show Tracker</strong> – Got a favorite show you don’t want to miss? Don’t have a PVR or want to be able to find the show to then PVR it later? Make an application which can search various online TV Guide sites, locate the shows/times/channels and add them to a database application. The database/website then can send you email reminders that a show is about to start and which channel it will be on. <strong>Travel Planner System</strong> – Make a system that allows users to put together their own little travel itinerary and keep track of the airline / hotel arrangements, points of interest, budget and schedule. <strong>Entity Relationship Diagram (ERD) Creator</strong> – A program that allows the user to put together ERD diagram and save it or have it generate some basic SQL syntax to give them a jump start. <strong>Database Translation (MySQL SQL Server)</strong> – A simple utility that reads in from one database and constructs SQL compliant with another database. Then saves that to another database. One popular transition would be to and from MySQL server for databases like SQL Server and Oracle. <strong>Web Board (Forum)</strong> – Create a forum for you and your buddies to post, administer and share thoughts and ideas. Graphics and Multimedia <strong>Slide Show</strong> – Make an application that shows various pictures in a slide show format. For extra complexity try adding various effects like fade in/out, star wipe and window blinds transitions. <strong>Mind Mapper</strong> – Allow the user to put down ideas and quickly brainstorm how they are related into a mind map. The goal here is speed so let the user quickly write in an idea and drag it around in a visual map to show relationships. <strong>Import Picture and Save as Grayscale</strong> – A utility that sucks the color right out of an image and saves it. You could add more including adjusting contrast, colorizing and more for added complexity. <strong>Stream Video from Online</strong> – Try to create your own online streaming video player. <strong>Mp3 Player (and Other Formats)</strong> – A simple program for playing your favorite music files. For extra complexity see if you can add in playlists and an equalizer. <strong>Bulk Picture Manipulator</strong> – This program will take in a directory of pictures and apply a certain effect to them whether it be reducing color count, changing its format, or alter file attributes. For something extra try to see if you can also create a system to tag them. <strong>CD Burning App</strong> – Create a utility that simply burns data to a CD. <strong>YouTube Downloader</strong> – A program which can download videos to your hard drive from youtube.com. Save the files in various formats including FLV and AVI. <strong>Wallpaper Manager</strong> – Make a program which keeps track of your favorite wallpapers, changes them regularly and maybe even re-sizes them for your resolution (aka tiles one and stretches another) <strong>Screen Capture Program</strong> – Make a utility that will simply capture a frame from your web cam. For added complexity see if you can also build in emailing functionality. <strong>Image Browser</strong> – This application is used to view various image files on your computer from PNG, GIF, JPG to BMP, TIFF etc. <strong>Traffic Light Application</strong> – See if you can make your own street light application and then put it into an intersection scenario. Don’t let any cars run the lights and crash into one another! <strong>MP3 to Wav Converter</strong> – MP3 is essentially compressed wav format. See if you can translate it back into wav so that some other sound editing programs can work with the wav file itself. Keep in mind that 1 MB of MP3 is relative 10MB wav. <strong>Signature Maker</strong> – Ever seen those web board posts where someone has a generated signature made up? See if you can make a program that allows the user to specify a background, text, colors and alignment to make their own signatures or userbars. <strong>Screen Saver</strong> – Make a screensaver program that will run while your computer sits idle. To make a simple one use some standard pictures and then for added complexity try a 3D object that spins around the screen and bounces off the sides. <strong>Watermarking Application</strong> – Have some pictures you want copyright protected? Add your own logo or text lightly across the background so that no one can simply steal your graphics off your site. Make a program that will add this watermark to the picture. <strong>Turtle Graphics</strong> – This is a common project where you create a floor of 20 x 20 squares. Using various commands you tell a turtle to draw a line on the floor. You have move forward, left or right, lift or drop pen etc. For added complexity, allow the program to read in the list of commands from a file. Do a search online for “Turtle Graphics” for more information.
[]
https://avatars.githubusercontent.com/u/140299755?v=4
qoiz
levydsa/qoiz
2023-11-21T19:45:10Z
QOI image format decoder/encoder.
master
0
0
0
0
https://api.github.com/repos/levydsa/qoiz/tags
MIT
[ "qoi-format", "zig", "ziglang" ]
2,860
false
2024-07-15T19:02:53Z
true
true
unknown
github
[]
A simple and fast implementation of the QOI image format decoder and encoder. Examples ```zig const qoiz = @import("qoiz"); test "image init reader" { const file = try fs.cwd().openFile("src/bench/data/dice.qoi", .{}); defer file.close(); <code>const image = try qoiz.Image(.rgb).initReader(testing.allocator, file.reader()); defer image.deinit(); </code> } ``` Benchmark <code>console $ zig build bench --release=fast -- qoiz 1028 dice : dec. 1.182ms ±σ 0.046ms | enc. 2.258ms ±σ 1.181ms edgecase : dec. 0.015ms ±σ 0.001ms | enc. 0.038ms ±σ 0.015ms kodim10 : dec. 3.760ms ±σ 0.136ms | enc. 7.463ms ±σ 3.744ms kodim23 : dec. 3.696ms ±σ 0.035ms | enc. 7.384ms ±σ 3.695ms qoi_logo : dec. 0.078ms ±σ 0.002ms | enc. 0.188ms ±σ 0.078ms testcard : dec. 0.123ms ±σ 0.004ms | enc. 0.255ms ±σ 0.123ms testcard_rgba : dec. 0.132ms ±σ 0.004ms | enc. 0.271ms ±σ 0.132ms wikipedia_008 : dec. 9.707ms ±σ 0.167ms | enc. 19.508ms ±σ 9.680ms zero : dec. 0.378ms ±σ 0.023ms | enc. 0.772ms ±σ 0.378ms</code> Another library for zig made by @ikskuh <code>console $ zig build bench --release=fast -- zigqoi 1028 dice : dec. 2.477ms ±σ 0.086ms | enc. 2.617ms ±σ 2.471ms edgecase : dec. 0.019ms ±σ 0.001ms | enc. 0.064ms ±σ 0.019ms kodim10 : dec. 4.468ms ±σ 0.082ms | enc. 6.644ms ±σ 4.462ms kodim23 : dec. 4.502ms ±σ 0.131ms | enc. 6.668ms ±σ 4.486ms qoi_logo : dec. 0.117ms ±σ 0.004ms | enc. 0.333ms ±σ 0.117ms testcard : dec. 0.162ms ±σ 0.005ms | enc. 0.321ms ±σ 0.162ms testcard_rgba : dec. 0.178ms ±σ 0.004ms | enc. 0.309ms ±σ 0.178ms wikipedia_008 : dec. 12.448ms ±σ 0.251ms | enc. 16.965ms ±σ 12.387ms zero : dec. 0.542ms ±σ 0.011ms | enc. 1.062ms ±σ 0.542ms</code> Reference implementation in C <code>console $ zig build bench --release=fast -- reference 1028 dice : dec. 1.236ms ±σ 0.046ms | enc. 1.535ms ±σ 1.235ms edgecase : dec. 0.027ms ±σ 0.002ms | enc. 0.037ms ±σ 0.027ms kodim10 : dec. 3.230ms ±σ 0.065ms | enc. 3.157ms ±σ 3.226ms kodim23 : dec. 3.165ms ±σ 0.055ms | enc. 3.021ms ±σ 3.162ms qoi_logo : dec. 0.148ms ±σ 0.005ms | enc. 0.246ms ±σ 0.148ms testcard : dec. 0.139ms ±σ 0.005ms | enc. 0.191ms ±σ 0.139ms testcard_rgba : dec. 0.146ms ±σ 0.005ms | enc. 0.204ms ±σ 0.146ms wikipedia_008 : dec. 8.343ms ±σ 0.123ms | enc. 9.346ms ±σ 8.329ms zero : dec. 0.496ms ±σ 0.015ms | enc. 0.766ms ±σ 0.496ms</code>
[]
https://avatars.githubusercontent.com/u/10145483?v=4
fibo
mmononen/fibo
2023-10-08T22:47:58Z
A small Fibonacci sequence benchmark for compilers.
main
0
0
0
0
https://api.github.com/repos/mmononen/fibo/tags
MIT
[ "algol68", "benchmarking", "c", "cpp", "crystal-lang", "d-lang", "dart", "fibonacci-sequence", "freebasic", "freepascal", "golang", "julia", "lua", "nim-lang", "odin-lang", "python", "qb64", "rust-lang", "v-lang", "zig" ]
494
false
2023-11-01T17:10:43Z
false
false
unknown
github
[]
Fibonacci series benchmark for several different languages, compilers and interpreters. Execution times were measured with time command on Linux &amp; WSL, and Luke Sampson's time utility (https://github.com/lukesampson/psutils) on Windows. Sources compiled mainly with the default settings. fibonacci(45) - execution times in seconds on Ryzen 5 5600 @ 3.5 GHz | Compiler / Interpreter | Debian 12 (WSL) | EndeavourOS | Win 11 | | -------------------------------- | ------ | ------ | ------ | | Algol 68 Genie 3.1.2 | 449.06 | | | | Algol 68 Genie 3.2.1 | | 401.97 | | | Algol 68 Genie 3.4.2 | | 399.16 | | | Algol 68 Genie 3.4.2 (--compile) | | 258.28 | | | Algol 68 Genie 3.4.4 | | | 779.97 | | Ballerina 1.2.11 | | 6.54 | | | Crystal 1.6.0 | 6.09 | | | | Crystal 1.9.2 | | 6.74 | | | Crystal 1.9.2 (--release) | | 4.25 | | | Crystal 1.10.0 | | 6.74 | | | Crystal 1.10.0 (--release) | | 4.25 | | | Dart 3.0.7 | | 6.72 | | | Dart 3.1.3 | | | 6.85 | | Dart 3.1.5 | | | 6.83 | | DMD64 D Compiler 2.105.2 | | 13.98 | 7.68 | | DMD64 D Compiler 2.105.3-dirty | | | 7.61 | | Elixir 1.14.0 (Erlang/OTP 24) | 9.07 | | | | Elixir 1.15.6 (Erlang/OTP 26) | | 9.81 | | | Elixir 1.15.7 (Erlang/OTP 26) | | 9.79 | | | Elixir 1.16.7 (Erlang/OTP 24) | | | 9.75 | | FreeBASIC 1.10.0 | | 6.63 | 5.25 | | Free Pascal 3.2.2 | 9.05 | 8.80 | 7.90 | | Gnu G++ 12.2.0 | 4.87 | | | | Gnu G++ 13.2.0 | | | 4.61 | | Gnu G++ 13.2.1 | | 5.15 | | | Gnu GCC 12.2.0 | 5.31 | | | | Gnu GCC 13.2.0 | | | 4.89 | | Gnu GCC 13.2.1 | | 5.15 | | | Go 1.19.8 | 4.76 | | | | Go 1.21.2 | | | 4.61 | | Go 1.21.3 | | 4.78 | | | Go 1.21.4 | | | 4.47 | | Java 1.8.0_382 | 2.71 | 2.77 | | | Julia 1.9.3 | | 4.40 | 5.72 | | Kotlin 1.9.10 | | 2.76 | | | Kotlin 1.9.20 | | | 4.84 | | Lua 5.4.2 | | | 61.97 | | Lua 5.4.4 | 64.08 | | | | Lua 5.4.6 | | 66.73 | | | LuaJIT 2.1.0-beta3 | 9.90 | | | | LuaJIT 2.1.1696795921 | | 9.79 | | | LuaJIT 2.1.1697887905 | | | 10.53 | | Nim 1.6.10 (c -d:release) | 1.24 | | | | Nim 1.6.10 (cpp -d:release) | 1.25 | | | | Nim 2.0.0 (c -d:release) | | 0.01 | 0.14 | | Nim 2.0.0 (cpp -d:release) | | 1.25 | 1.70 | | Odin dev-2023-10 | | 5.08 | | | Odin dev-2023-10-nightly | | | 4.81 | | Odin dev-2023-11-nightly | | | 4.36 | | PyPy 7.3.13 (Python 3.10.13) | | 10.64 | 11.72 | | Python 3.11.2 | 111.52 | | | | Python 3.11.5 | | 108.09 | 188.74 | | QB64 2.1 | | | 53.95 | | Ruby 3.0.6p216 | | 85.86 | | | Ruby 3.1.2p20 | 90.22 | | | | Ruby 3.2.2 | | | 86.31 | | Rust 1.63.0 | 5.61 | | | | Rust 1.73.0 | | 7.15 | 6.99 | | Tiny C Compiler 0.9.27 | | 5.54 | 4.86 | | V 0.4.2 | | | 4.95 | | V 0.4.3 | | 5.37 | 5.05 | | Zig 0.11.0 | | 7.39 | 7.86 |
[]
https://avatars.githubusercontent.com/u/428334?v=4
zig-btree
gabereiser/zig-btree
2023-03-17T16:09:02Z
A binary tree written in Zig by ChatGPT-4
main
0
0
0
0
https://api.github.com/repos/gabereiser/zig-btree/tags
MIT
[ "binary-search-tree", "binary-tree", "btree", "btrees", "chatgpt", "zig" ]
2
false
2023-03-17T16:11:40Z
false
false
unknown
github
[]
zig-btree A binary tree written in Zig by ChatGPT-4
[]
https://avatars.githubusercontent.com/u/795162?v=4
Windows-DPAPI-with-Zig
chgeuer/Windows-DPAPI-with-Zig
2023-12-20T12:57:42Z
null
main
0
0
0
0
https://api.github.com/repos/chgeuer/Windows-DPAPI-with-Zig/tags
-
[ "dataprotection", "dpapi", "windows", "zig", "ziglang" ]
127
false
2023-12-23T22:13:57Z
true
false
unknown
github
[]
Exploring the Windows Data Protection API (DPAPI) from <a>Zig</a> This project features a little command line utility which reads encrypted data from stdin and writes to stdout. The <a>Microsoft Windows Data Protection API (DPAPI)</a> features functions for encrypting/wrapping/protecting and decrypting/unwrapping/unprotecting data, namely <a>CryptProtectData</a> and <a>CryptUnprotectData</a>. These functions are defined in <code>dpapi.h</code>. Compiling and running The following command compiles a small CLI application (18kB on Windows): <code>shell zig build -Doptimize=ReleaseSmall</code> Then you pipe the contents of an encrypted file into the executable, and process the output like you wish. For example, on Windows, the Azure CLI stores all management tokens as JSON structure in an encrypted file in my <code>.azure</code> directory. The following pipeline pipes that file into the decryption utility and uses <a>JQ</a> to pretty-print parts of the JSON. <code>shell type %USERPROFILE%\.azure\msal_token_cache.bin | .\zig-out\bin\dpapi.exe unwrap | jq.exe ".RefreshToken"</code> With the checked-in binaries, you can also do round-trip: <code>shell echo Hallo Welt | .\dpapi.exe wrap | .\dpapi.exe unwrap</code> gives ``` C:\github\chgeuer\Windows-DPAPI-with-Zig (main -&gt; origin) λ echo Hallo Welt | .\dpapi.exe wrap | .\dpapi.exe unwrap Hallo Welt C:\github\chgeuer\Windows-DPAPI-with-Zig (main -&gt; origin) λ ``` Alternative in NET The C# version would be along these lines (using <code>System.Security.dll</code>): ```csharp using System; using System.Security.Cryptography; using System.Text; using System.IO; internal class Program { static void Main(string[] args) { var input = "Hallo, Welt!"; byte[] wrapped = Encrypt(input); File.WriteAllBytes(@"C:\Users\chgeuer\Desktop\zig2\dpapi_encrypted.bin", wrapped); <code> Console.WriteLine(Convert.ToBase64String(wrapped)); Console.WriteLine(Decrypt(wrapped)); } private static byte[] Encrypt(string userData) =&gt; ProtectedData.Protect( userData: Encoding.UTF8.GetBytes(userData), optionalEntropy: null, scope: DataProtectionScope.CurrentUser); private static string Decrypt(byte[] wrapped) =&gt; Encoding.UTF8.GetString( ProtectedData.Unprotect( encryptedData: wrapped, optionalEntropy: null, scope: DataProtectionScope.CurrentUser)); </code> } ```
[]
https://avatars.githubusercontent.com/u/3594035?v=4
lastchoice
tsunaminoai/lastchoice
2023-10-06T21:00:08Z
A FirstChoice database file reader written in zig. Written for my dad as an exercise, but hopefully helpful for others looking to use FOL files in data archeology.
main
6
0
0
0
https://api.github.com/repos/tsunaminoai/lastchoice/tags
-
[ "firstchoice", "zig", "ziglang" ]
132
false
2023-12-02T00:47:25Z
true
true
unknown
github
[]
LastChoice Description LastChoice is a cli application to recover data from a FirstChoice database. Goals <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> Read a FirstChoice database <br/><input type='checkbox' class='w-4 h-4 text-green-500 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' checked disabled></input> Read out to CSV <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> Read out to JSON Usage <code>bash fzp (options) &lt;path-to-database&gt; options: -h display header information -f display field information -r display records -c display records as CSV with header row -o &lt;path-to-output&gt; write records to file at path</code> Why? While it may seem silly to have a tool to read a database that is no longer in use, I had a few reasons for doing so. My Dad got in on using computers for business and personal use way back in the late '80s. As a result, he had a lot of data in FirstChoice databases. When his old machine died, he asked if I could help recover the data in the <code>FOL</code> flies he had. I knew that other converters existed, but of these, one was a paid application, and the <a>other</a>, while an invaluable resource, was not going to be simple enough for my dad to use. I decided to write this tool to help him out. I also wanted to learn more about Zig, and this seemed like a good project to do so. More than that, I realized that there are probably more FOL files floating around iini people's basements and attics, and I wanted to make sure that there was a tool that could read them into an exensible format for data archeology. If this tool has been of use to you, please let me know. I'd love to hear about it.
[]
https://avatars.githubusercontent.com/u/12129065?v=4
writing_interpreter_zig
shailpatels/writing_interpreter_zig
2023-06-17T17:01:25Z
null
main
0
0
0
0
https://api.github.com/repos/shailpatels/writing_interpreter_zig/tags
MIT
[ "monkey-language", "zig" ]
46
false
2024-06-20T02:47:34Z
true
false
unknown
github
[]
Writing An interpreter in Zig This repo is a zig implementation of the Monkey Language interpreter described in the excellent <a> Writing An Interpreter In Go </a> book by <a>Thorsten Ball</a> Current progress <ul> <li>[X] Lexing</li> <li>[X] Parsing <br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Evaluation <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> Extra</li> </ul> Building Install <a>Zig</a> <code>zig build</code>
[]
https://avatars.githubusercontent.com/u/56652412?v=4
echoz
t0k4r/echoz
2023-07-27T20:50:22Z
very basic zig web framework
main
0
0
0
0
https://api.github.com/repos/t0k4r/echoz/tags
-
[ "rest-api", "web", "zig" ]
29
false
2023-11-01T17:24:29Z
true
false
unknown
github
[]
404
[]
https://avatars.githubusercontent.com/u/18062018?v=4
Zubik
Robochu/Zubik
2023-07-24T04:24:11Z
A Rubik's cube solver written in Zig.
master
0
0
0
0
https://api.github.com/repos/Robochu/Zubik/tags
-
[ "rubiks-cube", "rubiks-cube-solver", "zig" ]
16
false
2024-04-20T17:02:08Z
true
false
unknown
github
[]
Zubik A Rubik's cube solver written in Zig.
[]
https://avatars.githubusercontent.com/u/106715298?v=4
vulkan-triangle-zig
imalexlee/vulkan-triangle-zig
2023-12-25T16:53:59Z
Vulkan triangle in zig :-)
main
0
0
0
0
https://api.github.com/repos/imalexlee/vulkan-triangle-zig/tags
-
[ "graphics", "vulkan", "zig" ]
1,857
false
2024-01-01T20:07:44Z
true
true
unknown
github
[]
vulkan-triangle-zig zig implementation of an RGB triangle using the Vulkan graphics API. Uses glfw for windowing. Notes <ul> <li>originally written to be compiled by zig-0.12.0-dev.1861+412999621 compiler</li> <li>must install Vulkan and glfw as a system library</li> <li>compiled on an M1 mac and therefore you need MoltenVK if you're doing the same. This will come with your Vulkan install.</li> <li>use <code>zig build run</code> to build an run</li> </ul>
[]
https://avatars.githubusercontent.com/u/15251568?v=4
zhip8
LarssonOliver/zhip8
2023-03-11T17:14:32Z
Zig CHIP-8 Emulator
main
0
0
0
0
https://api.github.com/repos/LarssonOliver/zhip8/tags
Apache-2.0
[ "chip-8", "chip8", "chip8-emulator", "zig", "ziglang" ]
162
false
2024-08-13T07:56:39Z
true
true
0.13.0
github
[ { "commit": "master", "name": "clap", "tar_url": "https://github.com/Hejsil/zig-clap/archive/master.tar.gz", "type": "remote", "url": "https://github.com/Hejsil/zig-clap" } ]
ZHIP8 - Zig CHIP-8 Emulator I built this project with the intention of learning Zig. I used the following CHIP-8 references during the implementation process: Started in Zig <code>0.10.0</code>, left for a while and then ported to, and finished in Zig <code>0.13.0</code>. <ul> <li>https://en.wikipedia.org/wiki/CHIP-8</li> <li>https://tobiasvl.github.io/blog/write-a-chip-8-emulator</li> </ul> The current implementation is lackluster in the graphics department, but this project is not about implementing OpenGL graphics, it is about understanding Zig as a language. Compilation and Testing Compilation using <code>zig build</code> produces a <code>./zig-out/bin/zhip8</code> binary. <code>bash zig build</code> Help page: ```bash $ ./zig-out/bin/zhip8 --help [-h] [-f ] ... <code>-h, --help Display this help and exit. -f, --frequency &lt;INT&gt; CPU frequency in Hz, default 700. &lt;ROM&gt;... </code> ``` Unit Tests Running the unit tests is done with: <code>bash zig build test --summary all</code> Input The inputs are very rudimentary, but the mapping of keys are as follows: <code>text 1 2 3 4 1 2 3 c q w e r \ 4 5 6 d a s d f / 7 8 9 e z x c v a 0 b f</code> Exiting the Emulator Exiting the program is done by hitting <code>&lt;ESC&gt;</code>.
[]
https://avatars.githubusercontent.com/u/44848747?v=4
homebrew-tap
Wallunen/homebrew-tap
2023-02-25T14:03:21Z
Random Homebrew formulae.
main
0
0
0
0
https://api.github.com/repos/Wallunen/homebrew-tap/tags
MIT
[ "homebrew", "zig" ]
573
false
2025-05-22T01:11:36Z
false
false
unknown
github
[]
Wallunen Tap How do I install these formulae? <code>brew install wallunen/tap/&lt;formula&gt;</code> Or <code>brew tap wallunen/tap</code> and then <code>brew install &lt;formula&gt;</code>. Documentation <code>brew help</code>, <code>man brew</code> or check <a>Homebrew's documentation</a>.
[]
https://avatars.githubusercontent.com/u/6756180?v=4
range-v3
kassane/range-v3
2023-04-26T13:41:43Z
Range library for C++14/17/20, basis for C++20's std::ranges (uses zig build-system)
zig-pkg
0
0
0
0
https://api.github.com/repos/kassane/range-v3/tags
NOASSERTION
[ "cpp-library", "range-library", "zig", "zig-package" ]
12,986
true
2024-08-04T20:23:09Z
true
true
unknown
github
[]
range-v3 Range library for C++14/17/20. This code was the basis of <a>a formal proposal</a> to add range support to the C++ standard library. That proposal evolved through a Technical Specification, and finally into <a>P0896R4 "The One Ranges Proposal"</a> which was merged into the C++20 working drafts in November 2018. About: Ranges are an extension of the Standard Template Library that makes its iterators and algorithms more powerful by making them <em>composable</em>. Unlike other range-like solutions which seek to do away with iterators, in range-v3 ranges are an abstraction layer <em>on top</em> of iterators. Range-v3 is built on three pillars: Views, Actions, and Algorithms. The algorithms are the same as those with which you are already familiar in the STL, except that in range-v3 all the algorithms have overloads that take ranges in addition to the overloads that take iterators. Views are composable adaptations of ranges where the adaptation happens lazily as the view is iterated. And an action is an eager application of an algorithm to a container that mutates the container in-place and returns it for further processing. Views and actions use the pipe syntax (e.g., <code>rng | adapt1 | adapt2 | ...</code>) so your code is terse and readable from left to right. Documentation: Check out the (woefully incomplete) documentation <a>here</a>. Other resources (mind the dates, the library probably has changed since then): <ul> <li>Usage:</li> <li>Talk: <a>CppCon 2015: Eric Niebler "Ranges for the Standard Library"</a>, 2015.</li> <li><a>A slice of Python in C++</a>, 07.12.2014.</li> <li>Actions (back then called <a>Container Algorithms</a>), 23.11.2014.</li> <li><a>Range comprehensions</a>, 27.04.2014.</li> <li> <a>Input iterators vs input ranges</a>, 07.11.2013. </li> <li> Design / Implementation: </li> <li>Rationale behind range-v3: <a>N4128: Ranges for the standard library Revision 1</a>, 2014.</li> <li>Ranges TS: <a>N4560: C++ Extensions for Ranges</a>, 2015.</li> <li>Implementation of customization points in range-v3:<ul> <li><a>N4381: Suggested Design for Customization Points</a>, 2015.</li> <li><a>P0386: Inline variables</a>, 2016.</li> <li><a>Customization Point Design in C++11 and Beyond</a>, 2014.</li> </ul> </li> <li>Proxy iterators in range-v3:<ul> <li><a>D0022: Proxy Iterators for the Ranges Extensions</a>.</li> <li><a>To Be or Not to Be (an Iterator)</a>, 2015.</li> <li><a>Iterators++: Part1</a>, 2015.</li> <li><a>Iterators++: Part2</a>, 2015.</li> <li><a>Iterators++: Part3</a>, 2015.</li> </ul> </li> <li>Metaprogramming utilities:<ul> <li>See the <a>meta documentation</a>, the library has changed significantly since the <a>2014 blog post</a>.</li> </ul> </li> <li>Concept emulation layer: <a>Concept checking in C++11</a>, 2013.</li> <li><a>C++Now 2014: Eric Niebler "C++11 Library Design"</a>, 2014.</li> </ul> License: Most of the source code in this project are mine, and those are under the Boost Software License. Parts are taken from Alex Stepanov's Elements of Programming, Howard Hinnant's libc++, and from the SGI STL. Please see the attached LICENSE file and the CREDITS file for the licensing and acknowledgments. Supported Compilers The code is known to work on the following compilers: <ul> <li>clang 5.0 (or later)</li> <li>GCC 6.5 (or later)</li> <li>Clang/LLVM 6 (or later) on Windows (older versions may work - we haven't tested.)</li> <li>Visual Studio 2019 (or later) on Windows, with some caveats due to range-v3's strict conformance requirements:</li> <li>range-v3 needs <code>/permissive-</code> and either <code>/std:c++latest</code>, <code>/std:c++20</code>, or <code>/std:c++17</code></li> </ul> <strong>Development Status:</strong> This code is fairly stable, well-tested, and suitable for casual use, although currently lacking documentation. <em>In general</em>, no promise is made about support or long-term stability. This code <em>will</em> evolve without regard to backwards compatibility. A notable exception is anything found within the <code>ranges::cpp20</code> namespace. Those components will change rarely or (preferably) never at all. <strong>Build status</strong> - on GitHub Actions: <a></a> Building range-v3 - Using vcpkg You can download and install range-v3 using the <a>vcpkg</a> dependency manager: <code>sh git clone https://github.com/Microsoft/vcpkg.git cd vcpkg ./bootstrap-vcpkg.sh ./vcpkg integrate install ./vcpkg install range-v3</code> The range-v3 port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please <a>create an issue or pull request</a> on the vcpkg repository. Building range-v3 - Using Conan You can download and install range-v3 using the <a>Conan</a> dependency manager. Setup your CMakeLists.txt (see <a>Conan documentation</a> on how to use MSBuild, Meson and others): ```cmake project(myproject CXX) add_executable(${PROJECT_NAME} main.cpp) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) # Include Conan-generated file conan_basic_setup(TARGETS) # Introduce Conan-generated targets target_link_libraries(${PROJECT_NAME} CONAN_PKG::range-v3) <code>Create `conanfile.txt` in your source dir:</code>sh [requires] range-v3/0.12.0 [generators] cmake <code>Install and run `conan`, then build your project as always:</code>sh pip install conan mkdir build cd build conan install ../ --build=missing cmake ../ cmake --build . ``` Building range-v3 - Using <code>build2</code> You can use <a><code>build2</code></a>, a dependency manager and build-system combined, to use <code>range-v3</code> (or work on it): Currently this package is available in these package repositories: - <strong>https://cppget.org/range-v3/</strong> for released and published versions. - <a><strong>The git repository with the sources of the <code>build2</code> package of <code>range-v3</code></strong></a> for unreleased or custom revisions of <code>range-v3</code>, or for working on it with <code>build2</code>. Usage: <ul> <li><code>build2</code> package name: <code>range-v3</code></li> <li>Library target name : <code>lib{range-v3}</code></li> <li><a>Detailed use cases and instructions in this document</a>.</li> </ul> For example, to make your <code>build2</code> project depend on <code>range-v3</code>: - Add one of the repositories to your configurations, or in your <code>repositories.manifest</code>, if not already there; for example: <code>: role: prerequisite location: https://pkg.cppget.org/1/alpha # v0.11.0 is there.</code> - Add this package as a dependency to your <code>manifest</code> file (example for <code>v0.11.x</code>): <code>depends: range-v3 ~0.11.0</code> - Import the target and use it as a prerequisite to your own target using <code>range-v3</code> in the appropriate <code>buildfile</code>: ```py import range_v3 = range-v3%lib{range-v3} <code>lib{mylib} : cxx{**} ... $range_v3 ``` </code> Then just build your project as usual (with <code>b</code> or <code>bdep update</code>), <code>build2</code> will figure out the rest. For <code>build2</code> newcomers or to get more details and use cases, you can read <a>this document</a> and the <a><code>build2</code> toolchain introduction</a>. Say Thanks! I do this work because I love it and because I love C++ and want it to be as excellent as I know it can be. If you like my work and are looking for a way to say thank you, you can leave a supportive comment on <a>my blog</a>. Or you could leave me some kudos on my Open Hub range-v3 contribution page. Just click the <strong>Give Kudos</strong> button <a>here</a>.
[]
https://avatars.githubusercontent.com/u/1920783?v=4
zls-plugin
konomae/zls-plugin
2024-01-05T08:34:10Z
A proto WASM plugin for ZLS.
main
0
0
1
0
https://api.github.com/repos/konomae/zls-plugin/tags
MIT
[ "language-server", "language-support", "zig", "ziglang" ]
277
false
2025-03-15T08:59:15Z
false
false
unknown
github
[]
ZLS plugin <a>ZLS</a> WASM plugin for <a>proto</a>. Installation Add the following to <code>.prototools</code>. <code>toml [plugins] zls = "github://konomae/zls-plugin"</code> Configuration ZLS plugin does not support configuration. Hooks ZLS plugin does not support hooks. Contributing Build the plugin: <code>shell cargo build --target wasm32-wasip1</code> Test the plugin by running <code>proto</code> commands. <code>shell proto install zls-test proto versions zls-test</code>
[]
https://avatars.githubusercontent.com/u/29004070?v=4
ansi
vitalspace/ansi
2024-01-11T02:17:35Z
Ansi Zig
main
0
0
0
0
https://api.github.com/repos/vitalspace/ansi/tags
-
[ "ansi", "colors", "zig" ]
4
false
2024-01-11T02:25:46Z
true
false
unknown
github
[]
Ansi Zig Usage ```typescript pub fn main() { const allocator = std.mem.page_allocator; const ansi = try Ansi().init(allocator); <code>const message = try ansi.bgBlack(try ansi.cyan("Hello world!!")); defer allocator.free(message); std.debug.print("{s}\n", .{message}); </code> } ```
[]
https://avatars.githubusercontent.com/u/101372000?v=4
zell-life
mr-ema/zell-life
2023-06-23T18:31:19Z
Conway's Game of Life using the Zig programming language and the Raylib library for graphics.
main
0
0
0
0
https://api.github.com/repos/mr-ema/zell-life/tags
NOASSERTION
[ "conways-game-of-life", "game-of-life", "raygui", "raylib", "state-machine", "zig" ]
975
false
2024-06-23T02:38:57Z
true
true
0.13.0
github
[ { "commit": "29ac31f40980d48087db36072693e62743c96ce1.tar.gz", "name": "raylib", "tar_url": "https://github.com/raysan5/raylib/archive/29ac31f40980d48087db36072693e62743c96ce1.tar.gz.tar.gz", "type": "remote", "url": "https://github.com/raysan5/raylib" }, { "commit": "bc67f42209cc32965c7...
Zig Conway's Game Of Life This is a simple implementation of Conway's Game of Life using the Zig programming language and the Raylib library for graphics. Navigation <ul> <li><a>Demo</a></li> <li><a>Features</a></li> <li><a>Default Bindings</a></li> <li><a>How To Build</a></li> </ul> Resources <ul> <li><a>DockerFile For Raylib Projects</a></li> <li><a>Nix Shell For Raylib Projects</a></li> <li><a>Zig</a></li> <li><a>Awesome Zig</a></li> <li><a>Raylib</a></li> <li><a>Zig Raylib Bindings</a></li> <li><a>Zig Showdown</a></li> </ul> Features <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> Pause the simulation (with key) <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> Save/Load grid from file <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> Zoom in and out <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> Configurable speed Planned <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> Multiple grids <br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Load/Save configuration using a json file <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> Improve debug logging and errors <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> Custom patterns <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> (UI) Improved user interface for better usability and aesthetics <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> (UI) add a toast notification system to show errors and useful info <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> Performance optimization for handling larger grids and more complex operations <br/><input type='checkbox' class='w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600' disabled></input> Advanced features for managing multiple grids simultaneously Demo Default Bindings | Action | Binding | | --------------------------------- | --------------------------------- | | Pause Simulation | <code>&lt;SPACE&gt;</code> | | Purge Life | <code>&lt;K&gt;</code> | | Toggle Edit Mode | <code>&lt;E&gt;</code> | | Zoom In | <code>&lt;=&gt;</code> or <code>&lt;WHEEL&gt;</code> | | Zoom Out | <code>&lt;-&gt;</code> or <code>&lt;WHEEL&gt;</code> | | Move Cam Around | <code>&lt;MOUSE RIGHT&gt;</code> | | Toggle Cell State (Edit Mode) | <code>&lt;MOUSE LEFT&gt;</code> | How To Build And Run It Before you start, make sure you have the required dependencies for raylib installed. Refer to the official <a>raylib - build and installation guide</a> for instructions on setting up the necessary environment. <code>git clone https://github.com/mr-ema/zell-life</code> <code>cd ./zell-life</code> <code>zig build run</code>
[]
https://avatars.githubusercontent.com/u/6891346?v=4
zigberrypi
razshare/zigberrypi
2023-05-31T16:58:13Z
Zig library for interacting with raspberrypi's gpio
main
0
0
0
0
https://api.github.com/repos/razshare/zigberrypi/tags
MIT
[ "gpio-pins", "raspberry-pi", "zig" ]
17
false
2023-06-01T17:41:33Z
true
false
unknown
github
[]
zigberrypi Zig library for interacting with raspberrypi's gpio How to install <ul> <li>add dependency <code>sh zigmod aq install 1/tncrazvan/zigberrypi</code></li> <li>add a reference for the dependency in <code>build.zig</code> <code>zig const deps = @import("deps.zig"); // ... pub fn build(b: *std.Build) void { // ... deps.addAllTo(exe); // ... }</code></li> <li>import <code>zigberrypi</code> in your project with <code>zig const gpio = @import("zigberrypi");</code></li> </ul> Example Blinking led example ```zig const std = @import("std"); const gpio = @import("zigberrypi"); fn sleepForTwoSeconds() void { std.time.sleep(std.time.ns_per_s * 2); } pub fn main() !void { var active = false; const pin11 = try gpio.openWritable(gpio.Pin.PIN11); defer pin11.close(); while (true) { try pin11.write(if (active) "1" else "0"); active = !active; sleepForTwoSeconds(); } } ```
[]
https://avatars.githubusercontent.com/u/1552770?v=4
ncinputtest
neurocyte/ncinputtest
2023-09-18T19:07:36Z
A simple notcurses input & jitter tester written in Zig
master
0
0
0
0
https://api.github.com/repos/neurocyte/ncinputtest/tags
MIT
[ "testing", "tui", "zig" ]
18
false
2024-08-15T13:42:44Z
true
true
unknown
github
[ { "commit": "3a3ab6e3a12f211158d79e17c7ae25fcb15644cf.tar.gz", "name": "notcurses", "tar_url": "https://github.com/neurocyte/notcurses-zig/archive/3a3ab6e3a12f211158d79e17c7ae25fcb15644cf.tar.gz.tar.gz", "type": "remote", "url": "https://github.com/neurocyte/notcurses-zig" } ]
ncinputtest A simple notcurses input &amp; jitter tester written in Zig Building <code>zig build run</code> Known to work with zig 0.12.0-dev.394+f2026e7dd
[]
https://avatars.githubusercontent.com/u/337093?v=4
libivf
tetsu-koba/libivf
2023-05-06T03:08:18Z
Library written in Zig for reading and writing IVF files
main
1
0
1
0
https://api.github.com/repos/tetsu-koba/libivf/tags
-
[ "video-streaming", "zig" ]
92
false
2024-06-13T04:37:16Z
true
false
unknown
github
[]
404
[]
https://avatars.githubusercontent.com/u/33050391?v=4
subcommander
speed2exe/subcommander
2024-01-15T15:12:45Z
null
main
0
0
0
0
https://api.github.com/repos/speed2exe/subcommander/tags
-
[ "zig", "zig-lib", "zig-library", "zig-package" ]
31
false
2025-01-19T04:51:58Z
true
true
unknown
github
[ { "commit": "e47406f5c169b39e0de2f188efad00bc46f33957.tar.gz", "name": "tree_fmt", "tar_url": "https://github.com/speed2exe/tree-fmt/archive/e47406f5c169b39e0de2f188efad00bc46f33957.tar.gz.tar.gz", "type": "remote", "url": "https://github.com/speed2exe/tree-fmt" } ]
Subcommander <ul> <li>command line parser with sub commands</li> </ul> Features <ul> <li>No heap allocation</li> <li>Declarative</li> </ul> Add as dependency to your Zig project <ul> <li> <code>build.zig.zon</code> <code>.{ .dependencies = .{ .subcommander = .{ // use a commit hash .url = "https://github.com/speed2exe/subcommander/archive/52c42f27cc888d3a9a0fbda6889b8a931ca673be.tar.gz", // upon compilation, you will get an error with the correct hash, // replace the following hash with the correct hash .hash = "1220cea02c171a09873b197687c80a0e1a632e58ab99b779d2d5b0090c116efe5348", }, }, }</code> </li> <li> <code>build.zig</code> <code>zig //... const subcommander_dep = b.dependency("subcommander", .{}); const subcommander = subcommander_dep.module("subcommander"); exe.addModule("subcommander", subcommander); //...</code> </li> </ul> Compatibility <ul> <li>not compatible with windows (yet)</li> </ul> Usage ```zig const std = @import("std"); const subcommander = @import("subcommander"); fn main() !void { // build your commands and flags here // define what flags to parse const mycommands: subcommander.Command = .{ // if not specified, will parse the flags, then subcommands (if any) // this will be the name of the program. // e.g. "greet --name=world" // usually you would want to skip this (dont specify) since the name of executable will not be consistent // for majority of use cases. // // .match = "greet", <code> // fn to execute when the command is matched .execute = greetHandler, // flags are local to the command "greet" .flags = &amp;.{ .{ .short = "n", .long = "name", .description = "name to greet", }, .{ .short = "h", .long = "help", .description = "print help", }, }, // subcommands are command that follows after `match` .subcommands = &amp;.{ .{ .match = "tom", .execute = greetTomHandler, .flags = &amp;.{ // addition flags after "tom" // e.g. args; "greet tom --tomflag=5 ..." // }, }, }, }; // run commands with args from the command line // Flag value type: ?[*:0]const u8 // Success: // ./mygreet --name=world # Flag value for name: "world" // ./mygreet --name= # Flag value for name: "" // ./mygreet --name # Flag value for name: null // ./mygreet // // We are skipping the first argument since it is the name of the program // therefore flags are parsed first, then subcommands try mycommands.run(std.os.argv[1..]); </code> } // function signature for greetHandler fn greetHandler(input: *const subcommander.InputCommand) void { // get the command that was matched std.debug.print("{s}", .{input.name.?}); // prints "greet" <code>// iterate over the flags for "greet" var flag_iter = input.flagIterRec(); while (flag_iter.next()) |flag| { const value: ?[*:0]const u8 = flag.value; // do something with the flag } // call next() to get the subcommand (if any) if (input.next) |next_input| { // `next_input` is same type as `input` } </code> } ```
[]
https://avatars.githubusercontent.com/u/137411855?v=4
kickzig
JosephABudd/kickzig
2023-09-05T13:21:58Z
A zig application framework. A CLI that generates the framework code, adds and removes GUI components, adds and removes messages that the front-end and back-end use to communicate.
main
0
0
0
0
https://api.github.com/repos/JosephABudd/kickzig/tags
MIT
[ "framework", "gui", "zig" ]
1,974
false
2024-10-18T20:15:12Z
true
true
unknown
github
[]
404
[]
https://avatars.githubusercontent.com/u/17755880?v=4
xrun.zig
rjsberry/xrun.zig
2023-10-03T22:08:03Z
Effortlessly run Zig firmware straight from your build.zig
main
0
0
0
0
https://api.github.com/repos/rjsberry/xrun.zig/tags
0BSD
[ "debugging", "embedded", "firmware", "gdb", "openocd", "rtt", "tools", "zig" ]
383
false
2023-11-01T17:11:41Z
true
false
unknown
github
[]
<em>xrun.zig</em> An OpenOCD wrapper to run Zig firmware directly from your <code>build.zig</code>. Dual licensed under the 0BSD and MIT licenses. In action Using <code>xrun</code> as a run step in your Zig build will first flash your firmware onto target hardware, then monitor the running firmware for RTT output: The runner exits when it encounters a breakpoint. If we change the breakpoint to a panic, <code>xrun</code> will print a backtrace for you: Dependencies Right now it's only possible to use <code>xrun</code> on MacOS or Linux. The <code>xrun</code> binary depends on: <ul> <li><code>openocd</code></li> <li><code>gdb-multiarch</code></li> <li><code>nm</code></li> </ul> You will need to have all three of these installed. Configuration <code>xrun</code> is configured in an <code>xrun.zig.zon</code> file at the root of your project. An example is shown below for the Raspberry Pi Pico H: ```zig .{ // REQUIRED <code>// The OpenOCD target -- configured as `target/{}.cfg`. .target = "rp2040", // The OpenOCD interface -- configured as `interface/{}.cfg`. .interface = "cmsis-dap", // OPTIONAL // The adapter speed in kHz. .adapter_speed = 5000, // Override the GDB binary. If unset, defaults to `gdb-multiarch`. .gdb = "arm-none-eabi-gdb", </code> } ``` Getting Started If you would like to use the Zig package manager, add <code>xrun</code> to your <code>build.zig.zon</code> like so: <code>zig .{ .name = "my-firmware", .version = "1.0.0", .dependencies = .{ .xrun = .{ .url = "https://github.com/rjsberry/xrun.zig/archive/24a7428e6bcdd91d17af631a89f267310c0a8519.tar.gz", .hash = "1220d9b2eb5d788c13d57caf2f2284294e1d3fb3fa928859c77813f92b9557690651", }, }, }</code> Alternatively you can include the code directly in your project as a submodule or simply by copying it in somewhere. Use the build wrapper in your <code>build.zig</code> to add run artifacts: ```zig const std = @import("std"); const Xrun = @import("xrun").Xrun; // Or if you are using a submodule: // const Xrun = @import("path/to/xrun/build.zig").Xrun; pub fn build(b: *std.Build) void { var xrun = Xrun.init(b); <code>// Set up your firmware build // // The following assumes you have stored the result of `b.addExecutable` // in a variable called `exe` const xrun_cmd = xrun.addRunArtifact(.{ .executable = exe }); const xrun_step = b.step("xrun", "Run the firmware on target hardware"); xrun_step.dependOn(&amp;xrun_cmd.step); </code> } ``` Usage You can view the command line help text with the <code>-h</code> or <code>--help</code> args: ``` zig build xrun -- --help usage: zig build xrun -- [] Arguments: <code>cmd: Command to execute [default=`monitor`]. </code> Commands: <code>flash: Flash the firmware and exit. gdb: Flash the firmware and start an interactive GDB session. monitor: Flash the firmware and monitor for RTT messages. </code> ``` For example, to simply flash the firmware: <code>zig build xrun -- flash</code> To start an interactive GDB session: <code>zig build xrun -- gdb</code>
[]
https://avatars.githubusercontent.com/u/11492844?v=4
dedalus
fjebaker/dedalus
2023-08-29T19:21:23Z
Gemini client / server in Zig with TLS 1.3
main
0
0
0
0
https://api.github.com/repos/fjebaker/dedalus/tags
-
[ "gemini", "gemini-server", "server", "zig" ]
15
false
2023-11-01T17:25:48Z
true
true
unknown
github
[ { "commit": "master.tar.gz", "name": "zigwolfssl", "tar_url": "https://github.com/fjebaker/zig-wolfssl/archive/master.tar.gz.tar.gz", "type": "remote", "url": "https://github.com/fjebaker/zig-wolfssl" } ]
404
[]
https://avatars.githubusercontent.com/u/3594035?v=4
anagram
tsunaminoai/anagram
2023-11-17T19:13:12Z
Experiment with zig and C in solving a solved problem
main
0
0
0
0
https://api.github.com/repos/tsunaminoai/anagram/tags
MIT
[ "anagram", "c", "zig" ]
994
false
2023-11-17T19:19:10Z
true
false
unknown
github
[]
Project Name Description This is a Zig language project that grew out of wondering if I could do anagram searching faster or at least differently than a tree based solution I made in C. In this apporach, I convert each word to a 26 bit integer where each bit represents the presence of a letter in the word. For example, the word "cat" would be converted to the integer 0b00000100000000000000000101. This integer is then used to check if a word is present in a list of words. This is used to prune the list of words to check further. The pruned list is then sorted and checked using a naive approach of checking the distribution of letters in the word compared to the needle. Performance The following was measured on an Apple M2 on the dictionary of 348,244 words in this repository. Both my old C code (in the <code>c</code> directory) and this Zig code were compiled with ReleaseFast. The query used was "ENCYCLOPEDIA": | Method | Time (ms) | | ------------------- | --------- | | C Tree | 174.23 | | Zig binary encoding | 29.79 | Installation To install this project, you need to have Zig installed on your machine. Once you have Zig installed, you can clone this repository and build the project using the <code>zig build</code> Usage <code>zig build run -- -d &lt;dictionary&gt; -q &lt;query&gt;</code> Contributing If you want to contribute or mock this project, please create a pull request with your changes. License This project is licensed under the <a>MIT License</a>.
[]
https://avatars.githubusercontent.com/u/11302774?v=4
comdirect-spending-calculator
TheFunctionalGuy/comdirect-spending-calculator
2023-10-12T23:51:45Z
CLI tool to calculate all earnings/expenses by using your exported comdirect account overview in csv format
main
0
0
0
0
https://api.github.com/repos/TheFunctionalGuy/comdirect-spending-calculator/tags
-
[ "cli", "comdirect", "zig" ]
38
false
2024-02-12T21:31:07Z
true
true
unknown
github
[ { "commit": "refs", "name": "clap", "tar_url": "https://github.com/Hejsil/zig-clap/archive/refs.tar.gz", "type": "remote", "url": "https://github.com/Hejsil/zig-clap" } ]
Usage Overview <code>-h, --help Display this help and exit -i, --include &lt;FILE&gt;... Optional filters which specify which values to take into account -e, --exclude &lt;FILE&gt;... Optional filters which specify which values NOT to take into account after applying the including filter -v, --verbose Show additional verbose output &lt;FILE&gt; First statement &lt;FILE&gt; Second statement</code> The program expects <a>statements</a> as positional inputs and <a>filters</a> as inputs via flags. Statements are processed entry by entry and filtered respectively by the given including/excluding filters. Results are all values of a statement summed up after they have passed both filter types. Both one or two statements as input are supported. One Statement Mode When only one statement is supplied all filters are only applied to this statement and the final result is the <em>earnings/expenses</em> for this statement. Two Statement Mode When supplying two statements the filters will be applied to both statements and the results for the second statement will be subtracted from the result of the first statement. The final result is the <em>difference</em> between both intermediate results. Statements The input statements need to be exported from a <a>comdirect</a> user account and converted to UTF-8 by running <code>just convert &lt;exported_statement.csv&gt;</code>. Information about <code>just</code> can be found in the <a>GitHub repo</a>. Filters Filters follow a line-based format. Each line specifies either: - A comment when the line starts with <code>//</code> followed by arbitrary text - Another filter file when the line starts with <code>@</code> followed by a path relative to the current filter file - A string which is matched against the entry description via <code>mem.startsWith</code> Installation Installing <code>comdirect-spending-calculator</code> is very easy. You will need <a>a build of Zig</a> (<code>master</code> or <code>0.11.0</code>) to build <code>comdirect-spending-calculator</code>. <code>bash git clone https://github.com/TheFunctionalGuy/comdirect-spending-calculator cd comdirect-spending-calculator zig build install -Doptimize=ReleaseSafe --prefix-exe-dir ~/prefixes/zig-bins/</code> Build Options | Option | Type | Default Value | What it Does | | ----------- | ------ | ------------- | ------------------------------------------------------------------------- | | <code>-Duse_gpa</code> | <code>bool</code> | false | Use a <code>GeneralPurposeAllocator</code> when set, which can be good for debugging |
[]
https://avatars.githubusercontent.com/u/79296565?v=4
oscar_c
ceverettkoop/oscar_c
2023-12-30T06:59:39Z
Starcraft Brood War bot written in Zig
main
0
0
0
0
https://api.github.com/repos/ceverettkoop/oscar_c/tags
MIT
[ "starcraft", "zig" ]
7,866
false
2024-01-03T18:00:22Z
true
false
unknown
github
[]
BWAPI 4.2 broodwar DLL bot written in Zig using the BWAPI-C wrapper. <code>zig build -Dwindows=true</code> will cross compile a 1.16.1 compatibile DLL bot that will work with the BWAPI.dll included in lib. You will also need to put the included BWAPIC.dll in the same directory as the starcraft.exe and modify your bwapi-ini file as usual.\ \ for other platforms (using openbw), you will probably have to build openbw and bwapi-c from source <code>https://github.com/OpenBW/bwapi https://github.com/RnDome/bwapi-c</code> place libBWAPILIB and libBWAPIC in lib and run: <code>zig build</code> this should build a shared library bot compatible with OpenBW. You may have to mess with environmental variables to get it to link properly when you run BWAPILauncher.
[]
https://avatars.githubusercontent.com/u/337093?v=4
pipe2socket
tetsu-koba/pipe2socket
2023-05-08T00:25:56Z
Read stdin and send to socket
main
0
0
0
0
https://api.github.com/repos/tetsu-koba/pipe2socket/tags
-
[ "video-streaming", "zig" ]
9
false
2024-05-18T06:07:48Z
true
false
unknown
github
[]
Read stdin and send to socket Very simple utility witten in Zig to send streaming data to local area network. Currently only supports TCP socket. Example Capture video frames by V4L2 and convert them to I420, and encode them to VP8, and sent them by TCP socket. ``` !/bin/sh -eux VIDEODEV=/dev/video0 WIDTH=320 HEIGHT=240 FRAMERATE=15 KBPS=1000 GOP=60 HOST=my-mac.local PORT=8999 v4l2capture $VIDEODEV /dev/stdout $WIDTH $HEIGHT $FRAMERATE YUYV | \ convert2i420 /dev/stdin /dev/stdout $WIDTH $HEIGHT YUYV | \ vp8enc /dev/stdin /dev/stdout $WIDTH $HEIGHT $FRAMERATE $KBPS $GOP | \ pipe2socket tcp://$HOST:$PORT ``` On the reciever <code>ffplay -hide_banner -autoexit tcp://:8999?listen</code> ToDo Make this into a package when the official zig package manager is released.
[]
https://avatars.githubusercontent.com/u/73485120?v=4
ziglang-examples
futured-it/ziglang-examples
2024-01-04T11:05:24Z
Code examples in Zig for basic functions of the language, algorithms, and real tasks.
main
0
0
0
0
https://api.github.com/repos/futured-it/ziglang-examples/tags
MIT
[ "examples", "zig" ]
9
false
2024-06-15T07:51:11Z
false
false
unknown
github
[]
Zig Examples I created this repo to learn Zig. There is an explanation of the basic functions of the language, simple algorithms written in Zig, and examples of solving real high-level tasks. Zig Installation <ul> <li><strong>macOS (darwin):</strong> <code>brew install zig</code> or <code>port install zig</code></li> <li><strong>Microsoft Windows:</strong> <code>winget install -e --id zig.zig</code> | <code>choco install zig</code> | <code>scoop install zig</code></li> <li><strong>Linux:</strong></li> <li>Arch (Manjaro): <code>pacman -S zig</code></li> <li>Debian (Ubuntu): <code>sudo apt install zig</code></li> </ul> Runtime <ul> <li><strong>To compile (to binary):</strong> <code>zig build-exe file.zig</code></li> <li><strong>To compile and run immediately:</strong> <code>zig run file.zig</code></li> </ul> Code examples <ul> <li><a><code>/language</code></a> - Examples of basic functions usage: variables, types, if statements, loops, etc.</li> <li><a><code>/code-examples</code></a> - Examples of simple algorithms in Zig.</li> <li><a><code>/real-tasks</code></a> - Examples of code for solving real high-level tasks.</li> </ul>
[]
https://avatars.githubusercontent.com/u/85104110?v=4
advent-of-code-zig-2022
pseudocc/advent-of-code-zig-2022
2023-06-19T04:41:11Z
Advent of Code 2022 Zig Solutions
main
0
0
0
0
https://api.github.com/repos/pseudocc/advent-of-code-zig-2022/tags
-
[ "advent-of-code", "advent-of-code-2022", "zig", "ziglang" ]
51
false
2023-07-18T09:31:54Z
false
false
unknown
github
[]
404
[]
https://avatars.githubusercontent.com/u/81799?v=4
ZestAllocators
gcarreno/ZestAllocators
2023-12-28T23:22:09Z
Zig Test(ZEST) code to explore the concept of the allocators
main
0
0
0
0
https://api.github.com/repos/gcarreno/ZestAllocators/tags
MIT
[ "allocators", "zig", "ziglang" ]
9
false
2023-12-28T23:37:37Z
true
false
unknown
github
[]
Zest Allocators Zig Test(ZEST) code to explore the concept of the allocators.
[]
https://avatars.githubusercontent.com/u/1748317?v=4
zigzag-butterflies
croqaz/zigzag-butterflies
2023-04-27T21:35:41Z
Smol experimental game in Zig
main
0
0
0
0
https://api.github.com/repos/croqaz/zigzag-butterflies/tags
MIT
[ "wasm", "zig" ]
122
false
2024-12-04T15:42:18Z
false
false
unknown
github
[]
Chasing zig-zag butterflies 🦋 A tiny game about chasing butterflies. Using Preact + Zig WASM. License <a>MIT</a> © Cristi Constantin.
[]
https://avatars.githubusercontent.com/u/139875399?v=4
temp-folder-tool
gaskam/temp-folder-tool
2024-01-23T22:15:29Z
It is a tool to create a folder where files can be stored temporarily with a custom retention period. It's useful for storing files that are only needed for a short time, such as files that you downloaded or screenshots that you took.
main
1
0
0
0
https://api.github.com/repos/gaskam/temp-folder-tool/tags
GPL-3.0
[ "bun", "preact", "typescript", "zig" ]
296
false
2024-10-28T19:00:05Z
false
false
unknown
github
[]
Temp Folder Tool This project is a tool to create a folder where files can be stored temporarily with a custom retention period. It's useful for storing files that are only needed for a short time, such as files that you downloaded or screenshots that you took. We programmed this in Zig because we wanted to learn a new language and Zig seemed like a good choice for performance. For the CLI, we used TypeScript ❤. All of this to maximize performance! For the GUI, we used Bun and Preact to create a simple and fast interface. Installation Simple installation - <em>recommended</em> <blockquote> <strong>Note:</strong> The application is not yet available for public download. It's comming soon! </blockquote> Manual installation You can also install the application manually by following the steps below: Pre-requisites: <strong>Install Bun</strong> For Windows : <code>terminal powershell -c "irm bun.sh/install.ps1|iex"</code> For Linux, MacOS and WSL : <code>terminal curl -fsSL https://bun.sh/install | bash</code> <strong>Install Zig</strong> Winget : <code>terminal winget install -e --id zig.zig.nightly</code> Chocolatey : <code>terminal choco install zig</code> Scoop : <code>terminal scoop install zig</code> Brew : <code>terminal brew install zig</code> MacPorts : <code>terminal port install zig</code> Installation: <strong>1. Clone the repository:</strong> <code>terminal git clone https://github.com/PatafixPLTX/temp-folder-tool.git</code> <code>terminal gh repo clone PatafixPLTX/temp-folder-tool</code> <strong>2. Install the dependencies for the GUI:</strong> <code>terminal cd temp-folder-tool/gui/tempfolder-preact npm install</code> <strong>3. You can now run the GUI:</strong> <code>terminal bun run dev</code> <strong>4. You can also run the CLI:</strong> <code>terminal cd temp-folder-tool/cli bun install bun ./index.ts</code> <strong>5. You can run the zig script:</strong> <code>terminal zig run main.zig</code> Usage CLI <blockquote> <strong>Note:</strong> You can't run the command <code>tempfolder</code> directly. You need to run <code>bun ./index.ts</code> in the <code>cli</code> folder. </blockquote> <code>tempfolder --help</code>: ```terminal Usage: tempfolder [options] Commands: -c, --config show the current config -v, --version show the cli version number -p, --path change the path of the temp folder -g, --github open the github page ``` GUI <blockquote> <strong>Note:</strong> GUI is not yet available as a standalone application. A wiki will be available soon to explain how to use the GUI. </blockquote> Contributing Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. License This project is licensed under the <a>GNU GPLv3</a> license. Click to see the license ```text GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . ``` Authors <ul> <li>Profile: @PatafixPLTX</li> <li>Contact: <a>contact@gaskam.com</a></li> <li>Website: <a>gaskam.com</a></li> </ul>
[]
https://avatars.githubusercontent.com/u/131762131?v=4
zigup
gvozdvmozgu/zigup
2023-07-12T20:35:35Z
zigup is an installer for the systems programming language Zig
master
0
0
0
0
https://api.github.com/repos/gvozdvmozgu/zigup/tags
-
[ "zig" ]
34
false
2025-04-11T18:39:48Z
false
false
unknown
github
[]
Zig Toolchain Downloader This tool downloads and extracts the Zig programming language toolchains from the official <a>Zig download index</a>. It automatically detects your host platform and installs the appropriate version.
[]
https://avatars.githubusercontent.com/u/59750184?v=4
tent.zig
fremantle-industries/tent.zig
2023-03-24T18:13:31Z
A bytes first microservice runtime for ambitious data driven projects
main
0
0
0
0
https://api.github.com/repos/fremantle-industries/tent.zig/tags
MIT
[ "data-engineering", "kappa-architecture", "microservices", "zig" ]
3
false
2023-03-28T04:29:57Z
true
false
unknown
github
[]
tent.zig A bytes first microservice runtime for ambitious data driven projects. Simplify your infrastructure from code. Usage ```sh A bytes first microservice runtime for ambitious data driven projects. Usage: tentz [command] Available Commands: init Initialize a new project generate Commands for generators plugin Commands for plugins Flags: -h, --help help for tentz -v, --version version for tentz ``` Development <code>sh make</code> Test <code>sh make test</code> Authors <ul> <li>Alex Kwiatkowski - alex+git@fremantle.io</li> </ul> License <code>tent.zig</code> is released under the <a>MIT license</a>
[]
https://avatars.githubusercontent.com/u/45179788?v=4
swim
jaschr/swim
2023-05-16T22:12:50Z
[S]imple [WI]ndow [M]anager
main
0
0
0
0
https://api.github.com/repos/jaschr/swim/tags
BSD-3-Clause
[ "window-manager", "wm", "x11", "zig" ]
12
false
2023-05-17T00:32:19Z
true
false
unknown
github
[]
SWIM A ~~(S)uperior~~ ~~(S)atisfactory~~ (S)imple (WI)ndow (M)anager Installation Coming soon... Configuration Comming soon... LICENSE <a>BSD 3 Clause</a>
[]
https://avatars.githubusercontent.com/u/67802418?v=4
aoc
Douradinho-Alpha/aoc
2023-12-06T22:41:06Z
Advent of Code 2023 in Zig
master
0
0
0
0
https://api.github.com/repos/Douradinho-Alpha/aoc/tags
-
[ "advent-of-code-2023", "zig" ]
43
false
2023-12-15T02:39:15Z
false
false
unknown
github
[]
These are my solutions for 2023 Advent of Code in the Zig language. I chose this years AoC to learn more about the zig language and how to better use it, while keeping my programming skills sharp in a low coding semester.
[]
https://avatars.githubusercontent.com/u/1148150?v=4
adventofzig
logc/adventofzig
2023-11-04T21:51:59Z
Solutions to Advent of Code puzzles in Zig
master
0
0
0
0
https://api.github.com/repos/logc/adventofzig/tags
BSD-3-Clause
[ "advent-of-code", "aoc", "zig" ]
33
false
2023-11-04T22:11:24Z
true
false
unknown
github
[]
advent of zig Structure This repository holds solutions to Advent of Code puzzles written in the programming language Zig. <ul> <li><code>src</code> holds all source code files. <code>main.zig</code> is the main program. It uses <code>aoc.zig</code> as a library where each daily puzzle has a function called as the puzzle itself. The convention is that this function returns a <code>Solutions</code> struct that holds two numbers: the solution to the first part of the puzzle, and the oslution to the second part. <code>main</code> only needs to invoke the correct function following the command line flags set by the user, and then to print the solution numbers out.</li> <li><code>var/data</code> holds data for puzzle inputs as .txt files. Each daily puzzle is in its own subdirectory, under <code>&lt;year&gt;/&lt;day&gt;</code>.</li> <li><code>libs</code> holds all dependencies of the project, as vendored git submodules. This worked better than using the recently released package manager.</li> </ul> Develop Build <code>shell $ git submodule init $ git submodule update $ zig build</code> Submodules are not needed for every puzzle, but the build will not succeed without the declared dependencies. Test <code>shell $ zig build test</code> The <code>test</code> step is added to the normal build on <code>build.zig</code> by the default template. License BSD-3-Clause See LICENSE file
[]
https://avatars.githubusercontent.com/u/161299?v=4
LearnOpenGL_Zig
magic003/LearnOpenGL_Zig
2023-12-27T00:44:02Z
Examples in the Learn OpenGL book written in Zig.
main
0
0
0
0
https://api.github.com/repos/magic003/LearnOpenGL_Zig/tags
MIT
[ "opengl", "zig" ]
1,206
false
2024-01-11T04:59:58Z
false
false
unknown
github
[]
learnopengl.com code in Zig This repo contains the code I wrote when reading the Learn OpenGL <a>book</a> using Zig. Code organization The code is organized according to the parts and chapters in the book. For example, <code>I_Getting_Started/4_1_hello_window</code>. The shared libraries live in the <code>libs</code> folder. Zig version The code was tested using Zig 0.12.0-dev.1856+94c63f31f and above. It will keep up with the master version. How to run it To run a particular sample, just go to its folder and run <code>zig build run</code>. <code>shell LearnOpenGL_Zig % cd I_Getting_Started/4_1_hello_window 4_1_hello_window % zig build run</code> Dependencies This repo depends on the following external libraries: * <a>mach_glfw</a>: GLFW bindings for Zig. * <a>zig-opengl</a>: used to generate the OpenGL bindings for Zig. * <a>stb-image.h</a>: a single-file public domain library for image in C/C++. * <a>zmath</a>: SIMD math library for game developers in Zig. It's replacement of glm for Zig. References <ul> <li><a>JoeyDeVries/LearnOpenGL</a>: the official repo for code samples of the book. This repo tries to keep the structure and style as close as it.</li> <li><a>zig_learn_opengl</a>: an existing repo for the code samples in Zig. This repo learns a lot from it, especially which Zig library to use.</li> </ul>
[]
https://avatars.githubusercontent.com/u/9482395?v=4
url-router
Hanaasagi/url-router
2023-12-16T12:22:02Z
URL router
master
0
0
0
0
https://api.github.com/repos/Hanaasagi/url-router/tags
Apache-2.0
[ "http", "radix-tree", "router", "url", "zig", "ziglang" ]
18
false
2024-05-29T09:07:35Z
true
true
unknown
github
[]
URL-Router ```zig const Request = struct { params: Params, method: enum { GET, POST }, // ... }; const Response = struct { // ... }; const App = struct { router: Router(<em>const (fn (</em>Request, <em>Response) void)), const Self = @This(); fn init(allocator: std.mem.Allocator) Self { return .{ .router = Router(</em>const (fn (<em>Request, </em>Response) void)).init(allocator), }; } <code>fn deinit(self: *Self) void { self.router.deinit(); } fn get(self: *Self, path: []const u8, handler: *const (fn (*Request, *Response) void)) void { self.router.insert(path, handler) catch @panic("TODO"); } fn handle_request(self: *Self, full_url: []const u8) void { // parse the url const path = full_url; const match = self.router.match(path) catch @panic("TODO"); var request = Request{ .method = .GET, .params = match.params, }; var response = Response{}; _ = match.value(&amp;request, &amp;response); } // ... </code> }; fn search_handler(request: <em>Request, response: </em>Response) void { _ = request; _ = response; std.log.err("search handler is called", .{}); // ... } fn static_handler(request: <em>Request, response: </em>Response) void { _ = response; std.log.err("static handler is called, name is {s}", .{request.params.get("name").?}); // ... } test "test" { var app = App.init(testing.allocator); defer app.deinit(); <code>app.get("/search", search_handler); app.get("/static/:name", static_handler); app.handle_request("/search"); app.handle_request("/static/robots.txt"); </code> } ```
[]
https://avatars.githubusercontent.com/u/3477132?v=4
zig-wasm-experiment
anthonycorletti/zig-wasm-experiment
2023-09-19T01:29:07Z
null
main
0
0
0
0
https://api.github.com/repos/anthonycorletti/zig-wasm-experiment/tags
-
[ "wasm", "webgpu", "zig" ]
7
false
2023-11-01T17:25:07Z
true
false
unknown
github
[]
zig-wasm-experiment A little experiment with Zig 🦖 and WebGPU 🤖
[]