Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 16 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
name = "rustup"
version = "1.30.0"
edition = "2024"
# `cargo run` without `--bin` runs the main binary, as it did before the
# `rustup-mock-server` and `rustup-mock-proxy` binaries were added.
default-run = "rustup-init"
license = "MIT OR Apache-2.0"
description = "Manage multiple rust installations with ease"
homepage = "https://github.com/rust-lang/rustup"
Expand Down Expand Up @@ -43,6 +46,7 @@ test = ["dep:snapbox", "dep:walkdir", "clap-cargo/testing_colors"]
anstream = "1"
anstyle = "1.0.11"
anyhow = "1.0.69"
base64 = "0.22"
cc = "1"
chrono = { version = "0.4", default-features = false, features = ["std"] }
clap = { version = "4", features = ["derive", "wrap_help", "string"] }
Expand All @@ -59,7 +63,7 @@ futures-util = "0.3.31"
git-testament = "0.2"
home = "0.5.4"
http-body-util = "0.1.0"
hyper = { version = "1.0", default-features = false, features = ["server", "http1"] }
hyper = { version = "1.0", default-features = false, features = ["client", "http1", "server"] }
hyper-util = { version = "0.1.1", features = ["tokio"] }
indicatif = "0.18"
itertools = "0.15"
Expand Down Expand Up @@ -93,7 +97,7 @@ tar = "0.4.26"
tempfile = "3.8"
thiserror = "2"
threadpool = "1"
tokio = { version = "1.26.0", default-features = false, features = ["macros", "rt-multi-thread", "sync"] }
tokio = { version = "1.26.0", default-features = false, features = ["macros", "rt-multi-thread", "signal", "sync"] }
tokio-retry = "0.3.0"
tokio-stream = "0.1.14"
toml = "1.0"
Expand Down Expand Up @@ -177,3 +181,13 @@ opt-level = 0
[package.metadata.cargo-all-features]
# Building with no web backend will error.
always_include_features = ["reqwest-rustls-tls"]

[[bin]]
name = "rustup-mock-server"
path = "src/bin/rustup-mock-server.rs"
required-features = ["test"]

[[bin]]
name = "rustup-mock-proxy"
path = "src/bin/rustup-mock-proxy.rs"
required-features = ["test"]
1 change: 1 addition & 0 deletions doc/dev-guide/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
- [Release process](release-process.md)
- [Tips and tricks](tips-and-tricks.md)
- [Tracing](tracing.md)
- [Testing](testing.md)
6 changes: 6 additions & 0 deletions doc/dev-guide/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ affecting any existing installation. Remember to keep those two environment vari
set when running your compiled `rustup-init` or the toolchains it installs, but _unset_
when rebuilding `rustup` itself.

To develop entirely offline, without network access to the real distribution
server, the `rustup-mock-server` program serves a mock distribution tree that
rustup can install from. See the
["Using with rustup" section of the testing documentation](testing.md#using-with-rustup)
for an example.

If you wish to install your new build to try out longer term in your home directory
then you can run `cargo dev-install` which is an alias in `.cargo/config` which
runs `cargo run -- --no-modify-path -y` to install your build into your homedir.
Expand Down
Loading
Loading