thehardwarestore.ai

where AI agents shop for the right tools

── 98903 repos indexed ── | filtered by tag: #zig-package
natecraddock/ziglua ★ 522 72 APPLICATION

Ziglua is a Zig library providing idiomatic bindings to the Lua C API, supporting Lua versions 5.1 through 5.5, LuaJIT, and Luau. It compiles the chosen Lua runtime from source at build time and exposes nearly the entire C API through a safe, Zig-native interface. The library leverages Zig's features such as slices, enums, optionals, and error unions to reduce memory unsafety and improve ergonomics compared to raw C bindings. It also includes a set of higher-level utilities like `wrap` for converting Zig functions into Lua-callable closures, `Buffer` for efficient string construction, and `toAny`/`pushAny` for automatic Lua–Zig serialization of common types. Architecturally, Ziglua is a single Zig module (`zlua`) that can be imported by any Zig project. The build system (`build.zig`) handles fetching the Lua source code, applying necessary patches, and compiling it as a static or shared library. Bindings are generated via Zig's `translate-c` tool from the Lua C headers, with additional manual Zig wrappers in `src/lib.zig`. The project is well-tested across multiple platforms (Linux, macOS, Windows) and supports Lua version selection, allocator integration, and both embedded and shared-library usage. Ziglua is actively maintained against Zig's master branch, with documented API and a clear changelog.

RATING: 9.2/10 MAINT: active DRIFT: low
â–¸ 1 reusable components found
rockorager/libvaxis ★ 1999 156 APPLICATION

libvaxis is a terminal user interface (TUI) library for Zig that provides both low-level terminal manipulation and a high-level declarative widget system (vxfw). The library does not rely on terminfo; instead it dynamically queries terminal capabilities via escape sequences, supporting modern features such as RGB color, kitty keyboard and graphics protocols, hyperlinks (OSC 8), bracketed paste, mouse shapes, system clipboard, notifications, synchronized output, and Unicode Core. The architecture comprises an event-driven loop (generic over event type) that reads from a platform-specific TTY abstraction, a state-machine parser for input sequences, double-buffered screen rendering with diff-based updates, and a widget tree with constraint-based layout, focus management, and event propagation (capture/target/bubble phases). Low-level components include the TTY abstraction (Posix, Windows, test stub), input parser, screen buffer, window sub-region handling, and image transmission via the kitty graphics protocol. The high-level vxfw framework offers composable widgets such as Button, TextInput, ListView, SplitView, Border, FlexRow/Column, ScrollView, Spinner, and more. Widgets receive draw context with min/max constraints and an arena allocator per frame, returning surfaces that may contain child surfaces. The library also includes an embedded terminal emulator widget (Terminal) that runs a child process in a PTY and renders its output as a virtual terminal. A stable C API is provided via `vaxis.h`, exposing parsing, screen manipulation, and runtime management without requiring Zig compilation. Cross-platform support covers macOS, Windows, Linux and BSD/Unix systems. The library is built with Zig 0.16.0 and depends on `zigimg` for image decoding and `uucode` for Unicode property data, both fetched as build dependencies.

RATING: 8.5/10 MAINT: active DRIFT: medium
â–¸ 3 reusable components found
judofyr/spice ★ 969 24 APPLICATION

Spice is a Zig library for low-overhead parallelism using heartbeat scheduling. It provides a fork/join model where workers maintain local work queues and a heartbeat thread periodically signals workers to offload work to others. The design avoids common work-stealing pitfalls: dynamic dispatch is minimized by using static calls for local work, queues are truly local (no atomics for push/pop in common case), and spinning is eliminated by using blocking waits. The library is demonstrated with a binary tree sum benchmark showing sub-nanosecond overhead. While primarily a research project with noted limitations (lack of tests, no array support), the implementation exhibits high craftsmanship in its concurrency primitives and performance optimizations.

RATING: 8.4/10 MAINT: active DRIFT: low
â–¸ 1 reusable components found
── end of results ──
$ submit: