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页
日本国民作家宫泽贤治给每个人的童话,动画大师宫崎骏的灵感源泉!收录十八篇天马行空的幻想杰作,特别收录经典动画《龙猫》角色原型篇——《橡子与山猫》。随书赠折纸山猫...
Wines,spiritsandbeers.Manyofushaveadrinkofsomekindatonetimeoranother,someofusmor...
大医之路 内容简介 作者,邢思邵,退休十载,年逾古稀。1933年出生于河北省霸州市胜芳镇,在作者少小离家时,那里盛产螃蟹,是一个鱼米之乡。乡亲们自诩:“上有天堂...
亨利·J·亚伯拉罕已荣誉退职的弗吉尼业大学政府和对外事务的JamesHart教授。共有12部著作,其中包括:《法院与自由》(FreedonlandCourt,牛...
《追梦成长 用梦想成就自己和世界》记录了作者历时七年完成“环球之旅”梦想的历程,以及在此期间的见闻与思考,强调“通过见识的拓展,为自己的人生打开新的格局,收获成...
本书是雪球上近30位知名投资人对曾经亏损经历的反思与总结,他们如今在各行各业都有了不起的成就,如创业、自己做私募、自己做资产管理人等,他们分别是i美股资产管理创...
补虚养生少生病 本书特色 中医认为,虚有阴虚、阳虚、气虚、血虚等,《补虚养生少生病》就重点从这几个角度来写,同时又因为肾和脾是人体的先后天之本,养好了脾、肾,身...
✦網路點擊次數超過5000萬次!系列銷售突破50萬冊!✧廣大讀者好評推薦!日本AMAZON平均4.7星超高評價!✦獲獎不斷!「2020這本漫畫真厲害!」男性部門...
吉米·哈利获过大英帝国勋章,写过荣登《纽约时报》榜首的系列畅销书。却坚持在乡间从事兽医工作50余年。写过的书拍成了电影电视剧,塑造的人物成了读者饭桌上的谈资,而...
野菜志 本书特色 《野菜志》是《自然随笔丛书》之一,书中具体介绍了:薄荷、水蓼、马齿苋、紫苏、柴胡、马兰、藿香、鸭跖草、野苋菜、黄荆、清明菜、商陆、薇菜、车前草...
心血管病临床诊治 目录 第1章冠心病心绞痛第2章心律失常第3章心力衰竭第4章冠心病急性心肌梗死第5章心源性休克第6章高脂血症第7章动脉粥样硬化第8章高血压病第9...
2020年的诺贝尔化学奖授予珍妮弗·杜德纳和埃玛纽埃勒·沙尔庞捷两位科学家,获奖原因是她们开发出基因组编辑方法,提出一种被称为CRISPR-Cas9的方法,该方...
《数据库系统原理及MySQL应用教程(第2版)》内容简介:本书全面地讲述了数据库技术的基本原理和应用。主要内容包括:数据库概述、
《温疫论》内容简介:本书,明代吴有性(字又可)撰于崇祯十五(1642)年,是中医史上第一部系统研究急性传染病的医学著作,是中医
戴明扬撰著的《嵇康集校注》,详校《嵇康集》众本,厘定文字,择录旧注,征引典故,广辑嵇康事迹及其人其作之评论,对研究嵇康生平及其作品具有重要的参考价值,几十年来一...
李连达中药研究探索与实践 本书特色 《李连达中药研究探索与实践》收集了中国工程 院李连达院士在中药研究过程中一系列关于中药现代 化、中药研究的发展与创新等方面的...
作品目录目录可爱的背带裙连体裤款式简单的裤子荷叶边短裤可爱的南瓜裤子人气方领上衣最爱的罩衫北欧风格套装巧用色彩的吊带背心
苏七七,电影学博士,影评人,策展人。在真实世界与电影时空的交织中,从经验与逻辑出发,寻找对时代语境与个体处境的理解,并寻找思想与审美的着落之处。著有《声色现场》...
作品目录第一章汇率基础知识第一节汇率的基本概念第二节汇率制度第二章汇率水平决定的原理第一节汇率水平决定原理之一第二节汇率
村上春树,日本作家。生于1949年。29岁开始写作,处女作《且听风吟》获日本群像新人奖,1987年问世的《挪威的森林》日文版销量已突破1000万册,2009年出...