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页
Chapter1字说——说说汉字那点事Chapter2字梳——梳理文字的构成Chapter3字思——字体设计的思维方法Chapter4字法——字体设计的
TimeBindsisapowerfulargumentthattemporaldissonanceandsexualdissonanceareintertwi...
《艺术品拍卖人的审定义务研究》内容简介:艺术品审定涵盖范围十分广泛,虽然在艺术史领域发展已久,但是成为法律议题,则始于文化
电焊工 内容简介 任务1了解焊接人门知识与焊接图样1.焊接入门知识简介2.焊接接头及焊接坡口图样任务2认识金属材料与热处理工艺1.认识金属材料2.钢的热处理工艺...
《深圳市民文化大讲堂2015年讲座精选(全2册)》内容简介:2015年,“深圳市民文化大讲堂”邀请了李林、谢春涛、侯杨方、何亮亮、厚
目录:目 录前言跟随周总理治水《周恩来与治水》序把水利电力的队伍建设提高到一个新水平——学习《邓小平文选》的体会先念同志与水利我们的学习榜样邓颖超大姐治淮工作的...
But thats what this is, isnt it? The ultimate bitch fight. When John takes a bre...
法律人士或者关心中国法治进程的人,无不对美国宪法心怀敬意。美国宪法的出现究竟是人性与自由的胜利,还是利益力量左右的结果?这是一个需要回答、却又不必认真计较答案的...
现代世界所经历的最深远变革是人口结构的变迁。以1800年为起点,全球人口经历过两次重大转型。第一次是人口膨胀带来了规模效应,为欧洲提供巨大的发展优势——不断增长...
精彩摘录临江之悲,也许系于个体之性情,也许基于世态之动荡,但更主要地缘于历史文化衍变过程中民族性格的发展史。任何时代都有
艾公子(原笔名最爱君),是微信公众号“最爱历史”创作团队的集体笔名,本书三名作者分别为郑焕坚、吴润凯、陈恩发。其中两名主创者郑焕坚、吴润凯均为《南方都市报》原高...
通向正义之路:法律推理的方法论研究 内容简介 法律推理是法律工作者利用法律现由推导和论证司法判决的证成过程或证成手段.它既是一种法律思维活动,又是一种应受法律规...
Presentingafullinterpretationofthelawconcerningtelecommunicationsderegulation,th...
★安杰拉•马森斯,英国悬疑小说作家,来自英格兰中部衰落破败的老工业区黑乡,少女时期因家庭原因在学校长期遭受霸凌,孤独成长。她在购物中心当了19年保安。在长达25...
他叫伍迪·艾伦,戴个眼镜,老是紧皱眉头,唠叨永远不停。他每年拍一部电影,《午夜巴黎》《安妮·霍尔》《曼哈顿》,你一定看过他的作品。每一部都是自己写剧本,如同拥有...
以赛亚·伯林,英国哲学家和政治思想史家,20世纪最著名的自由主义知识分子之一。出生于俄国里加的一个犹太人家庭,1920年随父母前往英国。1929年进入牛津大学攻...
《清影记录中国(2009):算命》内容简介:《清影纪录中国》系列丛书是清影工作室根据其免费影像放映计划,以纪录片作者访谈为主,
从前现代主义到后现代主义的美国法律思想 本书特色 “美国法律文库”是“中美元首法治计划”项目之一,该项目计划翻译百余种图书,全面介绍美国高水平的法学著作,是迄今...
温病条辨 内容简介 本书为温病通论著作,六卷。清·吴瑭(鞠通)著于嘉庆三年。书仿《伤寒论》体例,分条列论,以求简要易诵,又于各条之下详加辨析议论,故以“条辨”命...
作者简介:伊藤正子,1970年生于日本横滨。作为烹饪、家居小物等的生活方式设计师,多次在杂志与图书中登场。伊藤女士是一名公认的吃货,她会为了美食而日本各地、甚至...