
Cargo Tree for Finding Why a Dependency Is in Your Build
cargo tree prints the dependency graph. Use -i to find who pulls in a crate, -d to find duplicates, -e features to trace features and --depth to keep it readable.
Everything you need to level up your coding skills.

cargo tree prints the dependency graph. Use -i to find who pulls in a crate, -d to find duplicates, -e features to trace features and --depth to keep it readable.

Generic code compiles once per type, and that can bloat a binary and slow builds. Find the biggest instantiations with cargo llvm-lines and cut them with inner functions and dyn.

A user-supplied filename like ../../etc/passwd escapes your upload directory. Reject components, canonicalize and verify the prefix, and see why Path::join with an absolute path is a trap.

cargo-nextest runs each test in its own process with better parallelism, clear output, retries and JUnit reports. See install, speed expectations, config and what it does not run.

Four runtime base images for Rust containers, compared on size, libc, debugging, TLS certificates and security. A decision table and the failure each choice invites.

Profile guided optimization compiles twice: once to collect a profile from a real workload, once to optimize with it. Do it by hand or with cargo-pgo, and judge the gain.

The default HashMap hasher is DoS resistant and slower than it needs to be for trusted keys. See what changes with FxHash, ahash and foldhash, and when not to switch.

tracing adds spans and key-value fields to logs, works across async tasks and outputs JSON for log pipelines. Set up tracing-subscriber and instrument a handler.

Model states as an enum when they change at run time and as types when the order is known at compile time. See both versions of a connection and which one to pick.

Data layout and access patterns decide speed more than instructions. Learn cache lines, contiguous iteration, struct of arrays, branch prediction effects and how to test them.

rusqlite is a thin sync wrapper over SQLite and SQLx adds async and compile-time checks. Choose by whether your program is async and where the database file lives.

Exit codes are how scripts know your tool failed. Return 0 for success, a nonzero code for failure, send errors to stderr, and let main return ExitCode or Result.
We send one email when a new post is published. No spam.