graal/espresso
Gilles Duboscq f9942e8783 [GR-58460] Espresso: support constructors created by ReflectionFactory.
PullRequest: graal/18874
2024-09-25 09:21:37 +00:00
..
ci Add common CI files to gate predicates for sulong and espresso 2024-08-14 12:16:19 +02:00
docs Rename ContinuationExternalSerializer to ContinuationSerializable. 2024-06-27 13:11:04 +02:00
mx.espresso [GR-55586] Proguard fails when a dependency is a multi version jar with JDK-22 overlay. 2024-07-23 08:53:30 +02:00
src [GR-58460] Espresso: support constructors created by ReflectionFactory. 2024-09-25 09:21:37 +00:00
.gitignore
CHANGELOG.md Style pass and add CHANGELOG entry. 2024-06-03 08:48:48 +02:00
LICENSE
OWNERS.toml Add OWNERS file for espresso 2024-06-03 16:19:58 +02:00
README.md

README.md

Java On Truffle

Espresso is a full JVM capable of dynamic bytecode loading, written in Java using the Truffle framework. It can provide competitive performance when run on GraalVM.

It has some unique features:

  • Run Java code inside a sandboxed, isolated context using GraalVM's sandboxing features.
  • More comprehensive hotswap support than HotSpot, enabling you to easily patch code whilst the app is running by just recompiling your project in your IDE whilst attached with the debugger. Your app can react to HotSwap events in order to fix up internal state when needed.
  • Can be used to dynamically load and run Java from inside an ahead of time compiled native image.
  • Can be used to isolate and call code that requires an older Java version on a newer host JVM.

Why implement a JVM in Java?

  • It's easy to understand and work on. Adding features is easy. See How Espresso Works.
  • Full self-hosting (meta-circularity) is a common goal for programming languages, as it proves they are fully general enough to implement themselves.
  • It highlights the sublime potential of the GraalVM as a platform for implementing high-performance languages and runtimes.

Status

Espresso is a complete Java implementation which is kept up to date with the latest LTS JDK versions. When the VM is compiled to a native image it runs on Windows, macOS and Linux.

It features complete meta-circularity: it can run itself any amount of layers deep, preserving all the capabilities (Unsafe, JNI, Reflection...) of the base layer. Running HelloWorld on three nested layers of Espresso takes ~15 minutes.

The development of Espresso happens mostly on HotSpot, but this configuration (Espresso on HotSpot) is only supported on Linux, see Limitations.

Working on Espresso

See the hacking notes.