Runtime loader for the prebuilt librockbox_ffi shared library, built on the Java Foreign Function & Memory API (JEP 454, stable since JDK 22).
Nothing is linked at build time: the library is located at runtime and every function is bound to a MethodHandle downcall. This mirrors include/rockbox_ffi.h — keep the descriptors in sync with the C ABI.
Runtime loader for the prebuilt librockbox_ffi shared library, built on the Java Foreign Function & Memory API (JEP 454, stable since JDK 22). Nothing is linked at build time: the library is located at runtime and every function is bound to a MethodHandle downcall. This mirrors include/rockbox_ffi.h — keep the descriptors in sync with the C ABI.
(abi-version)ABI major version of the loaded library (bumped on breaking changes).
ABI major version of the loaded library (bumped on breaking changes).
(call k & args)Invoke the C function bound to k. Args must already be the right JVM type
(use int/long/float/boolean/MemorySegment at the call site — the ABI does no
narrowing). Returns the boxed result, or nil for void functions.
Invoke the C function bound to `k`. Args must already be the right JVM type (use int/long/float/boolean/MemorySegment at the call site — the ABI does no narrowing). Returns the boxed result, or nil for void functions.
(take-string seg)Copy a heap C string returned by the ABI into a String, then free it. Returns nil for a NULL pointer (the ABI's error/absent signal).
Copy a heap C string returned by the ABI into a String, then free it. Returns nil for a NULL pointer (the ABI's error/absent signal).
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |