我正在经历Rust的开始,我需要Cargo.toml在我的系统上获得箱子.我不是做货物包装的东西(例如创造Cargo.toml),因为我对语言感兴趣,而不是包装.
我可以cargo在某种程度上在我的系统上安装库而无需定义Cargo.toml使用Cargo.toml命令吗?
$ cargo install rand
Updating registry `https://github.com/rust-lang/crates.io-index`
specified package has no binaries
Run Code Online (Sandbox Code Playgroud) 我知道rustup将rustc和cargo二进制文件安装到~/.cargo/bin,但是它将rustup可执行文件安装到哪里?据我所知,任何文档都没有对此进行解释,并且运行安装程序也不会告诉您。如果可能,我希望避免将其安装到主目录以外的任何位置。我正在使用macOS,如果有帮助的话。