From 8a58e8e8cc20aaf0119da36bb2b9c52f7925ab1a Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Aug 23 2022 11:04:04 +0000 Subject: Rust: split rules for package sources from naming guidelines --- diff --git a/guidelines/modules/ROOT/pages/Rust.adoc b/guidelines/modules/ROOT/pages/Rust.adoc index 24663bb..9aa6f0a 100644 --- a/guidelines/modules/ROOT/pages/Rust.adoc +++ b/guidelines/modules/ROOT/pages/Rust.adoc @@ -24,12 +24,7 @@ are required, for example: * dropping *unused* optional features with missing dependencies (can be automated by using a `+rust2rpm.conf+` configuration file) -== Package Naming - -=== Library crates - -Source packages for Rust crates which contain a library with a public API -MUST be named `rust-$crate`. +== Package Sources Only library crates that are published on crates.io MAY be packaged for Fedora, since this enforces a certain standard of how crates are packaged and built, @@ -37,6 +32,18 @@ ensures that all the crate's dependencies are available from crates.io as well, and that there are no package name collisions due to the unique crate names in the crates.io namespace. +Crates that contain only an application but no library interface +MAY be packaged even if they are not published on crates.io, +because those packages are leaves +and cannot be depended on by other Rust crates. + +== Package Naming + +=== Library crates + +Source packages for Rust crates which contain a library with a public API +MUST be named `rust-$crate`. + === Mixed library / application crates Source packages for Rust crates @@ -60,11 +67,8 @@ because a crate can start to include a public library API at any time, in which case the "Mixed library / application crates" rules would apply, and the package would need to be renamed to include the `+rust-+` prefix. -Crates that contain only an application but no library interface -MAY be packaged even if they are not published on crates.io, -because those packages are leaves -and cannot be depended on by other Rust crates. -Such packages MUST follow the default xref:Naming.adoc[Naming Guidelines] +Application-only Rust projects which are not packaged from crates.io +must follow the general xref:Naming.adoc[Naming Guidelines] (i.e. drop the `+rust-+` prefix from the source package name) so that they cannot introduce potential source package name collisions with crates from the crates.io namespace.