I am trying to build
rustup-init) from source. I have the
rustup repo checked out, but when I run
cargo run from within the repo, it runs
rustup. I can see why this is happening - the repo contains only one binary target, which is
So how can I build
It’s all the same file. The way it behaves depends on the name of the binary. A bit sneaky, similar to how busybox works. If you rename it
rustup it should behave as
rustup. It you name it
rustfmt, etc… (non-exhaustive list), it becomes a shim that identifies the current active default toolchain, relevant overrides for the current directory, parses the additional
+toolchain argument if present, and then calls the correct respective installed binary with the remaining arguments.
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.