使用rustup安装rust环境

https://baijiahao.baidu.com/s?id=1650465844138933548&wfr=spider&for=pc

github地址:https://github.com/bradyjoestar/rustnotes(欢迎star!)
pdf下载链接:https://github.com/bradyjoestar/rustnotes/blob/master/Rust%E8%AF%AD%E8%A8%80%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0.pdf
参考:
https://rustcc.gitbooks.io/rustprimer/content/ 《RustPrimer》
https://kaisery.github.io/trpl-zh-cn/ 《Rust程序设计语言-简体中文版》

作者:bradyjoestar
链接:https://www.jianshu.com/p/b50cd297470c
来源:简书
rust学习笔记
https://www.jianshu.com/p/b50cd297470c

git 拉取代码出现错误的解决方法:

  原因可能有文件过大,网速太差,以及一些国外资源墙的因素影响等等。

  解决方式:

  1、文件太大解决方式为git 添加compression配置项

  git config --global core.compression -1

  compression时压缩的意思,从clone 的终端输出就知道,服务器会压缩目标文件,然后传输到客户端,客户端再进行解压。

  2、可以增加git 的缓存大小

  git config --global http.postBuffer 1048576000 (1 G)

  3、配置git的最低速和最低速时间

  git config --global http.lowSpeedLimit 0

  git config --global http.lowSpeedTime 9999999 单位 秒

  global配置对当前用户生效,如果需要对所有用户生效,则用-system

   4、 少clone一些

  git clone https://github.com/flutter.git -depth 1

  -depth 1 的含义是复制深度为1,就是每个文件只取最近一次提交,不是整个历史版本

  5、换协议

  clone http 方式换成SSH的方式,即https://改为git://

  git clone https://github.com/lutter/flutter.git

  git clone git://github.com/flutter/flutter.git

  这时要注意安装的rustup版本问题  我遇到的问题是由于rustup版本太高导致不兼容降低至rustup1.30.0版本会出现

  

   出现如上问题可以修改config文件,添加

  [http]

  check-revoke = false

  或者调置环境变量CARGO_HTTP_CHECK_REVOKE=false

  

   继续执行就会出现以上错误

  查看rustup版本号:rustc --version

  切换rustup版本:rustup default 1.10.0

    切换rustup 1.20.0、1.30.0版本都出现错误

查看rustup 安装版本:rustup show

原文地址:https://www.cnblogs.com/wjq13752525588/p/13431463.html