Preludes and glob imports in Rust are antipatterns that hide where types come from, cause naming conflicts, complicate code reviews and security audits, and can break builds on minor version updates. Explicit imports are preferred for clarity. The only acceptable exceptions are trait-only preludes (like Rayon's parallel iterator traits) and `use super::*` in test modules. Practical alternatives include re-exporting common types at the crate root, using module-level imports (e.g., `use std::fmt`), and enabling Clippy's wildcard_imports lint. Library authors should rely on semantic versioning and Rust's type system rather than preludes for API stability.

10m read timeFrom corrode.dev
Post cover image
Table of contents
I don’t like preludesCommon Arguments for PreludesCommon Arguments for Glob ImportsConclusion