Fork me on GitHub
#graalvm
<
2020-01-10
>
jaihindhreddy13:01:54

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?

jaihindhreddy13:01:14

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

jaihindhreddy13:01:07

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.

borkdude13:01:23

@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.

jaihindhreddy15:01:08

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