当前位置: 首页 > news >正文

创建网站的英语济南百度开户电话

创建网站的英语,济南百度开户电话,大学生对校园网站建设的需求是什么意思,试描述一下网站建设的基本流程图换皮不换身 换了国内源,构建时该卡还会卡。因为它所谓的换源,只是更换crates.io“索引”的源,而不是package“内容”的源。换了国内源后,在国内编译时访问 crates.io-index 自然会快很多,可是crates.io-index里面的信…

换皮不换身

换了国内源,构建时该卡还会卡。因为它所谓的换源,只是更换crates.io“索引”的源,而不是package“内容”的源。换了国内源后,在国内编译时访问 crates.io-index 自然会快很多,可是crates.io-index里面的信息含量本身就不多,主要是package名称/版本/依赖/特性等,Cargo还要去crates.io网站查询指定package的下载地址,而下载地址也是指向crates.io网站的。最终网络访问瓶颈还是境外的crates.io网站。

换国内源

清华

https://mirrors.tuna.tsinghua.edu.cn/help/crates.io-index.git/

清华大学开源软件镜像站,Rust crates.io 索引镜像使用帮助:
编辑 $CARGO_HOME/config 文件,添加以下内容:

[source.crates-io]
replace-with = 'mirror'[source.mirror]
registry = "https://mirrors.tuna.tsinghua.edu.cn/git/crates.io-index.git"

Rust Crates 实践指南 - The Guide to Rust Crates

https://mirrors.gitcode.host/zzy/rust-crate-guide/4-cargo/4.1-source-replacement.html

创建 $HOME/.cargo/config 文件(各操作系统及版本均大致相同),然后在 config 文件内写入下述配置内容:

[source.crates-io]
registry = "https://github.com/rust-lang/crates.io-index"
# 指定镜像
replace-with = '镜像源名' # 如:tuna、sjtu、ustc,或者 rustcc# 注:以下源配置一个即可,无需全部# 中国科学技术大学
[source.ustc]
registry = "git://mirrors.ustc.edu.cn/crates.io-index"# 上海交通大学
[source.sjtu]
registry = "https://mirrors.sjtug.sjtu.edu.cn/git/crates.io-index"# 清华大学
[source.tuna]
registry = "https://mirrors.tuna.tsinghua.edu.cn/git/crates.io-index.git"# rustcc社区
[source.rustcc]
registry = "https://code.aliyun.com/rustcc/crates.io-index.git"

查询 crates.io-index

https://github.com/rust-lang/crates.io-index/blob/master/to/ki/tokio

// ingore old vertions ...
{"name":"tokio","vers":"1.30.0","deps":[{"name":"async-stream","req":"^0.3","features":[],"optional":false,"default_features":true,"target":null,"kind":"dev"},{"name":"backtrace","req":"^0.3.58","features":[],"optional":false,"default_features":true,"target":"cfg(tokio_taskdump)","kind":"normal"},{"name":"bytes","req":"^1.0.0","features":[],"optional":true,"default_features":true,"target":null,"kind":"normal"},{"name":"futures","req":"^0.3.0","features":["async-await"],"optional":false,"default_features":true,"target":null,"kind":"dev"},{"name":"libc","req":"^0.2.145","features":[],"optional":true,"default_features":true,"target":"cfg(unix)","kind":"normal"},{"name":"libc","req":"^0.2.145","features":[],"optional":false,"default_features":true,"target":"cfg(unix)","kind":"dev"},{"name":"loom","req":"^0.7","features":["futures","checkpoint"],"optional":false,"default_features":true,"target":"cfg(loom)","kind":"dev"},{"name":"mio","req":"^0.8.6","features":[],"optional":true,"default_features":false,"target":null,"kind":"normal"},{"name":"mio-aio","req":"^0.7.0","features":["tokio"],"optional":false,"default_features":true,"target":"cfg(target_os = \"freebsd\")","kind":"dev"},{"name":"mockall","req":"^0.11.1","features":[],"optional":false,"default_features":true,"target":null,"kind":"dev"},{"name":"nix","req":"^0.26","features":["fs","socket"],"optional":false,"default_features":false,"target":"cfg(unix)","kind":"dev"},{"name":"num_cpus","req":"^1.8.0","features":[],"optional":true,"default_features":true,"target":null,"kind":"normal"},{"name":"parking_lot","req":"^0.12.0","features":[],"optional":true,"default_features":true,"target":null,"kind":"normal"},{"name":"pin-project-lite","req":"^0.2.11","features":[],"optional":false,"default_features":true,"target":null,"kind":"normal"},{"name":"rand","req":"^0.8.0","features":[],"optional":false,"default_features":true,"target":"cfg(not(all(target_family = \"wasm\", target_os = \"unknown\")))","kind":"dev"},{"name":"signal-hook-registry","req":"^1.1.1","features":[],"optional":true,"default_features":true,"target":"cfg(unix)","kind":"normal"},{"name":"socket2","req":"^0.5.3","features":["all"],"optional":true,"default_features":true,"target":"cfg(not(target_family = \"wasm\"))","kind":"normal"},{"name":"socket2","req":"^0.5.3","features":[],"optional":false,"default_features":true,"target":"cfg(not(target_family = \"wasm\"))","kind":"dev"},{"name":"tempfile","req":"^3.1.0","features":[],"optional":false,"default_features":true,"target":"cfg(not(target_family = \"wasm\"))","kind":"dev"},{"name":"tokio-macros","req":"~2.1.0","features":[],"optional":true,"default_features":true,"target":null,"kind":"normal"},{"name":"tokio-stream","req":"^0.1","features":[],"optional":false,"default_features":true,"target":null,"kind":"dev"},{"name":"tokio-test","req":"^0.4.0","features":[],"optional":false,"default_features":true,"target":null,"kind":"dev"},{"name":"tracing","req":"^0.1.25","features":["std"],"optional":true,"default_features":false,"target":"cfg(tokio_unstable)","kind":"normal"},{"name":"wasm-bindgen-test","req":"^0.3.0","features":[],"optional":false,"default_features":true,"target":"cfg(all(target_family = \"wasm\", not(target_os = \"wasi\")))","kind":"dev"},{"name":"windows-sys","req":"^0.48","features":[],"optional":true,"default_features":true,"target":"cfg(windows)","kind":"normal"},{"name":"windows-sys","req":"^0.48","features":["Win32_Foundation","Win32_Security_Authorization"],"optional":false,"default_features":true,"target":"cfg(windows)","kind":"dev"}],"cksum":"2d3ce25f50619af8b0aec2eb23deebe84249e19e2ddd393a6e16e3300a6dadfd","features":{"default":[],"fs":[],"full":["fs","io-util","io-std","macros","net","parking_lot","process","rt","rt-multi-thread","signal","sync","time"],"io-std":[],"io-util":["bytes"],"macros":["tokio-macros"],"net":["libc","mio/os-poll","mio/os-ext","mio/net","socket2","windows-sys/Win32_Foundation","windows-sys/Win32_Security","windows-sys/Win32_Storage_FileSystem","windows-sys/Win32_System_Pipes","windows-sys/Win32_System_SystemServices"],"process":["bytes","libc","mio/os-poll","mio/os-ext","mio/net","signal-hook-registry","windows-sys/Win32_Foundation","windows-sys/Win32_System_Threading","windows-sys/Win32_System_WindowsProgramming"],"rt":[],"rt-multi-thread":["num_cpus","rt"],"signal":["libc","mio/os-poll","mio/net","mio/os-ext","signal-hook-registry","windows-sys/Win32_Foundation","windows-sys/Win32_System_Console"],"stats":[],"sync":[],"test-util":["rt","sync","time"],"time":[]},"yanked":false,"rust_version":"1.63"}
{"name":"tokio","vers":"1.31.0","deps":[{"name":"async-stream","req":"^0.3","features":[],"optional":false,"default_features":true,"target":null,"kind":"dev"},{"name":"backtrace","req":"^0.3.58","features":[],"optional":false,"default_features":true,"target":"cfg(tokio_taskdump)","kind":"normal"},{"name":"bytes","req":"^1.0.0","features":[],"optional":true,"default_features":true,"target":null,"kind":"normal"},{"name":"futures","req":"^0.3.0","features":["async-await"],"optional":false,"default_features":true,"target":null,"kind":"dev"},{"name":"libc","req":"^0.2.145","features":[],"optional":true,"default_features":true,"target":"cfg(unix)","kind":"normal"},{"name":"libc","req":"^0.2.145","features":[],"optional":false,"default_features":true,"target":"cfg(unix)","kind":"dev"},{"name":"loom","req":"^0.7","features":["futures","checkpoint"],"optional":false,"default_features":true,"target":"cfg(loom)","kind":"dev"},{"name":"mio","req":"^0.8.6","features":[],"optional":true,"default_features":false,"target":null,"kind":"normal"},{"name":"mio-aio","req":"^0.7.0","features":["tokio"],"optional":false,"default_features":true,"target":"cfg(target_os = \"freebsd\")","kind":"dev"},{"name":"mockall","req":"^0.11.1","features":[],"optional":false,"default_features":true,"target":null,"kind":"dev"},{"name":"nix","req":"^0.26","features":["fs","socket"],"optional":false,"default_features":false,"target":"cfg(unix)","kind":"dev"},{"name":"num_cpus","req":"^1.8.0","features":[],"optional":true,"default_features":true,"target":null,"kind":"normal"},{"name":"parking_lot","req":"^0.12.0","features":[],"optional":true,"default_features":true,"target":null,"kind":"normal"},{"name":"pin-project-lite","req":"^0.2.11","features":[],"optional":false,"default_features":true,"target":null,"kind":"normal"},{"name":"rand","req":"^0.8.0","features":[],"optional":false,"default_features":true,"target":"cfg(not(all(target_family = \"wasm\", target_os = \"unknown\")))","kind":"dev"},{"name":"signal-hook-registry","req":"^1.1.1","features":[],"optional":true,"default_features":true,"target":"cfg(unix)","kind":"normal"},{"name":"socket2","req":"^0.5.3","features":["all"],"optional":true,"default_features":true,"target":"cfg(not(target_family = \"wasm\"))","kind":"normal"},{"name":"socket2","req":"^0.5.3","features":[],"optional":false,"default_features":true,"target":"cfg(not(target_family = \"wasm\"))","kind":"dev"},{"name":"tempfile","req":"^3.1.0","features":[],"optional":false,"default_features":true,"target":"cfg(not(target_family = \"wasm\"))","kind":"dev"},{"name":"tokio-macros","req":"~2.1.0","features":[],"optional":true,"default_features":true,"target":null,"kind":"normal"},{"name":"tokio-stream","req":"^0.1","features":[],"optional":false,"default_features":true,"target":null,"kind":"dev"},{"name":"tokio-test","req":"^0.4.0","features":[],"optional":false,"default_features":true,"target":null,"kind":"dev"},{"name":"tracing","req":"^0.1.25","features":["std"],"optional":true,"default_features":false,"target":"cfg(tokio_unstable)","kind":"normal"},{"name":"wasm-bindgen-test","req":"^0.3.0","features":[],"optional":false,"default_features":true,"target":"cfg(all(target_family = \"wasm\", not(target_os = \"wasi\")))","kind":"dev"},{"name":"windows-sys","req":"^0.48","features":[],"optional":true,"default_features":true,"target":"cfg(windows)","kind":"normal"},{"name":"windows-sys","req":"^0.48","features":["Win32_Foundation","Win32_Security_Authorization"],"optional":false,"default_features":true,"target":"cfg(windows)","kind":"dev"}],"cksum":"40de3a2ba249dcb097e01be5e67a5ff53cf250397715a071a81543e8a832a920","features":{"default":[],"fs":[],"full":["fs","io-util","io-std","macros","net","parking_lot","process","rt","rt-multi-thread","signal","sync","time"],"io-std":[],"io-util":["bytes"],"macros":["tokio-macros"],"net":["libc","mio/os-poll","mio/os-ext","mio/net","socket2","windows-sys/Win32_Foundation","windows-sys/Win32_Security","windows-sys/Win32_Storage_FileSystem","windows-sys/Win32_System_Pipes","windows-sys/Win32_System_SystemServices"],"process":["bytes","libc","mio/os-poll","mio/os-ext","mio/net","signal-hook-registry","windows-sys/Win32_Foundation","windows-sys/Win32_System_Threading","windows-sys/Win32_System_WindowsProgramming"],"rt":[],"rt-multi-thread":["num_cpus","rt"],"signal":["libc","mio/os-poll","mio/net","mio/os-ext","signal-hook-registry","windows-sys/Win32_Foundation","windows-sys/Win32_System_Console"],"stats":[],"sync":[],"test-util":["rt","sync","time"],"time":[]},"yanked":false,"rust_version":"1.63"}
{"name":"tokio","vers":"1.32.0","deps":[{"name":"async-stream","req":"^0.3","features":[],"optional":false,"default_features":true,"target":null,"kind":"dev"},{"name":"backtrace","req":"^0.3.58","features":[],"optional":false,"default_features":true,"target":"cfg(tokio_taskdump)","kind":"normal"},{"name":"bytes","req":"^1.0.0","features":[],"optional":true,"default_features":true,"target":null,"kind":"normal"},{"name":"futures","req":"^0.3.0","features":["async-await"],"optional":false,"default_features":true,"target":null,"kind":"dev"},{"name":"libc","req":"^0.2.145","features":[],"optional":true,"default_features":true,"target":"cfg(unix)","kind":"normal"},{"name":"libc","req":"^0.2.145","features":[],"optional":false,"default_features":true,"target":"cfg(unix)","kind":"dev"},{"name":"loom","req":"^0.7","features":["futures","checkpoint"],"optional":false,"default_features":true,"target":"cfg(loom)","kind":"dev"},{"name":"mio","req":"^0.8.6","features":[],"optional":true,"default_features":false,"target":null,"kind":"normal"},{"name":"mio-aio","req":"^0.7.0","features":["tokio"],"optional":false,"default_features":true,"target":"cfg(target_os = \"freebsd\")","kind":"dev"},{"name":"mockall","req":"^0.11.1","features":[],"optional":false,"default_features":true,"target":null,"kind":"dev"},{"name":"nix","req":"^0.26","features":["fs","socket"],"optional":false,"default_features":false,"target":"cfg(unix)","kind":"dev"},{"name":"num_cpus","req":"^1.8.0","features":[],"optional":true,"default_features":true,"target":null,"kind":"normal"},{"name":"parking_lot","req":"^0.12.0","features":[],"optional":true,"default_features":true,"target":null,"kind":"normal"},{"name":"pin-project-lite","req":"^0.2.11","features":[],"optional":false,"default_features":true,"target":null,"kind":"normal"},{"name":"rand","req":"^0.8.0","features":[],"optional":false,"default_features":true,"target":"cfg(not(all(target_family = \"wasm\", target_os = \"unknown\")))","kind":"dev"},{"name":"signal-hook-registry","req":"^1.1.1","features":[],"optional":true,"default_features":true,"target":"cfg(unix)","kind":"normal"},{"name":"socket2","req":"^0.5.3","features":["all"],"optional":true,"default_features":true,"target":"cfg(not(target_family = \"wasm\"))","kind":"normal"},{"name":"socket2","req":"^0.5.3","features":[],"optional":false,"default_features":true,"target":"cfg(not(target_family = \"wasm\"))","kind":"dev"},{"name":"tempfile","req":"^3.1.0","features":[],"optional":false,"default_features":true,"target":"cfg(not(target_family = \"wasm\"))","kind":"dev"},{"name":"tokio-macros","req":"~2.1.0","features":[],"optional":true,"default_features":true,"target":null,"kind":"normal"},{"name":"tokio-stream","req":"^0.1","features":[],"optional":false,"default_features":true,"target":null,"kind":"dev"},{"name":"tokio-test","req":"^0.4.0","features":[],"optional":false,"default_features":true,"target":null,"kind":"dev"},{"name":"tracing","req":"^0.1.25","features":["std"],"optional":true,"default_features":false,"target":"cfg(tokio_unstable)","kind":"normal"},{"name":"wasm-bindgen-test","req":"^0.3.0","features":[],"optional":false,"default_features":true,"target":"cfg(all(target_family = \"wasm\", not(target_os = \"wasi\")))","kind":"dev"},{"name":"windows-sys","req":"^0.48","features":[],"optional":true,"default_features":true,"target":"cfg(windows)","kind":"normal"},{"name":"windows-sys","req":"^0.48","features":["Win32_Foundation","Win32_Security_Authorization"],"optional":false,"default_features":true,"target":"cfg(windows)","kind":"dev"}],"cksum":"17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9","features":{"default":[],"fs":[],"full":["fs","io-util","io-std","macros","net","parking_lot","process","rt","rt-multi-thread","signal","sync","time"],"io-std":[],"io-util":["bytes"],"macros":["tokio-macros"],"net":["libc","mio/os-poll","mio/os-ext","mio/net","socket2","windows-sys/Win32_Foundation","windows-sys/Win32_Security","windows-sys/Win32_Storage_FileSystem","windows-sys/Win32_System_Pipes","windows-sys/Win32_System_SystemServices"],"process":["bytes","libc","mio/os-poll","mio/os-ext","mio/net","signal-hook-registry","windows-sys/Win32_Foundation","windows-sys/Win32_System_Threading","windows-sys/Win32_System_WindowsProgramming"],"rt":[],"rt-multi-thread":["num_cpus","rt"],"signal":["libc","mio/os-poll","mio/net","mio/os-ext","signal-hook-registry","windows-sys/Win32_Foundation","windows-sys/Win32_System_Console"],"stats":[],"sync":[],"test-util":["rt","sync","time"],"time":[]},"yanked":false,"rust_version":"1.63"}

Cargo从这里可以拿到历史版本号,依赖项(deps),特性(features)等信息。

查询package

https://crates.io/api/v1/crates/tokio/1.32.0

{"version":{"audit_actions":[{"action":"publish","time":"2023-08-16T21:11:49.973478+00:00","user":{"avatar":"https://avatars.githubusercontent.com/u/6180?v=4","id":10,"login":"carllerche","name":"Carl Lerche","url":"https://github.com/carllerche"}}],"checksum":"17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9","crate":"tokio","crate_size":725004,"created_at":"2023-08-16T21:11:49.973478+00:00","dl_path":"/api/v1/crates/tokio/1.32.0/download","downloads":1848459,"features":{"default":[],"fs":[],"full":["fs","io-util","io-std","macros","net","parking_lot","process","rt","rt-multi-thread","signal","sync","time"],"io-std":[],"io-util":["bytes"],"macros":["tokio-macros"],"net":["libc","mio/os-poll","mio/os-ext","mio/net","socket2","windows-sys/Win32_Foundation","windows-sys/Win32_Security","windows-sys/Win32_Storage_FileSystem","windows-sys/Win32_System_Pipes","windows-sys/Win32_System_SystemServices"],"process":["bytes","libc","mio/os-poll","mio/os-ext","mio/net","signal-hook-registry","windows-sys/Win32_Foundation","windows-sys/Win32_System_Threading","windows-sys/Win32_System_WindowsProgramming"],"rt":[],"rt-multi-thread":["num_cpus","rt"],"signal":["libc","mio/os-poll","mio/net","mio/os-ext","signal-hook-registry","windows-sys/Win32_Foundation","windows-sys/Win32_System_Console"],"stats":[],"sync":[],"test-util":["rt","sync","time"],"time":[]},"id":873708,"license":"MIT","links":{"authors":"/api/v1/crates/tokio/1.32.0/authors","dependencies":"/api/v1/crates/tokio/1.32.0/dependencies","version_downloads":"/api/v1/crates/tokio/1.32.0/downloads"},"num":"1.32.0","published_by":{"avatar":"https://avatars.githubusercontent.com/u/6180?v=4","id":10,"login":"carllerche","name":"Carl Lerche","url":"https://github.com/carllerche"},"readme_path":"/api/v1/crates/tokio/1.32.0/readme","rust_version":"1.63","updated_at":"2023-08-16T21:11:49.973478+00:00","yanked":false}}

Cargo从这里可以拿到package下载地址:"dl_path":"/api/v1/crates/tokio/1.32.0/download"。这是一个相对地址,前面需要加上crates.io的origin,最终获得完整下载地址:https://crates.io/api/v1/crates/tokio/1.32.0/download

下载package

https://crates.io/api/v1/crates/tokio/1.32.0/download

自动重定向到 https://static.crates.io/crates/tokio/tokio-1.32.0.crate,下载得到的是.crate文件,实际是一个压缩包,解压后就是tokio项目源代码目录树。

前瞻

现有方案不解决主要问题。我想今后Rust还是需要提供crates.io内package下载镜像源的。

http://www.ds6.com.cn/news/104451.html

相关文章:

  • 响应式网站后台百度贴吧网页版登录入口
  • 网页设计实训报告1000字杭州网站seo外包
  • 怎么修改公司网站内容链网
  • 做网站后端语言用什么百度搜索指数排行
  • 互联网电子商务网站开发技术互联网营销方法有哪些
  • 杭州网站app开发公司山东建站
  • 购物网站建设实战教程答案web网页制作成品
  • 行业前10的网站建设网络营销内容
  • 企业做网站的坏处营销策划推广
  • 一个好的网站需要具备什么下载微信
  • wordpress 数字不连续关键词seo教程
  • 青岛做网站建设的公司排名网络宣传方式有哪些
  • 手机网站客户端考证培训机构
  • 布吉商城网站建设哪家公司靠谱企业网站建设要多少钱
  • 无锡做网站设计的企业注册google账号
  • 网站商城怎么做的2023上海又出现疫情了
  • 成都网站设计开发公司谷歌商店paypal官网
  • 上海网站建设 s下载百度浏览器
  • 无经验做网站互联网推广方式
  • 苏州高端网站建设定制百度推广步骤
  • 星级酒店网站建设公司邹平县seo网页优化外包
  • 有几家做网站的公司好主流网站关键词排名
  • 做电商要注册网站吗四年级2023新闻摘抄
  • 妈妈教儿子做愛的网站广州各区最新动态
  • 无货源如何开网店全套教程seo推广代运营
  • 上海浦东新区网站找个免费网站这么难吗
  • 自己做网站用哪个软件推广技巧
  • 网站建设费用推荐网络个人小白如何做手游代理
  • 城市建设网搜索引擎优化是什么?
  • 龙岩建设局网站网络优化工程师简历