enso/docs/infrastructure
Hubert Plociniczak 096fcfee82
Generate native image for engine-runner (#3638)
This PR adds a possibility to generate native-image for engine-runner.
Note that due to on-demand loading of stdlib, programs that make use of it are currently not yet supported
(that will be resolved at a later point).
The purpose of this PR is only to make sure that we can generate a bare minimum runner because due to lack TruffleBoundaries or misconfiguration in reflection config, this can get broken very easily.
To generate a native image simply execute:
```
sbt> engine-runner-native/buildNativeImage
... (wait a few minutes)
```
The executable is called `runner` and can be tested via a simple test that is in the resources. To illustrate the benefits
see the timings difference between the non-native and native one:
```
>time built-distribution/enso-engine-0.0.0-dev-linux-amd64/enso-0.0.0-dev/bin/enso --no-ir-caches --in-project test/Tests/ --run engine/runner-native/src/test/resources/Factorial.enso 6
720

real	0m4.503s
user	0m9.248s
sys	0m1.494s
> time ./runner --run engine/runner-native/src/test/resources/Factorial.enso 6
720

real	0m0.176s
user	0m0.042s
sys	0m0.038s
```

# Important Notes
Notice that due to a [bug in GraalVM](https://github.com/oracle/graal/issues/4200), which is already fixed in 22.x, and us still being on 21.x for the time being, I had to add a workaround to our sbt build to build a different fat jar for native image. To workaround it I had to exclude sqlite jar. Hence native image task is on `engine-runner-native` and not on `engine-runner`.

Will need to add the above command to CI.
2022-09-22 14:45:10 +00:00
..
java-11.md Add a markdown style guide (#1022) 2020-07-21 13:59:40 +01:00
logging.md Add support for detailed logger configuration (#1745) 2021-05-19 09:02:32 +01:00
native-image.md Generate native image for engine-runner (#3638) 2022-09-22 14:45:10 +00:00
README.md Logging Service in the Launcher (#1169) 2020-10-02 18:17:21 +02:00
rust.md Bump GraalVM Version to 20.2.0 (#1094) 2020-08-28 13:03:09 +02:00
sbt.md Register instruments/language in their own compilation units to fix the sbt build issues (#3509) 2022-06-13 14:09:08 +00:00
upgrading-graalvm.md Enable the docker pipeline for releases (#1500) 2021-02-23 14:12:24 +00:00

layout title category tags order
section-summary Infrastructure infrastructure
infrastructure
readme
0

Infrastructure

The Enso runtime runs on the GraalVM which is a version of the JVM. This folder contains all documentation pertaining to Enso's infrastructure, which is broken up as follows:

  • sbt: The build tools that are used for building the project.
  • Java 11: Description of changes related to the Java 11 migration.
  • Native Image: Description of the Native Image build used for building the launcher native binary.
  • Rust: Description of integration of the Scala project with the Rust components.
  • Upgrading GraalVM: Description of steps that have to be performed by each developer when the project is upgraded to a new version of GraalVM.
  • Logging: Description of an unified and centralized logging infrastructure that should be used by all components.