Skip to content

is it possible to use ripgrep as a library inside of another Rust program? #2067

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

You must be logged in to vote

If you cannot create a child process, then your only option is to port ripgrep to Javascript or to devise a C API of ripgrep's various crates. Either is technically possible, but "feasible" is not a word I would use to describe it unless you have a lot of resources to throw at it.

I suggest shelling out, like VS Code does. Or writing your application in Rust and make use of ripgrep's crates as-is, and compile to WASM.

Replies: 1 comment 3 replies

Comment options

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

@BurntSushi
Comment options

@JordyScript
Comment options

Answer selected by JordyScript
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