Skip to content

Latest commit

 

History

History
34 lines (19 loc) · 3.06 KB

0000-graalvm-jdk.md

File metadata and controls

34 lines (19 loc) · 3.06 KB

Add support for Oracle GraalVM and update GraalVM CE buildpack

Summary

We will modify the Oracle Buildpack to include support for the new Oracle GraalVM distribution.

In addition, the existing graalvm buildpack will be clarified to indicate that it is the GraalVM Community buildpack. We cannot change its ID, but we will update the README and metadata to clarify this point.

Motivation

There are multiple motivations for this RFC:

  1. Oracle has introduced Oracle GraalVM, a new and free GraalVM distribution that provides advanced features including G1 GC, SBOM, as well as performance and size optimizations. A new buildpack for Oracle GraalVM will, for example, allow Spring users to build more efficient and secure microservices.
  2. The graalvm buildpack only supports GraalVM Community Edition. Since this is only one of many GraalVM distributions (Community Edition, Oracle GraalVM, Liberica NIK, Mandrel, ...), it makes sense to adjust the name and the README of the buildpack, so that it is clear to users which distribution the buildpack includes (Community Edition).
  3. The latest GraalVM release has dropped the GraalVM version in favor of the Java version, which may simplify the implementation and maintenance of the buildpack.
  4. Due to the alignment with OpenJDK, GraalVM is becoming more and more a standard JDK with Native Image support. The GraalVM Updater will be deprecated in the GraalVM for JDK 21 release and removed in the future.

Detailed Explanation

This RFC proposes to address the items listed under Motivation as follows:

  1. Update the Oracle Buildpack to support Oracle GraalVM. This will work just like what we have with the present Bellsoft Liberica buildpack, where the buildpack can provide a JVM and Native image tools.
  2. Update the README & buildpack metadata for the existing GraalVM buildpack to indicate it is specifically for the GraalVM Community release.

For more details, please see the proof of concept.

Rationale and Alternatives

Alternatively, the existing graalvm buildpack could be reworked and extended with support for Oracle GraalVM. For this, we would need to offer an environment variable such as $BP_DISTRIBUTION for users to select a specific GraalVM distribution. However, that would be somewhat inconsistent with the bellsoft-liberica buildpack, which also includes a GraalVM distribution. Having separate buildpacks for different GraalVM distributions is also more consistent with the Java buildpacks.

Implementation

See the Details section. The implementation plan as well as a proof of concept PR are documented there.