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页
In the last years of World War II, Friedrich Hayek wrote The Road to Serfdom. He...
作品目录推荐序――为中文版《从哈勃看宇宙》序前言第一章 哈勃太空望远镜和宇宙一 光与天文学二 天文学:观测的科学三 哈勃太空
作品目录目录序答读者问我和欣然他们谢欣然――她是主角,不要忘记萧遥――几次将我陷入写作困境陈明――在中学生中,比我想象的
小野×吳念真×柯一正×余為彥×詹宏志×舒國治×杜篤之×廖慶松×陳博文×張惠恭×鴻鴻×陳以文×王維明×陳駿霖×金燕玲×張震×柯宇綸×陳湘琪18位影人與文化人深摯講...
自由撰稿人,专栏作家
《余光中集(1-9)》内容简介:余光中先生从事文学事业已逾半个世纪。其历年发表的诗文,除近期新作之外,都曾由他亲手编定,结集出版。自1952年第一本诗集《舟子的...
精彩摘录「虽然只是偶然的情况,但是从以前开始,当我像现在这样在人行横道等交通灯的时候——」 我说道。 「一看到信号灯
孙庆伟,男,生于1970年,1988年入北京大学考古系学习,先后获学士、硕士、博士学位,现任北京大学考古文博学院教授、副院长,主要从事中国青铜时代考古研究和教学...
"TwoCountriesSpeak:PoemsandRemembrances"isarenditionofpoemsandreminiscencesshowc...
《谈笑间》乐嘉最新杂文集。嬉笑怒骂,乐嘉以其敏锐的洞察力和风趣犀利的文字表达了对生命、爱情、婚姻、家庭、职场等方面的独特见解。本书在帮助读者认清自己读懂别人的同...
本书主要采用认知语言学和语法化的理论方法,从来源上把汉语名量词分为三类,即“名词来源的名量词”“动词来源的名量词”和“复
医学遗传学-第3版 本书特色 《医学遗传学(供8年制及7年制5+3一 体化临床医学等专业用第3版全国高等学校教材)》广 泛采纳广大师生的意见和建议,同时又吸取了...
蒙田,法国人文主义思想家。主要作品有《蒙田随笔全集》、《蒙田意大利之旅》。叔本华,德国著名哲学家,唯意志主义的创始人和主要代表之一。著有《作为意志和表象的世界》...
Oncetherewasaraceofbeingsnotofangelsandnotofman...Across-breedbetweenthedivinean...
全球销量超过10000000册的《情商》作者“情商之父”丹尼尔·戈尔曼成名巨作。《情商》是20世纪颇具影响力的话题书籍之一。雄踞美国《纽约时报》畅销书排行榜前1...
冨樫 義博(とがし よしひろ、1966年4月27日 - )は、日本の漫画家。男性。愛称は「ヨシりん」、「冨樫王子」など。「富樫」は誤表記。妻は『美少女戦士セーラ...
武俠片向來被視為盛載着中國文化國族主義,但在香港的大眾文化脈絡下,卻是與香港現代都市工業式社會息息相關。葉曼丰指出,武俠片在香港的六、七十年代意義重大,不單關乎...
★全面讲述邓文迪从小至今四十余年人生历程,从一个小镇少女到跨国公司员工,从初涉职场到成功豪门阔太,娓娓道来,知无不言。★条分缕析邓文迪工作与生活的多方面,从培养...
朱学勤,1952年9月出生于上海市,复旦大学史学博士,1997年至1998年哈佛大学访问学者,现为上海大学历史系教授。著作有《道德理想国的覆灭——从卢梭到罗伯斯...
Accordingtomanyintroductorypsychologytextbooks,Westernersareplacinganincreasingl...