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-28T04:51:12.027300Z

That error indicate thats you are not compiling the native version of Datalevin, you are compiling the Java version that use JNR

Huahai 2021-02-28T04:51:57.027500Z

Native Datalevin does not use JNI at all, it uses the GraalVM SDK C API

Huahai 2021-02-28T04:57:14.027800Z

The decision on which version to use is made in Datalevin using a multimethod, which check whether or not it is running inside a GraalVM image. Even at the image build time, the code should be in GraalVM image so the native binding should be chosen, but somehow, yours is running in regular Java mode

Huahai 2021-02-28T05:00:52.028Z

Maybe point me to your repo so I can take a look at how you are compiling native image?

Huahai 2021-02-28T05:06:32.028200Z

ok, i found your datalevin branch

Huahai 2021-02-28T05:07:32.028400Z

you are depending on datalevin 0.3.17, which is the release before the work on native compilation, of course it won’t work

Huahai 2021-02-28T05:08:55.028600Z

I am going to release v0.4.0 today, as I just finished the native command line shell for datalevin

Huahai 2021-02-28T05:09:21.028800Z

v0.4.0 should work

Huahai 2021-02-28T06:23:13.029Z

also, you are right, i should bundle the dtlv.a in the library

Huahai 2021-02-28T06:25:34.029200Z

i am new to this business of releasing native code, so allow me sometime to get up to speed

Huahai 2021-02-28T06:58:08.029400Z

Created PR https://github.com/clojure-lsp/clojure-lsp/pull/347

Huahai 2021-02-28T06:58:24.029700Z

It compiles to native just fine.