Debian Rust packaging team


Get involved!


Packaging of all rust crates is done in a single git repo, because most crates only need two files (d/copyright, d/changelog), everything else is automatically generated by debcargo.

To help, join the salsa team, then git clone and follow instructions in README.rst. We currently have a backlog of about 200 crates to package and upload. Each crate takes about 2-3 minutes to package once everything is set up; the initial set-up may take 10-30 minutes depending on how familiar you are with Debian packaging tools.

For more details about what debcargo does, you can read through the Debian Rust packaging policy.

Toolchain (rustc, cargo)

General info

Bootstrapping a new distribution

rustc and cargo both Build-Depends on each other. In order to break the loop, we use Build Profiles.

For rustc, see "Bootstrapping" section of rustc's README.source.

For cargo, we currently don't have an automated way to do it. If you need to do this, the following steps should work: install upstream's cargo binary to /usr/local, install the other Build-Depends, and then dpkg-buildpackage -d.

Porting to a new architecture

Use sbuild --host=<arch> --profiles=nocheck, it should Just Work.

If it doesn't work, you might need to also give --extra-repository="deb buildd-unstable main" which happens when (e.g.) there was recently a new GCC or binutils upload, and not all architectures were built and uploaded to FTP yet so some architectures are out-of-sync version-wise.

If it still doesn't work, check the buildd logs for gcc-8 and binutils. If it says "Building" for either the source or the target architecture, you will need to wait until the builds are done. That's just an unfortunate aspect of how cross-building with sbuild works today, sadly.

If it still doesn't work, check that the binary package crossbuild-essential-$arch exists for the desired architecture. If it doesn't, add this to your ~/.sbuildrc:

   1 $crossbuild_core_depends = {
   2   sparc64 => ['gcc-sparc64-linux-gnu:native', 'g++-sparc64-linux-gnu:native', 'dpkg-cross:all'],
   3 };

changing sparc64 to your desired architecture. You probably also need to add Debian-Ports to your APT sources.list.

If it still doesn't work, then file a bug to src:rustc, src:cargo, or debcargo as appropriate. You can also try glaubitz's method which involves more manual steps, though it is probably out-of-date by the time you read this.

For more details about rustc cross-compiling see "Cross-compiling" section of rustc's README.Debian.


We always welcome new contributors, and we are mostly available on IRC for quick questions. Feel free to ping us and join the team: