News for hackers. Stuff that matters.
Re:Compiling Java into Native Binaries with Graal and Mill by nomercy400 on Tuesday February 04, 2025 @06:12AM (#42930937)
How do you compile to multiple platforms? Do you have separate machines for each platform?

Do you use any cli library in front? Is 12-20mb acceptable for a cli executable?

Working on a cli tool poc for work here, hence the interest.

Re:Compiling Java into Native Binaries with Graal and Mill by sgammon on Tuesday February 04, 2025 @06:13AM (#42930947)
Sorry, I know you weren't asking me, but for this same use case, yes, I've used a GHA build matrix with each OS/arch pair.

Cosmo/APE support would fix this, and GraalVM already ships with a Musl libc implementation, so it isn't very far off.

https://github.com/oracle/graal/issues/8350

Re:Compiling Java into Native Binaries with Graal and Mill by killingtime74 on Tuesday February 04, 2025 @03:09PM (#42937898)
Like the other poster, we have to compile it separately on different architecture machines (we are on Bitbucket). We use Quarkus as the base and picocli as the cli https://quarkus.io/guides/picocli. Quarkus takes care of a lot and makes the native image experience nicer. Size wise, for internal use our users don't complain, since we are all devs.

I think you can shrink the size with one of the optimisation levels https://www.graalvm.org/latest/reference-manual/native-image...