2026-03-27 13:13:52 +03:00
|
|
|
rustup
|
2025-08-26 04:41:14 +03:00
|
|
|
=
|
|
|
|
|
|
|
|
|
|
``` sh *** build ***
|
|
|
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
|
2026-03-27 13:13:52 +03:00
|
|
|
RUSTUP_HOME=/pkg/gnu/rustup \
|
|
|
|
|
CARGO_HOME=/pkg/gnu/rustup \
|
|
|
|
|
RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static \
|
|
|
|
|
RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup \
|
|
|
|
|
sh -s -- --no-modify-path -y --default-toolchain stable --profile default
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
``` sh *** config ***
|
|
|
|
|
echo "/pkg/gnu/rustup" > /pkg/gnu/s6/etc/envdir/CARGO_HOME
|
|
|
|
|
echo "/pkg/gnu/rustup" > /pkg/gnu/s6/etc/envdir/RUSTUP_HOME
|
|
|
|
|
echo "/pkg/gnu/openssl/ssl/cacert.pem" > /pkg/gnu/s6/etc/envdir/CARGO_HTTP_CAINFO
|
|
|
|
|
cat > /pkg/gnu/rustup/config.toml << 'EOF'
|
|
|
|
|
[source.crates-io]
|
|
|
|
|
replace-with = "mirror"
|
|
|
|
|
|
|
|
|
|
[source.mirror]
|
|
|
|
|
registry = "sparse+https://mirrors.ustc.edu.cn/crates.io-index/"
|
|
|
|
|
|
|
|
|
|
[http]
|
|
|
|
|
timeout = 60
|
|
|
|
|
multiplexing = false
|
|
|
|
|
low-speed-limit = 1024
|
|
|
|
|
|
|
|
|
|
[net]
|
|
|
|
|
retry = 5
|
|
|
|
|
EOF
|
2025-08-26 04:41:14 +03:00
|
|
|
```
|