29 repository-uri
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 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.
Generates Rust bindings for C/C++ libraries.
Rustler este un wrapper de funcții native și o interfață de funcții străine (FFI) care permite dezvoltarea de extensii de înaltă performanță pentru mașina virtuală BEAM. Servește ca o punte pentru scrierea funcțiilor native în Rust care pot fi apelate din medii Erlang. Proiectul se concentrează pe menținerea siguranței memoriei pentru a preveni blocajele sistemului și coruperea memoriei atunci când se execută cod compilat. Realizează acest lucru prin încapsularea apelurilor native în abstracții sigure și aplicarea regulilor de ownership și borrowing din Rust pentru gestionarea memoriei externe și a obiectelor de date structurate. Biblioteca oferă mecanisme pentru conversia datelor între tipurile de limbaj și gestionarea obiectelor de resurse. Aceste capabilități permit transmiterea referințelor către date structurate în cod extern cu eliberarea automată a memoriei prin garbage collector-ul runtime-ului.
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.