3 ms·
What the author mentions but doesn’t seem to allocate a lot of significance to is that in Go, modules are a level of organization higher up the hierarchy from p
by jeremyjh 3y ago
What the author mentions but doesn’t seem to allocate a lot of significance to is that in Go, modules are a level of organization higher up the hierarchy from packages. Rust has no such a higher level organizing unit. It’s only unit for both sharing dependencies and compiling files is a crate. So crates have to take on additional duties, such as specifying build instructions and dependencies.
Been years since I’ve done much Rust. Does this mean bumping dependency versions thus becomes a larger chore in a project?
- drewtato 3y agoRust has workspaces, which is a collection of packages (a Cargo.toml and related source files). Workspaces are still pretty underpowered, but they do have shared dependencies, compilation artifacts, version numbers, and CLI management. A lot of this is new (1 year old).
- beefsack 3y agoCargo workspaces have existed for a number of years now - the feature was released in Cargo alongside Rust 1.12 in September 2016: https://blog.rust-lang.org/2016/09/29/Rust-1.12.html https://blog.rust-lang.org/2016/09/29/Rust-1.12.html
- drewtato 3y agoThe version numbers are from a little more than a year ago. Originally, it was pretty much only compilation artifacts and some CLI. https://github.com/rust-lang/cargo/pull/10563 https://github.com/rust-lang/cargo/pull/10563