4 ms·
> So while Go encourages having reasonably sized packages, Rust unfortunately encourages huge crates. I'm a bit confused by this as I'm used to seeing the opp
by epage 3y ago
> So while Go encourages having reasonably sized packages, Rust unfortunately encourages huge crates.
I'm a bit confused by this as I'm used to seeing the opposite complaint, that Rust packages are too small. Maybe if there were examples it would help.
And while I do think we should explore ways to allow lower effort packages ("cargo script" is one component of this [0]), I see allowing submodules as a feature though maybe thats my Python/C++ background showing through. I do like that it allows both low overhead modules in your API (just a file) or allows you to separate a module out into multiple files for clearer organization (where cycles become important). While I don't know if there is a feasible design for this, but I do wish we could specify what modules are cyclic vs acyclic.
[0] https://github.com/rust-lang/rfcs/pull/3424 https://github.com/rust-lang/rfcs/pull/3424
- dimonomid 3y ago> 'm a bit confused by this as I'm used to seeing the opposite complaint, that Rust packages are too small. By "packages" here you're probably referring to the public crates on crates.io, right? Indeed, those public crates are not big in general, but that's not the point of the article. The article is rather talking about large, multi-crate projects, organized as a Cargo workspace. I agree it could have been clearer in the article.