gpt4 book ai didi

rust - rustup 安装到哪里?

转载 作者:行者123 更新时间:2023-11-29 07:50:33 28 4
gpt4 key购买 nike

我知道 rustuprustccargo 二进制文件安装到 ~/.cargo/bin,但是它将 rustup 可执行文件安装到哪里?据我所知,这在任何文档中都没有解释,运行安装程序也不会告诉你。如果可能的话,我想避免将它安装到我的主目录以外的任何地方。如果有区别,我会使用 macOS。

最佳答案

默认,rustup 也会安装到您的主目录:

$ which rustup
/Users/shep/.cargo/bin/rustup

documentation states :

rustup installs rustc, cargo, rustup and other standard tools to Cargo's bin directory. On Unix it is located at $HOME/.cargo/bin and on Windows at %USERPROFILE%\.cargo\bin. This is the same directory that cargo install will install Rust programs and Cargo plugins.

goes on to describe how to change the defaults :

rustup allows you to customise your installation by setting the environment variables CARGO_HOME and RUSTUP_HOME before running the rustup-init executable. As mentioned in the Environment Variables section, RUSTUP_HOME sets the root rustup folder, which is used for storing installed toolchains and configuration options. CARGO_HOME contains cache files used by cargo.

关于rust - rustup 安装到哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46739842/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com