enso/project
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
..
src/main/scala/licenses Register instruments/language in their own compilation units to fix the sbt build issues (#3509) 2022-06-13 14:09:08 +00:00
BenchTasks.scala Bump SBT and Scalafmt (#1203) 2020-10-22 16:12:28 +02:00
build.properties Update Scala to 2.13.8 (#3631) 2022-08-08 19:32:55 +00:00
BuildInfo.scala Fix dev version check (#3265) 2022-02-15 16:34:33 +01:00
Cargo.scala Self-hosted Engine CI for Windows and Linux (#3182) 2021-12-27 17:56:35 +01:00
CopyTruffleJAR.scala Bump SBT and Scalafmt (#1203) 2020-10-22 16:12:28 +02:00
CustomLogManager.scala Suppress pointless warnings coming from SBT (#3499) 2022-06-01 13:50:46 +00:00
Distribution.scala Bump SBT and Scalafmt (#1203) 2020-10-22 16:12:28 +02:00
DistributionPackage.scala Additional sbt commands to build stdlib packages (#3431) 2022-05-11 10:12:18 +00:00
Editions.scala Nightly proccess preparations: Setting Enso version through the environment (#3241) 2022-02-07 15:14:32 +01:00
EnvironmentCheck.scala Generate native image for engine-runner (#3638) 2022-09-22 14:45:10 +00:00
FrgaalJavaCompiler.scala Switching to Java 19 Frgaal compiler (#3594) 2022-07-19 09:28:31 +00:00
GatherLicenses.scala Register instruments/language in their own compilation units to fix the sbt build issues (#3509) 2022-06-13 14:09:08 +00:00
GenerateAST.scala Self-hosted Engine CI for Windows and Linux (#3182) 2021-12-27 17:56:35 +01:00
GenerateFlatbuffers.scala New IDE build script (#3466) 2022-05-23 04:16:04 +02:00
LauncherShimsForTest.scala Self-hosted Engine CI for Windows and Linux (#3182) 2021-12-27 17:56:35 +01:00
LibraryManifestGenerator.scala Preinstalling With Dependencies (#1981) 2021-11-23 11:51:17 +03:00
NativeImage.scala Generate native image for engine-runner (#3638) 2022-09-22 14:45:10 +00:00
Platform.scala Bump SBT and Scalafmt (#1203) 2020-10-22 16:12:28 +02:00
plugins.sbt EnsoCompilerTest to verify compatibility of parsers (#3723) 2022-09-20 15:50:27 +00:00
RecompileParser.scala Bump SBT and Scalafmt (#1203) 2020-10-22 16:12:28 +02:00
StdBits.scala Include only runtime dependencies in std-bits (#3445) 2022-05-12 10:44:46 +00:00
VerifyReflectionSetup.scala Fix the project manager reflection configuration (#1394) 2021-01-14 10:46:01 +00:00
WithDebugCommand.scala Qualified names & uppercase name resolution (#1062) 2020-08-05 22:16:44 +02:00