|
Hello, is it somehow possible to create custom bindings for LWJGL which do not need to be directly integrated into the We are using LMDB as database backend for https://github.com/eclipse-rdf4j/rdf4j and I want to investigate if https://github.com/datalevin/dlmdb/ is a better alternative for our usage scenario. Thank you and best regards, |
Replies: 2 comments 3 replies
|
For LMDB specifically, LWJGL already ships an The normal LWJGL distribution is module-based: core is required and bindings are optional modules. In this repo, LMDB is listed as If you want to use LMDB from Java, the simplest path is to depend on the existing If you mean "can I use LWJGL's generator for my own external binding without adding a module under |
|
Hey @kenwenzel, LWJGL builds LMDB into a JNI library with dedicated native methods. Even if the dlmdb API is compatible, there's no way to replace the lwjgl_lmdb binary with another build, because it will be lacking the JNI functions that Java needs. If datalevin can afford to require JDK 25 or newer, my recommendation would be: build dlmdb into a standard .so and use the Otherwise, it's either a new module in LWJGL as you said, or you can get creative with the existing lmdb module (replace the C source with dlmdb and add any new API in the existing bindings). |
Hey @kenwenzel,
LWJGL builds LMDB into a JNI library with dedicated native methods. Even if the dlmdb API is compatible, there's no way to replace the lwjgl_lmdb binary with another build, because it will be lacking the JNI functions that Java needs.
If datalevin can afford to require JDK 25 or newer, my recommendation would be: build dlmdb into a standard .so and use the
org.lwjgl.system.ffmAPI in LWJGL 3.4.0+ to create custom FFM-based bindings.SegmentStackprovides the equivalentMemoryStackfunctionality for FFM segments, however it is trivial to convert between NIO buffers andMemorySegmentif necessary.Otherwise, it's either a new module in LWJGL as you said, or you can get creat…