awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
libffi avatar

libffi/libffi

0
View on GitHub↗
4,281 stars·817 forks·C·21 viewssourceware.org/libffi↗

Libffi

libffi is a foreign function interface library that enables calling functions written in other languages at runtime. It serves as a multi-architecture ABI wrapper and dynamic call frame generator, allowing the execution of external functions based on runtime descriptions of argument types and return values.

The project provides a portable interface to handle diverse calling conventions across different hardware architectures and operating systems. It includes capabilities for executable closure allocation, which allows foreign code to trigger callbacks within a host language via jump tables stored in executable memory.

Beyond function invocation, the library manages low-level assembly stubs and utilizes call plan caching to reduce the overhead of mapping types to registers. It also includes a binary version script converter for transforming symbol-based version scripts between different linker formats.

Features

  • Foreign Function Interfaces - Provides a foreign function interface to call functions in other languages by dynamically constructing call frames.
  • Dynamic Call Frame Construction - Constructs function call stacks at runtime by arranging arguments in memory according to hardware calling conventions.
  • Assembly Stubs - Provides low-level assembly stubs to bridge generic function calls to hardware-specific register and stack layouts.
  • Multi-Architecture ABI Wrappers - Wraps diverse calling conventions across multiple hardware architectures and operating systems.
  • Calling Convention Abstractions - Supports various calling conventions like stdcall, thiscall, and fastcall across different hardware architectures.
  • Dynamic Call Frame Generators - Generates function call frames at runtime based on dynamic descriptions of argument and return types.
  • Language Interoperability - Enables execution of code across different programming languages using a portable interface for various calling conventions.
  • Portable Function Invocations - Executes compiled functions regardless of the target hardware calling convention through a portable interface.
  • Executable Memory Allocations - Allocates memory regions with execution permissions to store jump tables for redirecting foreign calls.
  • Function-Pointer Callbacks - Creates executable closures that allow native libraries to trigger logic and functions within the host language.
  • Executable Closure Allocations - Allocates memory with execution permissions to create function closures for external callbacks.
  • Executable Closure Providers - Generates executable closures that allow external programs to trigger callbacks within the host language via jump tables.
  • Call Plan Caches - Caches pre-calculated argument layouts to reduce the overhead of mapping types to registers for frequent calls.
  • General Libraries - Portable foreign-function interface library for C.
  • General Purpose Libraries - Portable foreign-function interface library.
  • Scripting and Bindings - Portable library for implementing foreign function interfaces.

Star history

Star history chart for libffi/libffiStar history chart for libffi/libffi

How this analysis was created: This summary and feature list are AI-generated from collected project material and can contain mistakes. Stars, license and language are imported from GitHub. Inclusion does not mean that we have tested or audited this project. Check the source documentation for any feature you depend on. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Projects sharing features with Libffi

These projects share indexed features with Libffi. Shared tags can include platform or build tooling; verify the primary use case before treating a result as a replacement.
  • pyo3/pyo3PyO3 avatar

    PyO3/pyo3

    15,344View on GitHub↗

    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

    Rustbindingffipython
    View on GitHub↗15,344
  • node-ffi/node-ffinode-ffi avatar

    node-ffi/node-ffi

    4,322View on GitHub↗

    node-ffi is a foreign function interface library for Node.js that enables calling functions from native C dynamic libraries without writing manual C++ bindings. It serves as a system for loading shared objects and DLLs into process memory, translating JavaScript values into binary representations, and executing external binaries at runtime. The project utilizes a wrapper around the libffi library to construct call frames and execute native functions with dynamic arguments. It distinguishes itself by providing a native memory manager for allocating raw pointers and a mapping system that connec

    JavaScript
    View on GitHub↗4,322
  • pyodide/pyodidepyodide avatar

    pyodide/pyodide

    14,685View on GitHub↗

    This project provides a full Python interpreter compiled to WebAssembly, enabling the execution of Python code and scientific libraries directly within web browsers and server-side environments. By bridging the gap between language runtimes, it allows developers to run computational tasks, manage packages, and perform data analysis in client-side environments without requiring a backend server. The platform distinguishes itself through a comprehensive foreign function interface that enables bidirectional data exchange, object proxying, and function calling between Python and JavaScript. It in

    Pythonpythonwebassembly
    View on GitHub↗14,685
  • java-native-access/jnajava-native-access avatar

    java-native-access/jna

    8,916View on GitHub↗

    JNA is a foreign function interface and native memory mapper that allows Java applications to call functions in shared native libraries without writing custom JNI wrapper code. It serves as a JNI alternative framework for invoking C functions and mapping native data structures using high-level interfaces. The library distinguishes itself through its ability to translate Java objects and primitives into C-style structs, unions, and pointers for cross-platform memory exchange. On Windows, it provides a dedicated toolkit for interacting with Component Object Model objects using both early and la

    Java
    View on GitHub↗8,916
Compare all 30 related projects→

Frequently asked questions

What does libffi/libffi do?

libffi is a foreign function interface library that enables calling functions written in other languages at runtime. It serves as a multi-architecture ABI wrapper and dynamic call frame generator, allowing the execution of external functions based on runtime descriptions of argument types and return values.

What are the main features of libffi/libffi?

The main features of libffi/libffi are: Foreign Function Interfaces, Dynamic Call Frame Construction, Assembly Stubs, Multi-Architecture ABI Wrappers, Calling Convention Abstractions, Dynamic Call Frame Generators, Language Interoperability, Portable Function Invocations.

Which projects share features with libffi/libffi?

Projects with overlapping indexed features include: pyo3/pyo3 — This project provides a framework for binding Rust and Python, enabling the creation of native extension modules and… node-ffi/node-ffi — node-ffi is a foreign function interface library for Node.js that enables calling functions from native C dynamic… pyodide/pyodide — This project provides a full Python interpreter compiled to WebAssembly, enabling the execution of Python code and… java-native-access/jna — JNA is a foreign function interface and native memory mapper that allows Java applications to call functions in shared… y-crdt/y-crdt — This project is a memory-safe library implemented in Rust that provides a high-performance engine for managing shared,… bytedeco/javacpp — JavaCPP is a JNI C++ bridge and foreign function interface that provides a binding generator, a native library loader,…