[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Being easy to package for Debian



30.05.2024 13:21:46 Lars Wirzenius <liw@liw.fi>:

> I am part of various projects that develop open source software using
> the Rust language. I also used to be a Debian developer, but haven't
> been for many years. As upstream, my question is, what can I do to
> make it as easy as possible for Debian to package software written in
> Rust?
>
> I'm asking about this in general rather than for a specific project,
> though my question is triggered by the Radicle project.
>
> Based on my Debian experience, and my hazy understanding of how the
> Rust packaging team in Debian operates, here is my current thinking,
> but I would welcome advice. As upstream I can ensure that:
>
> * my code is published on crates.io
> * my code works with the Rust compiler and cargo in Debian unstable
> * my crate dependencies are packaged in Debian
> * my code works with the versions of crate dependencies that are
>   packaged in Debian
> * I don't vendor any dependencies
>
> There are of course all the generic aspects of being packaged in
> Debian, but here I'm concerned about aspects relating to Rust
> specifically.

Hi Lars,

thanks for reaching out. As maintainer of quite a few Rust packages here are my thoughts:

- If possible (and it's in use), run CI on ARM too. I can't recall how many times I had to file upstream bugs because some bit alignment was hardcoded.
- For Rust bindings to C: basically the same, but this was a common source of such failures
- Not relying on crates pinned at a certain commit in Cargo.toml
-Using "common" crates where possible; like rand or serde
- Don't generate code. Gtk-rs does this and it's been causing headaches all around
- Don't use the latest release of e.g. clap

This is just off the top of my head. Note that I don't write Rust but rather package it. Thanks for asking !

Best,

werdahias


Reply to: