This makes it possible to build a native image for MacOS M1🎉.
I’ve tried it out and it blew my mind: A native executable of about 85 MB containing the whole (ok a small) Quarkus + AxonFramework + UI application that starts in 0,064 seconds.
First of all: Great work . I intentionally didn’t write an extension because I knew that this is a lot of work .
It’s been a while since I contributed to Quarkus and I’ve never wrote an extension. So I won’t be a big help for you regarding that.
At least I can share my main struggle with the native image build and how I resolved it:
The native image build removes Reflection and other things (Tips for writing native applications). To overcome this, there are configuration files and I’m sure also programatic ways in an extension.
I started with some manual configuration entries and hopped from one error message to the next. My final solution was then to generate these configuration files by running integration tests with activated Native Image Agent. I’ve documented it in WALKTHROUGH.md - Native Image and README.md - Native Image
Unfortunately, I needed to deactivate my fully automated approach using a GitHub Actions workflow since the generated json files were corrupted due to some (I presume) race conditions when Quarkus is stopped. Nevertheless, the configuration files are “good enough” for my small showcase.
Another thing that helped me a lot in hindsight is to rely as much as possible on already included things in Quarkus. For examples: I let CDI do all the heavy lifting and rely on how it is implemented in Quarkus (called ArC).
Let me know if this was helpful or share a concrete error message to dig deeper.