> If you file an issue against ripgrep proper with code links and some more details
Sorry, I don't think I explained my issue very well. In general it has nothing to do with the interaction with ripgrep, that works fine.
It's that each adapter (e.g. zip -> list of file streams) needs to have an interface of fn(Read) -> Iter
But then if there's a PDF within the zip, I have to give the returned ReadWithMeta to the PDF adapter - but it can't take ownership, because the Archive file iterators only give borrowed reads. I maybe worked around this by creating a wrapper type [3] and adding an unsafe here [2], but something deadlocks when adapting zip files currently.
Also, for external programs, I have to copy the data from the Read into a Write (stdin of the program) - which needs to happen in a separate thread, otherwise the stdout is never read [1], but some Reads I have aren't Send since they come from e.g. zip-rs, so they can't be passed to a thread.
[1] https://github.com/phiresky/ripgrep-all/blob/baca166fdab3d24...
[2] https://github.com/phiresky/ripgrep-all/blob/baca166fdab3d24...
[3] https://github.com/phiresky/ripgrep-all/blob/baca166fdab3d24...