18 مستودعات
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 هي مكتبة نصوص ديناميكية بلغة C توفر غلافاً لإدارة الذاكرة للنصوص المخصصة في الذاكرة العشوائية (heap). تنفذ المكتبة تخزيناً آمناً ثنائياً (binary-safe) عبر تتبع أطوال النصوص بشكل صريح، مما يسمح للمكتبة بالتعامل مع الأحرف الفارغة (null characters) داخل البيانات. تتميز المكتبة ببنية ذاكرة تستخدم مؤشرات دوال قابلة للتبديل للتخصيص والتحرير، مما يتيح دمج مديرات ذاكرة مخصصة. كما تستخدم تتبع الطول المخزن في الترويسة (header) لتوفير استرجاع للطول في زمن ثابت، وتحافظ على حشوة (padding) للنصوص المنتهية بـ null لضمان التوافق مع دوال النصوص القياسية في C. تغطي مجموعة الأدوات نطاقاً واسعاً من قدرات معالجة النصوص، بما في ذلك الربط، والتقسيم إلى رموز (tokenization)، والدمج، واستخراج النطاقات. كما توفر أدوات مساعدة لتعديل المخزن المؤقت في مكانه، مثل القص والتشذيب، وتتضمن بدائل محسنة لتنسيق النصوص بدلاً من دوال الطباعة القياسية.
Provides interchangeable function pointers for allocation and freeing to enable custom memory managers.
Rhai هو محرك برمجة نصية مضمن ولغة ذات كتابة ديناميكية مصممة للدمج في تطبيقات Rust. يعمل كمترجم لشجرة بناء الجملة المجردة (AST) وطبقة تداخل أصلية، مما يسمح للمطورين بربط أنواع ووظائف Rust ببيئة برمجة نصية للتواصل ثنائي الاتجاه. يعمل المشروع كإطار عمل لإنشاء لغات خاصة بالمجال (DSL) قابلة للتخصيص. يسمح بتعريف عوامل تشغيل مخصصة، وبناء جملة، وبيئات تنفيذ مقيدة، مما يتيح إنشاء لغات متخصصة ذات مجموعات وظيفية مصممة خصيصاً. يغطي المحرك مجموعة واسعة من القدرات بما في ذلك الحماية (Sandboxing) المحدودة الموارد للتنفيذ الآمن، وتنظيم الكود المعياري، ومعالجة البيانات الشاملة للأنواع الرقمية والنصية والثنائية. كما يوفر أدوات لمعالجة AST، وتسلسل حالة التنفيذ، وقابلية المراقبة في وقت التشغيل من خلال فحص مكدس الاستدعاءات وواجهات التصحيح. تم تصميم المحرك للنشر عبر المنصات على أي وحدة معالجة مركزية أو نظام تشغيل مدعوم من المترجم الأصلي.
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 هو جسر JNI C++ وواجهة وظائف خارجية توفر مولد ربط، ومحمل مكتبة أصلية، ومدير ذاكرة أصلية. يقوم بأتمتة إنشاء أغلفة Java حول رؤوس C++ الأصلية والمكتبات المشتركة لتمكين التوافق بين اللغتين. يتميز المشروع بمولد ربط C++ يحلل ملفات الرأس لإنتاج كود الغراء والواجهات اللازمة لاستدعاء الوظائف الأصلية تلقائياً. يتضمن محمل مكتبة أصلية يحدد ويستخرج الملفات الثنائية الخاصة بالمنصة من مسار الفئة (classpath) إلى ذاكرة تخزين مؤقت محلية للتنفيذ في وقت التشغيل. يدير النظام الوصول إلى الذاكرة الأصلية عالية الأداء من خلال تعيين المؤشر المباشر وتتبع الموارد لمنع تسرب الذاكرة. يتعامل مع تعيين الأنواع المعقدة لهياكل بيانات C++ ويدعم تعيين رد الاتصال الأصلي لربط مؤشرات الوظائف بطرق Java. تسمح مجموعة الأدوات باستبدال الطرق المدارة بتنفيذات C++ أو التجميع لتحسين وقت التنفيذ وتقليل حمل الموارد.
Links native function pointers or virtual functions to Java methods, allowing C++ code to trigger runtime logic.
Asterinas هو نواة نظام تشغيل آمنة للذاكرة مصممة لمنع سباقات البيانات وتلف الذاكرة. تعمل كنواة متوافقة مع Linux-ABI، مما يتيح تنفيذ ملفات Linux الثنائية الحالية وأحمال عمل الحاويات مع توفير نموذج توزيع نظام تشغيل تصريحي. يتميز المشروع بكونه مضيف حاويات آلة افتراضية ونظام تشغيل ضيف للحوسبة السرية، مما يسمح له بالعمل داخل بيئات تنفيذ موثوقة معزولة بالأجهزة مثل Intel TDX. ينفذ قاعدة حوسبة موثوقة دنيا عن طريق عزل العمليات غير الآمنة منخفضة المستوى ويفصل آليات النواة الأساسية عن تنفيذات السياسات المحددة. يغطي النظام مجموعة واسعة من القدرات، بما في ذلك إدارة الذاكرة الفيزيائية والافتراضية، والمعالجة المتعددة المتماثلة، وتجريد الأجهزة لمختلف معماريات CPU. كما يتضمن دعمًا لأوقات تشغيل الحاويات الآمنة، ومجموعة شاملة من بدائيات الشبكات والمقابس (sockets)، وسلسلة أدوات متخصصة لتجميع النواة والمحاكاة. يدعم المشروع النشر متعدد المعماريات عبر منصات x86-64 و RISC-V 64 و LoongArch 64.
Implements kernel-level callback registration for coordinating subsystems such as logging and power management.
Walt هو مترجم (transpiler) ولغة مكتوبة تحول صيغة تشبه JavaScript إلى تنسيق WebAssembly الثنائي. تعمل كأداة لتطوير منطق عالي الأداء للمتصفحات وبيئات التشغيل عبر ترجمة كود المصدر المكتوب إلى تنسيق نص WebAssembly. يتضمن المشروع محملاً مدمجاً مع أداة التجميع (bundler) يقوم بأتمتة إعادة تجميع ملفات المصدر أثناء عملية البناء. ويوفر مديراً للذاكرة الخطية يستخدم لتحديد تخطيطات البيانات المخصصة، والهياكل، ومخصصات الذاكرة داخل كومة متجاورة. تدعم اللغة توقيعات الدوال المحددة، والأنواع الرقمية، والقدرة على تصدير الدوال والمتغيرات العامة أو استيراد دوال خارجية من بيئة المضيف. وتمكن من استخدام الإغلاقات الوظيفية (closures)، ومؤشرات الدوال، وتنظيم البيانات المهيكل عبر إزاحات الذاكرة الثنائية.
Implements callbacks by mapping function references to indices within a WebAssembly table.
node-ffi هي مكتبة واجهة دالة خارجية (Foreign Function Interface) لـ Node.js تتيح استدعاء الدوال من مكتبات C الديناميكية الأصلية دون الحاجة لكتابة روابط C++ يدوية. تعمل كنظام لتحميل الكائنات المشتركة (shared objects) وملفات DLL في ذاكرة العملية، وتحويل قيم JavaScript إلى تمثيلات ثنائية، وتنفيذ الملفات الثنائية الخارجية في وقت التشغيل. يستخدم المشروع غلافاً حول مكتبة libffi لبناء إطارات الاستدعاء وتنفيذ الدوال الأصلية بمدخلات ديناميكية. يتميز بتوفير مدير ذاكرة أصلي لتخصيص المؤشرات الخام ونظام تعيين يربط هياكل C المعقدة بكائنات JavaScript. تغطي مجموعة الأدوات نطاقاً واسعاً من قدرات التوافقية الأصلية، بما في ذلك التحويل التلقائي لأنواع البيانات وإنشاء كتل ذاكرة قابلة للتنفيذ تسمح للمكتبات الأصلية بتشغيل دوال رد النداء (callbacks) في JavaScript. وللحفاظ على استجابة الخيط الرئيسي، يدعم المشروع نموذج تنفيذ غير متزامن يقوم بنقل استدعاءات الدوال الأصلية إلى مجموعة خيوط منفصلة.
Creates executable memory stubs that map JavaScript functions as C-style function pointers for native library callbacks.
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 s
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.