RFR: Add `--library-path-resolver` option for custom library path resolving

devjeonghwan duke at openjdk.org
Fri Nov 14 16:31:01 UTC 2025


On Fri, 14 Nov 2025 16:05:22 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

> Question: who writes the path resolver? The library, or the client of that library? I assume the former, right?  

yes, the library author is the one providing the resolver.

Unfortunately, a static configuration file wouldn't be enough because we strictly need to execute code at runtime.
For example, we need to check CPU features (like AVX or SSE) to decide which library variant to load, or handle file I/O to extract a library from a JAR to a temp directory. A static config simply can't handle that kind of dynamic logic.

I do understand your concern about the lack of structure in my current proposal. Since dynamic execution is mandatory for these use cases, could you suggest a specific architectural pattern that fits better with jextract's design? I’m happy to reimplement it to better fit jextract’s architecture.

-------------

PR Comment: https://git.openjdk.org/jextract/pull/295#issuecomment-3533560730


More information about the jextract-dev mailing list