Rust Module System Encourages Bad Practices

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • Onboard AI - Learn any GitHub repo in 59 seconds
  • InfluxDB - Collect and Analyze Billions of Data Points in Real Time
  • SaaSHub - Software Alternatives and Reviews
  • Cargo

    The Rust package manager

    There are some efforts for lowering the overhead and would be interesting to explore how we could further do it.

    First, we allow sharing `Cargo.toml` fields across the workspace since 1.64.0 [0]. In the upcoming 1.71.0, we extend this so that `cargo new` will automatically inherit fields when creating new `Cargo.toml` files [1].

    From a different angle, we are also adding support for single-file packages though this is more meant for binaries [2]

    [0] https://doc.rust-lang.org/cargo/reference/workspaces.html#th...

    [1] https://github.com/rust-lang/cargo/pull/12069

    [2] https://github.com/rust-lang/rfcs/pull/3424

  • rfcs

    RFCs for changes to Rust

    "private" trait impls (1) would be a much better solution. You probably never want the impl of a trait for a foreign type to be exposed to other crates, it's so unlikely that forbidding it in the name of coherence is a probably viable. But there's apparently many gotchas and no one has clearly written a way around them (2).

    (1) https://github.com/rust-lang/rfcs/issues/493 (although the comment section is kind of unhinged and goes off on distant tangents to modular typeclasses and first class modules)

    (2) http://smallcultfollowing.com/babysteps/blog/2015/01/14/litt...

  • Onboard AI

    Learn any GitHub repo in 59 seconds. Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at www.getonboard.dev.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts