logoalt Hacker News

phyzometoday at 2:37 AM2 repliesview on HN

Same situation in Rust crates, AIUI.


Replies

TheDongtoday at 3:50 AM

In go, `go mod init` and `go get go@latest` (both recommended commands), both set a 'go <latest-version>' stanzas. In go, you _must_ set a minimum required version.

If you type 'cargo init', you will get 'edition = "2024"', but no 'rust-version'.

The situation is different because rust does not require a 'rust-version' in Cargo.toml, and in practice most crates do not have one, while in go it is required you specify a minimum version, there's no automation to set it to the true minimum, and most projects update it incorrectly in practice (because the go cli updates it incorrectly for you).

howardjohntoday at 3:18 AM

I think Rust is slightly different in practice even if they behave the same technically. I'm not sure Rust lets you even set the MSRV to a specific patch which is the biggest annoyance with Go; if they do it's so uncommon I've at least never seen it. And I don't believe any Rust tooling encourages you to set the MSRV to <latest Rust version> like tools in the Go ecosystem do.