Remix.run Logo
brtkwr 11 hours ago

Hasn’t someone rewritten ripgrep in rust by now? C’mon it’s 2026. Oh wait it was written in Rust (back in 2016).

masklinn 10 hours ago | parent | next [-]

The fun part is it is pretty easy to “rewrite” ripgrep in rust, because burntsushi wrote it as a ton of crates which you can reuse. So you can reuse this to build your own with blackjack and hookers.

SAI_Peregrinus 7 hours ago | parent | next [-]

A "ton of crates" is IMO the best way to write large Rust programs. Each crate in Rust is a compilation unit, the equivalent of one `.c` file in C. If they don't depend on one another, each crate can be compiled in parallel. It makes building the whole project faster, often significantly so. As with anything one can take it too far, but as long as each crate makes sense as an independent unit it's good.

loeg 6 hours ago | parent [-]

Isn't creating a bunch of crates pretty annoying, logistically (in terms of mandatory directory structure and metadata files per crate)? (Compared with C/C++ individual .c/.cpp files being compilation units.) And does parallel compilation of crates break LTO?

mijoharas 8 hours ago | parent | prev [-]

Gotta add a +1 for this. I wanted to do some ignore files etc for a project.

I thought "well I kinda want to do what rg does". Had a little glance and it was already nicely extracted into a separate crate that was a dream to use.

Thanks @BurntSushi!

qudat 10 hours ago | parent | prev | next [-]

Waiting for the zig port

vortegne 10 hours ago | parent | prev [-]

https://github.com/alexpasmantier/grip-grab

Someone kinda did

brtkwr 9 hours ago | parent [-]

looks abandoned. last commit was 2 years ago.