Package: src:rustc
Version: 1.63.0+dfsg1-2

Because various libstds aren't packaged (including ones which cannot be packaged for license reasons like macOS targets), `-Zbuild-std` is an important feature for being able to build for various targets.

Sadly, by default builds fail because of a missing Cargo.lock for libstd in the rust-src package. Simply having an empty file at /usr/lib/rustlib/src/rust/Cargo.lock makes builds continue, but forces cargo to fetch the latest copies of crates like compiler-builtins, which no longer build with the version of rustc shipped in stable/bookworm (compiler-builtins in general only supports a single specific rust version which its intended to be built with). Working around this is theoretically doable with a magic dance, manually removing things from $HOME/.cargo and the --offline flag, but its a huge PITA. I believe the inclusion of a Cargo.lock would make cargo fetch the correct versions when building std.

Reply via email to