Skip to content

Project Crema: Open World for Native Image #11327

Open
@alina-yur

Description

@alina-yur

TL;DR

Crema will lift Native Image's default closed-world assumption by allowing dynamic loading and execution of classes at run time. It builds upon Native Image Layers and the JDWP-based debugger by adding a Java interpreter to the application layer. This will significantly improve usability with libraries that produce JVM bytecode at run time. Additionally, it will enable dynamic loading of plugins, such as javac annotation processors.

Goals

  • When enabled, be able to dynamically load classes, link them to AOT-compiled classes, and execute their bytecodes.
  • Load classes from run time-created class loaders.
  • Load classes from build time-created class loaders after re-linking them to their classpath.
  • Configure which AOT classes can be linked to by dynamically loaded classes and which class loaders are enabled at run time.
  • In future releases Crema can also potentially provide a JIT compiler for the dynamically loaded bytecodes.

Non-Goals

  • It is not a goal to enable this capability by default, or to be able to add this capability to native images built prior to Crema.
  • It is not a goal to be able to fallback to classloading for classes that are included in the AOT image (although some "AOT" methods could be executed via the bytecode interpreter).

Metadata

Metadata

Type

No type

Projects

Status

In Progress

Relationships

None yet

Development

No branches or pull requests

Issue actions