Description
Thanks for this library!
We're using java-tree-sitter as part of our CLI, which gets shipped as a jar to our users' machines. We'd like to be able to control exactly where the tree-sitter library lives, to prevent users from having to spawn Java with custom flags (e.g. -Djava.library.path
).
We can do this if java-tree-sitter provided a way to specify the library path programmatically at runtime. Java 22's FFI API allows this (see java.lang.foreign.SymbolLookup#libraryLookup(java.nio.file.Path, java.lang.foreign.Arena)
).
It'd be great if the java-tree-sitter library gave us a way to do this, too. It'd involve changing the logic here from being hard-coded.
For now, we plan on modifying TreeSitter.java
and re-compiling it during our own build. For reference: apple/pkl-lsp#23