Skip to content

Commit bdf780f

Browse files
committed
Specify the minimum supported Rust version for capnp crate
The MSRV (minimum supported Rust version) is the earliest version capable of building a project. In the case of the capnp crate, the MSRV is 1.65.0, due to the use of GATs. Having the MSRV in Cargo.toml helps display better error messages when the Rust version is too old to build a project. eg: > error: package `capnp v0.15.0 (/Users/maxime/Code/capnproto-rust/capnp)` > cannot be built because it requires rustc 1.65.0 or newer, while the > currently active rustc version is 1.64.0 Without it, the error messages are more confusing. > error[E0658]: generic associated types are unstable > --> capnp/src/traits.rs:73:5 > | > 73 | type Builder<'a>: FromStructBuilder<'a> + HasStructSize; > | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > | > = note: see issue #44265 <rust-lang/rust#44265> for more information Cargo.toml docs: https://doc.rust-lang.org/cargo/reference/manifest.html#the-rust-version-field
1 parent 17f0354 commit bdf780f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

capnp/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ description = "runtime library for Cap'n Proto data encoding"
88
repository = "https://github.com/capnproto/capnproto-rust"
99
documentation = "https://docs.capnproto-rust.org/capnp/"
1010
edition = "2021"
11+
rust-version = "1.65.0"
1112

1213
readme = "README.md"
1314

0 commit comments

Comments
 (0)