I have succeeded in building a native version of Datalevin by writing a native image specific LMDB wrapper, here’s my experience doing so, it might be of interest to some of you https://yyhh.org/blog/2021/02/writing-c-code-in-javaclojure-graalvm-specific-programming/
@huahaiy This is very exciting. Thank you for taking the time to write this down and to invest the time to make datalevin work with GraalVM. I will consider making a babashka pod for it so we can use a datalog store from scripts :). @lee: added it to https://github.com/lread/clj-graal-docs/blob/master/doc/external-resources.md#articles
@borkdude , thanks for started me in going down this rabbit hole. It’s indeed exciting to work with native image in clojure. Thanks for including Datalevin as a babashka pod, please let me know if you need anything from me. I will spend time finishing the native command line shell for Datalevin.
looks really cool. I'm working on a similar project. How did you generate the code for? https://github.com/juji-io/datalevin/blob/master/native/src/java/datalevin/ni/Lib.java Was it manually generated or did you use a somewhat automated process?
I did it manually
I imagine it shouldn’t be hard to write a tool to generate it automatically from a header file. It’s pretty mechanical.
ah ok. that's what I'm doing