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/.
borkdude 2020-04-29T22:24:23.212600Z

I need an example how to return a String (or CCharPointer to a String) from a native Graal library and how to read it from Java (or another Graal native application for that matter. I have tried this: https://github.com/borkdude/babashka/blob/7e31aedaff0d19caa8bb55f57636dc8b3ee8f0ce/libhsqldb/src/org/babashka/LibHsqlDb.java#L15 for the library and this for the program calling that library: https://github.com/borkdude/babashka/blob/7e31aedaff0d19caa8bb55f57636dc8b3ee8f0ce/src-java/org/babashka/LibHsqlDb.java#L4 but this results in a fatal error: https://github.com/borkdude/babashka/issues/397#issuecomment-621481269 I'm not so familiar with all this JNI stuff, so any help would be appreciated.

gklijs 2020-04-30T09:11:22.212700Z

Does it really needs to be a String? String's have some weird things, I think a char array would be simpler?

borkdude 2020-04-30T09:18:14.212900Z

I'm now trying a Char pointer: https://github.com/borkdude/babashka/issues/397