问题描述
有没有办法使用 Web 浏览器下载 Rust 依赖项?我目前可以通过网络浏览器访问互联网,但不能通过命令提示符 (Windows) 访问.
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).
我知道我可以设置本地文件服务器并设置 Cargo 使用一面镜子,但如果我一开始就拿不到板条箱,那也无济于事.
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.
查看相关Github issue,现已关闭.
推荐答案
可以使用以下地址:
https://crates.io/api/v1/crates/name/version/download
要直接从 crates.io 下载 crate - 只需更改 name
和 version
下载特定版本的 crate.
To download crates directly from crates.io - just change the name
and version
to download a specific version of a crate.
下载的文件有一个 .crate 扩展名,但它实际上是一个 tarball (.tar.gz).
The downloaded file has a .crate extension, but it's actually a tarball (.tar.gz).
这篇关于使用 Web 浏览器下载 Rust crates的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!