Support for GraalVMs native-image
- Dominant language
- Java
- Stars
- 4.5k
- Forks
- 2.3k
- Avg merge
- 1d 49m
- Merged PRs (30d)
- 26
Description
### Search before asking
- [x] I had searched in the [issues](https://github.com/apache/shiro/issues?q=is%3Aissue) and found no similar issues.
### Feature Request
Hi!
Oracle has created the [GraalVM](https://www.graalvm.org/) and one of its features is the [native-image](https://www.graalvm.org/22.2/docs/getting-started/#native-image) tool, which allows compiling a JVM application into a native executable. This executable doesn't need a JVM to run, it starts faster and often consumes less memory. But this has downsides, as some dynamic features from Java are not supported without additional configuration. The biggest contenders are [reflection](https://www.graalvm.org/22.2/reference-manual/native-image/dynamic-features/Reflection/), [resources](https://www.graalvm.org/22.2/reference-manual/native-image/dynamic-features/Resources/) and [proxies](https://www.graalvm.org/22.2/reference-manual/native-image/dynamic-features/DynamicProxy/).
Luckily, a library can ship some JSON metadata in the [META-INF/native-image/...](https://www.graalvm.org/22.2/reference-manual/native-image/metadata/) directory which enables those features.
For libraries which don't (or can't) add the metadata in their JARs, Oracle has created the [graalvm-reachability-repository](https://github.com/oracle/graalvm-reachability-metadata), which contains this metadata outside of the libraries JAR file. In an ideal world, all of the metadata is moved into the JARs of the libraries, but until our world has reached its ideal state, this repository will be used.
We are hardly waiting for GrallVM native-image support in officially Shiro repository.
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
Contributor guide
Research direction
No repository files or tests are named. Start by reviewing Shiro's use of reflection, resources, and proxies against GraalVM native-image requirements and the META-INF/native-image metadata format, then define the native-image build and metadata coverage needed for support.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100