18 Repos
Mechanisms for mapping managed methods to native memory addresses so native libraries can trigger runtime logic.
Distinct from Functional Event Callbacks: Specifically about bridging managed methods as C-style function pointers, distinct from event-based callbacks in pure managed code.
Explore 18 awesome GitHub repositories matching programming languages & runtimes · Function-Pointer Callbacks. Refine with filters or upvote what's useful.
JSPatch is a JavaScript native bridge and method swizzler that allows for the dynamic injection of logic into a hosted native environment. It functions as a cross-language data mapper and execution engine, enabling the replacement of native function pointers with JavaScript wrappers to modify application behavior at runtime. The project provides the ability to perform runtime application patching by overriding native class methods and object properties. This allows for the modification of application logic and the application of hotfixes using JavaScript code loaded from local files or remote
Encapsulates JavaScript functions as native blocks to be executed as asynchronous callbacks by the host environment.
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
Enables mapping Java methods to native function pointers, allowing external libraries to trigger logic within the JVM.
HybridCLR is a hybrid C# execution engine and assembly loader designed for Unity. It provides a system for hot-updating C# logic across all platforms at runtime without requiring the application to be rebuilt or reinstalled. The project is distinguished by its mixed-mode execution, which runs unmodified code at native speed while using a high-performance interpreter for updated functions. It includes a generic type resolver that allows hot-updated code to use generic classes and functions regardless of whether they were pre-instantiated in the main binary. To protect proprietary source code,
Facilitates high-speed data exchange between the managed runtime and native languages via a specialized bridge.
BlocksKit is a low-level utility library for Apple platform development, specifically designed for managing the execution flow and memory of blocks within macOS and iOS applications. It provides a collection of helper functions to simplify the use of blocks in Objective-C and C, reducing boilerplate code and addressing inherent technical limitations. The library focuses on bridging Objective-C blocks with legacy C-based APIs by providing compatible wrapper structures and function-pointer emulation. It enables the passing of blocks through system interfaces that require strict C-style callback
Maps block invocations to standard function pointers to satisfy strict type requirements in low-level system interfaces.
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
Transfers Rust closures as function pointers to C++ for callback-based event handling.
CppGuide is a curated collection of educational resources and practical guides focused on C++ server development, Linux kernel internals, concurrent programming, network protocols, and security exploitation. It provides structured learning paths for backend developers, covering everything from interview preparation to building high-performance network servers and understanding operating system fundamentals. The guide distinguishes itself by offering in-depth, hands-on tutorials that walk through real-world implementations, including building a Redis-like server from scratch, designing custom
Documents registering function pointers for decoupled coordination between kernel subsystems.
Carp is a statically typed Lisp compiler that compiles Lisp-like syntax directly to C source code, enabling seamless integration with existing C libraries and low-level system programming. It manages memory deterministically at compile time using ownership tracking and linear types, eliminating garbage collection pauses and runtime overhead while ensuring type safety through an inferred static type system. The language distinguishes itself through compile-time macro expansion and metaprogramming capabilities, allowing code generation and transformation before final binary output. It enforces
Provides a mechanism to obtain void pointers to functions for low-level interoperability.
sds ist eine C-Bibliothek für dynamische Strings, die einen Wrapper für die Speicherverwaltung von Strings auf dem Heap bereitstellt. Sie implementiert binärsichere Speicherung durch explizite Längenverfolgung, wodurch die Bibliothek Null-Bytes innerhalb der Daten verarbeiten kann. Die Bibliothek zeichnet sich durch eine Speicherarchitektur aus, die austauschbare Funktionszeiger für die Speicherallokation und -freigabe verwendet, was die Integration benutzerdefinierter Speicherverwalter ermöglicht. Sie nutzt eine im Header gespeicherte Längenverfolgung für den Zugriff auf die String-Länge in konstanter Zeit und hält Null-terminiertes Padding im Puffer vor, um die Kompatibilität mit Standard-C-String-Funktionen zu gewährleisten. Das Toolkit deckt eine breite Palette an String-Manipulationsfunktionen ab, darunter Konkatenation, Tokenisierung, Zusammenfügen und Bereichsextraktion. Zudem bietet es Hilfsprogramme für die In-Place-Mutation von Puffern, wie z. B. Trimmen und Zuschneiden, sowie optimierte Alternativen zur String-Formatierung für Standard-Print-Funktionen.
Provides interchangeable function pointers for allocation and freeing to enable custom memory managers.
Rhai ist eine eingebettete Skript-Engine und eine dynamisch typisierte Sprache, die für die Integration in Rust-Anwendungen entwickelt wurde. Sie fungiert als Compiler für abstrakte Syntaxbäume (AST) und als native Interop-Schicht, die es Entwicklern ermöglicht, Rust-Typen und -Funktionen für eine bidirektionale Kommunikation in eine Skriptumgebung zu mappen. Das Projekt dient als Framework zur Erstellung anpassbarer domänenspezifischer Sprachen. Es erlaubt die Definition benutzerdefinierter Operatoren, Syntax und eingeschränkter Ausführungsumgebungen, was die Erstellung spezialisierter Sprachen mit maßgeschneiderten Funktionsumfängen ermöglicht. Die Engine deckt ein breites Spektrum an Funktionen ab, darunter ressourcenbeschränktes Sandboxing für sichere Ausführung, modulare Code-Organisation und umfassende Datenverarbeitung für numerische, String- und Binärtypen. Zudem bietet sie Werkzeuge für AST-Manipulation, Serialisierung des Ausführungszustands sowie Laufzeit-Observability durch Call-Stack-Inspektion und Debugging-Schnittstellen. Die Engine ist für den plattformübergreifenden Einsatz auf jeder CPU und jedem Betriebssystem konzipiert, das vom nativen Compiler unterstützt wird.
Provides mechanisms to map script-defined functions to native memory addresses so the host application can trigger runtime logic.
flutterrustbridge is a code generation tool that automatically creates type‑safe Dart bindings for Rust functions, enabling direct cross‑language calls between Flutter and a Rust backend. It provides an async FFI adapter that transforms synchronous Rust functions into Dart async methods with background thread management, a cross‑language object manager that wraps persistent Rust structs as Dart objects preserving state across calls, and trait object interop that converts Rust traits into Dart abstract classes for seamless bidirectional use. The project handles the full lifecycle of integrat
Enables Rust code to invoke Dart callbacks, supporting bidirectional communication between the two languages.
JavaCPP ist eine JNI-C++-Brücke und ein Foreign Function Interface, das einen Binding-Generator, einen Native-Library-Loader und einen Native-Memory-Manager bereitstellt. Es automatisiert die Erstellung von Java-Wrappern um native C++-Header und Shared-Libraries, um Interoperabilität zwischen beiden Sprachen zu ermöglichen. Das Projekt bietet einen C++-Binding-Generator, der Header-Dateien parst, um automatisch den notwendigen Glue-Code und die Interfaces für den Aufruf nativer Funktionen zu produzieren. Es enthält einen Native-Library-Loader, der plattformspezifische Binärdateien vom Classpath in einen lokalen Cache für die Laufzeitausführung lokalisiert und extrahiert. Das System verwaltet hochperformanten nativen Speicherzugriff durch direktes Pointer-Mapping und Ressourcen-Tracking, um Memory-Leaks zu verhindern. Es handhabt komplexes Type-Mapping für C++-Datenstrukturen und unterstützt natives Callback-Mapping, um Funktionszeiger mit Java-Methoden zu verknüpfen. Das Toolset ermöglicht den Ersatz verwalteter Methoden durch C++- oder Assembly-Implementierungen, um die Ausführungszeit zu optimieren und den Ressourcen-Overhead zu reduzieren.
Links native function pointers or virtual functions to Java methods, allowing C++ code to trigger runtime logic.
Asterinas is a memory-safe operating system kernel designed to prevent data races and memory corruption. It functions as a Linux-ABI compatible kernel, enabling the execution of existing Linux binaries and container workloads while providing a declarative operating system distribution model. The project distinguishes itself by acting as a virtual machine container host and a confidential computing guest OS, allowing it to run within hardware-isolated Trusted Execution Environments such as Intel TDX. It implements a minimal trusted computing base by isolating unsafe low-level operations and se
Implements kernel-level callback registration for coordinating subsystems such as logging and power management.
Walt ist ein Transpiler und eine typisierte Sprache, die eine JavaScript-ähnliche Syntax in das WebAssembly-Binärformat konvertiert. Er fungiert als Toolchain für die Entwicklung hochperformanter Logik für Browser und Laufzeitumgebungen, indem typisierter Quellcode in das WebAssembly-Textformat übersetzt wird. Das Projekt enthält einen in den Bundler integrierten Loader, der die Neukompilierung von Quelldateien während des Build-Prozesses automatisiert. Es bietet einen linearen Speichermanager, der zur Definition benutzerdefinierter Datenlayouts, Structs und Speicherallokatoren innerhalb eines zusammenhängenden Heaps verwendet wird. Die Sprache unterstützt definierte Funktionssignaturen, numerische Typen sowie die Möglichkeit, Funktionen und Globals zu exportieren oder externe Funktionen aus der Host-Umgebung zu importieren. Sie ermöglicht die Verwendung funktionaler Closures, Funktionszeiger und strukturierter Datenorganisation über binäre Speicher-Offsets.
Implements callbacks by mapping function references to indices within a WebAssembly table.
node-ffi ist eine Foreign Function Interface-Bibliothek für Node.js, die den Aufruf von Funktionen aus nativen C-Dynamic-Libraries ermöglicht, ohne manuelle C++-Bindings schreiben zu müssen. Sie dient als System zum Laden von Shared Objects und DLLs in den Prozessspeicher, zur Übersetzung von JavaScript-Werten in binäre Repräsentationen und zur Ausführung externer Binärdateien zur Laufzeit. Das Projekt nutzt einen Wrapper um die libffi-Bibliothek, um Call-Frames zu konstruieren und native Funktionen mit dynamischen Argumenten auszuführen. Es zeichnet sich durch einen nativen Speicher-Manager zur Allokation von Raw-Pointern und ein Mapping-System aus, das komplexe C-Strukturen mit JavaScript-Objekten verbindet. Das Toolkit deckt ein breites Spektrum an nativer Interoperabilität ab, einschließlich automatischer Datentyp-Übersetzung und der Erstellung ausführbarer Speicher-Stubs, die es nativen Bibliotheken erlauben, JavaScript-Callbacks auszulösen. Um die Reaktionsfähigkeit des Main-Threads zu erhalten, unterstützt es ein asynchrones Ausführungsmodell, das native Funktionsaufrufe in einen separaten Thread-Pool auslagert.
Creates executable memory stubs that map JavaScript functions as C-style function pointers for native library callbacks.
libffi ist eine Foreign Function Interface-Bibliothek, die das Aufrufen von Funktionen aus anderen Sprachen zur Laufzeit ermöglicht. Sie dient als ABI-Wrapper für mehrere Architekturen und als Generator für dynamische Call-Frames, was die Ausführung externer Funktionen basierend auf Laufzeitbeschreibungen von Argumenttypen und Rückgabewerten erlaubt. Das Projekt bietet eine portable Schnittstelle zur Handhabung verschiedener Aufrufkonventionen über unterschiedliche Hardwarearchitekturen und Betriebssysteme hinweg. Es enthält Funktionen für die Zuweisung ausführbarer Closures, die es fremdem Code ermöglichen, Callbacks innerhalb einer Host-Sprache über Sprungtabellen im ausführbaren Speicher auszulösen. Über den Funktionsaufruf hinaus verwaltet die Bibliothek Low-Level-Assembly-Stubs und nutzt Call-Plan-Caching, um den Overhead beim Mapping von Typen auf Register zu reduzieren. Sie enthält zudem einen Konverter für binäre Versionsskripte, um symbolbasierte Versionsskripte zwischen verschiedenen Linker-Formaten zu transformieren.
Creates executable closures that allow native libraries to trigger logic and functions within the host language.
uniffi-rs is a Rust FFI binding generator and multi-language binding tool. It functions as an automated binding scaffolder that creates type-safe foreign function interfaces and native wrappers for Rust libraries in languages such as Swift, Kotlin, and Python. The project provides a system for cross-language interface definition, allowing functions and data structures to be specified in a shared format to ensure consistent API signatures across platforms. It further serves as an FFI memory management layer, handling object lifetimes and thread safety when sharing state between Rust and foreig
Exports traits so foreign code can pass callback implementations into Rust functions.
Rusqlite is an embedded database interface and relational database driver that provides a client library for interacting with SQLite. It functions as an SQL query wrapper, enabling the management of local file-based or in-memory databases through a safe interface. The library allows for the extension of native database capabilities by implementing custom scalar functions, collations, and virtual tables. It also supports the embedding of the database engine directly into the application binary to remove external library dependencies. The project covers a broad range of capabilities including
Allows registering native application functions as callbacks that the database engine invokes during query execution.
Oils is a Unix shell interpreter and scripting language runtime that combines a modern shell language with POSIX and Bash compatibility. It functions as a structured data shell, integrating JSON and J8 formats to manage complex data without relying on string parsing. The system is distinguished by a C++ transpiled interpreter that converts a subset of Python source code into strongly typed C++ for high-performance execution. It features a garbage-collected typed runtime that supports prototype-based polymorphism, lexical closures, and reference-based variable mutation. To decouple shell logic
Provides the ability to send blocks of code as arguments to procedures for implementing callbacks.