The Rust programming language offers the rare and valuable combination of statically verified memory safety and low-level control. Imagine C++ but without dangling pointers, null pointer dereferences, leaks, or buffer overruns. With this practical guide, systems programmers will understand Rust’s rules clearly and economically. You’ll learn how to express programs that Rust can prove are free of a broad class of common errors.
Rust brings the benefits of an expressive modern type system to systems programming. Authors Jim Blandy and Jason Orendorff demonstrate how Rust’s features put programmers in control over memory consumption and processor use, combining predictable performance with memory safety and trustworthy concurrency.
You’ll learn:
How to write fast, safe, concurrent programs in Rust
Rust’s rules for managing memory efficiently, including ownership, borrowing, moves, and lifetimes
How to design interfaces that fit well into the Rust ecosystem
Rust’s all-purpose Cargo tool for building, testing, and managing Rust packages
High-level features like traits, generics, closures, and iterators that make Rust productive and flexible
Jim Blandy has been programming since 1981, and writing Free software since 1990. He has been the maintainer of GNU Emacs and GNU Guile, and a maintainer of GDB, the GNU Debugger. He is one of the original designers of the Subversion version control system. Jim now works on Firefox’s web developer tools for Mozilla.
You'veheardthatRustletsyouwritesafe,fase,concurrentprograms.Thisisthechapterwhereweshowyouhowit'sdone.We'llcoverthreewaystouseRustthreads:1.Fork-joinparallelism2.Channels3.Sharedmuatblestate
——引自第458页
Apanicisnotacrash.It’snotundefinedbehavior.It’smorelikeaRuntimeExceptioninJavaorastd::logic_errorinC++.Thebehavioriswell-defined;itjustshouldn’tbehappening.Panicissafe.Itdoesn’tviolateanyofRust’ssafetyrules;evenifyoumanagetopanicinthemiddleofastandardlibrarymethod,itwillneverleaveadanglingpointerorahalf-initializedvalueinmemory.TheideaisthatRustcatchestheinvalidarrayaccess,orwhateveritis,beforeanythingbadhappens.Itwouldbeunsafetoproceed,soRustunwindsthestack.Buttherestoftheprocesscancontinuerunning.Panicisperthread.Onethreadcanbepanickingwhileotherthreadsaregoingonabouttheirnormalbusiness.InChapter19,we’llshowhowaparentthreadcanfindoutwhenachildthrea...
——引自第1页
卢泰宏,中山大学二级教授、博士生导师(退休),中国营销研究中心(CMC)创始主任,“菲利普?科特勒国际营销理论贡献奖”大中华区首位获奖者(2001)。荣获国家教...
高德拉特博士是以色列物理学家及企业管理大师,TOC制约法的创造者。他的第一部作品《目标》大胆借用小说的笔法,说明如何通过近乎常识的逻辑推理,解决复杂的管理问题,...
作品目录编选者序:生命的舞者小说罗生门鼻子孤独地狱父山药粥猴子手绢烟草和魔鬼大石内藏助的一天黄粱梦英雄之器戏作三昧西乡隆
本书专门介绍Android源代码的设计模式,共26章,主要讲解面向对象的六大原则、主流的设计模式以及MVC和MVP模式。主要内容为:优化代码的首步、开闭原则、里...
作品目录弗·谢·索洛约夫 一八八一年一月三十日在高级女子讲习班 悼念费·米·陀思妥耶斯基的演讲 纪念陀思妥耶夫斯基的三次演
作品目录勒卡雷《锅匠、裁缝、士兵、间谍》杜伦马特《诺言》西麦农(又译西默农)《麦格雷警长的圣诞节》· · · · · ·精彩
拍打疗法 内容简介 本书结合大量图示介绍了拍打疗法基本知识,讲述了各科病症治疗及运用,并给出了人体十四经脉循行分布示意图、常用腧穴的位置和主治病证表等。拍打疗法...
林毓生,台湾中央研究院院士,美国威斯康辛大学麦迪逊校区历史系荣誉教授。早年就读台大时,深受殷海光先生的启发,赴美以后,仍然经常与殷先生通信,直至殷先生逝世为止。...
"TruthIsInTheYouth,"willawakenyouwithatherapeuticfulfillment.Itsupliftingexubera...
奧古斯丁(Aurelius Augustinus,354年11月13日-430年8月28日)曾任北非城市希波的主教,故史稱希波的奧古斯丁(Augustine o...
口腔科手册 内容简介 本书系统介绍了牙体牙髓病学、牙周病学、儿童口腔医学、口腔黏膜病学、口腔颌面外科学、口腔修复学、口腔正畸学等口腔科常见疾病的诊断、治疗方法以...
《金领手记:领导为什么不生病》内容简介:白领和金领最大的区别是:白领在休年假时,找到最便宜的机票酒店行程,然后跟老板说我要
自由极光作家,编剧。北京电影学院毕业。没人能真的做到感同身受,但极光能一直陪在你身旁。已出版:“爱情四部曲”《我终于可以不再爱你了》《我曾爱过你想起就心酸》《我...
拔得女榜狀頭,當上了魁星娘子,虞璇璣終於又離為官之路更近一步!沒想到第一次進宮面聖,就從老番癲太上皇嘴裡聽到新拜座師李千里不可告人的八卦祕辛?熱鬧滾滾的進士宴,...
扶兰:1997年获华中师范大学历史学硕士学位,在华中农业大学任教至今,武汉大学历史系博士在读。最早开始动手写文,是看了《白发魔女传》这部电影之后——在迷茫而艰难...
《新宋》作者阿越作序,贾平凹、阿来、陈彦、徐则臣联袂推荐以轻松舒畅的笔触,探寻了南北两宋皇帝、士人以及武将各类人群的精神世界,重点在凸显人性和个性。宋朝“不杀上...
荣格(Carl Gustav Jung,1875-1961),瑞士著名心理学家,精神分析学家,对中国文化尤其是中国道教有极深的热爱和发展,曾从心理学角度分析中国...
李光耀曾任新加坡总理(开国元首)、新加坡最高领导人。为新加坡的独立及崛起做出卓越贡献,被誉为“新加坡国父”。不仅是现今新加坡政坛极具影响力的人物,也是亚洲乃至世...
精彩摘录纯意识即纯潜能,这是一个具有无穷可能性和无限创造性的场。纯意识是我们的精神实质。由于它无边无际,无穷无尽,所以又
The metamorphic nature of Venice, a city in which most buildings underwent throu...