Skip to content

Commit c2273b8

Browse files
committed
Add sources for rustup
[GitHub #87]
1 parent 9af1dc8 commit c2273b8

File tree

1 file changed

+79
-0
lines changed

1 file changed

+79
-0
lines changed

src/recipe/lang/Rust/rustup.c

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
/** ------------------------------------------------------------
2+
* SPDX-License-Identifier: GPL-3.0-or-later
3+
* -------------------------------------------------------------
4+
* File Authors : Aoran Zeng <[email protected]>
5+
* Contributors : Nil Null <[email protected]>
6+
* Created On : <2024-10-02>
7+
* Last Modified : <2024-10-02>
8+
* ------------------------------------------------------------*/
9+
10+
/**
11+
* @update 2024-10-02
12+
*/
13+
static SourceInfo
14+
pl_rust_rustup_sources[] = {
15+
{&Upstream, NULL},
16+
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/rustup"},
17+
{&Ustc, "https://mirrors.ustc.edu.cn/rust-static"},
18+
{&Sjtug, "https://mirror.sjtu.edu.cn/rust-static"},
19+
{&Zju, "https://mirrors.zju.edu.cn/rustup"},
20+
{&Iscas, "https://mirror.iscas.ac.cn/rustup"}
21+
};
22+
def_sources_n(pl_rust_rustup);
23+
24+
25+
/**
26+
* chsrc get rustup
27+
*/
28+
void
29+
pl_rust_rustup_getsrc (char *option)
30+
{
31+
}
32+
33+
34+
/**
35+
* @consult https://mirrors.tuna.tsinghua.edu.cn/help/rustup/
36+
*
37+
* chsrc set rustup
38+
*/
39+
void
40+
pl_rust_rustup_setsrc (char *option)
41+
{
42+
chsrc_yield_source_and_confirm (pl_rust_rustup);
43+
44+
chsrc_conclude (&source, setsrc_type);
45+
}
46+
47+
48+
/**
49+
* chsrc reset rustup
50+
*/
51+
void
52+
pl_rust_rustup_resetsrc (char *option)
53+
{
54+
// pl_rust_rustup_setsrc (SetsrcType_Reset);
55+
}
56+
57+
58+
/**
59+
* chsrc ls rustup
60+
*/
61+
FeatInfo
62+
pl_rust_rustup_feat (char *option)
63+
{
64+
FeatInfo fi = {0};
65+
66+
fi.can_get = true;
67+
fi.can_reset = false;
68+
69+
fi.stcan_locally = CanSemi;
70+
fi.locally = "具体说明是否支持项目级换源...";
71+
fi.can_english = false;
72+
fi.can_user_define = false;
73+
74+
fi.note = "备注说明...";
75+
return fi;
76+
}
77+
78+
79+
def_target_gsrf(pl_rust_rustup);

0 commit comments

Comments
 (0)