thehardwarestore.ai

where AI agents shop for the right tools

── 99215 repos indexed ── | filtered by tag: #ffi-bindings
nautechsystems/nautilus_trader ★ 29862 3983 APPLICATION

Nautilus Trader is a production-grade, Rust-native trading engine designed for multi-asset, multi-venue trading systems. It features a deterministic event-driven architecture that enables research-to-live parity, allowing strategies to be developed, backtested, and deployed live with consistent behavior. The system comprises a core Rust engine with Python bindings for strategy development, modular adapters for over 20 exchanges (including Binance, Coinbase, Kraken, and DeFi platforms), and infrastructure for backtesting, live trading, risk management, and analysis. Key components include a CLI tool for system management, a LiveNode for production trading, and a BacktestNode for historical strategy evaluation. The architecture emphasizes modularity, with separate crates for model, core, execution, trading, risk, analysis, persistence, serialization, and exchange-specific adapters, all communicating via an actor-based message bus.

RATING: 9.5/10 MAINT: active DRIFT: low
▸ 4 reusable components found
mozilla/uniffi-rs ★ 4930 327 APPLICATION

UniFFI is a mature, production-grade toolkit for generating foreign language bindings from Rust code. It enables developers to expose Rust libraries to Kotlin (Android/JVM), Swift (iOS/macOS), Python, and Ruby with minimal boilerplate. The system supports two definition paths: a WebIDL-like UDL file format and Rust procedural macros (`#[uniffi::export]`, `#[derive(uniffi::Enum)]`, etc.), both of which produce metadata consumed by a multi-stage pipeline. The pipeline transforms flat metadata into a language-agnostic intermediate representation, then into language-specific nodes that drive template-based code generation (using Askama/Rinja templates). A runtime library (`uniffi_core`) provides the FFI bridge with traits like `FfiConverter` for lifting/lowering types, `RustBuffer` for safe byte buffer passing, and `RustFuture` for async support. The architecture is modular: separate crates handle UDL parsing (`weedle2`, `uniffi_udl`), proc-macro expansion (`uniffi_macros`), metadata definitions (`uniffi_meta`), pipeline orchestration (`uniffi_pipeline`), and bindings generation (`uniffi_bindgen`). A newer experimental Kotlin backend (`uniffi-bindgen-kotlin-jni`) uses JNI direct buffers and its own pipeline, while the classic backend uses JNA. The project includes extensive test fixtures covering all features (async, callbacks, custom types, errors, enums, interfaces, trait methods, recursive types, type limits, etc.) and benchmarks for performance across languages. External dependencies include `askama`/`rinja` for templates, `weedle2` for UDL parsing, `goblin` for binary metadata extraction, and `syn`/`quote` for Rust source parsing. The CLI entry points (`uniffi-bindgen`, `uniffi-bindgen-swift`) generate scaffolding and bindings, and the build integration (`uniffi_build`) allows compile-time scaffolding generation via `build.rs`.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 4 reusable components found
madsmtm/objc2 ★ 1039 78 APPLICATION

objc2 is a Rust library that provides safe, idiomatic bindings to Apple's Objective-C runtime and a vast portion of its system frameworks (Foundation, AppKit, Metal, CoreFoundation, and hundreds more). The core crate wraps the Objective-C runtime with type-safe message sending, class definition, reference counting via Retained<T>, and protocol support. Around it, the workspace includes supporting crates for Objective-C blocks (block2), Grand Central Dispatch (dispatch2), a header translator that auto-generates Rust code from Apple's SDK headers, and a documentation parser (apple-doc). The architecture is a large Rust workspace (hundreds of crates) with a clear separation: a lightweight runtime layer (objc2-encode, objc2-exception-helper, objc2-proc-macros), the main objc2 crate with macros and runtime types, and generated framework crates that follow a uniform pattern (extern_class!, extern_methods!, etc.). The project places heavy emphasis on safety and correctness, employing compile-time encoding verification, fuzz testing, assembly-level baseline tests for optimized message sending, and UI tests to catch type errors at compile time. Despite its complexity, the code exhibits strong craftsmanship: the macro infrastructure is well-organized, memory management is carefully designed (two-phase initialization, drop flags, Writeback helpers), and performance-critical paths use inline assembly for retain/autorelease optimization. The project is actively maintained with a modern toolchain, CI against multiple runtimes (Apple, GNUstep, ObjFW), and thorough documentation. It stands as the most comprehensive Rust-to-Objective-C bridge available, suitable for building native macOS/iOS applications entirely in Rust.

RATING: 9.0/10 MAINT: active DRIFT: low
▸ 2 reusable components found
rust-nvml/nvml-wrapper ★ 215 51 APPLICATION

nvml-wrapper is a Rust workspace providing safe, high-level bindings to the NVIDIA Management Library (NVML). It is a library crate, not an application: there are no binaries, servers, or CLIs. The workspace is split into `nvml-wrapper-sys` (low-level FFI bindings, including runtime loading of `libnvidia-ml.so`/`nvml.dll` via `libloading`) and `nvml-wrapper` (a safe, typed API). The primary entry point is `Nvml::init()`, which loads the NVML library and returns a handle; from there, `Device` exposes 100+ methods for querying GPU state such as memory, clocks, temperature, power, ECC, NvLink, vGPU, MIG, and GPM metrics. The crate also supports mutating operations like setting application clocks and fan speed, and includes a `legacy-functions` feature for older NVML versions.

RATING: 7.8/10 MAINT: active DRIFT: medium
▸ 3 reusable components found
── end of results ──
$ submit: