Rename rust target to Cargo

This commit is contained in:
Aoran Zeng
2024-10-02 20:11:46 +08:00
parent 9fd619e7ca
commit 87aba9676e
4 changed files with 34 additions and 19 deletions

View File

@@ -7,16 +7,13 @@
* Last Modified : <2024-10-02>
* ------------------------------------------------------------*/
static MirrorSite
RsProxyCN = {"rsproxycn", "RsProxy.cn", "字节跳动基础架构Dev Infra", "https://rsproxy.cn/", NULL};
/**
* @update 2024-10-02
* @note `sparse+`
* @note `/`
*/
static SourceInfo
pl_rust_sources[] = {
pl_rust_cargo_sources[] = {
{&Upstream, "https://index.crates.io/"}, // @help 是这个吗?
{&MirrorZ, "https://mirrors.cernet.edu.cn/crates.io-index/"},
{&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/crates.io-index/"},
@@ -26,14 +23,14 @@ pl_rust_sources[] = {
{&RsProxyCN, "https://rsproxy.cn/index/"},
{&Hust, "https://mirrors.hust.edu.cn/crates.io-index/"}
};
def_sources_n(pl_rust);
def_sources_n(pl_rust_cargo);
/**
* chsrc get rust
* chsrc get cargo
*/
void
pl_rust_getsrc (char *option)
pl_rust_cargo_getsrc (char *option)
{
chsrc_view_file ("~/.cargo/config.toml");
}
@@ -43,12 +40,12 @@ pl_rust_getsrc (char *option)
* @consult https://mirrors.tuna.tsinghua.edu.cn/help/crates.io-index/
* @consult https://help.mirrors.cernet.edu.cn/crates.io-index
*
* chsrc set rust
* chsrc set cargo
*/
void
pl_rust_setsrc (char *option)
pl_rust_cargo_setsrc (char *option)
{
chsrc_yield_source_and_confirm (pl_rust);
chsrc_yield_source_and_confirm (pl_rust_cargo);
const char* file = xy_strjoin (3,
"[source.crates-io]\n"
@@ -64,17 +61,17 @@ pl_rust_setsrc (char *option)
/**
* chsrc reset rust
* chsrc reset cargo
*/
void
pl_rust_resetsrc (char *option)
pl_rust_cargo_resetsrc (char *option)
{
pl_rust_setsrc (SetsrcType_Reset);
pl_rust_cargo_setsrc (SetsrcType_Reset);
}
FeatInfo
pl_rust_feat (char *option)
pl_rust_cargo_feat (char *option)
{
FeatInfo fi = {0};
@@ -91,4 +88,4 @@ pl_rust_feat (char *option)
}
def_target_gsrf(pl_rust);
def_target_gsrf(pl_rust_cargo);

View File

@@ -0,0 +1,11 @@
/** ------------------------------------------------------------
* SPDX-License-Identifier: GPL-3.0-or-later
* -------------------------------------------------------------
* File Authors : Aoran Zeng <ccmywish@qq.com>
* Contributors : Nil Null <nil@null.org>
* Created On : <2024-10-02>
* Last Modified : <2024-10-02>
* ------------------------------------------------------------*/
static MirrorSite
RsProxyCN = {"rsproxycn", "RsProxy.cn", "字节跳动基础架构Dev Infra", "https://rsproxy.cn/", NULL};