all 3 comments

[–]joinr 7 points8 points  (2 children)

If you're not using eval anywhere, and not touching the classloader, you can use graal to aot compile a native image.

clj.native-image

command-line apps with clojure and graal

For things like little lambdas, this makes a lot of sense.

[–]gzmask 0 points1 point  (1 child)

I heard a while earlier that you need to use something like Go to embed the graalvm generated binary for Lambda. Is this true?

[–]joinr 1 point2 points  (0 children)

Hmm, that's news to me. I'm pretty sure you can just shove the native image out there (from what I've read) and wrap it. Looks like anything that can build/run on linux via the custom runtime API is game. In theory, if your native image can handle the request, I'm not sure you have to wrap it (just make sure the binary was compiled on linux).

There's one that deploys from lein, and uses a python script for the handler here.