[Top][All Lists]

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

branch master updated: doc: Document packaging guidelines for Rust crate

From: guix-commits
Subject: branch master updated: doc: Document packaging guidelines for Rust crates.
Date: Tue, 18 Feb 2020 02:52:40 -0500

This is an automated email from the git hooks/post-receive script.

efraim pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 8d1b22b  doc: Document packaging guidelines for Rust crates.
8d1b22b is described below

commit 8d1b22b27fba3d1e4310f02a5897d231b42ca117
Author: Efraim Flashner <address@hidden>
AuthorDate: Mon Feb 17 11:21:27 2020 +0200

    doc: Document packaging guidelines for Rust crates.
    * doc/contributing.texi (Rust Crates): New section.
 doc/contributing.texi | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/doc/contributing.texi b/doc/contributing.texi
index c6586a2..a0d0925 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
@@ -685,6 +686,40 @@ dashes and prepend the prefix @code{java-}.  So the class
+@node Rust Crates
+@subsection Rust Crates
+@cindex rust
+Rust programs standing for themselves are named as any other package, using the
+lowercase upstream name.
+To prevent namespace collisions we prefix all other Rust packages with the
+@code{rust-} prefix.  The name should be changed to lowercase as appropriate 
+dashes should remain in place.
+In the rust ecosystem it is common for multiple incompatible versions of a
+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.@: @code{rust-clap-2}), otherwise the version suffix
+should contain both the major and minor version (e.g.@: @code{rust-rand-0.6}).
+Because of the difficulty in reusing rust packages as pre-compiled inputs for
+other packages the Cargo build system (@pxref{Build Systems,
+@code{cargo-build-system}}) presents the @code{#:cargo-inputs} and
+@code{cargo-development-inputs} keywords as build system arguments.  It would 
+helpful to think of these as similar to @code{propagated-inputs} and
+@code{native-inputs}.  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
+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 used; to
+this end we try to refrain from skipping the tests or using 
+when possible.  Of course this is not always possible, as the package may 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 released.
 @node Fonts
 @subsection Fonts

reply via email to

[Prev in Thread] Current Thread [Next in Thread]