Digital Library

《Rust Crash Course Build High-Performance, Efficient and Productive Software with》内容提要

admin1 2026-11-17 19:30 Rust Crash Course Build High-Performance, Efficient and Productive Software with the Power of Next-Generation Programming… (Abhishek Kumar)(Z-Library)

Public

这本书面向已有编程基础的读者,以实战方式介绍 Rust 的核心语法与典型应用场景。作者 Abhishek Kumar 从自身经历和 Rust 的背景讲起,提到 Rust 已被 AOSP 支持用于系统开发,随后带读者完成环境搭建:用 rustup 安装、更新和卸载工具链,运行 Hello World,并熟悉 rustc、cargo、rustdoc 这套基础工具。

进入语言本身后,书里先处理类型与流程控制。整数类型从 i8/u8 一直讲到 i128/u128 以及 isize/usize,并说明溢出防护;函数部分区分语句与表达式;控制流覆盖 if、loop、while 和 for。接着是全书的重点之一——所有权与内存管理:数据在编译期大小未知或会动态变化时就要放到堆上,为此需要向内存分配器申请空间;围绕栈与堆、String 类型、Move/Clone/Copy、引用与借用、切片,读者可以建立起 Rust 管理内存的基本模型。结构体、枚举和 String、HashMap 等集合则用来组织数据。

再往后是进阶特性与工程化内容,包括模块与路径(相对或绝对)、错误处理,以及用自定义错误消息处理传给 area_square 函数的非法参数。

Digital Library AI Assistant
Hi — I can help you pick a book. Tell me a topic, language, or level, e.g. “a light English read”. If that's too broad, I'll ask one follow-up.
Searching the library and writing a reply…