About Repository
Each crate has a file called Cargo.toml in which there must be a section called [package] in which there can be a key called repository. For example the rustatic project has something like this:
[package]
repository = "https://github.com/szabgab/rustatic"
Having this entry allows Crates.io to link to the repository and it makes it easy for everyone to find the public version control of the crate.
- NA for repository
- repository URL starts with http://
- GitHub repository URL starts with www
- No commit count
NA for repository
Each Crate can have a field in the Cargo.toml called repository with the URL of their public Version Control System (VCS). Usually on some git-hosting services. For example the rustatic crate has repository = "https://github.com/szabgab/rustatic/" in its Cargo.toml.
Having that link in the Cargo.toml file means that users can easily find the source code of the crate. It is listed on Crates.io, lib.rs, the Rust Digger, etc.
If you are the author of the crate then it is easy to add the entry. You do have a public repository for the project, don't you?
If you are not the author, then it is a bit tricky as first you need to find the repository.
- Each crate on the Rust Digger should have a link to its owner. (If not, that's a problem)
- Each owner has a link to his/her GitHub user. After all the username on crates.io is the same as the username on GitHub.
- Following that link you can list all the repositories of the person and you might find the one corresponding to this crate.
- If you found the repository then edit the Cargo.toml file and add the repository entry to it. Then send it as a Pull-Request.
- Alternatively, you might take a look at the other crates of the owner to see where is their repository. According to our stats, about 5% of the crates are hosted in some system that is not GitHub.
- If you can't find the repository then you could, politely(!) contact the owner and ask if the crates is indeed theirs and if they have a public VCS somewhere. Keep in mind that some people don't make their VCS public and some don't even use one. I am not happy about it, but I would not want to make them uncomfortable.
http vs https
Most git hosting companies (e.g. GitHub, GitLab) will accept an inbound link using `http`. Some people have included a link in their Cargo.toml file using the http link. We have a report of all the repository links using http. It is not a super critical thing to fix, but also not a huge effort.
Github with www
Some people include a repository URL to GitHub using the www hostname as in https://www.github.com/.... GitHub automatically redirects that page to https://github.com/... (a URL without the www hostname). It is really just a cosmetic issue, but it is also a very simple change. We list the crates with www in their gitHub repository url.