Rust 程序设计语言 简体中文版 1.85.0macOS 上安装 rustup 如果你使用 Linux 或 macOS,打开终端并输入如下命令: $ curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh 此命令下载一个脚本并开始安装 rustup 工具,这会安装最新稳定版 Rust。过程中可能会提示 你输入密码。如果安装成功,将会出现如下内容: Rust is installed 程序 接下来,新建一个源文件,命名为 main.rs。Rust 源文件总是以 .rs 扩展名结尾。如果文件名 包含多个单词,那么按照命名习惯,应当使用下划线来分隔单词。例如命名为 hello_world.rs, 而不是 helloworld.rs。 现在打开刚创建的 main.rs 文件,输入示例 1-1 中的代码。 文件名:main.rs fn main() { println!("Hello 上,输 入如下命令,编译并运行文件: 15/562Rust 程序设计语言 简体中文版 $ rustc main.rs $ ./main Hello, world! 在 Windows 上,输入命令 .\main.exe,而不是 ./main: > rustc main.rs > .\main Hello, world! 不管使用何种操作系统,终端应该打印字符串 Hello, world!。如果没有看到这些输出,回到0 码力 | 562 页 | 3.23 MB | 29 天前3
 Comprehensive Rust(Ukrainian) 2024126 embedded-hal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283 50.7 probe-rs та cargo-embed . . . . . . . . . . . . . . . . . . . . . . . . . . . 283 50.7.1 Налагодження . . крейт, а також завантажені залежності готові до роботи. Потім ви сможете скопіювати приклади в src/main.rs, щоб поекспериментувати з ними: cargo init concurrency cd concurrency cargo add tokio --features full вписується в ширшу екосистему і в цей курс. Встановлення Дотримуйтесь інструкцій на https://rustup.rs/. Як результат, ви отримаэте інструмент побудови Cargo (cargo) та компілятор Rust (rustc). Ви також0 码力 | 396 页 | 1.08 MB | 10 月前3
 Comprehensive Rust(Persian	) 202412embedded-hal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281 7 51.7 probe-rs and cargo-embed . . . . . . . . . . . . . . . . . . . . . . . . . . 281 51.7.1 � � � � � � � � � ) � � � � � � � � � � � � � � � � � � � � � � . � � � � � � � � � � � � � � � � � � � � � � src/main.rs � � � / � � � � � � � � � � � � � � � � � � � � � � � � � � : cargo init concurrency cd concurrency � � � � � . � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � https://rustup.rs . � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � Cargo (cargo ( � � � � � � �0 码力 | 393 页 | 987.97 KB | 10 月前3
 Comprehensive Rust(English) 2024126 embedded-hal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274 50.7 probe-rs and cargo-embed . . . . . . . . . . . . . . . . . . . . . . . . . . 274 50.7.1 Debugging . . . . and the dependencies downloaded and ready to go. You can then copy/paste the examples into src/main.rs to experiment with them: cargo init concurrency cd concurrency cargo add tokio --features full cargo and how it fits into this training. Installation Please follow the instructions on https://rustup.rs/. This will give you the Cargo build tool (cargo) and the Rust compiler (rustc). You will also get0 码力 | 382 页 | 1.00 MB | 10 月前3
 Comprehensive Rust(简体中文) 2024126 embedded-hal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255 51.7 probe-rs 和 cargo-embed . . . . . . . . . . . . . . . . . . . . . . . . . . . 255 51.7.1 调试 . . . . . . . . Rust 中的并发 课程为期一天,旨在介绍传统并发和 async/await 并发。 你需要设置一个新 crate,下载所需的依赖项,做好课前准备。然后,你可以将示例复制/粘贴到 src/main.rs 中,以便对以下代码进行实验: cargo init concurrency cd concurrency cargo add tokio --features full cargo run 课程形式 Rust 应用的标准工 具。在这里,我们想简要介绍一下什么是 Cargo、它如何融入更广泛的生态系统,以及我们如何在本培训 中合理利用 Cargo。 安装 请按照 https://rustup.rs/ 上的说明操作。 这将为你提供 Cargo 构建工具 (cargo) 和 Rust 编译器 (rustc)。你还将获得 rustup,这是一个命令 行实用程序, 你可以用它来安装不同的编译器版本。0 码力 | 359 页 | 1.33 MB | 10 月前3
 Comprehensive Rust(Español) 202412embedded-hal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277 7 51.7 probe-rs y cargo-embed . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277 51.7.1 Depuración . . . descargar y preparar las dependencias. A continuación, podrás copiar y pegar los ejemplos en src/main.rs para experimentar con ellos: cargo init concurrency cd concurrency cargo add tokio --features full cómo encaja en esta formación. Instalación Sigue las instrucciones que se indican en https://rustup.rs/. Esto te dará la herramienta de compilación Cargo (cargo) y el compilador Rust (rustc). También obtendrás0 码力 | 389 页 | 1.04 MB | 10 月前3
 Comprehensive Rust(Português do Brasil) 2024126 embedded-hal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 51.7 probe-rs e cargo-embed . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 7 51.7.1 Depuração . . as dependências baixadas e prontas para uso. Você pode então copiar/colar os exemplos para src/main.rs para experimentá-los: cargo init concurrency cd concurrency cargo add tokio --features full cargo como ele se encaixa neste treinamento. Instalação Por favor, siga as instruções em https://rustup.rs/. Isso fornecerá a ferramenta de compilação Cargo (cargo) e o compilador Rust (rustc). Você também0 码力 | 389 页 | 1.05 MB | 10 月前3
 Comprehensive Rust(繁体中文)6 embedded-hal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254 51.7 probe-rs and cargo-embed . . . . . . . . . . . . . . . . . . . . . . . . . . 255 51.7.1 偵錯 . . . . . . . . on classical as well as async/await concurrency. 您會需要設定新的 Crate,然後下載並準備執行依附元件。接著就能將範例複製貼上至 src/main.rs, 使用這些範例進行實驗: cargo init concurrency cd concurrency cargo add tokio --features full cargo run 形式 生態系統中使用的標準工具,用於建構及執 行 Rust 應用程式。以下簡要介紹 Cargo,以及如何在更廣大的生態系統和本訓練課程中運用 Cargo。 安裝 請按照 https://rustup.rs/ 中的指示操作。 This will give you the Cargo build tool (cargo) and the Rust compiler (rustc). You will also0 码力 | 358 页 | 1.41 MB | 10 月前3
 Hello 算法 1.2.0 简体中文 Rust 版记录。需要注意的是,Python 中 range(a, b) 对应的区间是“左闭右开”的,对应的遍历范围为 ?, ? + 1, … , ? − 1 : // === File: iteration.rs === /* for 循环 */ fn for_loop(n: i32) -> i32 { let mut res = 0; // 循环求和 1, 2, ..., n-1, n for i 循环中,程序每轮都会先检查条件,如果条 件为真,则继续执行,否则就结束循环。 下面我们用 while 循环来实现求和 1 + 2 + ⋯ + ? : // === File: iteration.rs === /* while 循环 */ fn while_loop(n: i32) -> i32 { let mut res = 0; let mut i = 1; // 初始化条件变量 // 复杂度分析 www.hello‑algo.com 21 例如在以下代码中,条件变量 ? 每轮进行两次更新,这种情况就不太方便用 for 循环实现: // === File: iteration.rs === /* while 循环(两次更新) */ fn while_loop_ii(n: i32) -> i32 { let mut res = 0; let mut i = 1; // 初始化条件变量0 码力 | 387 页 | 18.51 MB | 10 月前3
 Comprehensive Rust(한국어) 2024126 embedded-hal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263 51.7 probe-rs and cargo-embed . . . . . . . . . . . . . . . . . . . . . . . . . . 263 51.7.1 디버깅 . . . . . . . classical as well as async/await concurrency. 새 크레이트를 설정하고 몇 가지 의존성을 다운로드해 두어야 합니다. 그런다음 예제를 src/main.rs 에 복사/붙여넣기 하여 테스트 해 볼 수있습니다: cargo init concurrency cd concurrency cargo add tokio --features full 카고가 무엇인지, 그리고 카고가 러스트 생태계에서 어떤 역할을 하는지, 그리고 이 강의에서어떻게 사용될 지에 대해 간략히 설명하겠습니다. 설치하기 https://rustup.rs/ 의 설치 방법을 따르세요. This will give you the Cargo build tool (cargo) and the Rust compiler (rustc). You0 码力 | 369 页 | 1.29 MB | 10 月前3
共 68 条
- 1
 - 2
 - 3
 - 4
 - 5
 - 6
 - 7
 













