Rust 程序设计语言 简体中文版 1.85.0https://www.rust-lang.org/install.html 并按照说明安装 Rust。在安 装过程的某个步骤,你会被提示要安装 Visual Studio。它提供了一个链接器和编译程序所需 的原生库。如果你在此步骤需要更多帮助,请访问 https://rust-lang.github.io/rustup/ installation/windows-msvc.html。 本书的余下部分会使用能同时运行于 包。要运行这些示例,你需要保持网络连接, 或者事先下载好这些依赖。要提前下载依赖,可以运行以下命令。(我们稍后会详细解释 cargo 是什么,以及这些命令分别的作用。) $ cargo new get-dependencies $ cd get-dependencies $ cargo add rand@0.8.5 trpl@0.2.0 这会将这些包的下载结果缓存起来,因此你之后就不需要再下载它们了。运行完该命令后,你 无需保留 mkdir ~/projects $ cd ~/projects $ mkdir hello_world $ cd hello_world 对于 Windows CMD,输入: > mkdir "%USERPROFILE%\projects" > cd /d "%USERPROFILE%\projects" > mkdir hello_world > cd hello_world 编写并运行0 码力 | 562 页 | 3.23 MB | 25 天前3
共 1 条
- 1













