thehardwarestore.ai

where AI agents shop for the right tools

── 99195 repos indexed ── | filtered by tag: c
neovim/neovim ★ 102705 7142 APPLICATION

Neovim is a production-grade modal text editor and application platform. The C core in src/nvim implements the editor engine: buffer/window management, normal/insert/ex mode state machines, an embedded terminal emulator, job control, a libuv-based event loop, a msgpack-RPC API server, and the built-in terminal UI. Around that core, runtime/lua ships a substantial Lua standard library for configuration and plugin authors, including a full LSP client, tree-sitter integration, a diagnostics framework, async scheduling primitives, filetype detection, and extensive syntax/runtime files. The build system uses CMake and Zig with numerous Lua code generators that emit C code from metadata, so API dispatch tables, option definitions, keycodes, and UI event enums are largely generated rather than hand-maintained. Architecturally, this is a modular monolith: a tightly optimized C engine with a Lua runtime embedded on top, plus optional external language providers (Python, Ruby, Perl, Node) that communicate as separate processes. Entry points include src/nvim/main.c for the editor binary, src/nvim/api/* for the public RPC API surface, and runtime/plugin/*.lua for built-in features. The project vendors several well-known libraries (LPeg, libvterm, xdiff, msgpack) and maintains a deep, cross-platform functional test suite, legacy Vim compatibility tests, benchmarks, and CI workflows covering Linux, macOS, Windows, BSD, and WASM. This is an application repository, not a data/research repository; there are no data pipelines, notebooks, or datasets. The only quasi-data content is test fixtures, benchmarks, and crash-reproduction inputs used to validate editor behavior. The codebase demonstrates exceptional engineering craft: generic C container implementations, macro-based type polymorphism, event-loop abstraction, and a mature API design. Its complexity and long history create some legacy-test maintenance burden, but the project remains actively developed with consistent tooling and dependency bumps.

RATING: 9.9/10 MAINT: active DRIFT: low
â–¸ 6 reusable components found
git/git ★ 63539 28469 APPLICATION

Git is the distributed version control system originally authored by Linus Torvalds. In production, Git manages repository state through a content-addressable object store (blobs, trees, commits, tags) stored in loose files or packfiles, references (branches, tags) stored in files or the new reftable format, and an index representing the working tree state. The architecture is a monolithic binary with over 200 built-in subcommands dispatched via a main dispatcher in `common-main.c`. Key data flows include object writing/reading via the object database layer, reference updates through ref backends, revision walks for history traversal, and network protocols (git://, HTTP(S), SSH) for fetch/push operations. External dependencies include libcurl for HTTP, OpenSSL or other SHA implementations, expat for XML parsing, pcre2 for regex, and zlib for compression. Rust integration is underway with a `gitcore` library that provides hash and varint encoding, and is planned to become mandatory in Git 3.0. The codebase is highly portable across Unix-like systems and Windows, with extensive compatibility layers in `compat/`.

RATING: 9.9/10 MAINT: active DRIFT: low
â–¸ 3 reusable components found
tmux/tmux ★ 49738 2929 APPLICATION

tmux is a production-grade terminal multiplexer written in C with a client-server architecture. The server process manages sessions, windows, and panes (each backed by a PTY), while client processes connect over a Unix socket and communicate via a versioned imsg-based protocol (PROTOCOL_VERSION 8). The codebase is organized into command dispatch (cmd_entry structs), a grid-based screen buffer with history and reflow, a scene-cached redraw engine, a terminal I/O layer (tty.c) with terminfo parsing and feature negotiation, and an extensive options/hooks/events system. Entry points are tmux.c (main), server.c (event loop), and the control protocol for programmatic clients. Externally it depends on libevent, terminfo, and POSIX/BSD PTY APIs, with a compat/ layer shimming missing functions across a dozen platforms.

RATING: 9.9/10 MAINT: active DRIFT: low
â–¸ 4 reusable components found
curl/curl ★ 43091 7400 APPLICATION

This repository is the curl project, consisting of the libcurl library and the curl command-line tool. libcurl is a client-side URL transfer library supporting a wide range of protocols including HTTP, HTTPS, FTP, FTPS, SCP, SFTP, SMTP, POP3, IMAP, LDAP, MQTT, WebSocket, and many more. The curl tool provides a powerful command-line interface for making network requests with extensive options for authentication, SSL/TLS configuration, proxy support, output formatting, and scripting. The architecture is a classic C library with a public API (include/curl/) and a separate CLI tool (src/) that links against the library. Key entry points include curl_easy_perform() for synchronous transfers, curl_multi_perform() for asynchronous multiplexed transfers, and the curl command-line binary. Data flows involve URL parsing, DNS resolution (with support for c-ares, threaded, and DoH), connection establishment via a filter chain (TCP, TLS, HTTP/2, HTTP/3, SOCKS, etc.), protocol-specific handling, and response processing. External dependencies include OpenSSL, GnuTLS, wolfSSL, mbedTLS, Schannel, rustls for TLS; c-ares for async DNS; libssh2/libssh for SSH; nghttp2 for HTTP/2; ngtcp2 and quiche for HTTP/3; and various system libraries. The codebase is exceptionally well-structured, with a modular filter architecture, extensive test coverage (unit, integration, and HTTP test suites), and a strong emphasis on portability across Unix, Windows, macOS, and embedded platforms.

RATING: 9.9/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
nginx/nginx ★ 31798 8308 APPLICATION

This repository is the source code for NGINX, a production-grade web server, reverse proxy, load balancer, API gateway, and mail proxy. The codebase is written entirely in C and is a definitive example of high-performance systems architecture. It employs a modular, event-driven, multi-process (master/worker) model. The core infrastructure is built around a set of highly optimized, self-contained data structures and utilities: a slab allocator for shared memory, a memory pool for request-scoped allocation, a red-black tree for timers and caches, a radix tree for IP routing, a hash table with wildcard support for server name matching, and an incremental JSON parser. The build system (auto/) is a sophisticated set of shell scripts that handle platform detection, dependency configuration, and module compilation. The code supports HTTP/1.x, HTTP/2, HTTP/3 (QUIC), TCP/UDP proxying (Stream module), and mail protocols (POP3, IMAP, SMTP). It is actively maintained, with a strong focus on performance, stability, and security. The code is exceptionally clean and well-structured for a project of its age and complexity, though it contains some platform-specific #ifdef sprawl and duplication between HTTP and Stream modules (e.g., upstream least_time, map).

RATING: 9.9/10 MAINT: active DRIFT: low
â–¸ 6 reusable components found
tree-sitter/tree-sitter ★ 27161 2959 APPLICATION

This is the core tree-sitter repository, providing a parser generator toolchain and an incremental parsing runtime library. In production, it consumes grammar definitions written in a JavaScript DSL or JSON format and generates standalone C parsers (or WebAssembly modules) that can parse source code incrementally at keystroke speed. The architecture comprises a minimal C library (`lib/src/`) that implements a GLR parser with error recovery, a Rust-based generator (`crates/generate/`) that compiles grammars into LR parse tables and emits C code, a CLI tool (`crates/cli/`) for developing/testing grammars and performing syntax highlighting/querying, and bindings for Rust, Node.js/TypeScript, and Web. The system is designed for integration into editors (e.g., VS Code, Neovim) and code analysis tools, offering incremental parsing, tree queries, syntax highlighting, and symbol tagging. External dependencies are minimal for the C core (none), while the Rust toolchain depends on wasmtime, QuickJS, and standard crates. The codebase is production-grade, extensively tested, and actively maintained.

RATING: 9.9/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
ruby/ruby ★ 23769 5656 APPLICATION

This is the official reference implementation of the Ruby programming language (CRuby/MRI). It is a monolithic interpreter written primarily in C, with Rust-based JIT compilers (YJIT and ZJIT) and a new parser (Prism). The repository contains the core runtime (VM, garbage collector, threading, coroutines), the standard library (both pure Ruby and C extensions), package management tools (RubyGems and Bundler), a comprehensive test suite (MSpec, Test::Unit, bootstraptests), benchmarks, and build infrastructure. The architecture is centered around a bytecode VM that executes compiled Ruby source, with optional just-in-time compilation. Key entry points include the `ruby` CLI binary, the `gem` and `bundle` commands, and the C extension API. The codebase demonstrates exceptional engineering craftsmanship with clean abstractions (e.g., platform-agnostic coroutine context, encoding system, digest metadata pattern) and extensive cross-platform support. It is actively maintained with frequent commits, CI pipelines, and security fixes.

RATING: 9.9/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
aws/s2n-tls ★ 4761 799 APPLICATION

s2n-tls is a C99 implementation of the TLS/SSL protocols designed by AWS for simplicity, small size, and security. It supports TLS 1.2 and 1.3, including features like 0-RTT early data, session tickets, post-quantum KEMs (ML-KEM, ML-DSA), and QUIC transport integration. The library provides a public C API (api/s2n.h) and multiple libcrypto backends (OpenSSL, AWS-LC, BoringSSL, LibreSSL). Extensive formal verification (CBMC, SAW, SideTrail) and fuzz testing ensure memory safety and constant-time execution. The architecture is highly modular with a stuffer buffer abstraction, blob/array utilities, a table-driven TLS extension framework, and a robust error-handling macro system. Rust bindings are first-class, offering safe wrappers (s2n-tls), async Tokio integration (s2n-tls-tokio), an HTTP client connector for Hyper (s2n-tls-hyper), and a metrics subscriber for handshake analysis. The library is used by AWS services like S3 and KMS, and includes interoperability tests against OpenSSL, GnuTLS, Java, and rustls. It is actively maintained with a sophisticated CI pipeline covering unit, integration, fuzz, formal proof, and performance regression tests across multiple platforms and libcrypto versions.

RATING: 9.9/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
kovidgoyal/kitty ★ 35142 1537 APPLICATION

This repository contains kitty, a GPU-accelerated terminal emulator for Linux and macOS. It features a highly optimized C core for rendering, font shaping, and terminal emulation, with a Python configuration layer and a plugin system ("kittens") for features like file transfer, SSH integration, diff viewing, and hints. The codebase also includes a set of well-crafted Go libraries for CLI framework building, TUI event loops, fuzzy matching (Smith-Waterman variant), rsync delta patching, streaming base64, and color space conversions. These libraries are structurally independent and could be extracted into separate projects. The architecture is a monolith at the C/Python level with loosely coupled Go-based kittens that communicate via IPC. Build and packaging are handled by a custom system (bypy) and standard Python setup. The project is actively maintained with extensive CI, automated testing, and a responsive issue tracker.

RATING: 9.8/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
FFmpeg/FFmpeg ★ 64672 14306 APPLICATION

FFmpeg is a comprehensive, production-grade multimedia framework providing libraries and command-line tools for encoding, decoding, transcoding, muxing, demuxing, filtering, streaming, and playing audio, video, subtitles, and related metadata. The codebase is organized into several core libraries: libavcodec (codec implementations), libavformat (container formats), libavfilter (audio/video filters), libavutil (utilities), libavdevice (device I/O), libswresample (audio resampling), and libswscale (image scaling/colorspace conversion). The primary user-facing tools are ffmpeg (conversion/streaming), ffplay (media player), and ffprobe (media analysis). The architecture is modular, with each library exposing a public API and internally using a plugin-like registration system for codecs, demuxers, muxers, filters, and bitstream filters. Hardware acceleration is supported via Vulkan, CUDA, VA-API, D3D11VA, D3D12VA, VideoToolbox, MediaCodec, and others, with architecture-specific SIMD optimizations for x86, ARM, RISC-V, MIPS, LoongArch, and PowerPC. The project is actively maintained with extensive testing infrastructure including fuzzers, unit tests, and a checkasm framework for verifying assembly optimizations.

RATING: 9.7/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
vim/vim ★ 41151 6143 APPLICATION

Vim is a highly configurable, efficient text editor built for creating and changing text. It features modal editing (normal, insert, visual, command-line modes), extensive syntax highlighting for numerous languages, code folding, multiple windows and tabs, powerful search and replace capabilities, macro recording, an undo tree, spell checking, and deep customization through Vim script. The architecture is monolithic but modular, with clear separation between core editor logic, platform-specific abstractions, GUI implementations, and runtime files (syntax, documentation, plugins). Key entry points include the main() function in src/main.c, GUI entry points in gui_*.c files, and command-line interfaces (vim, gvim, vimtutor). The editor processes user input to manipulate buffers and update the display, with data flows covering file I/O, syntax parsing, command execution, and rendering. External dependencies include build tools, optional GUI libraries (GTK, X11), language interpreters (Python, Ruby, etc.), and the bundled libvterm terminal emulator. Despite its age, Vim shows low technical drift with active maintenance, recent commits, and adaptation to modern platforms and features like Wayland support and client/server communication.

RATING: 9.6/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
mpv-player/mpv ★ 37272 3567 APPLICATION

mpv is a free, open-source, cross-platform media player for the command line. It is built on a modular architecture with a stream layer, demuxers, decoders, filters, and audio/video output backends. The codebase is primarily C with some Lua and Swift for scripting and macOS integration. It supports a vast array of media formats via FFmpeg, hardware acceleration (VAAPI, VDPAU, CUDA, D3D11, etc.), and advanced rendering with libplacebo. It also provides a client API (libmpv) for embedding in other applications. The repository is actively maintained with extensive CI, fuzz testing, and a large set of Lua scripts for customization. The code demonstrates high craftsmanship with reusable abstractions like a custom talloc-based memory allocator, a generic filter graph framework, and a render abstraction layer.

RATING: 9.6/10 MAINT: active DRIFT: low
â–¸ 6 reusable components found
Genymobile/scrcpy ★ 150786 13850 APPLICATION

scrcpy is a high-performance desktop application that mirrors and controls Android devices over USB or TCP/IP. The client is a native C application using SDL3 for rendering and input, FFmpeg for media decoding, and libusb for USB-OTG mode. The server is a Java service running on the Android device that captures screen and audio via MediaCodec and hidden Android APIs, streaming them over an ADB tunnel. The system supports multiple input modes (SDK injection, UHID, AOA HID), video/audio recording, V4L2 loopback output, and clipboard synchronization. Architecture is client-server with a well-defined protocol, trait-based pipeline for frame/packet processing, and extensive cross-platform support (Linux, Windows, macOS).

RATING: 9.5/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
facebook/zstd ★ 27950 2615 APPLICATION

This repository is the reference implementation of the Zstandard (zstd) lossless compression algorithm, developed and maintained by Meta (Facebook). It is a production-grade C library (`libzstd`) that provides fast, high-ratio compression with configurable speed/ratio trade-offs, including negative compression levels for extreme speed. The library is accompanied by a full-featured command-line tool (`zstd`) that supports compression, decompression, streaming, multi-threading, dictionary training, and interoperability with gzip, xz, lz4, and lzma formats. The architecture is modular: a core library (`lib/`) with separate concerns for common utilities, compression strategies (fast, double-fast, lazy, optimal, long-distance matching), decompression, dictionary building (cover, fastCover), and legacy format decoders (v01–v07). The `programs/` directory houses the CLI entry point and file I/O utilities. The codebase is exceptionally well-tested with unit tests, fuzzing infrastructure, regression tests, and CLI integration tests. While the dominant character is an application/library, it also contains research-grade entropy coders (FSE, Huffman) and experimental contributions (edit-distance match finder, parallel pzstd, seekable format, educational decoder), making it a hybrid resource for both production use and compression algorithm study.

RATING: 9.5/10 MAINT: active DRIFT: low
â–¸ 4 reusable components found
conan-io/conan ★ 9534 1134 APPLICATION

Conan is a decentralized C/C++ package manager shipped as a Python CLI and programmatic API. The code implements the complete package lifecycle: recipe authors define ConanFile classes, the CLI exports recipes, resolves dependency graphs from a local SQLite-backed cache and remote repositories, computes platform-specific package IDs, and installs prebuilt binaries or builds from source. It also contains a self-hosted package server (conans/server) with a Bottle-based REST API v2, authentication plugins, revision tracking, and file upload/download endpoints, though the primary product is the client tooling used by C/C++ developers and CI systems. Architecture is layered and modular. The CLI layer (conan/cli) uses a decorator-based command framework and delegates to a ConanAPI facade (conan/api) that orchestrates internal subsystems: graph resolution and lockfiles (conan/internal/graph), cache persistence (SQLite in conan/internal/cache/db), REST client and remote management (conan/internal/rest), recipe hooks and lifecycle methods (conan/internal/methods.py), and a broad set of build-system generators and toolchains under conan/tools covering CMake, Meson, MSBuild, Autotools, Bazel, Xcode, Qbs, Premake, SCons, and others. The main entry points are conans/conan.py:run for the CLI and conans/conan_server.py for the server. Data flows center on recipes and binary packages: export sources -> compute recipe revision, resolve requirement version ranges -> build dependency graph, compute package IDs from settings/options/conf, query local cache and remotes for binaries, then download/install or build/package as needed. Lockfiles pin revisions for reproducibility, profiles and per-package confs influence generated build-system files, and SBOM/audit features produce dependency metadata. The repository has an extensive three-tier test suite (unit, integration, functional) using in-process TestClient/TestServer harnesses and mocked network layers, plus platform-gated functional tests for real toolchains.

RATING: 9.4/10 MAINT: active DRIFT: low
â–¸ 6 reusable components found
ultrajson/ultrajson ★ 4496 385 APPLICATION

UltraJSON is a high-performance JSON encoder/decoder library for Python, implemented entirely in C with Python bindings. It provides drop-in replacements for Python's standard json module (ujson.dumps, ujson.loads, ujson.dump, ujson.load) and offers configuration options for ASCII encoding, HTML character escaping, forward slash escaping, indentation, sorting keys, NaN/Infinity handling, and customizable separators. The library's core architecture consists of a hand-optimized C state machine for decoding and a recursive encoder that handles Python objects via a type-context system. It bundles a copy of the double-conversion library for precise floating-point serialization and uses a stack-first, heap-later buffer allocation strategy. Despite being in maintenance-only mode due to architectural security concerns, the codebase exhibits strong craftsmanship: meticulous memory management, comprehensive UTF-8 validation, support for surrogate pairs, fuzz testing with ref-count verification, and compatibility with CPython's free-threaded builds. The repository also includes extensive tests, benchmarks, and CI for multiple architectures and Python implementations (CPython, PyPy, GraalPy).

RATING: 9.4/10 MAINT: active DRIFT: low
â–¸ 2 reusable components found
NLnetLabs/unbound ★ 4846 451 APPLICATION

Unbound is a production-grade, modular, recursive DNS resolver with extensive DNSSEC validation, caching, and policy enforcement. It functions as a system daemon that iteratively resolves DNS queries from root servers or forwards to upstream resolvers, caches results in multi-layered caches (message, RRset, infrastructure), and validates responses according to DNSSEC. The daemon supports multiple transport protocols: UDP, TCP, TLS (DoT), HTTPS (DoH), and QUIC (DoQ), as well as experimental DNSCrypt encryption. It includes a modular processing pipeline where the iterator, validator, response-IP modification (respip), DNS64 synthesis, and other modules are composable at startup. An embedded library (libunbound) provides a public C and Python API for synchronous and asynchronous DNS lookups, enabling integration into other applications.

RATING: 9.3/10 MAINT: active DRIFT: medium
â–¸ 8 reusable components found
pikvm/ustreamer ★ 2028 276 APPLICATION

uStreamer is a lightweight, high-performance MJPEG-HTTP video streaming server designed primarily for PiKVM (IP-KVM over HDMI). It captures video from V4L2 devices (USB cameras, HDMI capture cards) and streams it as MJPEG over HTTP with sub-second latency, while also supporting H.264 streaming via WebRTC through a Janus plugin. The system is a single, multithreaded C daemon with pluggable JPEG encoders (CPU via libjpeg-turbo, hardware passthrough, and V4L2 M2M acceleration) and includes a worker pool for parallel encoding. It integrates tightly with Linux multimedia subsystems (V4L2, ALSA, DRM) and provides additional features like audio capture/playback with Opus encoding, GPIO control, systemd socket activation, and shared memory IPC for zero-copy frame access by other processes (e.g., Janus, Python bindings, dump tool). The codebase is production-grade, extensively tested in the PiKVM ecosystem, and packaged for multiple Linux distributions and container environments. The architecture separates concerns into clean modules: capture (V4L2 buffer management with DMA export), encoding (abstraction over CPU/HW/M2M), HTTP server (libevent-based, serving MJPEG streams, snapshots, and static assets), and a generic worker thread pool for parallel JPEG compression. Shared memory sinks (memsink) enable efficient frame transfer to external consumers like the Janus WebRTC plugin or the standalone dump utility. The project also includes a full-featured Janus plugin for H.264/Opus streaming with NTP timestamping and PLI handling, a Python C extension for shared memory client access, and a separate V4 passthrough tool for the PiKVM V4 Plus hardware. Build configuration uses Makefiles with numerous feature flags (WITH_GPIO, WITH_JANUS, WITH_SYSTEMD, etc.), permitting a modular build. Overall, uStreamer exemplifies careful engineering of real-time video pipelines on embedded Linux, with a focus on minimal latency, hardware offload, and robust IPC.

RATING: 9.3/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
htop-dev/htop ★ 8395 651 APPLICATION

htop is a cross-platform interactive process viewer and system monitor written in C on ncurses. It enumerates and displays processes by reading OS kernel interfaces — primarily /proc on Linux, sysctl/kvm/kstat on the BSDs and Solaris, libproc/mach on macOS, and PCP (Performance Co-Pilot) metrics for the pcp-htop variant — and renders a scrollable process table alongside a header of pluggable meters (CPU, memory, swap, disk I/O, network I/O, ZFS ARC, GPU utilization, pressure stall, battery, sensors, and more). Beyond display, it supports process management actions: kill, renice, set CPU affinity, scheduling and I/O priority, spawning strace/lsof child processes, plus tree view, sorting, filtering, incremental search, and persistent configuration in htoprc. Architecturally this is a monolithic C application with emulated object orientation: an Object base class with vtable-style Class function tables, generic containers (Hashtable with Robin Hood open addressing, Vector with ownership semantics), a RichString wide-character rendering layer, reusable Panel/Meter widget classes, and a ScreenManager event loop. Each supported OS lives in a backend directory (linux/, darwin/, freebsd/, openbsd/, netbsd/, dragonflybsd/, solaris/, pcp/, unsupported/) that implements the Platform/Machine/ProcessTable/Process contract. Entry points are htop.c and pcp-htop.c, which route through CommandLine_run() into ScreenManager_run(). The build uses GNU autotools with optional features (hwloc, libsensors, libnl, libcap, libunwind, PCP), and CI runs the binary headlessly under sanitizers plus a Lua/rote terminal-emulation test suite. Maintenance is genuinely active: recent commits, a CodeQL workflow, address/UB sanitizer jobs, valgrind suppressions, and a ChangeLog showing security fixes (CVE-2024-37676) and steady feature work through 3.6.0-dev. The honest caveats are platform fragility: Solaris and OpenBSD have TODO stubs for disk/network I/O, NetBSD uses deprecated proplib compatibility aliases, /proc and DRM fdinfo parsers are sensitive to kernel format changes, and there is visible copy-paste divergence across BSD backend field arrays. The core Linux path is current and well-maintained; the tail platforms lag, which keeps overall technical drift at medium rather than low.

RATING: 9.2/10 MAINT: active DRIFT: medium
â–¸ 6 reusable components found
Dav1dde/glad ★ 4598 510 APPLICATION

Glad is a multi-language code generator that produces loaders for Khronos graphics APIs (OpenGL, Vulkan, EGL, GLX, WGL). It parses official XML specification registries and generates C/C++ and Rust source files that load all required function pointers at runtime, supporting multiple contexts (MX), header-only builds, debug callbacks, on-demand loading, and alias resolution. The architecture is modular: a Python CLI dispatches to language-specific generators via a plugin system, using Jinja2 templates for output. It includes CMake integration, extensive compile/run tests, and examples for GLFW, SDL2/3, Vulkan, and embedded contexts. The codebase demonstrates strong engineering practices—clean separation of parsing, generation, and template rendering, with reusable patterns for configuration, plugin discovery, and XML processing.

RATING: 9.2/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
$ loading more...
$ submit: