Downloading Rust crates using a web browser

孤街浪徒 提交于 2019-12-10 14:04:14

问题


Is there any way to download Rust dependencies using a web browser? I currently have internet access through my web browser but not through the command prompt (Windows).

I know that I can set up a local fileserver and set Cargo to use a mirror, but that doesn't help if I can't get the crates in the first place.

Edit:

See related Github issue, now closed.


回答1:


You can use the following address:

https://crates.io/api/v1/crates/name/version/download

To download crates directly from crates.io - just change the name and version to download a specific version of a crate.

The downloaded file has a .crate extension, but it's actually a tarball (.tar.gz).



来源:https://stackoverflow.com/questions/45304541/downloading-rust-crates-using-a-web-browser

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!