From unknown Mon Aug 18 11:30:31 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39640] [PATCH] doc: Document packaging guidelines for Rust crates. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 17 Feb 2020 09:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 39640 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 39640@debbugs.gnu.org Cc: Efraim Flashner X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15819313569546 (code B ref -1); Mon, 17 Feb 2020 09:23:02 +0000 Received: (at submit) by debbugs.gnu.org; 17 Feb 2020 09:22:36 +0000 Received: from localhost ([127.0.0.1]:37991 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j3cbs-0002Tt-CR for submit@debbugs.gnu.org; Mon, 17 Feb 2020 04:22:36 -0500 Received: from lists.gnu.org ([209.51.188.17]:53751) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j3cbr-0002Tm-6i for submit@debbugs.gnu.org; Mon, 17 Feb 2020 04:22:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51268) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j3cbq-0003wU-1Q for guix-patches@gnu.org; Mon, 17 Feb 2020 04:22:35 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j3cbo-0008L2-RF for guix-patches@gnu.org; Mon, 17 Feb 2020 04:22:33 -0500 Received: from flashner.co.il ([178.62.234.194]:53758) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j3cbo-0008KU-Lt for guix-patches@gnu.org; Mon, 17 Feb 2020 04:22:32 -0500 Received: from localhost (unknown [141.226.13.108]) by flashner.co.il (Postfix) with ESMTPSA id AB899401BE; Mon, 17 Feb 2020 09:22:31 +0000 (UTC) From: Efraim Flashner Date: Mon, 17 Feb 2020 11:21:59 +0200 Message-Id: <20200217092159.776-1-efraim@flashner.co.il> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 178.62.234.194 X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) * doc/contributing.texi (Rust Crates): New section. --- doc/contributing.texi | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/doc/contributing.texi b/doc/contributing.texi index c6586a2adf..2fb641f0c5 100644 --- a/doc/contributing.texi +++ b/doc/contributing.texi @@ -347,6 +347,7 @@ needed is to review and apply the patch. * Python Modules:: A touch of British comedy. * Perl Modules:: Little pearls. * Java Packages:: Coffee break. +* Rust Crates:: Beware of oxidation. * Fonts:: Fond of fonts. @end menu =20 @@ -665,6 +666,39 @@ are also prepended by @code{perl-}. Such modules te= nd to have the word prefix. For instance, @code{libwww-perl} becomes @code{perl-libwww}. =20 =20 +@node Rust Crates +@subsection Rust Crates + +@cindex rust +Rust programs standing for themselves are named as any other package, us= ing the +lowercase upstream name. + +To prevent namespace collisions we prefix all other rust packages with t= he +@code{rust-} prefix. The name should be changed to lowercase as appropr= iate and +dashes should remain in place. + +In the rust ecosystem it is common for multiple incompatable versions of= a +package to be used at any given time, so all packages should have a vers= ioned +suffix. If a package has passed version 1.0.0 then just the major versi= on +number is sufficient (e.g.@: rust-clap-2), otherwise the version suffix = should +contain the major and minor version (e.g.@: rust-rand-0.6). + +Because of the difficulty in reusing rust packages as pre-compiled input= s for +other packages the @xref{cargo-build-system} presents the @code{#:cargo-= inputs} +and @code{cargo-development-inputs} keywords as build-system arguments. = It +would be helpful to think of these as similar to @code{propagated-inputs= } and +@code{native-inputs}. Rust @code{dependencies} and @code{build-dependen= cies} +should go in @code{#:cargo-inputs}, and @code{dev-dependencies} should g= o in +@code{#:cargo-development-inputs}. If a rust package links to other lib= raries +then the standard placement in @code{inputs} and the like should be used= . + +Care should be taken to ensure the correct version of dependencies are u= sed; to +this end we try to refrain from skipping the tests or using @code{#:skip= -build?} +when possible. Of course this is not always possible, as the package ma= y be +developed for a different Operating System, depend on features from the = Nightly +Rust compiler, or the test suite may have atrophied since it was release= d. + + @node Java Packages @subsection Java Packages =20 --=20 2.25.0 From unknown Mon Aug 18 11:30:31 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39640] [PATCH] doc: Document packaging guidelines for Rust crates. Resent-From: Nicolas Goaziou Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 17 Feb 2020 11:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39640 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Efraim Flashner Cc: 39640@debbugs.gnu.org Received: via spool by 39640-submit@debbugs.gnu.org id=B39640.158193956822513 (code B ref 39640); Mon, 17 Feb 2020 11:40:02 +0000 Received: (at 39640) by debbugs.gnu.org; 17 Feb 2020 11:39:28 +0000 Received: from localhost ([127.0.0.1]:38065 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j3ekK-0005r3-1f for submit@debbugs.gnu.org; Mon, 17 Feb 2020 06:39:28 -0500 Received: from relay10.mail.gandi.net ([217.70.178.230]:35159) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j3ekH-0005qt-OQ for 39640@debbugs.gnu.org; Mon, 17 Feb 2020 06:39:26 -0500 Received: from localhost (40-67.ipv4.commingeshautdebit.fr [185.131.40.67]) (Authenticated sender: admin@nicolasgoaziou.fr) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 8A011240003; Mon, 17 Feb 2020 11:39:23 +0000 (UTC) From: Nicolas Goaziou References: <20200217092159.776-1-efraim@flashner.co.il> Date: Mon, 17 Feb 2020 12:39:22 +0100 In-Reply-To: <20200217092159.776-1-efraim@flashner.co.il> (Efraim Flashner's message of "Mon, 17 Feb 2020 11:21:59 +0200") Message-ID: <87k14lphn9.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hello, Efraim Flashner writes: > * doc/contributing.texi (Rust Crates): New section. Great! Thank you for this clarification. > +To prevent namespace collisions we prefix all other rust packages with the rust -> Rust > +In the rust ecosystem it is common for multiple incompatable versions of a Ditto. Also incompatable -> incompatible ? > +package to be used at any given time, so all packages should have a versioned > +suffix. If a package has passed version 1.0.0 then just the major version > +number is sufficient (e.g.@: rust-clap-2), otherwise the version suffix should > +contain the major and minor version (e.g.@: rust-rand-0.6). Nitpick: should contain both the major... But that's just me. I would also use @code{rust-clap-2} and @code{rust-rand-0.6} > +Because of the difficulty in reusing rust packages as pre-compiled inputs for rust -> Rust > +other packages the @xref{cargo-build-system} presents the @code{#:cargo-inputs} @xref is misused here. It targets references at the beginning of a sentence. I.e., it will generate ... other packages the See cargo-build-system presents... I suggest the more verbose ... other packages the Cargo build system (@pxref{cargo-build-system}) presents... > +and @code{cargo-development-inputs} keywords as build-system arguments. It build-system or build system? > Rust @code{dependencies} and @code{build-dependencies} > +should go in @code{#:cargo-inputs}, and @code{dev-dependencies} should go in > +@code{#:cargo-development-inputs}. If a rust package links to other libraries rust -> Rust Regards, -- Nicolas Goaziou From unknown Mon Aug 18 11:30:31 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Efraim Flashner Subject: bug#39640: closed (Re: [bug#39640] [PATCH] doc: Document packaging guidelines for Rust crates.) Message-ID: References: <20200218075130.GO1968@E5400> <20200217092159.776-1-efraim@flashner.co.il> X-Gnu-PR-Message: they-closed 39640 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 39640@debbugs.gnu.org Date: Tue, 18 Feb 2020 07:53:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1582012382-22436-1" This is a multi-part message in MIME format... ------------=_1582012382-22436-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #39640: [PATCH] doc: Document packaging guidelines for Rust crates. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 39640@debbugs.gnu.org. --=20 39640: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D39640 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1582012382-22436-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 39640-done) by debbugs.gnu.org; 18 Feb 2020 07:52:10 +0000 Received: from localhost ([127.0.0.1]:39490 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j3xft-0005or-OU for submit@debbugs.gnu.org; Tue, 18 Feb 2020 02:52:09 -0500 Received: from flashner.co.il ([178.62.234.194]:58962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j3xfs-0005oN-91 for 39640-done@debbugs.gnu.org; Tue, 18 Feb 2020 02:52:08 -0500 Received: from localhost (unknown [141.226.13.108]) by flashner.co.il (Postfix) with ESMTPSA id 19EC54002B; Tue, 18 Feb 2020 07:52:01 +0000 (UTC) Date: Tue, 18 Feb 2020 09:51:30 +0200 From: Efraim Flashner To: Nicolas Goaziou Subject: Re: [bug#39640] [PATCH] doc: Document packaging guidelines for Rust crates. Message-ID: <20200218075130.GO1968@E5400> References: <20200217092159.776-1-efraim@flashner.co.il> <87k14lphn9.fsf@nicolasgoaziou.fr> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="s3R87C3fwYeCSZ0b" Content-Disposition: inline In-Reply-To: <87k14lphn9.fsf@nicolasgoaziou.fr> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 39640-done Cc: 39640-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --s3R87C3fwYeCSZ0b Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 17, 2020 at 12:39:22PM +0100, Nicolas Goaziou wrote: > Hello, >=20 > Efraim Flashner writes: >=20 > > * doc/contributing.texi (Rust Crates): New section. >=20 > Great! Thank you for this clarification. >=20 I realized I had most of it in my head and that wasn't helping anyone > > +To prevent namespace collisions we prefix all other rust packages with= the >=20 > rust -> Rust >=20 > > +In the rust ecosystem it is common for multiple incompatable versions = of a >=20 > Ditto. >=20 > Also incompatable -> incompatible ? >=20 spelling is hard :) > > +package to be used at any given time, so all packages should have a ve= rsioned > > +suffix. If a package has passed version 1.0.0 then just the major ver= sion > > +number is sufficient (e.g.@: rust-clap-2), otherwise the version suffi= x should > > +contain the major and minor version (e.g.@: rust-rand-0.6). >=20 > Nitpick: should contain both the major... >=20 > But that's just me. >=20 > I would also use @code{rust-clap-2} and @code{rust-rand-0.6} Both sound good. >=20 > > +Because of the difficulty in reusing rust packages as pre-compiled inp= uts for >=20 > rust -> Rust >=20 > > +other packages the @xref{cargo-build-system} presents the @code{#:carg= o-inputs} >=20 > @xref is misused here. It targets references at the beginning of > a sentence. I.e., it will generate >=20 > ... other packages the See cargo-build-system presents... >=20 > I suggest the more verbose >=20 > ... other packages the Cargo build system (@pxref{cargo-build-system}) = presents... pxref turned out to be a bit more complicated than I thought. I got it referring to Build Systems but not to cargo-build-system inside it. Since the references to gnu-build-system are similar I figured it was about the same. >=20 > > +and @code{cargo-development-inputs} keywords as build-system arguments= =2E It >=20 > build-system or build system? >=20 I've always thought of it as build-system due to the keyword, but 'build system' would be the correct one. > > Rust @code{dependencies} and @code{build-dependencies} > > +should go in @code{#:cargo-inputs}, and @code{dev-dependencies} should= go in > > +@code{#:cargo-development-inputs}. If a rust package links to other l= ibraries >=20 > rust -> Rust >=20 > Regards, >=20 > --=20 > Nicolas Goaziou Thanks for the review! --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --s3R87C3fwYeCSZ0b Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl5Ll4EACgkQQarn3Mo9 g1F+JBAArGZxPsJnWU6OuoE06w1XpTVcIa3MoiM+R+s5JHWrQCVisAye+q1zAVzi k5NpFUE2Al7viufKJLINmhAKJB81IRXS3qqbZDUvzFS8W8l+w+MTsVMryURtbRLo xDnVBg2q26RLKM5Zus9fgVLm2dvDY4GeeKiRizsqSo51nua0LTOSxM04P+zRZKDY +VoAzp89Do7DZmUusjDyIC7CpxtHDSEOoJNbH8l3xugE6C5fj+Fjm5AD1nPWi6Li wHgDDueadAbUMbdR70zr8RXts2mNHI8S0SJx9MdPi4bBoiU5z5k8Fliy6cT7+Jn4 SsEIlnRg6dr3XsvTzFdETx56XoECJVkvHZugrkNYcU23aVgeyJ4rdZ3XiASgcrya d2DuKNwRkb5vf+6pEjIS2VS/UUyo/5UW8qKfbjzIeL96ztsuBxbfgE654orob4OS Xa7dRizyMCsq3WSTeAa1kiCirkrTSLwHHwyxRapjTUVti3EvMJhG/iSkdE95pDXN JTc7sLX6x13xSHuRuTNZwnZw4lL+sQtEoIaCKqAVdw7xYOAaU8s1T3sUc8FPKSCf 6665vmeutvjEbPz2EuHUcEW5ajuEpk4lZE/262tjFj5+HDZ0c6tEJ25fErKRIf0S 2u6jAVtu4N7dS4WXayZZHdRIsguZbzdVCKZzOO6uwn0T851zdR4= =x4CS -----END PGP SIGNATURE----- --s3R87C3fwYeCSZ0b-- ------------=_1582012382-22436-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 17 Feb 2020 09:22:36 +0000 Received: from localhost ([127.0.0.1]:37991 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j3cbs-0002Tt-CR for submit@debbugs.gnu.org; Mon, 17 Feb 2020 04:22:36 -0500 Received: from lists.gnu.org ([209.51.188.17]:53751) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j3cbr-0002Tm-6i for submit@debbugs.gnu.org; Mon, 17 Feb 2020 04:22:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51268) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j3cbq-0003wU-1Q for guix-patches@gnu.org; Mon, 17 Feb 2020 04:22:35 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j3cbo-0008L2-RF for guix-patches@gnu.org; Mon, 17 Feb 2020 04:22:33 -0500 Received: from flashner.co.il ([178.62.234.194]:53758) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j3cbo-0008KU-Lt for guix-patches@gnu.org; Mon, 17 Feb 2020 04:22:32 -0500 Received: from localhost (unknown [141.226.13.108]) by flashner.co.il (Postfix) with ESMTPSA id AB899401BE; Mon, 17 Feb 2020 09:22:31 +0000 (UTC) From: Efraim Flashner To: guix-patches@gnu.org Subject: [PATCH] doc: Document packaging guidelines for Rust crates. Date: Mon, 17 Feb 2020 11:21:59 +0200 Message-Id: <20200217092159.776-1-efraim@flashner.co.il> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 178.62.234.194 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: submit Cc: Efraim Flashner X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) * doc/contributing.texi (Rust Crates): New section. --- doc/contributing.texi | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/doc/contributing.texi b/doc/contributing.texi index c6586a2adf..2fb641f0c5 100644 --- a/doc/contributing.texi +++ b/doc/contributing.texi @@ -347,6 +347,7 @@ needed is to review and apply the patch. * Python Modules:: A touch of British comedy. * Perl Modules:: Little pearls. * Java Packages:: Coffee break. +* Rust Crates:: Beware of oxidation. * Fonts:: Fond of fonts. @end menu =20 @@ -665,6 +666,39 @@ are also prepended by @code{perl-}. Such modules te= nd to have the word prefix. For instance, @code{libwww-perl} becomes @code{perl-libwww}. =20 =20 +@node Rust Crates +@subsection Rust Crates + +@cindex rust +Rust programs standing for themselves are named as any other package, us= ing the +lowercase upstream name. + +To prevent namespace collisions we prefix all other rust packages with t= he +@code{rust-} prefix. The name should be changed to lowercase as appropr= iate and +dashes should remain in place. + +In the rust ecosystem it is common for multiple incompatable versions of= a +package to be used at any given time, so all packages should have a vers= ioned +suffix. If a package has passed version 1.0.0 then just the major versi= on +number is sufficient (e.g.@: rust-clap-2), otherwise the version suffix = should +contain the major and minor version (e.g.@: rust-rand-0.6). + +Because of the difficulty in reusing rust packages as pre-compiled input= s for +other packages the @xref{cargo-build-system} presents the @code{#:cargo-= inputs} +and @code{cargo-development-inputs} keywords as build-system arguments. = It +would be helpful to think of these as similar to @code{propagated-inputs= } and +@code{native-inputs}. Rust @code{dependencies} and @code{build-dependen= cies} +should go in @code{#:cargo-inputs}, and @code{dev-dependencies} should g= o in +@code{#:cargo-development-inputs}. If a rust package links to other lib= raries +then the standard placement in @code{inputs} and the like should be used= . + +Care should be taken to ensure the correct version of dependencies are u= sed; to +this end we try to refrain from skipping the tests or using @code{#:skip= -build?} +when possible. Of course this is not always possible, as the package ma= y be +developed for a different Operating System, depend on features from the = Nightly +Rust compiler, or the test suite may have atrophied since it was release= d. + + @node Java Packages @subsection Java Packages =20 --=20 2.25.0 ------------=_1582012382-22436-1--