awesome-repositories.com
Blog
awesome-repositories.com

Descoperă cele mai bune repository-uri open source cu căutare AI.

ExploreazăCăutări recomandateAlternative open-sourceSoftware self-hostedBlogHartă site
ProiectDespreCum realizăm clasamentulPresăServer MCP
LegalConfidențialitateTermeni
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
rust-lang avatar

rust-lang/rust-bindgen

0
View on GitHub↗
5,212 stele·810 fork-uri·Rust·BSD-3-Clause·2 vizualizărirust-lang.github.io/rust-bindgen↗

Rust Bindgen

Rust-bindgen este un generator de binding-uri pentru interfața de funcții străine (FFI) la momentul build-ului și un parser de headere C conceput pentru a automatiza interoperabilitatea între limbaje. Funcționează ca un instrument pentru a face legătura între Rust și bibliotecile C, C++ și Objective-C prin producerea de declarații specifice platformei în timpul procesului de compilare.

Proiectul se distinge prin capacitatea sa de a gestiona constructe complexe ale limbajelor din familia C, incluzând moștenirea și metodele C++, precum și clasele și protocoalele Objective-C. Asigură compatibilitatea binară pe diferite arhitecturi prin calcularea layout-urilor de memorie conștiente de țintă și validarea faptului că dimensiunile și aliniamentele structurilor generate se potrivesc cu definițiile sursă originale.

Instrumentul oferă mapare extinsă a tipurilor pentru uniuni C, bitfields și membri de tip array flexibili, mapând în același timp tipurile complexe sau netraductibile din biblioteca standard către blob-uri de octeți opace. Include un sistem de configurare pentru filtrarea binding-urilor, substituirea tipurilor complexe și controlul derivării trăsăturilor sau vizibilitatea câmpurilor.

Binding-urile generate pot include documentație extrasă din headerele sistemului și sunt procesate printr-un formator standard pentru a asigura un stil de cod consistent.

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.

Istoric stele

Graficul istoricului de stele pentru rust-lang/rust-bindgenGraficul istoricului de stele pentru rust-lang/rust-bindgen

Căutare AI

Explorează mai multe repository-uri excelente

Descrie ce ai nevoie în limbaj simplu — AI-ul sortează mii de proiecte open source selectate în funcție de relevanță.

Start searching with AI

Alternative open-source pentru Rust Bindgen

Proiecte open-source similare, clasificate după numărul de funcționalități comune cu Rust Bindgen.
  • dtolnay/cxxAvatar dtolnay

    dtolnay/cxx

    6,664Vezi pe 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
    Vezi pe GitHub↗6,664
  • android/ndk-samplesAvatar android

    android/ndk-samples

    10,513Vezi pe 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++
    Vezi pe GitHub↗10,513
  • crystal-lang/crystalAvatar crystal-lang

    crystal-lang/crystal

    20,299Vezi pe 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
    Vezi pe GitHub↗20,299
  • cython/cythonAvatar cython

    cython/cython

    10,767Vezi pe 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
    Vezi pe GitHub↗10,767
Vezi toate cele 30 alternative pentru Rust Bindgen→

Întrebări frecvente

Ce face rust-lang/rust-bindgen?

Rust-bindgen este un generator de binding-uri pentru interfața de funcții străine (FFI) la momentul build-ului și un parser de headere C conceput pentru a automatiza interoperabilitatea între limbaje. Funcționează ca un instrument pentru a face legătura între Rust și bibliotecile C, C++ și Objective-C prin producerea de declarații specifice platformei în timpul procesului de compilare.

Care sunt principalele funcționalități ale rust-lang/rust-bindgen?

Principalele funcționalități ale rust-lang/rust-bindgen sunt: 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.

Care sunt câteva alternative open-source pentru rust-lang/rust-bindgen?

Alternativele open-source pentru rust-lang/rust-bindgen includ: 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…