]> git.proxmox.com Git - proxmox.git/blob - README.rst
proxmox-async: move AsyncChannelWriter to src/io
[proxmox.git] / README.rst
1 Local cargo config
2 ==================
3
4 This repository ships with a ``.cargo/config`` that replaces the crates.io
5 registry with packaged crates located in ``/usr/share/cargo/registry``.
6
7 A similar config is also applied building with dh_cargo. Cargo.lock needs to be
8 deleted when switching between packaged crates and crates.io, since the
9 checksums are not compatible.
10
11 To reference new dependencies (or updated versions) that are not yet packaged,
12 the dependency needs to point directly to a path or git source.
13
14 Steps for Releases
15 ==================
16
17 - Cargo.toml updates:
18 - Bump all modified crate versions.
19 - Update all the other crates' Cargo.toml to depend on the new versions if
20 required, then bump their version as well if not already done.
21 - Update debian/changelog files in all the crates updated above.
22 - Build packages with `make deb`.
23
24 Adding Crates
25 =============
26
27 1) At the top level:
28 - Generate the crate: ``cargo new --lib the-name``
29 - Sort the crate into ``Cargo.toml``'s ``workspace.members``
30 - Sort the crate into the ``Makefile``'s ``CRATES`` list.
31
32 2) In the new crate's ``Cargo.toml``:
33 - Replace the ``author`` line with
34 ``authors = ["Proxmox Support Team <support@proxmox.com>"]``
35 - Add ``license = "AGPL-3"``
36 - Add ``exclude = [ "debian" ]``
37 - Add a meaningful ``description``
38 - Copy ``debian/copyright`` and ``debian/debcargo.toml`` from another subcrate.