mirror of
https://github.com/RubyMetric/chsrc
synced 2025-07-24 01:09:34 +08:00
This is the last R
This commit is contained in:
parent
94bf2f5caf
commit
1754a1a943
@ -43,6 +43,8 @@
|
||||
|
||||
#include "framework/core.c"
|
||||
|
||||
#include "recipe/lang/rawstr4c.h"
|
||||
|
||||
#include "recipe/lang/Ruby/Ruby.c"
|
||||
|
||||
#include "recipe/lang/Python/common.h"
|
||||
|
@ -5,7 +5,7 @@
|
||||
* Contributors : Mikachu2333 <mikachu.23333@zohomail.com>
|
||||
* |
|
||||
* Created On : <2023-08-30>
|
||||
* Last Modified : <2025-07-11>
|
||||
* Last Modified : <2025-07-22>
|
||||
* ------------------------------------------------------------*/
|
||||
|
||||
static SourceProvider_t pl_rust_cargo_upstream =
|
||||
@ -21,44 +21,33 @@ static SourceProvider_t pl_rust_cargo_upstream =
|
||||
*
|
||||
* @note 以下都支持稀疏索引,我们换源时都将默认添加 `sparse+`
|
||||
* @note 链接末尾的 `/` 不能缺少
|
||||
*
|
||||
* @note 2025-06-17: 经验证,南京大学、华中科大的镜像同步失败,实际情况下多数包都不可用
|
||||
*/
|
||||
static Source_t pl_rust_cargo_sources[] =
|
||||
{
|
||||
{&pl_rust_cargo_upstream, "https://github.com/rust-lang/crates.io-index/",
|
||||
NULL},
|
||||
{&pl_rust_cargo_upstream, "https://github.com/rust-lang/crates.io-index/", DelegateToUpstream},
|
||||
|
||||
{&MirrorZ, "https://mirrors.cernet.edu.cn/crates.io-index/", DelegateToMirror},
|
||||
{&RsProxyCN, "https://rsproxy.cn/index/", DelegateToMirror},
|
||||
|
||||
{&MirrorZ, "https://mirrors.cernet.edu.cn/crates.io-index/",
|
||||
NULL},
|
||||
{&RsProxyCN, "https://rsproxy.cn/index/",
|
||||
NULL},
|
||||
{&Ali, "https://mirrors.aliyun.com/crates.io-index/",
|
||||
"https://mirrors.aliyun.com/crates/api/v1/crates/windows/0.58.0/download"},
|
||||
|
||||
{&Zju, "https://mirrors.zju.edu.cn/crates.io-index/",
|
||||
NULL},
|
||||
{&Zju, "https://mirrors.zju.edu.cn/crates.io-index/", DelegateToMirror},
|
||||
|
||||
// {&Nju, "https://mirror.nju.edu.cn/git/crates.io-index.git/",
|
||||
// NULL},
|
||||
/* 注释原因: (2025-06-17) 镜像同步失败,多数包都不可用 */
|
||||
// {&Nju, "https://mirror.nju.edu.cn/git/crates.io-index.git/", DelegateToMirror},
|
||||
|
||||
{&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/crates.io-index/",
|
||||
NULL},
|
||||
|
||||
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/crates.io-index/",
|
||||
NULL},
|
||||
|
||||
{&Bfsu, "https://mirrors.bfsu.edu.cn/crates.io-index/",
|
||||
NULL},
|
||||
{&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/crates.io-index/", DelegateToMirror},
|
||||
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/crates.io-index/", DelegateToMirror},
|
||||
{&Bfsu, "https://mirrors.bfsu.edu.cn/crates.io-index/", DelegateToMirror},
|
||||
|
||||
{&Ustc, "https://mirrors.ustc.edu.cn/crates.io-index/",
|
||||
"https://crates-io.proxy.ustclug.org/api/v1/crates/windows/0.58.0/download"},
|
||||
|
||||
// {&Hust, "https://mirrors.hust.edu.cn/crates.io-index/",
|
||||
// NULL},
|
||||
/* 注释原因: (2025-06-17) 镜像同步失败,多数包都不可用 */
|
||||
// {&Hust, "https://mirrors.hust.edu.cn/crates.io-index/", DelegateToMirror},
|
||||
|
||||
{&Cqu, "https://mirrors.cqu.edu.cn/crates.io-index/",
|
||||
NULL}
|
||||
{&Cqu, "https://mirrors.cqu.edu.cn/crates.io-index/", DelegateToMirror}
|
||||
};
|
||||
def_sources_n(pl_rust_cargo);
|
||||
|
||||
@ -84,19 +73,12 @@ pl_rust_cargo_setsrc (char *option)
|
||||
{
|
||||
chsrc_yield_source_and_confirm (pl_rust_cargo);
|
||||
|
||||
const char *file =
|
||||
R"toml(
|
||||
[source.crates-io]
|
||||
replace-with = 'mirror'
|
||||
char *content = RAWSTR_pl_rust_cargo_config;
|
||||
|
||||
[source.mirror]
|
||||
registry = "sparse+@url@"
|
||||
)toml";
|
||||
|
||||
file = xy_str_gsub (file, "@url@", source.url);
|
||||
content = xy_str_gsub (content, "@url@", source.url);
|
||||
|
||||
chsrc_note2 (xy_strjoin (3, "请手动写入以下内容到 ", xy_normalize_path ("~/.cargo/config.toml"), " 文件中:"));
|
||||
println (file);
|
||||
print (content);
|
||||
|
||||
chsrc_determine_chgtype (ChgType_Auto);
|
||||
chsrc_conclude (&source);
|
||||
|
@ -8,6 +8,8 @@ char RAWSTR_pl_java_maven_config[] = "\074\155\151\162\162\157\162\076\012\040\0
|
||||
|
||||
char RAWSTR_pl_java_build_gradle[] = "\141\154\154\160\162\157\152\145\143\164\163\040\173\012\040\040\040\040\162\145\160\157\163\151\164\157\162\151\145\163\040\173\012\040\040\040\040\040\040\040\040\155\141\166\145\156\040\173\040\165\162\154\040\047\100\165\162\154\100\047\040\175\012\040\040\040\040\040\040\040\040\155\141\166\145\156\114\157\143\141\154\050\051\012\040\040\040\040\040\040\040\040\155\141\166\145\156\103\145\156\164\162\141\154\050\051\012\040\040\040\040\175\012\175\012";
|
||||
|
||||
char RAWSTR_pl_rust_cargo_config[] = "\133\163\157\165\162\143\145\056\143\162\141\164\145\163\055\151\157\135\012\162\145\160\154\141\143\145\055\167\151\164\150\040\075\040\047\155\151\162\162\157\162\047\012\012\133\163\157\165\162\143\145\056\155\151\162\162\157\162\135\012\162\145\147\151\163\164\162\171\040\075\040\042\163\160\141\162\163\145\053\100\165\162\154\100\042\012";
|
||||
|
||||
char RAWSTR_pl_haskell_cabal_config[] = "\162\145\160\157\163\151\164\157\162\171\040\155\151\162\162\157\162\012\040\040\165\162\154\072\040\100\165\162\154\100\012\040\040\163\145\143\165\162\145\072\040\124\162\165\145\012";
|
||||
|
||||
char RAWSTR_pl_haskell_stackage_yaml[] = "\160\141\143\153\141\147\145\055\151\156\144\145\170\072\012\040\040\144\157\167\156\154\157\141\144\055\160\162\145\146\151\170\072\040\100\165\162\154\100\012\040\040\150\141\143\153\141\147\145\055\163\145\143\165\162\151\164\171\072\012\040\040\040\040\153\145\171\151\144\163\072\012\040\040\040\040\040\040\055\040\060\141\065\143\067\145\141\064\067\143\144\061\142\061\065\146\060\061\146\065\146\065\061\141\063\063\141\144\144\141\067\145\066\065\065\142\143\060\146\060\142\060\066\061\065\142\141\141\070\145\062\067\061\146\064\143\063\063\065\061\145\062\061\144\012\040\040\040\040\040\040\055\040\061\145\141\071\142\141\063\062\143\065\062\066\144\061\143\143\071\061\141\142\065\145\065\142\144\063\066\064\145\143\065\145\071\145\070\143\142\066\067\061\067\071\141\064\067\061\070\067\062\146\066\145\062\066\146\060\141\145\067\067\063\144\064\062\012\040\040\040\040\040\040\055\040\062\070\060\142\061\060\061\065\063\141\065\062\062\066\070\061\061\066\063\066\065\070\143\142\064\071\146\066\063\062\143\144\145\063\146\063\070\144\067\066\070\142\067\063\066\144\144\142\143\071\060\061\144\071\071\141\061\141\067\067\062\070\063\063\012\040\040\040\040\040\040\055\040\062\141\071\066\142\061\070\070\071\144\143\062\062\061\143\061\067\062\071\066\146\143\143\062\142\142\063\064\142\071\060\070\143\141\071\067\063\064\063\067\066\146\060\146\063\066\061\066\066\060\062\060\060\071\063\065\071\061\066\145\146\062\060\061\012\040\040\040\040\040\040\055\040\062\143\066\143\063\066\062\067\142\144\066\143\071\070\062\071\071\060\062\063\071\064\070\067\146\061\141\142\144\060\062\145\060\070\141\060\062\145\066\143\146\061\066\145\144\142\061\060\065\141\070\060\061\062\144\064\064\064\144\070\067\060\143\063\012\040\040\040\040\040\040\055\040\065\061\146\060\061\066\061\142\071\060\066\060\061\061\142\065\062\143\066\066\061\063\063\067\066\142\061\141\145\071\063\067\066\067\060\144\141\066\071\063\062\062\061\061\063\141\062\064\066\141\060\071\146\070\060\067\143\066\062\146\066\071\062\061\012\040\040\040\040\040\040\055\040\067\067\062\145\071\146\064\143\067\144\142\063\063\144\062\065\061\144\065\143\066\145\063\065\067\061\071\071\143\070\061\071\145\065\066\071\144\061\063\060\070\065\067\144\143\062\062\065\065\064\071\142\064\060\070\064\065\146\146\060\070\071\060\144\012\040\040\040\040\040\040\055\040\141\141\063\061\065\062\070\066\145\066\141\144\062\070\061\141\144\066\061\061\070\062\062\063\065\065\063\063\143\064\061\145\070\060\066\145\065\141\067\070\067\145\060\142\066\144\061\145\067\145\145\146\063\146\060\071\144\061\063\067\144\062\145\071\012\040\040\040\040\040\040\055\040\146\145\063\063\061\065\060\062\066\060\066\070\060\062\146\145\141\143\061\065\145\065\061\064\144\071\142\071\145\141\070\063\146\145\145\070\142\066\146\146\145\146\067\061\063\063\065\064\067\071\141\062\145\066\070\144\070\064\141\144\143\066\142\060\012\040\040\040\040\153\145\171\055\164\150\162\145\163\150\157\154\144\072\040\063\040\043\040\156\165\155\142\145\162\040\157\146\040\153\145\171\163\040\162\145\161\165\151\162\145\144\012\040\040\040\040\043\040\151\147\156\157\162\145\040\145\170\160\151\162\141\164\151\157\156\040\144\141\164\145\054\040\163\145\145\040\150\164\164\160\163\072\057\057\147\151\164\150\165\142\056\143\157\155\057\143\157\155\155\145\162\143\151\141\154\150\141\163\153\145\154\154\057\163\164\141\143\153\057\160\165\154\154\057\064\066\061\064\012\040\040\040\040\151\147\156\157\162\145\055\145\170\160\151\162\171\072\040\156\157\012";
|
||||
|
@ -51,6 +51,23 @@ allprojects {
|
||||
|
||||
|
||||
|
||||
## Rust
|
||||
|
||||
- namespace = `rust`
|
||||
- name = `cargo_config`
|
||||
|
||||
```toml
|
||||
[source.crates-io]
|
||||
replace-with = 'mirror'
|
||||
|
||||
[source.mirror]
|
||||
registry = "sparse+@url@"
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
## Haskell
|
||||
|
||||
- namespace = `haskell`
|
||||
|
Loading…
x
Reference in New Issue
Block a user