Make "homepage" optional in Cargo.toml #9

Closed
opened 2026-03-01 09:10:56 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @bunburya on GitHub (Feb 24, 2024).

This tool appears to fail if the homepage field is not specified in Cargo.toml. C-METADATA, which is linked in the README, states that homepage is optional and further states:

The homepage metadata should only be set if there is a unique website for the crate other than the source repository or API documentation. Do not make homepage redundant with either the documentation or repository values. For example, serde sets homepage to https://serde.rs, a dedicated website.

Given that a lot of crates these days will just have a repository URL and not a separate homepage, I think it would be good to make homepage optional in cargo-aur (following the approach in C-METADATA). The url field in the PKGBUILD could be set to homepage or, if that is not present, documentation or, if that is not present, repository (the last being a required field per C-METADATA).

Happy to work on a PR for this if helpful.

Originally created by @bunburya on GitHub (Feb 24, 2024). This tool appears to fail if the `homepage` field is not specified in `Cargo.toml`. [C-METADATA](https://rust-lang.github.io/api-guidelines/documentation.html#c-metadata), which is linked in the README, states that `homepage` is optional and further states: > The homepage metadata should only be set if there is a unique website for the crate other than the source repository or API documentation. Do not make `homepage` redundant with either the `documentation` or `repository` values. For example, serde sets homepage to https://serde.rs, a dedicated website. Given that a lot of crates these days will just have a repository URL and not a separate homepage, I think it would be good to make `homepage` optional in `cargo-aur` (following the approach in C-METADATA). The `url` field in the PKGBUILD could be set to `homepage` or, if that is not present, `documentation` or, if that is not present, `repository` (the last being a required field per C-METADATA). Happy to work on a PR for this if helpful.
Author
Owner

@fosskers commented on GitHub (Feb 24, 2024):

Great suggestion. Want to give it a shot?

@fosskers commented on GitHub (Feb 24, 2024): Great suggestion. Want to give it a shot?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/cargo-aur#9