Skip to content

Commit

Permalink
Enable native image with web server
Browse files Browse the repository at this point in the history
Store frontend as zip file in order to be able to read and index the
files during native compilation

Otherwise it is not possible to enumerate all the resource files,
because of which native image compiler doesn't include them
  • Loading branch information
hrj committed May 7, 2024
1 parent 1f32011 commit cfa8026
Show file tree
Hide file tree
Showing 16 changed files with 49 additions and 91 deletions.
4 changes: 3 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ lazy val abandon = (project in file(".")).
settings(
name := "abandon",
run /fork := true,
nativeImageOptions ++= List("--initialize-at-build-time", "--no-fallback", "-O2")
nativeImageOptions ++= List("--initialize-at-build-time", "--no-fallback", "-O2", "-H:IncludeResources=\".*/frontend/build.zip$\""),
nativeImageJvm := "graalvm-java21",
nativeImageVersion := "21.0.2"
)
.enablePlugins(NativeImagePlugin)

Expand Down
Binary file added cli/src/main/resources/frontend/build.zip
Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit cfa8026

Please sign in to comment.