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页
编辑推荐:◎全球最权威中国问题专家、“头号中国通”费正清的唯一自传梁思成、林徽因夫妇为他取中文名“费正清”;胡适带着他视察监狱,探望政治犯;麦卡锡主义横行,他被...
今年98岁高龄的旅美著名艺术家张充和女士,在中国传统诗词、书画、昆曲、音乐等方面均有精湛的造诣,是中国文人文化在当代的杰出代表之一。本书收录了她自选诗词二十首,...
法庭魔术师 本书特色 《法庭魔术师》对从事或即将从事司法工作的读者,领导干部、辩论爱好者、商务谈判人员、心理分析师等专业人士都有很大的启迪。美国头号刑事辩护律师...
斋藤孝[日]毕业于东京大学现为明治大学教授、畅销书作家日本新潮艺术奖 、每日出版文化奖特别奖获得者。斋藤孝作品的累计发行量超过万册 ,代表作 有《 开口就能说 ...
余新忠,南开大学历史学博士,南开大学历史学院暨中国社会史研究中心“英才教授”、博士生导师。南开大学历史学院院长。主要从事医疗社会文化史和明清社会史研究。博士论文...
《智能小车机器人制作大全》内容简介:“i创客”谐音为“爱创客”,也可以解读为“我是创客”。创客的奇思妙想和丰富成果,充分展示
徐晓,出版人,作家。毕业于北京师范大学中文系。曾任光明日报出版社副总编辑,现任财新传媒首席文化编辑。
作者簡介羅伯特.埃斯基爾森(Robert Eskildsen)美國史丹佛大學歷史博士,現任日本國際基督教大學歷史系教授。研究領域為近代日本史及近代東亞史。論文散...
安全感≠钱包的厚度。1891年,查尔斯•威尔士连续五次押中红色五号,导致蒙特卡洛大赌场破产,但幸运的查尔斯后来是在债台高筑的情况下酗酒而死的。人们总试图用安全代...
Delirious and morei the lessons of the skyscraperii strategy vs architectureCort...
金属切削刀具设计手册(单行本)孔加工刀具、铣刀、数控机床用工具系统 本书特色 《孔加工刀具、铣刀、数控机床用工具系统》是由机械工业出版社出版的。金属切削刀具设计...
《老舍散文精选》内容简介:《老舍散文精选》是中国20世纪作家老舍的散文精选集,系“名著阅读力养成丛书”之一。老舍是杰出的语言
配套PPT+代码+数据获取方式:1、微信关注“华章计算机”2、在后台回复关键词:69325本书介绍在嵌入式系统中的机器学习算法优化原理、设计方法及其实现技术。内...
本书是从心理学、社会学的角度解读孤独的一本书。作者金珽运在50岁时辞去大学教授的工作,孤身一人前往日本学习绘画。到了日本他发现,孤独死是这个国家的一种流行现象,...
TheHandbookofPhonologicalTheory,SecondEdition,isaninnovativeanddetailedexaminati...
四圣心源 本书特色 本书为清代名医黄元御所著。全书十卷,书中将黄帝、岐伯、秦越人、张仲景等医中四圣之学融会贯通,分别从天人、六气、脉法、劳伤、杂病、七窍、疮疡、...
▼内容简介鲁迅超越他的时代,也超越我们的时代。直到今日我们仍没有跳出他早已看透的“五指山”。本书对鲁迅作品中蕴涵的中西文化比较、改造国民性、文艺与政治的关系等等...
为什么要废除死刑 本书特色 罗贝尔·巴丹德:法国律师、政治家、作家。在法国,他因坚决支持废除死刑而闻名。他在弗朗索瓦·密特朗担任总统...
弗里德里希·尼采(Friedrich Wilhelm Nietzsche,1844—1900),德国哲学家、语言学家、文化评论家、诗人和思想家。尼采被认为是西方...
✦網路點擊次數超過5000萬次!系列銷售突破50萬冊!✧廣大讀者好評推薦!日本AMAZON平均4.7星超高評價!✦獲獎不斷!「2020這本漫畫真厲害!」男性部門...