I'm interested in updating bazel rules to build native-image binaries:
https://github.com/andyscott/rules_graal
to use 19.0.0. Unfortunately, native-image has been removed from the tarball that is distributed. Having a command to run to fetch native-image significantly complicates building these rules.
Is there a way to download a separate tarball with the native-image related files that haven't been included in 19.0.0?
Hi @johnynek, thanks for your interest in GraalVM.
Unfortunately we do not provide a separate tarball with Native Image.
You could download and extract the Native Image plugin from the release page, but you would also have to restore the symlinks and the permissions as specified in the metadata of gu (in the META-INF directory`).
It might be simpler to run gu install native-image, or to build a custom GraalVM which includes Native Image (see the README of the vm suite; mx --dynamicimports /substratevm build is a good starting point).
We are experimenting with this at Stripe, but building images for Mac and Linux with an unfamiliar build system seems like a time sink. Likewise, auditing gu and what network connections it is making is also a time sink. We network isolate our CI, so running some downloader program on each CI build isn鈥檛 something we鈥檇 want to do.
We will probably continue to use the RC releases and hope you consider publishing tarballs in the future.
What do you think of the following?
gu install --file PATH_TO_THE_INSTALLABLENote that 2. does not require network access.
Considering native-image is a lot of folks primary reason for using Graal, adding yet another installation step seriously seems ill advised.
The gu install still isn鈥檛 ideal. Bazel aims to be a hermetic build system. What do I need to execute gu? I have to declare all those inputs to bazel so it can reproducibly run that command in any environment without dependency on the local machine.
The tarball is much easier: I tell bazel to fetch a tarball and allow it to use everything on a path inside that tarball.
Thanks for the feedback, I understand your concern.
gu is a Java program that runs on GraalVM without external dependencies. To execute it, you do not need anything else than the GraalVM it comes with. Here you can see how the command line is generated: https://github.com/oracle/graal/blob/master/vm/mx.vm/gu
Most helpful comment
Considering native-image is a lot of folks primary reason for using Graal, adding yet another installation step seriously seems ill advised.