← Back to context

Comment by juliangmp

2 days ago

>[...] this will depend on who you ask, e.g. some C++ developers don’t mind Rust’s compilation times at all, as they are used to the same (or worse) build times

Yeah pretty much. C++ is a lot worse when you consider the practical time spent vs compilation benchmarks. In most C++ projects I've seen/worked on, there were one or sometimes more code generators in the toolchain which slowed things down a lot.

And it looks even more dire when you want to add clang-tidy in the mix. It can take like 5 solid minutes to lint even small projects.

When I work in Rust, the overall speed of the toolchain (and the language server) is an absolute blessing!

>And it looks even more dire when you want to add clang-tidy in the mix. It can take like 5 solid minutes to lint even small projects.

And running all tests with sanitizers, just to get some runtime checks of what Rust excludes at compile time.

I love Rust for the fast compile times.

why do you run clang-tidy with compiler? Just use it interactively - with cland. These is much more useful to me

  • We do use clangd and it provides many checks, but I wanted to include clang-tidy in the CI. Though since me and my colleagues combine ff-only and ‘must build successfully before merging’, adding like 5 minutes to the CI is really annoying.

    Iirc the reason why clangd is so much faster than clang-tidy is that clangs omits certain checks and limits which code it analyzes.