Jonas Møller writes: > Hi Guix! Why does cargo-build-system need #:cargo-inputs specified in the package definition? This seems like a big > mistake for a couple of reasons. Just like the nice people in mail list explained, when building a package, Guix builders are not allowed to connect to network, so the crates should be prefetched. and AFIAK, Maxime Devos is working on new build system called "Antioxidant", which can build rust application without cargo (Yes, invoke rustc directly!), The new build system will cache the rlib intermediate result of crate and share between different builds. > 1 It is completely redundant, it should match what is in Cargo.toml. I know `guix import crate` exists to automate > this process, but I don't understand the rationale for duplicating > this information. Not only Guix do this, Debian also package Rust crates [1]. > 2 It is bad practice for Guix to override Cargo.lock if it exists, this means that Guix is building a different binary to the > one the developers of the packaged Rust application are seeing on their end, this is a much bigger problem. OK, IMO almost all software packaged by Linux distro are "different" from upstream at binary level. A notable example is, software developer may prefeer to add bundled 3rd party dependencies to ease the build of package. But distro maintainers want to ensure every software use the library provided by distro[2]. And there maybe distro specific patches (Redhat backports security fixes to the old version of package for their RHEL) > This can and will cause spurious build failures, or bugs that are unknown to the developers of the Rust programs that > Guix packages. The Rust crate in Guix is used to package rust application, if user have problem with the rust application on Guix (e.g. ripgrep, fd, xxd, bat ...) They should report to Guix first, so it's Guix developer's responsibility to smooth out those differences. If user want to develop a Rust crate/application, they can still use "cargo" command and fetch crates from crates.io registry. [1]: https://packages.debian.org/sid/librust-bytecount-dev [2]: https://wiki.gentoo.org/wiki/Why_not_bundle_dependencies -- Retrieve my PGP public key: gpg --recv-keys B3EBC086AB0EBC0F45E0B4D433DB374BCEE4D9DC Zihao