finding locations of many files via kpse
Deyan Ginev
deyan.ginev at gmail.com
Tue Jul 2 14:23:33 CEST 2024
@Norbert
>
> > That was the reason for the (still experimental) rust-kpathsea wrapper
> > getting created:
> > https://github.com/dginev/rust-kpathsea
>
> What is the state of it? Instead of writing my own C-code, I could look
> into using your rust wrapper, but AFAIS there is no cmd line interface
> like asking for many files.
>
It is an early stage wrapper for Rust, so it is a good fit for Rust
projects (or small Rust scripts) which need convenient calls into
libkpathsea. That is also limited to distributions where libkpathsea is
easily available to be linked against (not yet Windows, for example).
There are no executables in that package ("no batteries included"), it is
meant to be used as a dependency in larger projects (such as latex-to-html
converters).
To Jonathan's point, a call to "kpsewhich" on my 7 year old NVMe drive
takes 100 ms. Most of that appears to be spent in warming up - so avoiding
the top-level initialization is really the key bit to amortize. The
individual find calls are essentially free afterwards.
Greetings,
Deyan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/texhax/attachments/20240702/6f60a97a/attachment-0001.htm>
More information about the texhax
mailing list.