awesome-repositories.com
Blog
awesome-repositories.com

Découvrez les meilleurs dépôts open-source grâce à notre recherche par IA.

ExplorerRecherches sélectionnéesAlternatives open sourceLogiciels auto-hébergésBlogPlan du site
ProjetÀ proposNotre méthodologiePresseServeur MCP
Mentions légalesConfidentialitéConditions d'utilisation
© 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·6 vuesrust-lang.github.io/rust-bindgen↗

Rust Bindgen

Rust-bindgen est un générateur de liaisons d'interface de fonction étrangère au moment de la construction et un analyseur d'en-têtes C conçu pour automatiser l'interopérabilité entre les langages. Il fonctionne comme un outil pour relier Rust aux bibliothèques C, C++ et Objective-C en produisant des déclarations spécifiques à la plateforme pendant le processus de compilation.

Le projet se distingue par sa capacité à gérer des constructions de langage de la famille C complexes, y compris l'héritage et les méthodes C++, ainsi que les classes et protocoles Objective-C. Il garantit la compatibilité binaire entre différentes architectures en calculant les dispositions de mémoire sensibles à la cible et en validant que les tailles et alignements de structure générés correspondent aux définitions source originales.

L'outil fournit un mappage de type étendu pour les unions C, les champs de bits et les membres de tableau flexibles, tout en mappant les types de bibliothèque standard intraduisibles ou complexes vers des blobs d'octets opaques. Il inclut un système de configuration pour filtrer les liaisons, substituer des types complexes et contrôler la dérivation de traits ou la visibilité des champs.

Les liaisons générées peuvent inclure une documentation extraite des en-têtes système et sont traitées via un formateur standard pour garantir un style de code cohérent.

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.

Historique des stars

Graphique de l'historique des stars pour rust-lang/rust-bindgenGraphique de l'historique des stars pour rust-lang/rust-bindgen

Recherche par IA

Explorez plus de dépôts awesome

Décrivez vos besoins en langage naturel — l'IA classe des milliers de projets open source sélectionnés par pertinence.

Start searching with AI

Alternatives open source à Rust Bindgen

Projets open source similaires, classés selon le nombre de fonctionnalités partagées avec Rust Bindgen.
  • dtolnay/cxxAvatar de dtolnay

    dtolnay/cxx

    6,664Voir sur GitHub↗

    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
    Voir sur GitHub↗6,664
  • android/ndk-samplesAvatar de android

    android/ndk-samples

    10,513Voir sur GitHub↗

    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++
    Voir sur GitHub↗10,513
  • crystal-lang/crystalAvatar de crystal-lang

    crystal-lang/crystal

    20,299Voir sur GitHub↗

    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
    Voir sur GitHub↗20,299
  • cython/cythonAvatar de cython

    cython/cython

    10,767Voir sur GitHub↗

    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
    Voir sur GitHub↗10,767
Voir les 30 alternatives à Rust Bindgen→

Questions fréquentes

Que fait rust-lang/rust-bindgen ?

Rust-bindgen est un générateur de liaisons d'interface de fonction étrangère au moment de la construction et un analyseur d'en-têtes C conçu pour automatiser l'interopérabilité entre les langages. Il fonctionne comme un outil pour relier Rust aux bibliothèques C, C++ et Objective-C en produisant des déclarations spécifiques à la plateforme pendant le processus de compilation.

Quelles sont les fonctionnalités principales de rust-lang/rust-bindgen ?

Les fonctionnalités principales de rust-lang/rust-bindgen sont : 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.

Quelles sont les alternatives open-source à rust-lang/rust-bindgen ?

Les alternatives open-source à rust-lang/rust-bindgen incluent : 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…