Does this project have APIs so can be used by other languages, like Java? #2058
-
Hi, Does this project has APIs so can be used by other Java projects to build some kind of local file search project which runs in a browser? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I'm not sure I fully understand your question, but ripgrep does have a If you mean Rust APIs, ripgrep is split into a bunch of libraries: https://docs.rs/grep. But it's not exactly easy to use at the moment, and there is no library API equivalent of ripgrep itself. You have to put all of the pieces together yourself. |
Beta Was this translation helpful? Give feedback.
I'm not sure I fully understand your question, but ripgrep does have a
--json
flag that will cause it to emit matches in a structured format that is easier to reading. But it does require that you executerg
as a sub-process.If you mean Rust APIs, ripgrep is split into a bunch of libraries: https://docs.rs/grep. But it's not exactly easy to use at the moment, and there is no library API equivalent of ripgrep itself. You have to put all of the pieces together yourself.