Coloring of output and analysis of dependencies
⚓ Rust 📅 2025-08-21 👤 surdeus 👁️ 9I am writing a small personal CLI in Rust. There are two not so important issues I'd need help with:
- Is there any built in way to analyse the how much a dependency contributes to the build time?
For the depsize (may be a bad metric) there isn't a cargo built-in tool for it (cargo treedoesn't seem to do this).
I've only found cargo-depsize, which does seem neat. I do think one could also use the cargo cache instead of http-querying metadata (which must be slower).
My goal is that my little tool compiles in a short time, and uses dependencies that contain not too much extra functionality (although I know I should learn to use thefeaturesflag as well.) - Is there a way to colour the cargo outputs that go through
lessormore, or do i need another tool?
For example, this fails:
I tried somecargo report --color always --help | less # or more etc.lessflags like-R, but no luck so far, and I want to conserve the way cargo displays it.
PS: it seems for 1. cargo +nightly build --timings may be useful.
3 posts - 3 participants
🏷️ Rust_feed