
Copy Versus Clone in Rust and Which Types Are Copy
Copy is an implicit bitwise duplicate and Clone is an explicit call that can do real work. Know which of your types should have which, and what each costs.
Everything you need to level up your coding skills.

Copy is an implicit bitwise duplicate and Clone is an explicit call that can do real work. Know which of your types should have which, and what each costs.

A feature enabled by any crate in your dependency graph is enabled for everyone using that crate. Learn how resolver 2 and 3 limit it, how to find who enabled what and rules for additive features.

cargo-deny checks advisories, licenses, banned crates and registry sources from one deny.toml. See a working configuration, how to read failures and how to add exceptions with a reason.

Seven changes that cut Cargo build time: check instead of build, a faster linker, dependency debug settings, incremental, workspace splits, sccache and feature trimming.

Code blocks in doc comments compile and run as tests. Write examples that stay correct, hide setup lines with a hash, mark intentional failures and choose the right attributes.

Shrink a Rust binary in steps: strip symbols, size optimization, LTO, panic abort, dependency pruning and cargo bloat to find what takes the space.

Run a Rust binary on a Linux server under systemd: a locked down unit file, a dedicated user, environment files, restart policy, logs through journald and a simple release procedure.

codegen-units splits a crate into parallel pieces and opt-level picks how hard LLVM works. See the defaults, the trade-offs and the settings for speed or size.

LTO lets the compiler optimize across crates and often shrinks and speeds a binary, at the cost of build time. See thin, fat and off, and how to measure the trade.

Clippy is the Rust linter with hundreds of lints in groups: correctness, style, perf, pedantic and more. Learn what each group means, how to configure them and how to adopt it in CI.

Clean architecture's dependency rule fits Rust: inner layers define traits and outer layers implement them. Here is how many layers you need, with a layout and a verdict.

Share one version, one edition and one lint set across a workspace. See [workspace.package], [workspace.lints] and workspace = true in members.
We send one email when a new post is published. No spam.