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/.
jaihindhreddy 2020-01-10T13:05:54.081800Z

This question might not belong here. Feel free to moderate... I have a repo with some Clojure, and I'm looking to take just 3 functions and compile them to native-images and deploy them as Lambdas. And in doing so, is it possible to put only the deps of that fn in the native-image?

jaihindhreddy 2020-01-10T13:06:14.082400Z

In other words, can I compile a fn and only it's dependencies from a repo?

jaihindhreddy 2020-01-10T13:07:07.083500Z

The idea is, I want to maintain what is logically one service, in one repo, but it'll have a bunch of serverless bits in it.

borkdude 2020-01-10T13:09:23.085100Z

@jaihindhreddy I support something similar with babashka + carve. With babashka you can build an uberscript, which means it will generate a file with all required namespaces inside of it. And then with carve you can delete all unused bits. https://github.com/borkdude/carve But GraalVM itself already will eliminate all unused bits similar to Google Closure for CLJS, so just using those 3 functions from your -main will probably be enough.

jaihindhreddy 2020-01-10T15:10:08.086300Z

Wow. Didn't know Graal did that. I'll read more about that? Will check out babashka. Thanks a lot!