Giter Club home page Giter Club logo

rustup-mirror's Introduction

rustup-mirror

Crates.io version Changelog FOSSA Status

Setup a local rustup mirror. For usage, please run rustup-mirror -h.

How to install

Run cargo install rustup-mirror.

Features

  1. Check if file is already downloaded and check its integrity by comparing sha256 checksum.
  2. Download and replace links in the manifest files.

Example usage

$ rustup-mirror # use HTTPS_PROXY for proxy
$ # wait for downloading
$ cd ./mirror # default directory, see rustup-mirror -h
$ python3 -m http.server &
$ RUSTUP_DIST_SERVER=http://127.0.0.1:8000 rustup install stable

Note:

  1. A full clone of a stable distribution takes 16G disk space (as of Feb 2019).
  2. Python3 http.server module does not support Range download. It may fail when a partial downloaded file exists. Do not use this in production.

License

FOSSA Status

rustup-mirror's People

Contributors

circuitcoder avatar dependabot[bot] avatar dingelish avatar fossabot avatar jessebraham avatar jiegec avatar johnlepikhin avatar martme avatar wangweixuan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

rustup-mirror's Issues

An error occurred when running rustup-mirror

Running the cargo install rustup-mirror command is normal. But there was an error running rustup-mirror, which seems to be an error returned by response, and I don't know what happened. I have set up https_proxy

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: reqwest::Error { kind: Request, url: Url { scheme: "https", username: "", password: None, host: Some(Domain("static.rust-lang.org")), port: None, path: "/dist/channel-rust-stable.toml", query: None, fragment: None }, source: hyper::Error(Connect, Ssl(Error { code: ErrorCode(1), cause: Some(Ssl(ErrorStack([Error { code: 336130315, library: "SSL routines", function: "ssl3_get_record", reason: "wrong version number", file: "../ssl/record/ssl3_record.c", line: 332 }]))) }, X509VerifyResult { code: 0, error: "ok" })) }', /root/.cargo/registry/src/mirrors.xxxxx.com-530b4d703ccc752a/rustup-mirror-0.4.4/src/main.rs:122:52

Target list needs syncing with Rust 1.79

The target list generated by rustc 1.79 differs from the current list as follows:

diff --git a/src/main.rs b/src/main.rs
index c8cc483..65aa046 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -18,3 +18,3 @@ const RELEASE_CHANNELS: [&str; 3] = ["stable", "beta", "nightly"];
 // rustc --print target-list | awk '{print "    \"" $1 "\","}'
-const TARGETS: [&str; 223] = [
+const TARGETS: [&str; 239] = [
     "aarch64-apple-darwin",
@@ -25,2 +25,5 @@ const TARGETS: [&str; 223] = [
     "aarch64-apple-tvos-sim",
+    "aarch64-apple-visionos",
+    "aarch64-apple-visionos-sim",
+    "aarch64-apple-watchos",
     "aarch64-apple-watchos-sim",
@@ -35,2 +38,3 @@ const TARGETS: [&str; 223] = [
     "aarch64-unknown-hermit",
+    "aarch64-unknown-illumos",
     "aarch64-unknown-linux-gnu",
@@ -58,2 +62,5 @@ const TARGETS: [&str; 223] = [
     "arm64_32-apple-watchos",
+    "arm64e-apple-darwin",
+    "arm64e-apple-ios",
+    "arm64ec-pc-windows-msvc",
     "armeb-unknown-linux-gnueabi",
@@ -90,3 +97,3 @@ const TARGETS: [&str; 223] = [
     "armv7s-apple-ios",
-    "asmjs-unknown-emscripten",
+    "armv8r-none-eabihf",
     "avr-unknown-gnu-atmega328",
@@ -97,2 +104,3 @@ const TARGETS: [&str; 223] = [
     "hexagon-unknown-linux-musl",
+    "hexagon-unknown-none-elf",
     "i386-apple-ios",
@@ -118,4 +126,6 @@ const TARGETS: [&str; 223] = [
     "i686-uwp-windows-msvc",
+    "i686-win7-windows-msvc",
     "i686-wrs-vxworks",
     "loongarch64-unknown-linux-gnu",
+    "loongarch64-unknown-linux-musl",
     "loongarch64-unknown-none",
@@ -164,3 +174,5 @@ const TARGETS: [&str; 223] = [
     "riscv32i-unknown-none-elf",
+    "riscv32im-risc0-zkvm-elf",
     "riscv32im-unknown-none-elf",
+    "riscv32ima-unknown-none-elf",
     "riscv32imac-esp-espidf",
@@ -168,2 +180,4 @@ const TARGETS: [&str; 223] = [
     "riscv32imac-unknown-xous-elf",
+    "riscv32imafc-esp-espidf",
+    "riscv32imafc-unknown-none-elf",
     "riscv32imc-esp-espidf",
@@ -205,3 +219,5 @@ const TARGETS: [&str; 223] = [
     "wasm32-wasi",
-    "wasm32-wasi-preview1-threads",
+    "wasm32-wasip1",
+    "wasm32-wasip1-threads",
+    "wasm32-wasip2",
     "wasm64-unknown-unknown",
@@ -220,3 +236,2 @@ const TARGETS: [&str; 223] = [
     "x86_64-pc-windows-msvc",
-    "x86_64-sun-solaris",
     "x86_64-unikraft-linux-musl",
@@ -240,2 +255,3 @@ const TARGETS: [&str; 223] = [
     "x86_64-uwp-windows-msvc",
+    "x86_64-win7-windows-msvc",
     "x86_64-wrs-vxworks",

Actually, I wonder if we can make * the default value for --targets option, and remove the hard-coded list altogether.

rust-src component isn't mirrored

When running rustup-mirror, the rust-src package, which has a different naming format than the rest of the components, isn't downloaded.

Unlike the rest of the packages, there is just a single rust-src-*.tar.xz file for all targets, where it only differs between different toolchains (rust-src-nightly.tar.xz, rust-src-1.50-tar.xz).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.