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页
☆被斯蒂芬‧金选为2009年夏季阅读首选。☆凶手从不露面,用电话摧毁受害者的理智,让他们一丝不苟地按他说的行事,在极短时间内以诡异的方式自杀。☆心理扭曲的刑讯高...
量子力学是什么?量子理论跟我又有什么关系?它是现代科学的前沿阵地,研究比原子还小的微观世界。它一出生就离经叛道,和牛顿分庭抗礼,长大后又把爱因斯坦打得头破血流。...
圣地亚哥·拉蒙-卡哈尔(Santiago Ramón y Cajal, 1852-1934)是现代神经科学之父,也是诺贝尔奖获得者。他还是一名出色的艺术家——他...
赖声川1954年出生于美国华盛顿,籍贯江西会昌,生长于美国与台湾,美国加州伯克利大学戏剧博士,前台北艺术大学戏剧学院教授及院长。世界上最著名的华人戏剧家之一,被...
马克·郭士顿(Mark Goulston)◆ 心理、沟通、营销跨界整合专家◆ 全美年度最优秀商业教练马克·郭士顿是著名心理学家,医学博士,奥普拉脱口秀、今日秀以...
《人文北京》内容简介:本书以京味的文字、老北京人的视角对北京的历史文化进行了概括介绍,力求通 俗、全面、易读、有趣。本书的内
电影伴读中国文学文库。本书精选了鲁迅小说、杂文数十篇。鲁迅(1881-1936),现代文学家、思想家和革命家。原名周树人,字豫才,浙江绍兴人。1918年5月,首...
《我没疯,我只是与你不同》一书于1997年由Davies-Black出版社出版,一经上市就取得了很大的反响,先后被十几个国家引进出版。该书
精彩摘录我们要打败乌野!突破预选赛!打到白鸟泽——引自第21212页并未腐朽而攀登到此处的这班家伙,有着不轻易动摇的强大——
反思、揭示、挑战人类社会的科学现状。《科学的隐忧》对全球化与科学发展、科学如何工作和共享、科学的本质、科学与有限资源、科学与商业竞争等议题进行了深入解析。科学究...
巴里·J.奈尔伯夫·博弈论大师·耶鲁大学管理学院资深教授,MBA项目导师·畅销书《策略思维》《妙趣横生博弈论》作者奈尔伯夫在耶鲁大学讲授谈判、创新、战略及博弈理...
◎ 凯迪克金奖、女王终身成就奖获得者、美国最具代表性的插画家塔莎•杜朵的优雅生活。◎ 出售中日韩三国版权,深受多国读者喜爱。◎ 日本NHK电视台多次拍摄专题纪录...
贺兰,毕业于清华大学热能工程系,现为北京某冶金企业工程师。业余弄笔,活跃于天涯论坛等中文社区,作品散见于《北京青年报》《万象》等报纸杂志。
《新生代女性农民工城市适应性研究》内容简介:社会流动是社会学研究中的一个重要领域。在席卷全国的迁移浪潮中,女性农民工所占比
加布里埃莱•邓南遮Gabriele dAnnunzio(1863-1938)意大利诗人、小说家、剧作家,二十世纪初欧洲最具影响力的诗人之一,意大利唯美主义文学代...
1987年,R.梅雷迪思·贝尔宾博士和他的研究人员组建了“贝尔宾协会”,致力于推进团队角色理论在组织内部的应用与实践,助力企业在组织建设、人才开发、提升组织能力...
《杀死一只知更鸟》是公认的美国文学经典,而它在教育领域的意义却使其突破了国界,成为世界上最有名的成长小说之一。《杀死一只知更鸟》在西方世界的影响力巨大,是美国中...
建筑师参数化设计师NCF站长ID: Skywoolf
弗雷德里克•方热 Frédéric Fanget精神科医生、心理治疗师,任教于法国里昂第一大学,著有《医治受伤的自信》(Oser. Thérapie de la...
王春明,1987年生,上海人。复旦大学哲学学士、外国哲学硕士,法国里尔第三大学(现法国里尔大学)哲学博士,复旦大学哲学流动站博士后。现任复旦大学当代国外马克思主...