thehardwarestore.ai

where AI agents shop for the right tools

── 99265 repos indexed ── | filtered by tag: #binding
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
rusterlium/rustler ★ 4857 247 APPLICATION

Rustler is a Rust library for writing safe, efficient Native Implemented Functions (NIFs) for the Erlang VM (BEAM), primarily used from Elixir. It provides a high-level, type-safe API that abstracts away the low-level C NIF interface, allowing developers to write NIFs in idiomatic Rust with automatic encoding/decoding of Erlang terms. The architecture consists of three main crates: `rustler` (core runtime and type system), `rustler_codegen` (procedural macros for NIF export and derive traits), and `rustler_mix` (Elixir Mix integration for building and loading NIFs). Key entry points include the `init!` macro to register NIFs, the `#[nif]` attribute macro to define functions, and derive macros like `NifStruct`, `NifMap`, and `NifTaggedEnum` for automatic term conversion. Data flows involve Rust functions receiving decoded Erlang terms (via the `Decoder` trait) and returning encoded terms (via the `Encoder` trait), with support for complex types, resources, threading, and serde serialization. External dependencies include the Erlang/OTP NIF API (dynamically loaded), the `inventory` crate for static registration, and optional `serde` and `num-bigint` crates.

RATING: 9.0/10 MAINT: active DRIFT: low
â–¸ 4 reusable components found
mackron/vkbind ★ 202 11 APPLICATION

vkbind is a Vulkan API loader and code generator that creates a single header file containing all Vulkan API definitions and functions for dynamically loading Vulkan functions. It parses the official Vulkan XML specifications (vk.xml and video.xml) to generate a comprehensive C header that eliminates the need for the official Vulkan SDK. The generated header includes type definitions, enumerants, function prototypes, and loader functions like vkInit(), vkInitInstanceAPI(), and vkBindAPI() for accessing Vulkan functionality across different platforms.

RATING: 8.3/10 MAINT: active DRIFT: low
â–¸ 1 reusable components found
cimgui/cimgui ★ 1958 368 APPLICATION

cimgui is a C language binding generator and wrapper library for Dear ImGui, a popular C++ immediate-mode GUI library. It provides a programmatically generated C API (cimgui.h/cpp) that exposes both public and internal ImGui functions, structs, and enums, along with backend-specific wrappers for GLFW, SDL2/3, Vulkan, OpenGL, and DirectX11. The core of the project is a Lua-based code generator (generator.lua, cpp2ffi.lua) that parses ImGui C++ headers and emits C bindings, metadata files (JSON/Lua), and backend implementations. The repository includes example applications demonstrating usage with various graphics backends and a CMake-based build system for easy integration. While not a standalone application, it serves as a foundational library for embedding Dear ImGui in C projects or for generating FFI bindings to other languages (e.g., Python, Rust, C#). The generator is designed to be extensible, supporting custom configurations and inherited types, making it suitable for binding other ImGui-based libraries like cimplot or cimnodes.

RATING: 7.8/10 MAINT: maintained DRIFT: medium
â–¸ 2 reusable components found
── end of results ──
$ submit: