rust 很不错,但是crates 经常下载有点慢,当前阿里云还没有相关的镜像,还有科大为我们提供了一个

配置方法

  • 添加crates 配置
    $HOME/.cargo/config 目录
[registry]
index = "git://mirrors.ustc.edu.cn/crates.io-index"

说明:
如果不支持git 协议,可以使用http

 
index = "http://mirrors.ustc.edu.cn/crates.io-index"

cargo 0.13.0 以及高版本的,配置如下:

[source.crates-io]
registry = "https://github.com/rust-lang/crates.io-index"
replace-with = 'ustc'
[source.ustc]
registry = "git://mirrors.ustc.edu.cn/crates.io-index"

一个下载效果

  Downloaded serde v1.0.81 (registry `git://mirrors.ustc.edu.cn/crates.io-index`)
  Downloaded semver-parser v0.7.0 (registry `git://mirrors.ustc.edu.cn/crates.io-index`)
  Downloaded syntex_syntax v0.42.0 (registry `git://mirrors.ustc.edu.cn/crates.io-index`)
  Downloaded term v0.4.6 (registry `git://mirrors.ustc.edu.cn/crates.io-index`)
  Downloaded rand_pcg v0.1.1 (registry `git://mirrors.ustc.edu.cn/crates.io-index`)
  Downloaded unicode-xid v0.0.3 (registry `git://mirrors.ustc.edu.cn/crates.io-index`)
  Downloaded regex-syntax v0.5.6 (registry `git://mirrors.ustc.edu.cn/crates.io-index`)
  Downloaded memoffset v0.2.1 (registry `git://mirrors.ustc.edu.cn/crates.io-index`)
  Downloaded syntex_pos v0.42.0 (registry `git://mirrors.ustc.edu.cn/crates.io-index`)
  Downloaded rand v0.5.5 (registry `git://mirrors.ustc.edu.cn/crates.io-index`)
  Downloaded stable_deref_trait v1.1.1 (registry `git://mirrors.ustc.edu.cn/crates.io-index`)
  Downloaded tokio-io v0.1.10 (registry `git://mirrors.ustc.edu.cn/crates.io-index`)
  Downloaded arrayvec v0.4.9 (registry `git://mirrors.ustc.edu.cn/crates.io-index`)
  Downloaded rand_core v0.2.2 (registry `git://mirrors.ustc.edu.cn/crates.io-index`)

参考资料

https://lug.ustc.edu.cn/wiki/mirrors/help/rust-crates

rust crates 国内镜像加速配置的更多相关文章

  1. docker学习(2) mac中docker-machine使用vmware fusion以及配置国内镜像加速

    一.前言 先回顾下上一节创建docker-machine的过程,默认情况下docker toolbox中的docker-machine使用virtual box创建虚拟机,KI首次启动时创建虚拟机的过 ...

  2. python 使用pip安装使用国内镜像加速下载安装包的方法

    清华大学提供开源镜像站:https://mirrors.tuna.tsinghua.edu.cn/help/pypi/ pypi 镜像每 5 分钟同步一次. pip install 包的名字 == 版 ...

  3. Docker(3)- Centos 7.x 下 Docker 镜像加速配置

    如果你还想从头学起 Docker,可以看看这个系列的文章哦! https://www.cnblogs.com/poloyy/category/1870863.html 前言 默认情况下,Docker ...

  4. pip安装库时报错,使用国内镜像加速

    pip install requests或pip --trusted-host pypi.python.org install requests报错: 原因:网上解释为网速太慢,或被防火墙 解决方法: ...

  5. 安装使用yarn,使用国内镜像加速npm和yarn

    安装yarn https://yarnpkg.com/lang/zh-hans/docs/install/ 使用国内镜像加速npm和yarn 1. npm config set registry=ht ...

  6. Docker - Docker国内镜像的配置及使用

    Docker国内镜像 DaoCloud - Docker加速器 阿里云 - 开发者平台 微镜像 - 希云cSphere 镜像广场 - 时速云 灵雀云 网易蜂巢 阿里云的Docker加速器 阿里云 - ...

  7. Docker - 国内镜像的配置及使用

    Docker国内镜像 DaoCloud - Docker加速器 阿里云 - 开发者平台 微镜像 - 希云cSphere 网易蜂巢 阿里云的Docker加速器 阿里云 - 开发者平台:https://d ...

  8. 使用国内镜像加速下载Android SDK

    本文转自:http://blog.kuoruan.com/24.html.感谢原作者. 什么是Android SDK SDK:(software development kit)软件开发工具包.被软件 ...

  9. gradle更换国内镜像、配置本地仓库地址

    gradle更换国内镜像,安装包解压后init.d文件夹下面创建init.gradle文件,内容如下 allprojects{ repositories { def REPOSITORY_URL = ...

随机推荐

  1. 【题解】Luogu P4284 [SHOI2014]概率充电器

    原题传送门 我们知道,每个电器充电对充电电器数的贡献都是相等的1,所以若第\(i\)个电器有\(p_i\)的概率充电时 \[E=\sum_{i=1}^np_i\] 我们考虑如何求\(p_i\),根据树 ...

  2. 系统压测结果对比:tomcat/thinkphp/swoole/php-fpm/apache

    [测试所用服务器8核,16G内存]压测接口:很简单,从一张表里根据主键随机查询出一条数据[数据库服务器和WEB服务器分开的].表数据量大概:910000+条. 这个测试结果很有趣:tp5.0和3.2性 ...

  3. thinkPHP中 query()和execute()的区别

    query()执行的是查询(select)的SQL语句. execute()执行的是插入(insert)和修改(update)的SQL语句.execute()方法将返回影响的记录数. 如果在TP中使用 ...

  4. Python面向对象封装案例

    01. 封装 封装 是面向对象编程的一大特点 面向对象编程的 第一步 —— 将 属性 和 方法 封装 到一个抽象的 类 中 外界 使用 类 创建 对象,然后 让对象调用方法 对象方法的细节 都被 封装 ...

  5. SpringMVC中的400错误,The request sent by the client was syntactically incorrect.

    在其他对象属性类型一样情况下,只需要创建一个类,再在springmvc.xml中添加配置: package com.ujiuye.common; import org.springframework. ...

  6. kubernetes网络之Flannel

    简介 Flannel是CoreOS团队针对Kubernetes设计的一个网络规划服务,简单来说,它的功能是让集群中的不同节点主机创建的Docker容器都具有全集群唯一的虚拟IP地址. 在默认的Dock ...

  7. Es查询工具使用

    Kibana按照索引过滤数据 1.创建索引模式 2.查询索引中的数据 Es查询不返回数据 创建索引的时候指定mapping mappings={ "mappings": { &qu ...

  8. MySQL 触发器学习-markdown->html 格式测试

    <!doctype html>触发器 figure:first-child { margin-top: -20px; } #write ol, #write ul { position: ...

  9. 【转】UCOSIII基础知识点

    1.其中最有用的功能应该是时间片轮转法( roundrobin), 这个是 uC/OS-II 中不支持的,但是现在已经是 uC/OS-III 的一个功能了 2.uC/OS-III 被设计用于 32 位 ...

  10. springboot 集成J2Cache

    J2Cache 是 OSChina 目前正在使用的两级缓存框架.第一级缓存使用 Ehcache,第二级缓存使用 Redis .由于大量的缓存读取会导致 L2 的网络成为整个系统的瓶颈,因此 L1 的目 ...