29 Repos
Libraries and generators for bridging Rust with other languages.
Explore 29 awesome GitHub repositories matching part of an awesome list · Foreign Function Interface. Refine with filters or upvote what's useful.
RustPython is a Python 3 compatible interpreter implemented in Rust. It functions as a scripting engine that can be embedded directly into host applications, allowing for the execution of dynamic scripts and the customization of software behavior within a memory-safe environment. The project distinguishes itself through its ability to bridge Python and JavaScript runtimes, enabling data exchange and function invocation across language boundaries. It also provides a portable execution environment by compiling Python code into WebAssembly, which allows for the execution of logic directly within
Python interpreter implemented in Rust.
This project provides a framework for binding Rust and Python, enabling the creation of native extension modules and the embedding of the Python interpreter within host applications. It functions as a cross-language interoperability library that facilitates the execution of scripts, the definition of classes, and the sharing of data structures across the boundary of the two runtimes. The framework distinguishes itself through the use of procedural macros to automate the generation of boilerplate code, simplifying the process of exposing native functions and data types. It employs type-level m
Rust bindings for the Python interpreter.
wasm-bindgen is a glue code generator and interoperability tool that facilitates high-level communication and data exchange between compiled Rust modules and JavaScript environments. It functions as a memory bridge and type definition generator, allowing the exchange of complex data types and the calling of functions across execution boundaries. The project distinguishes itself by automating the conversion of data types and function signatures using attribute-based bindings. It generates the necessary JavaScript and WebAssembly wrappers to manage linear memory mapping and creates automatic Ty
Facilitates interaction between Wasm and JavaScript.
Neon is a framework for writing high-performance native Node.js modules using the Rust programming language. It serves as a foreign function interface bridge and a toolchain for bootstrapping, compiling, and managing Rust-based extensions. The project provides a cross-language memory manager that handles buffers and object borrowing to ensure safe memory access between Rust and JavaScript. It enables the mapping of data types and function calls across the language boundary, allowing Rust functions to be exported to the script environment and JavaScript functions to be called from Rust. The f
Bindings for writing native Node.js modules in Rust.
wasm-pack is a build tool and workflow orchestrator for compiling Rust code to WebAssembly. It coordinates the compilation process and generates the JavaScript glue code required to execute Rust logic within web browsers and server-side runtimes. The tool manages binary optimization to reduce file sizes and improve execution speed. It also functions as a package manager, bundling compiled WebAssembly modules into archives compatible with JavaScript registries and bundlers. The project covers language interoperability through the automatic generation of TypeScript type definitions. It further
Builds and publishes Wasm packages to npm.
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
Safe interop between Rust and C++.
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.
Generates Rust bindings for C/C++ libraries.
Rustler ist ein nativer Funktions-Wrapper und ein Foreign-Function-Interface, das die Entwicklung von Hochleistungs-Erweiterungen für die BEAM-Virtual-Machine ermöglicht. Es dient als Brücke zum Schreiben nativer Funktionen in Rust, die aus Erlang-Umgebungen heraus aufgerufen werden können. Das Projekt konzentriert sich auf die Wahrung der Speichersicherheit, um Systemabstürze und Speicherbeschädigungen bei der Ausführung von kompiliertem Code zu verhindern. Dies erreicht es durch das Kapseln nativer Aufrufe in sichere Abstraktionen und das Anwenden der Eigentums- und Ausleihregeln von Rust auf das Management von externem Speicher und strukturierten Datenobjekten. Die Bibliothek bietet Mechanismen für die Datenkonvertierung zwischen Sprach-Typen und das Management von Ressourcenobjekten. Diese Funktionen ermöglichen das Übergeben von Referenzen auf strukturierte Daten in externen Code mit automatischer Speicherfreigabe durch den Garbage Collector der Runtime.
Bridge for creating Erlang NIF functions in Rust.
A project for generating C bindings from Rust code
Generates C header files from Rust source code.
High level Lua 5.5/5.4/5.3/5.2/5.1 (including LuaJIT) and Luau bindings to Rust with async/await support
High-level Lua bindings for Rust with async support.
ISO Prolog system implemented in Rust.
Rust <-> Python bindings
Python bindings for Rust.
“The Tie Between Ruby and Rust.”
Native Ruby extensions in Rust and vice versa.
Generate C# FFI from Rust for automatically brings native code and C native library to .NET and Unity.
Generates C# bindings for Rust.
A setuptools/wheel/cffi extension to embed a binary data in wheels
Distributes dynamic libraries in Python wheels.
Easy way to write Node.js module using Rust
Generates Node.js modules using Rust.
WebAssembly implementation from scratch in Safe Rust with zero dependencies
WebAssembly interpreter written in safe Rust.
Objective-C Runtime bindings and wrapper for Rust.
Objective-C runtime bindings for Rust.