mirror of
https://github.com/RubyMetric/chsrc
synced 2025-06-08 03:04:03 +08:00
Rename rust
target to Cargo
This commit is contained in:
parent
9fd619e7ca
commit
87aba9676e
@ -47,7 +47,10 @@
|
|||||||
#include "recipe/lang/Lua.c"
|
#include "recipe/lang/Lua.c"
|
||||||
#include "recipe/lang/Go.c"
|
#include "recipe/lang/Go.c"
|
||||||
#include "recipe/lang/Java.c"
|
#include "recipe/lang/Java.c"
|
||||||
#include "recipe/lang/Rust.c"
|
|
||||||
|
#include "recipe/lang/Rust/common.h"
|
||||||
|
#include "recipe/lang/Rust/rustup.c"
|
||||||
|
#include "recipe/lang/Rust/Cargo.c"
|
||||||
|
|
||||||
#include "recipe/lang/Dart/Pub.c"
|
#include "recipe/lang/Dart/Pub.c"
|
||||||
#include "recipe/lang/Dart/Flutter.c"
|
#include "recipe/lang/Dart/Flutter.c"
|
||||||
|
@ -7,16 +7,13 @@
|
|||||||
* Last Modified : <2024-10-02>
|
* Last Modified : <2024-10-02>
|
||||||
* ------------------------------------------------------------*/
|
* ------------------------------------------------------------*/
|
||||||
|
|
||||||
static MirrorSite
|
|
||||||
RsProxyCN = {"rsproxycn", "RsProxy.cn", "字节跳动基础架构Dev Infra", "https://rsproxy.cn/", NULL};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @update 2024-10-02
|
* @update 2024-10-02
|
||||||
* @note 以下都支持稀疏索引,我们换源时都将默认添加 `sparse+`
|
* @note 以下都支持稀疏索引,我们换源时都将默认添加 `sparse+`
|
||||||
* @note 链接末尾的 `/` 不能缺少
|
* @note 链接末尾的 `/` 不能缺少
|
||||||
*/
|
*/
|
||||||
static SourceInfo
|
static SourceInfo
|
||||||
pl_rust_sources[] = {
|
pl_rust_cargo_sources[] = {
|
||||||
{&Upstream, "https://index.crates.io/"}, // @help 是这个吗?
|
{&Upstream, "https://index.crates.io/"}, // @help 是这个吗?
|
||||||
{&MirrorZ, "https://mirrors.cernet.edu.cn/crates.io-index/"},
|
{&MirrorZ, "https://mirrors.cernet.edu.cn/crates.io-index/"},
|
||||||
{&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.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/"},
|
{&RsProxyCN, "https://rsproxy.cn/index/"},
|
||||||
{&Hust, "https://mirrors.hust.edu.cn/crates.io-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
|
void
|
||||||
pl_rust_getsrc (char *option)
|
pl_rust_cargo_getsrc (char *option)
|
||||||
{
|
{
|
||||||
chsrc_view_file ("~/.cargo/config.toml");
|
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://mirrors.tuna.tsinghua.edu.cn/help/crates.io-index/
|
||||||
* @consult https://help.mirrors.cernet.edu.cn/crates.io-index
|
* @consult https://help.mirrors.cernet.edu.cn/crates.io-index
|
||||||
*
|
*
|
||||||
* chsrc set rust
|
* chsrc set cargo
|
||||||
*/
|
*/
|
||||||
void
|
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,
|
const char* file = xy_strjoin (3,
|
||||||
"[source.crates-io]\n"
|
"[source.crates-io]\n"
|
||||||
@ -64,17 +61,17 @@ pl_rust_setsrc (char *option)
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* chsrc reset rust
|
* chsrc reset cargo
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
pl_rust_resetsrc (char *option)
|
pl_rust_cargo_resetsrc (char *option)
|
||||||
{
|
{
|
||||||
pl_rust_setsrc (SetsrcType_Reset);
|
pl_rust_cargo_setsrc (SetsrcType_Reset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
FeatInfo
|
FeatInfo
|
||||||
pl_rust_feat (char *option)
|
pl_rust_cargo_feat (char *option)
|
||||||
{
|
{
|
||||||
FeatInfo fi = {0};
|
FeatInfo fi = {0};
|
||||||
|
|
||||||
@ -91,4 +88,4 @@ pl_rust_feat (char *option)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def_target_gsrf(pl_rust);
|
def_target_gsrf(pl_rust_cargo);
|
11
src/recipe/lang/Rust/common.h
Normal file
11
src/recipe/lang/Rust/common.h
Normal 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};
|
@ -5,7 +5,7 @@
|
|||||||
* Contributors : Nil Null <nil@null.org>
|
* Contributors : Nil Null <nil@null.org>
|
||||||
* Created On : <2023-09-01>
|
* Created On : <2023-09-01>
|
||||||
* Major Revision : 1
|
* Major Revision : 1
|
||||||
* Last Modified : <2024-09-29>
|
* Last Modified : <2024-10-02>
|
||||||
* ------------------------------------------------------------*/
|
* ------------------------------------------------------------*/
|
||||||
|
|
||||||
/* Begin Target Matrix */
|
/* Begin Target Matrix */
|
||||||
@ -29,7 +29,10 @@ static const char
|
|||||||
*pl_php [] = {"php", "composer", NULL, t(&pl_php_target)},
|
*pl_php [] = {"php", "composer", NULL, t(&pl_php_target)},
|
||||||
*pl_lua [] = {"lua", "luarocks", NULL, t(&pl_lua_target)},
|
*pl_lua [] = {"lua", "luarocks", NULL, t(&pl_lua_target)},
|
||||||
*pl_go [] = {"go", "golang", "goproxy", NULL, t(&pl_go_target)} ,
|
*pl_go [] = {"go", "golang", "goproxy", NULL, t(&pl_go_target)} ,
|
||||||
*pl_rust [] = {"rust", "cargo", "crate", "crates", NULL, t(&pl_rust_target)},
|
|
||||||
|
*pl_rust_cargo[] = {"rust", "cargo", "crate", "crates", NULL, t(&pl_rust_cargo_target)},
|
||||||
|
*pl_rust_rustup[]= {"rustup", NULL, t(&pl_rust_rustup_target)},
|
||||||
|
|
||||||
*pl_java [] = {"java", "maven", "mvn", "gradle", NULL, t(&pl_java_target)},
|
*pl_java [] = {"java", "maven", "mvn", "gradle", NULL, t(&pl_java_target)},
|
||||||
*pl_clojure[]= {"clojure","clojars","cloj", "lein", NULL, t(&pl_clojure_target)},
|
*pl_clojure[]= {"clojure","clojars","cloj", "lein", NULL, t(&pl_clojure_target)},
|
||||||
|
|
||||||
@ -50,7 +53,8 @@ static const char
|
|||||||
pl_nodejs_nvm,
|
pl_nodejs_nvm,
|
||||||
pl_perl, pl_php,
|
pl_perl, pl_php,
|
||||||
pl_lua,
|
pl_lua,
|
||||||
pl_rust, pl_go,
|
pl_rust_cargo, pl_rust_rustup,
|
||||||
|
pl_go,
|
||||||
/*pl_nuget,*/
|
/*pl_nuget,*/
|
||||||
pl_java, pl_clojure,
|
pl_java, pl_clojure,
|
||||||
pl_dart, pl_dart_flutter,
|
pl_dart, pl_dart_flutter,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user