29 dépôts
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 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.
Generates Rust bindings for C/C++ libraries.
Rustler est un wrapper de fonction native et une interface de fonction étrangère (FFI) qui permet le développement d'extensions haute performance pour la machine virtuelle BEAM. Il sert de pont pour écrire des fonctions natives en Rust qui peuvent être appelées depuis des environnements Erlang. Le projet se concentre sur le maintien de la sécurité mémoire pour éviter les plantages du système et la corruption de la mémoire lors de l'exécution de code compilé. Il y parvient en enveloppant les appels natifs dans des abstractions sûres et en appliquant les règles de propriété et d'emprunt de Rust à la gestion de la mémoire externe et des objets de données structurés. La bibliothèque fournit des mécanismes pour la conversion de données entre les types de langage et la gestion des objets de ressources. Ces capacités permettent de passer des références à des données structurées dans du code externe avec une libération automatique de la mémoire via le garbage collector du 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.