clj-easy / graalvm-clojure

This project contains a set of "hello world" projects to verify which Clojure libraries do actually compile and produce native images under GraalVM.
Apache License 2.0
497 stars 45 forks source link

Explicitly use graalvm env in project #32

Closed burinc closed 3 years ago

burinc commented 3 years ago

Hi @BrunoBonacci

Thanks for creating the library for us all. I like to add this PR to make it easier to compile and build native-image with JDK/GraalVM. It introduce the variable/env GRAALVM_HOME to project.clj and use the variable with lean-shell script.

I tested this out with the aws-s3-api example and it works very well.

This make it possible to build uberjar with other JDK (e.g. non-graalvm) while ensure that the native-config and native-image steps are using this env as part of the command.

Also I updated the sample-project with basic instruction and the same config for other to use.

Best, Burin