dalek-cryptography/ed25519-dalek

`ed25519` v1.4.0 has an MSRV of 1.56

tarcieri opened this issue · 2 comments

This issue is mostly a heads up that the latest ed25519 crate release, v1.4.0, has bumped its minimum supported Rust version to 1.56, as part of a Rust 2021 edition upgrade:

RustCrypto/signatures#450

This may manifest in a Cargo resolution failure that looks like the following when building ed25519-dalek on earlier versions of Rust:

error: failed to parse manifest at `.cargo/registry/src/github.com-1ecc629/ed25519-1.4.0/Cargo.toml`

Caused by:
  failed to parse the `edition` key

Caused by:
  this version of Cargo is older than the `2021` edition, and only supports `2015` and `2018` editions.

If you are using ed25519-dalek with versions of Rust prior to 1.56, you will need to add a constraint to your Cargo.toml such as the following:

[dependencies]
ed25519 = ">=1, <1.4" # ed25519 1.4 requires MSRV 1.56

It might be worth adding such a constraint to ed25519-dalek itself, although this does have the downside of rejecting compatible versions of crates on newer MSRVs.

Thank you @tonychain, I can confirm that this solved this issue for me too.

str4d commented

It might be worth adding such a constraint to ed25519-dalek itself, although this does have the downside of rejecting compatible versions of crates on newer MSRVs.

I generally prefer avoiding these, precisely because of the downstream incompatibilities they cause. See also dalek-cryptography/x25519-dalek#74 (comment) where a zeroize = "=1.3" prevented me from upgrading x25519-dalek to access a security-relevant API (which fortunately I could just reproduce outside the crate, but that's not generally going to be the case, and having upgrades blocked by having a too-new MSRV seems like a particularly troublesome way to block forward progress).