🔧 Improve china mirroring speed
This commit is contained in:
2
bin/builders/BaseBuilder.ts
vendored
2
bin/builders/BaseBuilder.ts
vendored
@@ -49,7 +49,7 @@ export default abstract class BaseBuilder {
|
|||||||
const isChina = await isChinaDomain('www.npmjs.com');
|
const isChina = await isChinaDomain('www.npmjs.com');
|
||||||
const spinner = getSpinner('Installing package...');
|
const spinner = getSpinner('Installing package...');
|
||||||
const rustProjectDir = path.join(tauriSrcPath, '.cargo');
|
const rustProjectDir = path.join(tauriSrcPath, '.cargo');
|
||||||
const projectConf = path.join(rustProjectDir, 'config');
|
const projectConf = path.join(rustProjectDir, 'config.toml');
|
||||||
await fsExtra.ensureDir(rustProjectDir);
|
await fsExtra.ensureDir(rustProjectDir);
|
||||||
|
|
||||||
if (isChina) {
|
if (isChina) {
|
||||||
|
|||||||
@@ -1,14 +1,10 @@
|
|||||||
[source.crates-io]
|
[source.crates-io]
|
||||||
# To use sparse index, change 'rsproxy' to 'rsproxy-sparse'
|
replace-with = 'rsproxy-sparse'
|
||||||
replace-with = 'rsproxy'
|
|
||||||
|
|
||||||
[source.rsproxy]
|
[source.rsproxy]
|
||||||
registry = "https://rsproxy.cn/crates.io-index"
|
registry = "https://rsproxy.cn/crates.io-index"
|
||||||
[source.rsproxy-sparse]
|
[source.rsproxy-sparse]
|
||||||
registry = "sparse+https://rsproxy.cn/index/"
|
registry = "sparse+https://rsproxy.cn/index/"
|
||||||
|
|
||||||
[registries.rsproxy]
|
[registries.rsproxy]
|
||||||
index = "https://rsproxy.cn/crates.io-index"
|
index = "https://rsproxy.cn/crates.io-index"
|
||||||
|
|
||||||
[net]
|
[net]
|
||||||
git-fetch-with-cli = true
|
git-fetch-with-cli = true
|
||||||
|
|||||||
Reference in New Issue
Block a user