This project implements RPM macros and generators for building Rust crates and Rust code in general.

The RPM macros and generators in this project fall into three categories:

  • macros.d/macros.rust-srpm: macros that are needed when constructing source packages (for example, resolving Source tags in spec files to actual URLs)
  • macros.d/macros.rust: macros that define default Rust compiler flags
  • macros.d/macros.cargo, fileattrs/cargo.attr: macros and RPM generators for building Rust projects with cargo

To decouple the release cycles of the different components involved in packaging Rust projects (and prevent possible bootstrap problems), the code originally developed under the "rust2rpm" umbrella was split into three projects:

  • cargo2rpm: low-level functionality for translating between cargo and RPM
  • rust-packaging: RPM macros and generators built on top of the cargo2rpm CLI
  • rust2rpm: RPM spec file generator built on top of cargo2rpm