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/.
chrisn 2021-03-19T18:49:55.008300Z

@borkdude - I have avclj compiling down into a graal native executable that generates video - https://github.com/cnuernber/avclj

phronmophobic 2021-03-19T18:50:45.008900Z

is the main Idea using the stuff in JDK-16 instead of jna?

chrisn 2021-03-19T18:51:04.009200Z

Graal native has literally nothing to do with JDK-16 or JNA.

borkdude 2021-03-19T18:51:44.009700Z

congrats :)

phronmophobic 2021-03-19T18:52:09.009800Z

I'm just curious how the c ffi is done.

chrisn 2021-03-19T18:53:03.010Z

I wrote a new dtype-ffi driver.

chrisn 2021-03-19T18:53:35.010100Z

One second, doing a release because I missed some files in the check-in.

chrisn 2021-03-19T18:54:11.010300Z

It takes the same library definition as before but outputs a static class. That uses all the graal native C stuff in order to cause the system to link with the libraries when graal builds the executable.

phronmophobic 2021-03-19T18:55:12.010500Z

oh ok. I haven't look at JDK-16, but it seemed plausible that its cffi might be graalvm compatible.

chrisn 2021-03-19T18:55:42.010800Z

Not in the least.

chrisn 2021-03-19T18:55:53.011Z

Not even closely compatible at this time. Maybe in the future.

chrisn 2021-03-19T18:56:04.011200Z

JDK-16 is way better and more flexible.

Huahai 2021-03-19T21:39:53.012900Z

i saw some jdk.incubator.foreign classes, so does it rely on some jdk16 features?

chrisn 2021-03-19T22:16:49.013700Z

No not at all. My graal install is jvm 1.8

chrisn 2021-03-19T22:17:50.014500Z

The system will automatically use what is installed favoring JNA over JDK-16. But for this pathway I hardcoded it for https://github.com/cnuernber/avclj/blob/master/native_test/avclj/main.clj.

Huahai 2021-03-19T22:35:37.016500Z

since tech.v3.datatype.ffi.graalvm only works for graalvm, i believe, one has to have write another ffi if running on jvm?

Huahai 2021-03-19T22:36:51.017600Z

i saw that you asked in graalvm channel if they are going to unify these, that’s what I wanted to know as well.

Huahai 2021-03-19T22:37:31.018300Z

otherwise, it’s a pity having to write two versions of ffi every time, which is what i am doing in datalevin right now