Skip to content

Conversation

@staticlibs
Copy link
Collaborator

This PR adds the experimental reachability-metadata.json file for Graal's native-image.

See #421 for details.

Testing: test coverage pending.

This PR adds the experimental [reachability-metadata.json](https://www.graalvm.org/latest/reference-manual/native-image/metadata/)
file for Graal's `native-image`.

See duckdb#421 for details.

Testing: test coverage pending.
@hubertp
Copy link

hubertp commented Nov 17, 2025

For test coverage you would have to build Native Image and run your test suite on it, I'm afraid. I can take a look and see if I can build it. You are using custom Make file, which has no official support, but it should be doable.

Additionally, I will update the reachability file as it is probably missing a few bits and pieces. I'm not sure if this will be a problem, but are you planning on upgrading JDK used to compile Java sources sometime soon? The one currently used is pretty ancient.

@staticlibs
Copy link
Collaborator Author

@hubertp

For test coverage you would have to build Native Image and run your test suite on it, I'm afraid.

I was able to build the native image, but it didn't run even the hello-world test (after successfully loading the native lib). I stopped at this point, but if you know the AOT compilation setup that works - I can add it to the test suite/CI promptly (having the full test-suite running is not necessary).

I can take a look and see if I can build it. You are using custom Make file, which has no official support, but it should be doable.

That would be great! I think the JAR build setup can be completely ignored - any AOT setup that uses pre-built "-nolib" JAR would be helpful. Even better, if it runs on Graal-community ot Mandrel.

Additionally, I will update the reachability file as it is probably missing a few bits and pieces.

PRs with such updates are welcome, assuming we have some smoke-check native image test setup on CI - I can merge such updates straight away.

I'm not sure if this will be a problem, but are you planning on upgrading JDK used to compile Java sources sometime soon? The one currently used is pretty ancient.

There are no plans to raise the minimal runtime JDK requirements from JDK 8 while this version is supported. Given that JDK 6 (released in 2006) is still supported by multiple vendors - I think the update from JDK 8 (as a runtime JDK) will not happen any time soon.

That said, it is possible to bytecode-compile for JDK 8 using javac from newer versions. So if that will be necessary for native-image - we can look into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants