Skip to content

Add target specification to rust-toolchain file #1893

@refugeesus

Description

@refugeesus

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions