Replies: 2 comments 21 replies
-
Hey @aalmiray I have a couple of resources for you to look at:
You can also find other native-image and other GraalVM related posts here https://github.com/neomatrix369/awesome-graal/blob/master/blog-posts.md I hope this helps - maybe you wish to accomplish this in another way, but UPX seems to be the most portable and one of the widely tested ways to get around this. It is of course after the fact the native-image builder creates the native-image, and does not solve the issue at build/image creation level. |
Beta Was this translation helpful? Give feedback.
-
Thanks for opening the discussion, @aalmiray. What's the easiest way to reproduce such a build? I'd like to run it through the Dashboard. |
Beta Was this translation helpful? Give feedback.
-
I'm currently looking at options to generate a native image executable for the jreleaser/jreleaser CLI. Current settings create an image close to 100M in size and I wonder what could be done to shrink it down.
All classes found int he
org.jreleaser.*
packages should be included in the image. There are a few places where proxy and reflection config must be declared. Most of the codebase is reflection free but external configuration is read through Jackson (hence reflection), some network services require reflection/proxies as well (Feign, Hub4j, Twitter4j).I used the agent to gather information and ended up manually updating the generated files into https://github.com/jreleaser/jreleaser/tree/graal/apps/jreleaser/src/main/resources/META-INF/native-image/org.jreleaser/jreleaser
This manual update is likely responsible for the growth in size.
Additionally every project generates reflect and proxy config files using custom APT. See attached ZIP with all generated files
native-image.zip
The executable is created passing these additional command flags:
Beta Was this translation helpful? Give feedback.
All reactions