前言
Foreword
Rust 编程语言在短短几年内取得了长足的进步,从最初由一小群爱好者组成的萌芽社区创建和孵化,发展成为世界上最受喜爱和最受欢迎的编程语言之一。回首往事,Rust 的力量和前景必然会引起人们的关注,并在系统编程领域占据一席之地。但不可预见的是,全球范围内兴趣和创新的增长渗透到了开源社区,并催化了各行各业的大规模采用。
The Rust programming language has come a long way in a few short years, from its creation and incubation by a small and nascent community of enthusiasts, to becoming one of the most loved and in-demand programming languages in the world. Looking back, it was inevitable that the power and promise of Rust would turn heads and gain a foothold in systems programming. What was not inevitable was the global growth in interest and innovation that permeated through open source communities and catalyzed wide-scale adoption across industries.
此时此刻,我们可以轻而易举地指出 Rust 所提供的精彩特性,来解释这种兴趣和采用率的爆炸式增长。谁不想要内存安全、以及快速性能、以及友好的编译器、以及卓越的工具,还有许多其他出色的特性呢?你今天看到的 Rust 语言结合了系统编程领域多年的研究与一个充满活力且充满激情的社区的实践智慧。这门语言的设计富有目的性,制作精良,为开发者提供了一个工具,使编写安全、快速且可靠的代码变得更加容易。
At this point in time, it is easy to point to the wonderful features that Rust has to offer to explain this explosion in interest and adoption. Who doesn’t want memory safety, and fast performance, and a friendly compiler, and great tooling, among a host of other wonderful features? The Rust language you see today combines years of research in systems programming with the practical wisdom of a vibrant and passionate community. This language was designed with purpose and crafted with care, offering developers a tool that makes it easier to write safe, fast, and reliable code.
但真正让 Rust 与众不同的是,它的根基在于赋予你(用户)实现目标的能力。这是一门希望你成功的语言,而“赋能”这一原则贯穿于构建、维护和倡导这门语言的社区核心。自本权威著作的上一个版本以来,Rust 已进一步发展成为一种真正全球化且值得信赖的语言。Rust 项目现在得到了 Rust Foundation 的大力支持,该基金会还投资于关键计划,以确保 Rust 的安全、稳定和可持续发展。
But what makes Rust truly special is its roots in empowering you, the user, to achieve your goals. This is a language that wants you to succeed, and the principle of empowerment runs through the core of the community that builds, maintains, and advocates for this language. Since the previous edition of this definitive text, Rust has further developed into a truly global and trusted language. The Rust Project is now robustly supported by the Rust Foundation, which also invests in key initiatives to ensure that Rust is secure, stable, and sustainable.
《Rust 编程语言》(The Rust Programming Language)的这一版是一个全面的更新,反映了该语言多年来的演进,并提供了宝贵的新信息。但这不仅仅是一本关于语法和库的指南——它还是一份加入社区的邀请,这个社区珍视质量、性能和深思熟虑的设计。无论你是一位想要第一次探索 Rust 的资深开发者,还是一位想要精进技能的经验丰富的 Rustacean,这一版都能为每个人提供所需的知识。
This edition of The Rust Programming Language is a comprehensive update, reflecting the language’s evolution over the years and providing valuable new information. But it is not just a guide to syntax and libraries—it’s an invitation to join a community that values quality, performance, and thoughtful design. Whether you’re a seasoned developer looking to explore Rust for the first time or an experienced Rustacean looking to refine your skills, this edition offers something for everyone.
Rust 的历程是一个协作、学习和迭代的过程。这门语言及其生态系统的成长是其背后充满活力、多元化社区的直接体现。成千上万开发者的贡献,从核心语言设计者到业余贡献者,造就了 Rust 这样独特且强大的工具。通过拿起这本书,你不仅是在学习一门新的编程语言,你还在加入一场让软件变得更好、更安全、更令人愉悦的运动。
The Rust journey has been one of collaboration, learning, and iteration. The growth of the language and its ecosystem is a direct reflection of the vibrant, diverse community behind it. The contributions of thousands of developers, from core language designers to casual contributors, are what make Rust such a unique and powerful tool. By picking up this book, you’re not just learning a new programming language—you’re joining a movement to make software better, safer, and more enjoyable to work with.
欢迎来到 Rust 社区!
Welcome to the Rust community!
— Bec Rumbul,Rust Foundation 执行董事
- Bec Rumbul, Executive Director of the Rust Foundation