4 个仓库
Mapping managed methods to C-style function pointers for native-to-managed invocation.
Distinct from Native Library Integrations: Distinct from general integrations as it specifically enables the native library to trigger logic within the VM.
Explore 4 awesome GitHub repositories matching programming languages & runtimes · Native Callbacks. Refine with filters or upvote what's useful.
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
Maps high-level methods to C-style function pointers so native libraries can trigger logic within the runtime.
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,
Implements high-performance callbacks to allow native libraries to trigger logic within the managed runtime.
JavaCPP 是一个 JNI C++ 桥接器和外部函数接口,提供绑定生成器、原生库加载器和原生内存管理器。它自动化了在原生 C++ 头文件和共享库周围创建 Java 包装器的过程,以实现两种语言之间的互操作性。 该项目具有一个 C++ 绑定生成器,可解析头文件以自动生成调用原生函数所需的胶水代码和接口。它包含一个原生库加载器,可定位并从类路径中提取特定平台的二进制文件到本地缓存中以供运行时执行。 该系统通过直接指针映射和资源跟踪来管理高性能原生内存访问,以防止内存泄漏。它处理 C++ 数据结构的复杂类型映射,并支持原生回调映射以将函数指针链接到 Java 方法。 该工具集允许使用 C++ 或汇编实现替换托管方法,以优化执行时间并减少资源开销。
Maps Java methods to native function pointers or virtual functions so C++ code can trigger logic within the runtime.
node-ffi 是一个 Node.js 的外部函数接口库,无需编写手动 C++ 绑定即可调用原生 C 动态库中的函数。它作为一个系统,用于将共享对象和 DLL 加载到进程内存中,将 JavaScript 值转换为二进制表示,并在运行时执行外部二进制文件。 该项目利用 libffi 库的包装器来构建调用帧并使用动态参数执行原生函数。它的特色在于提供了一个用于分配原始指针的原生内存管理器,以及一个将复杂 C 结构映射到 JavaScript 对象的映射系统。 该工具包涵盖了广泛的原生互操作性功能,包括自动数据类型转换和创建可执行内存存根,允许原生库触发 JavaScript 回调。为了保持主线程响应能力,它支持异步执行模型,将原生函数调用卸载到单独的线程池中。
Maps JavaScript functions to C-style function pointers, allowing native libraries to trigger logic within the runtime.