Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Direct link to download published crate sources #1592

Closed
dhardy opened this issue Jan 10, 2019 · 4 comments
Closed

Direct link to download published crate sources #1592

dhardy opened this issue Jan 10, 2019 · 4 comments
Labels
A-frontend 🐹 C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works wontfix

Comments

@dhardy
Copy link

dhardy commented Jan 10, 2019

A couple of times now I have wanted to download the source for a published crate. Sometimes a link to the code repository is all you need, but sometimes the link is missing (or there isn't even a published repository), and sometimes you need to inspect the exact code of a release.

Since Cargo publications are just source tarballs, inspecting the .crate files is easy if you can get them, however apparently the only way to do this is to make Cargo download the crate as a dependency, then retrieve it from Cargo's cache.

Summary: add a direct download link for each published .crate file.
Related: #193

@sgrif
Copy link
Contributor

sgrif commented Jan 10, 2019

I don't think this is a common enough need to justify a link on the website. You can download any crate by just going to crates.io/api/v1/crates/crate_name/vers/download (e.g. https://crates.io/api/v1/crates/diesel/1.3.3/download)

@dhardy
Copy link
Author

dhardy commented Jan 11, 2019

Thanks, but that's quite a URL to remember. I would prefer a link on the page (or maybe under the "all versions" page).

@Turbo87
Copy link
Member

Turbo87 commented Dec 6, 2020

as described in e.g. #2113 and some of the other linked issues, our official recommendation is to use tools like https://github.com/JanLikar/cargo-clone to download the raw source of crates if you need them, or use our API endpoint for it directly.

since the mainstream way of downloading crates is always going to be cargo usage, a prominent "Download" button on the page could cause quite a bit of confusion to our users. since downloading a .crate file manually is a relatively uncommon thing and there are already cargo plugins that allow this, we don't think the tradeoff of having such a button is worth it.

@Turbo87 Turbo87 closed this as completed Dec 6, 2020
@Turbo87 Turbo87 added the wontfix label Dec 6, 2020
@pragmatrix
Copy link

a prominent "Download" button on the page could cause quite a bit of confusion to our users

Agreed, but there is also lies the solution, don't make a download button prominent. The users needing it will find it, the ones who don't, won't be confused.

@Turbo87 Turbo87 added C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works and removed C-feature-request labels Feb 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend 🐹 C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works wontfix
Projects
None yet
Development

No branches or pull requests

5 participants