awesome-repositories.com
Blog
awesome-repositories.com

Entdecke die besten Open-Source-Repositories mit KI-gestützter Suche.

EntdeckenKuratierte SuchenOpen-Source-AlternativenSelf-hosted SoftwareBlogSitemap
ProjektÜber unsRanking-MethodikPresseMCP-Server
RechtlichesDatenschutzAGB
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
rust-lang avatar

rust-lang/rust-bindgen

0
View on GitHub↗
5,212 Stars·810 Forks·Rust·BSD-3-Clause·4 Aufruferust-lang.github.io/rust-bindgen↗

Rust Bindgen

Rust-bindgen ist ein Build-Time-Generator für Foreign Function Interface (FFI)-Bindings und ein C-Header-Parser, der entwickelt wurde, um die Interoperabilität zwischen Sprachen zu automatisieren. Er fungiert als Tool, um Rust mit C-, C++- und Objective-C-Bibliotheken zu verbinden, indem er während des Kompilierungsprozesses plattformspezifische Deklarationen erstellt.

Das Projekt zeichnet sich durch seine Fähigkeit aus, komplexe Sprachkonstrukte der C-Familie zu verarbeiten, einschließlich C++-Vererbung und -Methoden sowie Objective-C-Klassen und -Protokolle. Es stellt die binäre Kompatibilität über verschiedene Architekturen hinweg sicher, indem es zielspezifische Speicherlayouts berechnet und validiert, dass die generierten Strukturgrößen und Alignments mit den ursprünglichen Quelldefinitionen übereinstimmen.

Das Tool bietet umfangreiches Typ-Mapping für C-Unions, Bitfields und flexible Array-Member, während nicht übersetzbare oder komplexe Standardbibliothekstypen auf opake Byte-Blobs abgebildet werden. Es enthält ein Konfigurationssystem zum Filtern von Bindings, zum Ersetzen komplexer Typen und zur Steuerung der Trait-Ableitung oder Feldsichtbarkeit.

Generierte Bindings können extrahierte Dokumentationen aus System-Headern enthalten und werden durch einen Standard-Formatter verarbeitet, um ein konsistentes Code-Styling sicherzustellen.

Features

  • Rust-C++ Bridges - Automates the creation of type-safe bindings to bridge Rust with C++ libraries, including complex types and inheritance.
  • Native Library Integrations - Provides a tool to execute external native libraries by mapping C/C++ headers to type-safe Rust bindings.
  • FFI Binding CLI Generators - Generates target-specific FFI bindings during the build process to ensure memory layout compatibility across architectures.
  • Rust-C++ FFI Generators - Creates type definitions and FFI declarations from C++ headers, supporting inheritance and methods.
  • Compile-Time Code Generators - Produces platform-specific FFI glue code during the build process to ensure architecture compatibility.
  • Target-Aware Padding & Alignment - Calculates structure padding and alignment by querying the target platform's compiler to ensure binary compatibility.
  • C and Objective-C Interface Mapping - Provides foreign function interface definitions for Objective-C headers by mapping classes to structs and protocols to traits.
  • Native C Interoperability - Bridges C, C++, and Objective-C libraries with Rust by automating the creation of memory-safe declarations.
  • C Function Bindings - Generates bindings that map native C functions to Rust methods for direct execution.
  • C Header Binding Generators - Parses C or C++ headers during the build process to automatically generate foreign function interface signatures.
  • Objective-C Symbol Binding Generators - Creates FFI definitions from Objective-C headers by mapping classes to structs and protocols to traits.
  • Source-To-Source Transpilers - Translates C and C++ language constructs into equivalent foreign function interface signatures in the target language.
  • Compiler-Integrated AST Parsing - Uses an integrated compiler frontend like Clang to parse C headers into abstract syntax trees.
  • Binding Configurations - Provides settings and builder methods to control how source types are translated into target language structures.
  • FFI Declaration Generators - Generates type-safe cross-language interface declarations from both C and C++ header files.
  • Binding Filters - Limits the output to specific types, functions, and variables that match defined rules or dependency requirements.
  • Byte-Compatible Bitfield Generators - Implements tools that generate memory-compatible bitfield structures with typed accessors for low-level language interoperability.
  • Compilation Target Specifications - Specifies a target platform or compiler version to ensure generated bindings match the deployment binary format.
  • FFI Opaque Type Handles - Represents untranslatable types as byte blobs with specific size and alignment to maintain binary compatibility.
  • Opaque Type Definitions - Defines abstract data types as fixed-size byte arrays to hide internal structure and maintain memory layout compatibility.
  • Rust-C++ Type Mappings - Maps complex C++ standard library types to compatible byte blobs with correct size and alignment.
  • Union Mappings - Creates representations of C unions using native union types or specialized structs to ensure layout compatibility.
  • Layout Verifications - Provides validation that generated structure sizes and alignments match the original source definitions to ensure binary compatibility.
  • Target-Aware Binding Generation - Passes specific architecture arguments to the compiler to ensure generated bindings match a non-native target system.
  • Foreign Function Interface - Generates Rust bindings for C/C++ libraries.

Star-Verlauf

Star-Verlauf für rust-lang/rust-bindgenStar-Verlauf für rust-lang/rust-bindgen

KI-Suche

Entdecke weitere awesome Repositories

Beschreibe in einfachen Worten, was du brauchst — die KI bewertet tausende kuratierte Open-Source-Projekte nach Relevanz.

Start searching with AI

Open-Source-Alternativen zu Rust Bindgen

Ähnliche Open-Source-Projekte, sortiert nach der Anzahl der gemeinsamen Funktionen mit Rust Bindgen.
  • dtolnay/cxxAvatar von dtolnay

    dtolnay/cxx

    6,664Auf GitHub ansehen↗

    CXX is a code generator that produces a safe, zero-overhead FFI bridge between Rust and C++. It lets functions and data types from either language be used directly in the other, with static type safety enforced at compile time and no copying, serialization, or runtime checks across the boundary. The bridge supports the full range of cross-language interactions: Rust can call C++ functions and use C++ types, and C++ can call Rust functions and use Rust types. Standard library types like strings, vectors, and smart pointers are mapped automatically between the two languages, while opaque types

    Rust
    Auf GitHub ansehen↗6,664
  • android/ndk-samplesAvatar von android

    android/ndk-samples

    10,513Auf GitHub ansehen↗

    The Android NDK samples provide a comprehensive collection of code examples demonstrating how to integrate C and C++ native code into Android applications. This repository serves as a practical guide for developers utilizing the Android Native Development Kit to implement performance-critical application components that require direct hardware access and low-level system interaction. The project highlights the use of the Java Native Interface to bridge managed code with native modules, enabling cross-language function calls and efficient data exchange. It demonstrates how to manage native act

    C++
    Auf GitHub ansehen↗10,513
  • crystal-lang/crystalAvatar von crystal-lang

    crystal-lang/crystal

    20,299Auf GitHub ansehen↗

    Crystal is a statically typed, compiled programming language designed for high performance and memory safety. It leverages an LLVM-based compiler to translate source code into optimized machine-executable binaries, while its type-inference-based static analysis enforces strict safety rules during the build process. The language distinguishes itself through a fiber-based concurrent runtime that manages lightweight execution units for asynchronous input and output without blocking the main process. It also features a powerful compile-time macro system that allows for the inspection and transfor

    Crystalcompilercrystalcrystal-language
    Auf GitHub ansehen↗20,299
  • cython/cythonAvatar von cython

    cython/cython

    10,767Auf GitHub ansehen↗

    Cython is a compiler that translates Python code into C or C++ to create high-performance extension modules. It functions as a static typing optimizer and a C extension generator, allowing developers to declare C types within Python code to reduce interpreter overhead and increase execution speed. The project enables the wrapping of external C libraries to provide high-level interfaces to low-level system capabilities. It also serves as a native binary packager, capable of freezing scripts and their dependencies into standalone executable binaries for distribution. The system covers a broad

    Cythonbig-dataccpp
    Auf GitHub ansehen↗10,767
Alle 30 Alternativen zu Rust Bindgen anzeigen→

Häufig gestellte Fragen

Was macht rust-lang/rust-bindgen?

Rust-bindgen ist ein Build-Time-Generator für Foreign Function Interface (FFI)-Bindings und ein C-Header-Parser, der entwickelt wurde, um die Interoperabilität zwischen Sprachen zu automatisieren. Er fungiert als Tool, um Rust mit C-, C++- und Objective-C-Bibliotheken zu verbinden, indem er während des Kompilierungsprozesses plattformspezifische Deklarationen erstellt.

Was sind die Hauptfunktionen von rust-lang/rust-bindgen?

Die Hauptfunktionen von rust-lang/rust-bindgen sind: Rust-C++ Bridges, Native Library Integrations, FFI Binding CLI Generators, Rust-C++ FFI Generators, Compile-Time Code Generators, Target-Aware Padding & Alignment, C and Objective-C Interface Mapping, Native C Interoperability.

Welche Open-Source-Alternativen gibt es zu rust-lang/rust-bindgen?

Open-Source-Alternativen zu rust-lang/rust-bindgen sind unter anderem: dtolnay/cxx — CXX is a code generator that produces a safe, zero-overhead FFI bridge between Rust and C++. It lets functions and… android/ndk-samples — The Android NDK samples provide a comprehensive collection of code examples demonstrating how to integrate C and C++… crystal-lang/crystal — Crystal is a statically typed, compiled programming language designed for high performance and memory safety. It… cython/cython — Cython is a compiler that translates Python code into C or C++ to create high-performance extension modules. It… c3lang/c3c — c3c is the compiler for the C3 programming language, transforming source code into executable binaries, static… jerryscript-project/jerryscript — JerryScript is a lightweight, ECMAScript-compliant JavaScript engine and bytecode compiler designed for…