This repository contains the full implementation of the Marginfi v2 protocol, a decentralized lending and borrowing platform on Solana. The core is an Anchor-based Rust smart contract that manages deposits, borrows, repays, liquidations, orders, and flash loans across multiple assets. It integrates with external lending protocols (Kamino, Drift, Solend, JupLend) via cross-program invocation (CPI), allowing users to use positions from those protocols as collateral. The codebase also includes a comprehensive CLI tool (p0-cli) for admin operations and user interaction, a standalone type crate for shared data structures, multiple mock programs for integration testing, and extensive test suites (Rust integration tests, TypeScript bankrun tests, and fuzz testing with Trident and libfuzzer). The architecture is a single Solana program with a rich set of instruction handlers, supported by off-chain tooling. The repository demonstrates high engineering craftsmanship with well-structured code, reusable components, and thorough testing across many edge cases.
This repository is a Rust library (and optional CLI tool) that generates documentation for JavaScript and TypeScript modules. It parses source code using `deno_graph` and `deno_ast`, extracts documentation nodes (functions, classes, interfaces, enums, variables, type aliases, namespaces) along with JSDoc comments, and produces output in multiple formats: JSON for programmatic consumption, plain text for CLI display, static HTML pages with search, dark mode, and breadcrumbs, and structured diffs between two versions of an API. The HTML generation uses Handlebars templates and Tailwind CSS, and includes a client-side search index built with Fuse.js. The crate is used by the `deno doc` command and is published as `@deno/doc` for the JavaScript ecosystem via WASM. Its architecture is modular: a parsing layer resolves source files into a documentation graph, and separate output modules handle text, JSON, HTML, and diff rendering. The diff engine includes rename detection and change heuristics. The project is well-tested with a large suite of snapshot and specification tests covering a wide range of TypeScript features.
LocalSend is a free, open-source, cross-platform application for secure local file sharing over a local network without internet access. It supports Android, iOS, macOS, Windows, Linux, and a CLI, using a combination of Flutter for the UI and Rust for performance-critical networking, cryptography, and file transfer logic. The architecture is modular: a core Rust library (`packages/core`) implements the LocalSend protocol (v2/v3) with HTTP/HTTPS, multicast discovery, WebRTC, and TLS encryption; a Flutter app provides the graphical interface with state management via Refena (Redux-like) and i18n support for 50+ languages; and a separate CLI and WebRTC signaling server are also included. The app features device discovery, file/message transfer with progress tracking, PIN protection, checksum verification, quick-save, receive history, and a web share mode that allows browser-based downloads/uploads. The codebase demonstrates high craftsmanship with clean separation of concerns, extensive integration tests, and reusable patterns such as typed isolate communication, custom DNS resolution for IPv6 scoped addresses, and connection rate limiting.
fff (Fast File Finder) is a high-performance file search and content grep toolkit written in Rust, designed for long-running applications like code editors, AI agents, and file explorers. It provides fuzzy filename search with typo resistance, live content grep (plain text, regex, fuzzy), directory search, glob filtering, and git-aware frecency ranking. The core library maintains a persistent in-memory index with a bigram-based content prefilter, an LMDB-backed frecency and query history store, and a live filesystem watcher for incremental updates. The system is exposed through multiple interfaces: a Neovim plugin with a full TUI picker UI, an MCP server for AI assistants (Claude Code, Codex), language bindings for Python, Node.js, and Bun, and a C FFI for embedding in other languages. The architecture is a Rust core library with multiple frontends communicating via FFI or direct Rust API, all sharing the same `FilePicker` instance that manages indexing, searching, and watching. The codebase demonstrates exceptional performance engineering with SIMD-optimized string operations, compressed inverted indexes, arena-based path storage, and careful concurrency design with thread pools and lock-free snapshots.
Bottlerocket is a free, open-source Linux-based operating system purpose-built for hosting containers. It is designed with a strong focus on security, immutability, and reliable updates. The system is configured entirely through an API-driven settings model, with all configuration stored as key-value pairs in a filesystem datastore. It supports multiple orchestrator variants (Amazon EKS, Amazon ECS, VMware, and bare metal) and cloud platforms (AWS, VMware, bare metal), with specialized variants for NVIDIA GPUs and FIPS compliance. The architecture is a minimal, Rust-heavy OS image built via a custom build system (Twoliter). The core components include a settings datastore with serialization/deserialization, a versioned migration framework for safe upgrades/downgrades, per-variant settings plugins loaded as dynamic libraries, and a TUF-based update mechanism with A/B partition flipping. The build system produces bootable images (AMIs, OVAs, raw images) and publishes them to TUF repositories. The codebase is organized as a Cargo workspace with hundreds of small crates, each handling a specific concern (migrations, defaults, plugins, models). Key entry points include the build system (cargo make), the settings datastore library (sources/api/datastore), the migration helpers (sources/api/migration/migration-helpers), and the per-variant settings defaults (sources/settings-defaults). The repository also contains tools for local VM testing, kernel config diffing, and secure boot key generation. While the codebase is well-structured and actively maintained, it suffers from significant duplication across many similar variants (e.g., Kubernetes 1.31 through 1.37) and a large number of archived migrations, which increases maintenance burden.
grex is a regular expression generator that creates regex patterns from user-provided test cases. It implements DFA construction, Hopcroft's minimization algorithm, and Brzozowski's algebraic method to produce Perl-compatible regexes. The system serves dual purposes as a command-line utility and a library with bindings for Rust, Python, and WebAssembly. Key features include Unicode grapheme handling, configurable character class conversions (digits/whitespace/word), case insensitivity, repetition detection, and syntax highlighting. The architecture separates core regex building logic from CLI, Python, and WASM extension points, enabling reuse across multiple contexts.
Wry is a cross-platform Rust library for embedding native webviews into desktop and mobile applications. It is not a standalone application but a composable crate used by projects like Tauri. The code exposes a builder-pattern API (`WebViewBuilder` -> `WebView`) with `WebContext`, custom protocol handlers, an async IPC bridge, permissions, downloads, cookies, and platform extension traits. Production behavior is split across four backends: WebView2 on Windows, WKWebView on macOS/iOS, WebKitGTK on Linux, and Android WebView through JNI/Kotlin. All backends implement the same high-level operations but use platform-specific mechanisms (COM, Objective-C runtime, GTK signals, JNI pipes) with conditionally compiled code. Primary data flows are page loading from URLs or HTML, custom scheme requests handled as `http::Request`/`Response`, and JavaScript-to-Rust IPC via an injected `window.ipc.postMessage` bridge. The crate also supports drag-and-drop, permission requests, streaming media through custom protocols, and initialization scripts injected before page load. Most platform differences are isolated behind extension traits, allowing downstream users to add platform-specific behavior without polluting the core API. Maintenance is active, with frequent releases, cross-platform CI, Miri tests, performance benchmarks, and a covector-driven release process. However, the codebase carries notable drift risk: private macOS APIs, version-gated workarounds, Cargo audit ignores tied to an older MSRV, some Android toolchain pins in documentation, and an in-progress migration to Rust 2024 edition. Despite these risks, engineering quality is strong: the custom protocol workaround, main-thread dispatch utility, and permission normalization layers are clean examples of hard-won platform integration patterns.
Aya is a Rust framework for developing, loading, and managing eBPF (extended Berkeley Packet Filter) programs. It provides a pure-Rust alternative to libbpf and bcc, allowing developers to write eBPF programs in Rust without leaving the language ecosystem. The framework supports various eBPF program types (XDP, socket filters, tracepoints, kprobes, uprobes, LSM, etc.) and map types (arrays, hash maps, perf event arrays, ring buffers, etc.), with strong emphasis on type safety and developer experience. Aya implements BTF (BPF Type Format) support for compile-once-run-everywhere portability across kernel versions and provides procedural macros to reduce boilerplate when defining eBPF entities. The architecture consists of multiple crates separating userspace and kernel-space concerns, with extensive integration tests validating functionality against actual kernels.
plotters is a Rust data visualization library that provides a high-level API for creating charts and plots. It supports multiple backends (bitmap, SVG, canvas, WASM) via the `DrawingBackend` trait, allowing output to PNG, SVG, GIF, or interactive Jupyter notebooks. The core crate `plotters` offers chart builders, coordinate systems, drawable elements, series, and styles, while backend crates (`plotters-bitmap`, `plotters-svg`) implement the trait. Key entry points include `ChartBuilder`, `DrawingArea`, and backend constructors like `BitMapBackend::new`. Data flows involve user-provided iterators transformed into drawable elements via series (e.g., `LineSeries`, `Histogram`) and rendered to the chosen backend. External dependencies include `image`, `chrono`, `font-kit`, `ab_glyph`, `gif`, and `serde` (optional). The library is designed for embedding in Rust applications, not as a standalone tool, and is actively maintained with extensive examples, benchmarks, and CI.
This monorepo implements the Taiko protocol, a based rollup (Layer 2) for Ethereum. It is a production-grade infrastructure system comprising multiple services: a Go client (taiko-client) for block proposal, proving, and chain derivation; a Rust client (taiko-client-rs) for the same with additional preconfirmation support; a bridge UI (Svelte/TypeScript) for cross-chain token transfers; an event indexer (Go) that indexes on-chain events into a MySQL database with REST API; a relayer (Go) that processes bridge messages via RabbitMQ; an ejector (Rust) that monitors operator liveness and handles reorgs; and a balance monitor (Go) exporting Prometheus metrics. The architecture is microservice-oriented with shared protocol contracts (Solidity) in the protocol package. Key entry points include CLI binaries for each service, the bridge UI frontend, and deployment scripts for smart contracts. Data flows: L1 events are indexed by the eventindexer and relayer; the relayer processes bridge messages and submits claims; the driver derives L2 blocks from L1 proposals (blob sidecars) and syncs the execution engine; the prover generates and submits proofs (SGX, RISC0, SP1). External dependencies include Ethereum L1/L2 nodes, MySQL, RabbitMQ, IPFS gateways, and beacon chain APIs. The codebase is actively maintained with frequent releases and multiple audit reports.
PyApp is a Rust-based CLI tool that builds standalone executables for Python applications. At build time, it embeds a Python distribution (CPython or PyPy) and the target Python project (as a wheel, source distribution, or dependency file) into a single binary. At runtime, the binary bootstraps itself by extracting the Python distribution, creating a virtual environment (or using full isolation), installing the project (optionally via pip or uv), and executing the specified Python code (module, script, notebook, or arbitrary code). It exposes optional management commands for cache management, metadata display, pip invocation, Python shell, self-update, and removal. The architecture is a monolith with clear module separation: build script (build.rs), runtime initialization (app.rs), distribution handling, compression, process management, and network download. The codebase is well-structured, uses modern Rust patterns (edition 2021, anyhow for error handling, clap for CLI), and includes comprehensive CI/CD pipelines. It is not a data research project; it is a packaging and deployment tool for Python applications.
Dotter is a dotfile manager and templater written in Rust. It manages symbolic links and Handlebars-based templates for configuration files, supporting conditional deployment based on variables, packages, and host-specific configurations. The architecture is a single CLI binary with subcommands for deploy, undeploy, init, watch, and shell completion generation. It reads TOML configuration files (global.toml, local.toml) that define packages, files, and variables, then merges them with optional includes and patches. The deployment logic uses a trait-based Filesystem abstraction to support real operations and dry-run simulation, with platform-specific handling for Unix (sudo elevation) and Windows (symlink detection). The codebase demonstrates strong Rust practices: extensive use of traits for testability, mockall for unit testing, comprehensive error handling with anyhow, and a modular structure separating concerns (config, actions, filesystem, handlebars helpers, diff). It is actively maintained with recent commits, CI/CD pipelines, and a well-documented wiki.
This is a Rust library that provides safe, idiomatic bindings over the C library librdkafka, enabling Rust applications to produce and consume messages from Apache Kafka. The architecture is a thin wrapper: it exposes a high-level typed API (producers, consumers, admin client, transactions) while delegating all network I/O, partition management, and protocol handling to librdkafka. Key entry points include `ClientConfig` for building clients, the `Consumer` and `Producer` traits, and concrete implementations (`BaseConsumer`, `StreamConsumer`, `BaseProducer`, `FutureProducer`, `ThreadedProducer`). Data flows through a polling loop that dispatches events (delivery reports, rebalance notifications, log messages) to user-provided `ClientContext` callbacks. External dependencies are the librdkafka native library (bundled via submodule or system) and optional async runtimes (Tokio, smol, async-std). The library is heavily used in production Rust Kafka deployments.
JSTprove is a production-grade zero-knowledge proof system for verifying ONNX neural network inference. It compiles ML models into arithmetic circuits using the Expander Compiler Collection (ECC) frontend, generates witnesses, and produces proofs via a GKR/sumcheck-based prover with multiple polynomial commitment schemes (KZG, Hyrax, Orion, Basefold, WHIR). The system supports multiple efficient field arithmetics (Mersenne31, BabyBear, Goldilocks, BN254, GF2) with SIMD/AVX/NEON optimizations, and provides hardware acceleration through Metal and CUDA backends. The codebase is organized as a Rust workspace with ~30 crates, offering a CLI (`jstprove`, `jstprove-remainder`), Python bindings via PyO3, and a zkVM guest (Jolt). It is actively maintained by Inference Labs with regular commits, CI/CD pipelines, and e2e tests covering full model pipelines (LeNet, CIFAR CNN, MiniResNet). While primarily an application toolkit, it contains deep cryptographic research contributions in the form of advanced polynomial commitment constructions (sparse WHIR, hyper-bivariate KZG) and circuit optimizations (cross-layer GKR, LogUp range checks). Some hints (e.g., sigmoid, gridsample) carry documented soundness caveats, and the system relies on nightly Rust and platform-specific intrinsics, which may limit portability.
CamillaDSP is a real-time audio stream processing engine written in Rust. It captures audio from a configurable backend (ALSA, PulseAudio, PipeWire, CoreAudio, WASAPI, ASIO, or file), processes it through a user-defined pipeline of filters, mixers, compressors, and other DSP components, and outputs it to a playback device. The pipeline is defined via YAML configuration, supporting biquad filters, FIR convolution (with hand-optimized NEON and AVX+FMA SIMD kernels), loudness, limiting, noise gates, and dithering. A websocket-based control interface allows runtime adjustments of volume, mute, faders, and config reloads. The architecture is modular with separate threads for capture, processing, and playback, using a PI rate controller for buffer level regulation. Benchmarks demonstrate attention to performance. While primarily an application, the DSP filter implementations and utility components (ring buffer, conversion routines, rate controller) are reusable building blocks for audio software.
Tuliprox is a production-grade IPTV streaming proxy and DVR system written in Rust, with a WebAssembly frontend in Yew. It aggregates IPTV sources from M3U, Xtream, Stalker, HDHomeRun, and media servers (Plex/Emby/Jellyfin) and presents them as a unified streaming backend via multiple protocols (HLS, Xtream, M3U, HDHomeRun). The system provides advanced features: HLS caching and segment repair, recording with conflict resolution and retention policies, RBAC with per-user connection limits and GeoIP filtering, EPG with smart matching, playlist transformation with a DSL-based mapping engine, and comprehensive notification channels (Discord, Telegram, Slack, etc.). The architecture is modular with many loosely-coupled crates (auth, session, hls, dvr, parser, repository, messaging) sharing a common model crate (`shared`), which enforces type safety and prevents configuration drift between frontend and backend. The frontend is a rich single-page application with real-time dashboards, source/playlist editors, user management, and a setup wizard. The codebase demonstrates high craftsmanship in its custom B+Tree storage engine, HLS state machine, notification channel trait, and frontend form management macros. It is actively maintained with CI/CD, Docker deployment, and clear separation of concerns, though some dependency version pinning and large enum variants indicate areas for cleanup.
MMTk (Memory Management Toolkit) is a high-performance, portable garbage collection framework written in Rust. It provides a library of reusable GC algorithms (plans) including generational, concurrent, mark-sweep, immix, reference-counting (LXR), and mark-compact variants. The system exposes a trait-based VM binding interface (VMBinding) that language runtimes implement to integrate MMTk as their garbage collector. The architecture is modular: a parallel work-stealing scheduler dispatches GC work packets, policy spaces encapsulate memory allocation strategies (bump, free-list, immix, large object, etc.), and a flexible metadata system supports both header-resident and side metadata. The crate is not a standalone application; it is consumed as an rlib by VM bindings such as OpenJDK, JikesRVM, V8, Julia, and Ruby. Extensive use of procedural macros (HasSpaces, PlanTraceObject) reduces boilerplate for adding new GC plans. The codebase includes performance tracing tools (eBPF, Perfetto) and a comprehensive test suite with mock VM support.
jlrs is a Rust library that provides safe, high-performance bindings to the Julia C API, enabling both embedding Julia within Rust applications and exporting Rust functions as Julia modules (via ccall). The architecture is modular, with separate crates for raw FFI (`jl_sys`, `jlrs_sys`), a proc-macro crate (`jlrs_macros`) for derive macros and the `julia_module!` macro, and the main `jlrs` crate offering managed types (`Value`, `Array`, `DataType`), memory safety through scoped GC frames, and multiple runtime modes (local, async via tokio, multi-threaded). The library handles Juliaβs garbage collector carefully with custom GC-safe locks and fast thread-local state, and supports advanced features like static arrays, ndarray integration, and opaque Rust types managed by Julia. Key entry points are the `Builder` struct for initializing Julia, runtime handles (`LocalHandle`, `AsyncHandle`, `MtHandle`), and the `julia_module!` macro for exposing Rust code. The codebase is well-tested with integration tests, benchmarks, and CI across Julia LTS and stable versions on Linux, macOS, and Windows.
cargo-careful is a Rust CLI cargo subcommand that re-runs a user's build/test/run under a specially constructed Rust toolchain. The binary in src/main.rs expects to be invoked as `cargo careful <subcommand>`, supports run, test, build, rustc, nextest, and setup, and locates the active rustc version and host target. It finds the rust-src rustup component (offering to install it interactively unless running in CI), builds a per-target/per-sanitizer sysroot in a user cache directory via the rustc_build_sysroot library, then invokes cargo with that custom sysroot and encoded RUSTFLAGS so both the sysroot and the user's crate get extra runtime checking.
This repository provides the `honggfuzz` Rust crate, which integrates Google's Honggfuzz fuzzer with Rust. It offers a library with a `fuzz` function and `fuzz!` macro for defining fuzz targets, and two cargo subcommands (`cargo hfuzz` and `cargo honggfuzz`) for building with fuzzing instrumentation and running the fuzzer. The crate handles persistent fuzzing, conditional compilation via `cfg(fuzzing)`, and supports both raw byte slices and structured inputs via the `arbitrary` crate. The build script compiles the Honggfuzz C library from a submodule and links it statically. The codebase is well-structured, with clear separation between the library, CLI tools, and build infrastructure, and demonstrates thoughtful engineering for a security testing tool.