A personal list of pain-points, rough edges, ambiguities, etc observed while trying to work on Rust projects (+adject tooling, cargo, crates.io, rust-analyzer, etc).
This list is for personal reference, of personal experiences, not for "dunking" on the language or for flame wars. Multiple things in this list might be entirely incorrect / just undocumented.
The most common pattern for crate names is to use hypens. However, hypens are not valid identifiers in Rust. As such, these get implicitly converted to underscores.
If you have a crate named foobar-rs
, all references to that package in Rust code will need to use foobar_rs
.
At some point in the past, this was an explicit implementation detail, requiring the syntax:
extern crate "foobar-rs" as foobar_rs;