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/.
Saikyun 2020-06-14T14:23:17.388700Z

is it possible to declare functions as native when using gen-class? I found ACC_NATIVE here: https://github.com/clojure/clojure/blob/master/src/jvm/clojure/asm/Opcodes.java but it doesn't seem to be used anywhere in clojure

Saikyun 2020-06-15T07:01:44.395500Z

thanks 🙂

Saikyun 2020-06-14T14:23:50.389500Z

right now I've solved it by leaning on java-classes with native-declarations, but it'd be very useful if I didn't have to do that

Saikyun 2020-06-14T16:50:34.390600Z

in case anyone else needs it, I added support for it: https://github.com/Saikyun/clojure you can use ^:native in the same way as you use ^:static 🙂

Saikyun 2020-06-14T18:42:53.392Z

you can also just "add" a new gen-class , here's a repo where I utilize this "technique". tested with clojure-1.10.2-alpha1. https://github.com/Saikyun/native-image-clojure-c

alexmiller 2020-06-14T18:58:09.393100Z

I’ve run into this and there is a ticket for it in Clojure FYI

Saikyun 2020-06-14T18:59:57.393300Z

ah, cool. I couldn't find any tickets regarding this. it was a bit hard to search for "native" though, haha. 🙂 thanks for the info

alexmiller 2020-06-14T19:03:08.393700Z

https://clojure.atlassian.net/browse/CLJ-1409

alexmiller 2020-06-14T19:04:14.394200Z

Or https://ask.clojure.org/index.php/2393/add-support-for-marking-gen-class-methods-as-native?show=2612 if you want to vote for it

Saikyun 2020-06-14T19:04:41.394500Z

cool, thanks. would it be interesting with a pr? I'm not sure how you usually deal with these things 🙂

alexmiller 2020-06-14T20:22:03.395300Z

https://clojure.org/dev/dev for process