-
Notifications
You must be signed in to change notification settings - Fork 926
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate GraalVM native image config (#5005)
Motivation: Armeria and its dependencies (e.g. Netty, JCTools and Caffeine) use fair amount of reflections, JNI and other advanced features of JVM, which require explicit configuration when building a native image with GraalVM. We should provide native image configuration in our artifacts so that a user can easily build a native image out of the box. Modifications: - Added a new project flag `native`. For a project with `native` flag, we add a task `nativeImageTrace` that runs select test cases annotated with a `GenerateNativeImageTrace` to collect the trace files generated by `native-image-agent`. - See https://www.graalvm.org/22.0/reference-manual/native-image/Agent/ - Added a new project `:native-image-config`, which: - aggregates all traces into native image config; and - cleans up the noise from the generated native image config - Added the initial version of native image config to `META-INF/native-image/com.linecorp.armeria/armeria`. - Renamed and relocated some test classes so that they are not included in the native image config Result: - A user can now easily build a native image of an Armeria application. - Future works: - Configure our build pipieline to generate native image config for different platforms automatically (macOS, Linux epoll, Linux io_uring and Windows). - Use annotation processors rather than reflection for scanning annotations. - Add entries for Windows and Linux io_uring. --------- Co-authored-by: Hannam Rhee <jrhee17@linecorp.com>
- Loading branch information
Showing
93 changed files
with
10,742 additions
and
278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.