Story Details

  • Rust’s dependencies are starting to worry me

    Posted: 2025-05-09 09:11:05

    The author expresses growing concern over the complexity and interconnectedness of Rust's dependency graph. They highlight how seemingly simple projects can pull in a vast number of crates, increasing the risk of encountering bugs, vulnerabilities, and build issues. This complexity also makes auditing dependencies challenging, hindering efforts to ensure code security and maintainability. The author argues that the "batteries included" approach, while beneficial for rapid prototyping, might be contributing to this problem, encouraging developers to rely on numerous crates rather than writing more code themselves. They suggest exploring alternative approaches to dependency management, questioning whether the current level of reliance on external crates is truly necessary for the long-term health of the Rust ecosystem.

    Summary of Comments ( 470 )
    https://news.ycombinator.com/item?id=43935067

    Hacker News users largely disagreed with the author's premise that Rust's dependency situation is alarming. Several commenters pointed out that the blog post misrepresents the dependency graph, including dev-dependencies and transitive dependencies unnecessarily. They argued that the actual number of dependencies linked at runtime is significantly smaller and manageable. Others highlighted the benefits of Rust's package manager, Cargo, and its features like semantic versioning and reproducible builds, which help mitigate dependency issues. Some suggested the author's perspective stems from a lack of familiarity with Rust's ecosystem, contrasting it with languages like Python and JavaScript where dependency management can be more problematic. A few commenters did express some concern over build times and the complexity of certain crates, but the overall sentiment was that Rust's dependency management is well-designed and not a cause for significant worry.