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页
罗伯特·迪默里(Robert Dimery)是位自由乐评人,曾为Time Out(伦敦)与Vogue等多家杂志撰写专栏与乐评。他主编的《有生之年非听不可的100...
中国荞麦学 本书特色 任长忠、赵钢主编的《中国荞麦学(精)》涵盖荞麦生物学、资源育种、遗传生理、生产栽培、作物营养与施肥、植物保护、品质加工等诸多领域,内容丰富...
医方守约 本书特色 胡先容老先生将自己的书稿定名为《医方守约》是有深意的。书稿中记录了伤寒证一百三十方,金匮杂病一百四十六方及《千金要方》、《千金翼方》...
欧文·M·柯匹(Irivng M.Copi,1917-2002),美国著名逻辑教育家,曾先后执教于美国伊利诺伊大学、密歇根大学、普林斯顿大学和夏威夷大学。卡尔·...
生产.销售伪劣商品罪专题整理 本书特色 《生产、销售伪劣商品罪专题整理》:北京师范大学刑事法律科学研究院刑法学研究总整理文库。生产.销售伪劣商品罪专题整理 内容...
作品目录序第一章 概论中国汉阙概论第二章 中国汉阙研究汉阙与汉代建筑汉阙的形式与内容中国汉阙中反映的汉代书法艺术从汉阙铭文
基于计算机辅助的桥梁倒塌事故分析 本书特色 桥梁是交通生命线的咽喉工程。然而,近些年来国内外桥梁倒塌事故屡见不鲜。桥梁倒塌不仅会造成交通阻断,产生巨大的经济损失...
作者:圣勇,约生活在3-4世纪,大乘佛教梵语文学中使用古典梵语写作的先驱和代表人物之一,著有诗歌作品《妙语宝箧》和《波罗蜜要义》。译者:黄宝生,北京大学东方语言...
Bringstheradicalenvironmentalismknownasdeepecologyintoanencounterwithcontemporar...
苏慧廉,英国人,传教士,著名的教育家,欧洲一流的汉学家。他一生最好的时光都在中国度过,他的故事,却少有人知。在十九世纪晚期至二十世纪初的中国,这三个字与许多历史...
邓安庆,已出版《纸上王国》《柔软的距离》《山中的糖果》《我认识了一个索马里海盗》《天边一星子》《永隔一江水》《望花》等书,有部分作品被翻译成英语、意大利语、西班...
王汎森(1958— ),历史学家,台湾中研院院士。曾任历史语言研究所所长(2003—2009) ,特聘研究员。台湾云林人。就读于台湾大学历史系、历史研究所。 1...
腹部肿瘤超声诊断技术 本书特色 为满足国内超声诊断工作者和临床医师学习和提高超声诊断技术的需要,重庆出版社组织重庆医科大学及第三军医大学的超声医学骨干力量,经过...
危令敦,美國威斯康辛大學麥迪遜校區博士,目前任教於香港中文大學中國語言及文學系,編著有《香港小說五家》、《一生二、二生三:高行健小說研究》、《香港文學大系:一九...
不明原因发热 目录 **章基本概念第二章体温测量第三章体温热型第四章诊断要点第五章鉴别诊断第六章治疗决策第七章经典型不明原因发热病因分布特征第八章复发性不明原因...
猴子是一种和我们人类联系密切的动物,但你有没有想过,猴子为何与众不同?《了不起的猴子》,一本猴类百科绘本,带读者解开猴类
作品目录自序:写在最前面“太傻”世界的一个童话序及导读前言第二版修订说明第一章 NO.1误区——留学申请的迷雾第二章 NO.2本质
在青木和子看来,与玫瑰的邂逅似乎是“命中注定”!种植玫瑰、观赏玫瑰、刺绣玫瑰,已成为她生活中不可或缺的一部分,日子过得幸福而充实,令人羡慕。本书甄选了29种玫瑰...
金子美铃(1903-1930)活跃于上个世纪20年代的日本童谣诗人。去世时年仅二十六岁。其作品一度被世人遗忘。1984年,金子美铃生前留下的三本手抄童谣诗集共五...
时方歌括 本书特色 《时方歌括》为清代医家陈修园所著。全书分上、下二卷,共收录了唐、宋以后的中医常用方剂一百零八首,按性质分为十二类,并将各方韵为歌诀。陈氏既采...