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/.
ghadi 2021-02-13T00:02:18.183700Z

thanks y'all

ericdallo 2021-02-13T00:23:45.183900Z

So, after a lot of debugging I started to wonder if babashka is really being compiled with those flags, I added this to babashka main first line:

(println (System/getProperty "borkdude.dynaload.aot"))
  (println (System/getProperty "clojure.compiler.direct-linking"))
  (println (System/getProperty "clojure.spec.skip-macros"))
Then I run:
script/uberjar
script/compile
and when running ./bb I get:

ericdallo 2021-02-13T00:24:12.184300Z

I'm probably missing something during the build, but could not figure it out 😔

ericdallo 2021-02-13T15:47:32.188200Z

About the UPX, the size of clojure-lsp was reduced from 107MB -> 29MB with a drawback of 300ms on the startup

👍 1
ericdallo 2021-02-13T15:47:55.188700Z

I'll do some tests but the trade-off for clojure-lsp looks good

🎉 1
ericdallo 2021-02-13T15:48:39.189100Z

Probably will use this action on the CI: https://github.com/svenstaro/upx-action

borkdude 2021-02-13T16:00:10.189500Z

Does it work on all platforms?

ericdallo 2021-02-13T16:00:35.190Z

the action say it does, I'll test if it works nice with graalvm compiled binaries yet