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页
作品目录增订第四版前言第二版前言《返乡——致亲人》荷尔德林和诗的本质《如当节日的时候……》《追忆》荷尔德林的大地和天空诗
李微漪,画家。2011年,因其与一只狼共同生活八个月的传奇经历而成为媒体关注的焦点。
威廉·惠亭顿,威廉·惠亭顿博士是美国南加州大学卢卡斯电影艺术学院电影批评研究专业的副系主任,他研究的领域包括电影电视历史、类型研究、数字文化、声音文化、剧本改编...
新修本草:辑复本第二版 内容简介 本书是对世界*早药典唐代政府编修的《新修本草》的介绍,对其收载850种药物和详细介绍药物的性味、功效等内容进行标点、辑校。新修...
《看风景的心情:我与西湖“申遗”不期而遇》内容简介:本书作者是一位把西湖景观文化推向国际舞台的传播者,也是一位把西湖千古风
〔德〕保罗·卡雷尔(Paul Carell),原名保罗·卡尔·施密特,德国军事图书作家。
三戒大师起点知名作家,原名杨浩,山东青岛人,属狗的八零后,喜爱读史,时常为明清时期我华夏之衰落扼腕叹息。追本溯源,便找到了这个资本主义萌芽方兴未艾,中西方交流热...
《道路与梦想》内容简介:在《道路与梦想》中,王石不仅以坦率而诚挚的方式讲述了他的人生风雨历程,回顾了万科的成长故事,更描绘
作品目录神奇的呼吸――北京・中国历史博物馆我们活着――四川・自贡恐龙博物馆寒来暑往――天津自然博物馆瞬间古老――北京・周
何炳棣,中央研究院院士。國立清華大學文學士、美國哥倫比亞大學哲學博士。美國芝加哥大學歷史系湯遜講座教授、美國加州大學Irvine分校傑出訪問教授。著作:《中國會...
乡村法案:1940年代太行地区政府断案63例 本书特色 白潮编著的《乡村法案--1940年代太行地区政府断案63例》是那个硝烟弥漫的战争年代特有的司法记录。在这...
“我就是我!我就是女人!”从“野丫头”到“女性主义理论第一人”上野千鹤子完整回顾40年女性主义历程*“我就是这样一路飞奔而来的,我希望读者能够接过我的接力棒。”...
张小娴,香港女作家。1995年推出第一部长篇小说《面包树上的女人》而走红文坛,继亦舒之后,成为香港最受欢迎的言情小说家。她的作品善于描写都市的男欢女爱,深受年轻...
魏娅,笔名烷基八氮,毕业于南京大学政府管理学院,小说作者,专业影评人。 作品多次刊登、转载于《中国青年》杂志、每日豆瓣公众号、GGV纪源资本公众号等多家媒体。“...
医学社会学 内容简介 现代国家中死亡和失能的主要原因由传染病向慢性病的转变,使社会、健康和患病关系的研究变得越来越重要。社会行为不但与传染病的发生和传播有关,而...
为什么当你真心投入到一段关系中后,容易变得反复无常?为什么平日乐观自信的自己,一恋爱就变得患得患失、多疑易怒?为什么我们越想拥有时,越会像个小孩子一样无助、哭闹...
巫山:自由撰稿人,畅销书作家,业余编剧。多家青春言情畅销杂志专栏作者,累计发表短文达百万字。视写作为终生之愿,希望能维持初心写到老。新浪微博:巫山wushan微...
ThefirstdayofsummerforetellsnewbeginningsforJohnMoore,arenowned,yetemotionallyst...
作者:じん(自然の敵P)1990年出生於日本北海道的多範圍創作者。從小開始接觸音樂,風格受到作曲家神前暁的影響。2011年起投稿於NICONICO動畫的「カゲロ...
Apsychologicalstudyofcombatinwarandtheterrorbombingshereathome-fromKorea,Algeria...