Skip to content

Commit 3d2db24

Browse files
committed
Improve and extend README.md.
1 parent 196e8a3 commit 3d2db24

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

README.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,28 @@
11
# GraalVM Reachability Metadata Repository
22

3-
When you use [GraalVM Native Image](https://www.graalvm.org/latest/reference-manual/native-image/) to build a native executable it only includes the elements reachable from your application entry point, its dependent libraries, and the JDK classes discovered through static analysis. However, the reachability of some elements (such as classes, methods, or fields) may not be discoverable due to Java’s dynamic features including reflection, resource access, dynamic proxies, and serialization. If an element is not reachable, it is not included in the generated executable and this can lead to run time failures.
4-
To include elements whose reachability is undiscoverable, the Native Image builder requires externally provided [reachability metadata](https://www.graalvm.org/reference-manual/native-image/metadata/).
3+
This repository enables users of [GraalVM Native Image](https://www.graalvm.org/latest/reference-manual/native-image/) to share and reuse metadata for libraries and frameworks in the Java ecosystem.
4+
The repository is integrated with [GraalVM Native Build Tools](https://github.com/graalvm/native-build-tools) beginning with version `0.9.13`:
5+
you can enable automatic use of the metadata repository for [Gradle projects](https://graalvm.github.io/native-build-tools/latest/gradle-plugin.html#metadata-support) or [Maven projects](https://graalvm.github.io/native-build-tools/latest/maven-plugin.html#metadata-support).
56

6-
The GraalVM Reachability Metadata Repository enables Native Image users to share and reuse metadata for libraries and frameworks in the Java ecosystem, and thus simplify maintaining third-party dependencies. The repository is integrated with [GraalVM Native Build Tools](https://github.com/graalvm/native-build-tools) beginning with version 0.9.13: you can enable automatic use of the metadata repository for [Gradle projects](https://graalvm.github.io/native-build-tools/latest/gradle-plugin.html#metadata-support) or for [Maven projects](https://graalvm.github.io/native-build-tools/latest/maven-plugin.html#metadata-support).
7+
[This web page](https://www.graalvm.org/native-image/libraries-and-frameworks/) provides an overview of libraries and frameworks that are tested and thus ready for GraalVM Native Image.
8+
If you would like to see your library or framework in the list too, please open a pull request and extend [this JSON file](https://github.com/oracle/graalvm-reachability-metadata/blob/master/library-and-framework-list.json).
9+
Before submitting a pull request, please read [this guide](./CONTRIBUTING.md#tested-libraries-and-frameworks).
710

8-
### Contributing
11+
## Rationale
912

10-
We welcome contributions from the community. Before submitting a pull
11-
request, please [review our contribution guide](./CONTRIBUTING.md).
13+
When you use Native Image to build native executables it only includes the elements reachable from your application entry point, its dependent libraries, and JDK classes discovered through static analysis.
14+
However, the reachability of some elements (such as classes, methods, or fields) may not be discoverable due to Java’s dynamic features including reflection, resource access, dynamic proxies, and serialization.
15+
If an element is not reachable, it is not included in the generated executable at build time, which can lead to failures at run time.
16+
Native Image has built-in metadata for JDK classes but user code and dependencies may use dynamic features of Java that are undiscoverable by the Native Image analysis.
17+
For this reason, Native Image accepts additional [reachability metadata](https://www.graalvm.org/reference-manual/native-image/metadata/) in the form of JSON files.
18+
Since this metadata is specific to a specific code base, the JSON files providing the corresponding metadata can be shared for libraries and frameworks.
19+
This repository is a centralized place for sharing such files for libraries and frameworks that do not provide built-in metadata yet.
20+
It is also used to retrofit metadata for older versions of libraries and frameworks.
1221

22+
If you are a library or framework maintainer, the best way to make your code ready for GraalVM Native Image is to provide reachability metadata as part of your JARs.
23+
Please visit [this web page](https://www.graalvm.org/latest/reference-manual/native-image/metadata/) for more information.
1324

14-
### Tested Libraries and Frameworks
25+
## Contributing
1526

16-
We track the libraries and frameworks that are tested with GraalVM Native Image. If you would like to see your library/framework
17-
in the list too, please open a pull request and extend [this JSON file](https://github.com/oracle/graalvm-reachability-metadata/blob/master/library-and-framework-list.json).
18-
Before submitting a pull request, please read [this guide](./CONTRIBUTING.md#tested-libraries-and-frameworks).
27+
We welcome contributions from the community.
28+
Before submitting a pull request, please [review our contribution guide](./CONTRIBUTING.md).

0 commit comments

Comments
 (0)