Skip to content

Does this project have APIs so can be used by other languages, like Java? #2058

Answered by BurntSushi
nlpsuge asked this question in Q&A
Discussion options

You must be logged in to vote

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 execute rg 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.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@nlpsuge
Comment options

@BurntSushi
Comment options

@nlpsuge
Comment options

Answer selected by BurntSushi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants