How to install rust-src when installing a toolchain with the "rust-toolchain" file?

I want to be able to install a specific toolchain for a project. I found out that I can do this with the rust-toolchain file in the project root directory.

But I also need rust-src for this toolchain. How can I install rust-src automatically like the toolchain itself?

got it

channel = "nightly-2021-01-07"
components = [ "rust-src" ]
profile = "minimal"

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.