SaaSHub helps you find the best software and product alternatives Learn more →
Top 23 Zig zig-package Projects
-
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
Project mention: MicroZig: Unified abstraction layer and HAL for Zig on several microcontrollers | news.ycombinator.com | 2024-02-28
-
Zig and Rust both promote explicit error handling, however their mechanisms are different. Rust uses Result enums, while Zig uses a (global) error set type (though similar to an enum) and error propagation. Similarly, Rust uses the Option enum for optional types, while Zig uses a type modifier (?T). Both offer modern, syntactic sugar to handle those (call()? and if let Some(value) = optional {} in Rust, try call() and if (optional) |value| {} in Zig). Since Rust uses the standard library to implement error handling and options, users have the possibility to extend those systems which is quite powerful. However, I like the approach Zig takes in providing those things as language features. While their approach fits well into the C universe, I dislike that there is no pragmatic way to add more context to an error (but well, no allocations). Libraries like [clap](https://github.com/Hejsil/zig-clap) solve this by implementing a diagnostics mechanism.
-
Project mention: Show HN: Chili. Rust port of Spice, a low-overhead parallelization library | news.ycombinator.com | 2024-09-19
That’s what I was wondering. Iiuc openmp uses work stealing and the spice readme talks about the inefficiency of that:
https://github.com/judofyr/spice?tab=readme-ov-file#work-ste...
so I’d be interested in seeing a benchmark.
-
There's a similar tool for building static sites using the zig build system: https://github.com/kristoff-it/zine
They made their own template language on top of html. An interesting outcome of this is that any error in the html, like a missing closing tag, becomes a build time error.
-
Project mention: Epoll: The API that powers the modern internet (2022) | news.ycombinator.com | 2024-01-11
I have a somewhat popular HTTP server library for Zig [1]. It started off as a thread-per-connection (with an optional thread pool), but when it became apparent that async wasn't going to be added back into the language any time soon, I switched to using epoll/kqueue.
Both APIs allow you to associate arbitrary data (void ) with the event that you're registering. So when you're notified of the event, you can access this data. In my case, it's a big Conn struct. It contains things like the # of requests on this connection (to enforce a configured max request per connection), a timestamp where it should timeout if there's no activity. The Conn is part of an intrusive linked list, so it has a next: Conn and prev: *Conn. But, what you're probably most curious about, is that it has a Request.State. This has a static buffer ([]u8) that can grow as needed to hold all the received data up until that point (or if we're writing the data, then the buffered data that we have to write). It's important to have a max # of connections and a max request size so you can enforce an upper limit on the maximum memory the library might use. It acts as a state machine to track up to what point it's parsed the request. (since you don't want to have to re-parse the entire request as more bytes trickle in).
It's all half-baked. I can do receiving/sending asynchronously, but the application handler is called synchronously, and if that, for example, calls PG, that's probably also synchronous (since there's no async PG library in Zig). Makes me feel that any modern language needs a cohensive (as in standard library, or de facto standard) concurrency story.
[1] https://github.com/karlseguin/http.zig
-
-
-
-
-
mach-glfw
Ziggified GLFW bindings with 100% API coverage, zero-fuss installation, cross compilation, and more.
-
-
-
-
-
-
-
-
mach-gpu-dawn
Google's Dawn WebGPU implementation, cross-compiled with Zig into a single static library
-
zero-graphics
Application framework based on OpenGL ES 2.0. Runs on desktop machines, Android phones and the web
-
-
-
Zig zig-package discussion
Zig zig-package related posts
-
Show HN: Chili. Rust port of Spice, a low-overhead parallelization library
-
Spice: Fine-grained parallelism with sub-nanosecond overhead in Zig
-
MicroZig: Unified abstraction layer and HAL for Zig on several microcontrollers
-
After a day of programming in Zig
-
0.11.0 Release Notes
-
Is it too early to use Zig for CLI tooling ideas?
-
Zig for gamedev?
-
A note from our sponsor - SaaSHub
www.saashub.com | 10 Oct 2024
Index
What are some of the best open-source zig-package projects in Zig? This list will help you:
Project | Stars | |
---|---|---|
1 | capy | 1,647 |
2 | microzig | 1,182 |
3 | zig-clap | 907 |
4 | spice | 725 |
5 | zine | 565 |
6 | http.zig | 529 |
7 | linuxwave | 523 |
8 | zig-network | 472 |
9 | mecha | 452 |
10 | zgl | 411 |
11 | mach-glfw | 379 |
12 | websocket.zig | 289 |
13 | sdk | 265 |
14 | ziglua | 258 |
15 | zig-args | 243 |
16 | known-folders | 226 |
17 | LoLa | 190 |
18 | interface.zig | 164 |
19 | mach-gpu-dawn | 150 |
20 | zero-graphics | 146 |
21 | ctregex.zig | 125 |
22 | async_io_uring | 111 |
23 | qml_zig | 86 |