Fork me on GitHub
#graalvm
<
2020-12-23
>
mafcocinco17:12:05

Could someone point me to a build configuration (i.e. something like compile.sh from the hello-world example) that works when using aleph for HTTP client? I seem to be getting a good deal of errors around io.netty.channel.* classes, with a recommendation from the compiler that I include a --initialize-at-run-time flag for the each offending object. I was hoping I would not have to do each individually but perhaps that is the only way.

mafcocinco17:12:50

additional context: I’m working off of this example, though it seems to be creating a server while I’m using the http client: https://github.com/BrunoBonacci/graalvm-clojure/tree/master/aleph. Not sure if that makes a difference.

borkdude18:12:12

@mafcocinco never tried aleph to native, but http-kit 2.5.0 works very well with graalvm. also https://github.com/borkdude/babashka.curl works cross platform (small wrapper around curl).

borkdude18:12:20

Clj-http-lite works well too.

mafcocinco18:12:04

cool. I’ll just use http-kit if it works. thanks.

borkdude18:12:28

@mafcocinco babashka already bundles http-kit, so you can also use that as a native client

valerauko19:12:44

getting netty to compile for native-image needs that you profile it beforehand with realistic workloads so it knows what gets used

valerauko19:12:03

i was analyzing it with -agentlib:native-image-agent=config-output-dir=./resources