Skip to content

Add target specification to rust-toolchain file #1893

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

Closed
refugeesus opened this issue Jun 7, 2019 · 2 comments
Closed

Add target specification to rust-toolchain file #1893

refugeesus opened this issue Jun 7, 2019 · 2 comments

Comments

@refugeesus
Copy link

Describe the problem you are trying to solve
I would like to add a target specification as a sub-category of the toolchain specified in the rust-toolchain file to automatically fetch the target for a toolchain if not already added.

Describe the solution you'd like
I think it would be helpful to automatically fetch a specified target if it is not currently installed when building projects containing a rust-toolchain file. Allowing for a specific target sub-category under the toolchain definition would remove build errors due to fetching a new toolchain set in the rust-toolchain file which then would not have the associated target. This isn't a huge issue, just an ease of use improvement particularly for users who are not familiar with compiler components.

Notes
Anyone starting out building projects using rustup without prior knowledge of compiling projects for embedded systems is going to trip over this concept for a while initially. The argument can be made that this is "part of the learning process" but setting up the rust-toolchain file with a target implies understanding that the components were needed. This is mainly for collaborative work where people are working across multiple projects with several toolchains/targets.

@kinnison
Copy link
Contributor

I'm not entirely sure that rust-toolchain is really the right place for this, though I also can't think quite of a better option right now.

How would you envisage the file being altered, and what would the effect be if the target in question wasn't available for the given toolchain? What if they run cargo build --target=anothertarget instead of just cargo build etc?

@jschwe
Copy link

jschwe commented Sep 16, 2020

I think #2438 closes this.

@kinnison kinnison closed this as completed Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants