Discuss GraalVM related topics. Use clojure 1.10.2 or newer for all new projects. Contribute to and GraalVM slack:
borkdude 2020-02-27T11:11:26.058100Z

Clojure Rust GraalVM example updated: Now uses a Rust library to get the amount of free memory and displays it in EDN.

borkdude 2020-02-27T13:32:06.059200Z

@retrogradeorbit Included your cool trick of storing the lib in ~/.clojure_rust and loading it from there now:

borkdude 2020-02-27T13:43:47.059700Z

@retrogradeorbit Where are the functions that you are calling from Clojure to C location in your source?

borkdude 2020-02-27T13:44:15.060Z

I mean the Clojure part calling into C

Crispin 2020-02-27T13:45:53.060700Z

for all of them just grep for SpireUtils

borkdude 2020-02-27T13:46:38.061200Z

ah here you define the native things in Java: so it looks like you're also using JNA right?

Crispin 2020-02-27T13:47:40.061900Z

not JNA, no. graal doesnt support JNA

borkdude 2020-02-27T13:47:52.062100Z

sorry JNI

Crispin 2020-02-27T13:48:01.062300Z

yep JNI

Crispin 2020-02-27T13:48:24.062800Z

so is used to generate SpireUtils.h

zilti 2020-02-27T13:48:32.063100Z

JNI is more performant anyway, right?

Crispin 2020-02-27T13:49:24.063600Z

yep. significantly more performant. but much more ceremony around it

Crispin 2020-02-27T13:49:42.064Z

JNA is almost magical.

Crispin 2020-02-27T13:49:52.064200Z

header file is generated here:

Crispin 2020-02-27T13:50:10.064900Z

so in JDK8 there was a special tool javah

Crispin 2020-02-27T13:50:22.065200Z

in JDK11 its bundled into javac

borkdude 2020-02-27T13:51:06.065600Z

Awesome. I added this to the graal docs repo: If you have anything to add there, feel free.

Crispin 2020-02-27T13:53:13.066Z

I can add some stuff sure

borkdude 2020-02-27T14:32:51.066300Z

I think adding the remarks about javah / javac could definitely be useful

Crispin 2020-02-27T14:35:07.066900Z

Yeah I will write a quick summary for the C library case.

Crispin 2020-02-27T16:02:09.067300Z

borkdude 2020-02-27T16:05:01.067700Z

🙏 :thanks: