graalvm

Discuss GraalVM related topics. Use clojure 1.10.2 or newer for all new projects. Contribute to https://github.com/clj-easy/graal-docs and https://github.com/BrunoBonacci/graalvm-clojure. GraalVM slack: https://www.graalvm.org/slack-invitation/.
Huahai 2021-02-08T22:38:37.130Z

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/

borkdude 2021-02-08T22:47:16.131400Z

@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

👍 2
1
Huahai 2021-02-08T22:49:08.133500Z

@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.

👍 3
phronmophobic 2021-02-08T22:49:22.133600Z

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?

Huahai 2021-02-08T23:38:26.135Z

I did it manually

Huahai 2021-02-08T23:39:08.135200Z

I imagine it shouldn’t be hard to write a tool to generate it automatically from a header file. It’s pretty mechanical.

phronmophobic 2021-02-08T23:39:42.135500Z

ah ok. that's what I'm doing