How to switch between Rust toolchains?

前端 未结 3 1626
盖世英雄少女心
盖世英雄少女心 2021-01-17 11:08

rustup help toolchain lists the following sub-commands

SUBCOMMANDS:
    list         List installed too         


        
相关标签:
3条回答
  • 2021-01-17 11:39

    Use rustup default <toolchain> to change the default toolchain. You can use the full name (e.g. rustup default stable-x86_64-unknown-linux-gnu) or a short alias (e.g. rustup default stable).

    rustup also has methods to override the default in a more scoped manner. See Override precedence in rustup's README.

    0 讨论(0)
  • 2021-01-17 11:45

    To toggle between nightly and stable configurations in your repo use:

    rustup override set nightly
    

    or:

    rustup override set stable
    
    0 讨论(0)
  • 2021-01-17 11:52

    The rustup default stable command works well, but the easiest way is to keep a rust-toolchain file inside your project root folder. This is similar to a .nvm file for a NodeJS project.

    rust-toolchain

    nightly
    

    or

    stable
    

    0 讨论(0)
提交回复
热议问题