Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

could cargo-sweep work without rustup? #26

Open
bbigras opened this issue Aug 23, 2019 · 2 comments

Comments

@bbigras
Copy link

@bbigras bbigras commented Aug 23, 2019

I don't use rustup and I was wondering if this tool could still work without it.

@Eh2406

This comment has been minimized.

Copy link
Collaborator

@Eh2406 Eh2406 commented Aug 23, 2019

The "installed" and "toolchains" modes do rely on rustup at the moment. The others do not. I would love to see it have graceful fallback to using rustc directly. A PR is wellcome!

Skimming the code the only places we rely on rustup are:

let out = Command::new("rustup")
.args(&["toolchain", "list"])
.output()?;

Where we use it to determine the available rustc toolchains. This could return a sentinel value if rustup is not available.
and:
let plus_name = "+".to_owned() + x;
let out = Command::new("rustc").args(&[&plus_name, "-vV"]).output()?;

Where we use the +toolchain syntax that rustup adds. This function could check for the sentinel value and not use the +toolchain if it is not available.

@holmgr, can we add a help-wanted and feature-request or similar tags? I would but I don't have perms on this repo.

@holmgr

This comment has been minimized.

Copy link
Owner

@holmgr holmgr commented Nov 2, 2019

Yes, that seems like a great idea @Eh2406, will give some more permissions :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.