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. 示例:WPF开发的简单ObjectProperyForm用来绑定实体表单

    原文:示例:WPF开发的简单ObjectProperyForm用来绑定实体表单 一.目的:自定义控件,用来直接绑定实体数据,简化开发周期 二.实现: 1.绑定实体对象 2.通过特性显示属性名称 3.通 ...

  2. 在RedHead中安装Oracle

    配置Linux系统下Oracle的安装环境. 1.检查和更新所需软件包. # rpm -q binutils compat-libstdc++-33 elfutils-libelf elfutils- ...

  3. “分而治之”,一种AI和动画系统的架构

    译者注:随着国内游戏研发水平的不断提高,对画面品质的不断提升,同时大量手游使用Unity和Unreal 4等成熟的工具开发,动作状态机已经不是什么陌生的概念了.我们在项目开发时也大量使用了动作状态机. ...

  4. Java的Stream流式操作

    前言 最近在实习,在公司看到前辈的一些代码,发现有很多值得我学习的地方,其中有一部分就是对集合使用Stream流式操作,觉得很优美且方便.所以学习一下Stream流,在这里记录一下. Stream是什 ...

  5. 2019 金蝶java面试笔试题 (含面试题解析)

      本人5年开发经验.18年年底开始跑路找工作,在互联网寒冬下成功拿到阿里巴巴.今日头条.金蝶等公司offer,岗位是Java后端开发,因为发展原因最终选择去了金蝶,入职一年时间了,也成为了面试官,之 ...

  6. Django:RestFramework之-------序列化器

    8.序列化 功能: 对请求数据进行验证 对Queryset进行序列化 8.1一个简单序列化: import json from api import models from rest_framewor ...

  7. SpringBoot,SSM和SSH

    Springboot的概念: 是提供的全新框架,使用来简化Spring的初始搭建和开发过程,使用了特定的方式来进行配置,让开发人员不在需要定义样板化的配置.此框架不需要配置xml,依赖于想MAVEN这 ...

  8. Android图像滤镜框架GPUImage从配置到应用

    GPUImage简介 GPUImage 是iOS下一个开源的基于GPU的图像处理库,提供各种各样的图像处理滤镜,并且支持照相机和摄像机的实时滤镜.GPUImage for Android是它在Andr ...

  9. linux防火墙和xshell的链接

    centos7用的firewalld 1.firewalld的基本使用 启动: systemctl start firewalld 关闭: systemctl stop firewalld 查看状态: ...

  10. docker cannot stop container问题解决

    docker 容器在启动时出现异常,删除容器或者暂停容器时会出现cannot stop container 先使用sudo aa-remove-unknown ,再进行其他操作 lgj@lgj-Len ...