【Rust日报】2021-06-29 Rust社区到底发生了什么?

在curl中应用hyper是怎样帮助互联网变得更安全的?

How using hyper in curl can help make the internet safer

摘要

curl作为一款开源的使用URL语法进行文件传输的命令行工具,在互联网各种平台下都有广泛的支持和使用。但是curl是用C语言编写的,由于臭名昭著的C语言引起的内存安全问题,跟curl相关的安全漏洞有50%都是由C语言错误引起的;

另一方面,Rust语言自诞生之初就主打内存安全,一个自然的设想就是能否把curl的核心设施用rust语言编写的组件代替来提升curl的安全性。

在今年二月初的时候,来自互联网安全研究小组(Internet Security Research Group)的Josh Aas、curl的作者Daniel Stenberg以及hyper和Amazon Web Services的Sean McArthur举行了一次联合网络研讨会(joint webinar),讨论了内存安全和互联网安全的关系,并且探讨了如何在curl中应用hyper作为后端来提升整个互联网的网络安全质量。

具体措施是在curl中增加编译选项,使得提供设置hyper为curl的后端实现的选择。如今curl和hyper的代码开发都合入到了各自项目的主分支,但是新的发行版本可能要等到确保新开发的功能和原始C版本的实现逻辑一致,并通过足够完整的测试集覆盖后才会提上日程,这也是接下来要重点关注的事情。

《Programming Rust》第二版已经官宣发行

The second edition of Programming Rust is officially available!

摘要

由O'Reilly出版的《Programming Rust》第二版的电子书和实体书都已经上市了:

  • 实体书直达链接:https://www.oreilly.com/library/view/programming-rust-2nd/9781492052586/

  • 电子书直达链接:https://www.ebooks.com/en-us/book/210313783/programming-rust/jim-blandy/

关于《Programming Rust》

《Programming Rust》是一本深入考察Rust语言设计思想以及如何将其应用于一系列系统编程问题的技术书籍。本书通过若干入门级的项目示例,深入研究了Rust语言具体的语言特性和各种特性相互作用的逻辑,从类型系统到如何根据类型系统建模现实中的问题,从unsafe rust的本质探讨、如何处理FFI外部函数调用到Rust异步编程等高级特性,无一不做到了深入浅出。

为什么编写第二版?

本书较之第一版,根据Rust编译器最新版本的特性完全进行了跟进,并且新增了一个详尽的讲述异步编程的机制和技巧的章节。《Programming Rust》是一本适合想要了解Rust语言的C、C++、Python、Java或者其他语言的开发者,或者那些想要提升自己编程技巧的Rust编程人员的书籍。

讨论:Rust社区到底发生了什么?

What's wrong with the Rust community?

摘要:作者发现自己关注的repo凡事用rust语言编写的都有上千次的commit(最近的提交可能就在30秒钟之前),因此有感于Rust社区充满活力;和其他语言相比,Rust语言的生态系统虽然年轻但是也已经相当成熟了。( i <3 rust 跟帖者可能的原因是:

  1. 幸存者偏差:认为楼主关注的repo都是大型项目,因此贡献频繁是理所当然的;

  2. 投资偏好:Rust是一门年轻的语言,很多时间和金钱被投入用于建造核心基础设施;与核心工具都是用C语言编写、核心网络设施都是用Go语言编写的相比,Rust要走的路还有很多。

  3. 强大的社区:Rust拥有一个令人惊叹的强有力支持的社区,这或许和楼主发现的现象有关系;

  4. 内存安全保证代码质量:由于Rust在编译期间的安全保障,贡献的代码(只要编译通过)很容易被确认为是内存安全的,这使得很多开源项目的维护者更愿意接受其他人的代码贡献。

不少人认为,易于贡献代码 这一点自己再同意不为过。(:


From 日报小组 odd-cat

社区学习交流平台订阅:

Rust.cc 论坛: 支持 rss

微信公众号:Rust 语言中文社区

Key Features Get started with Rust to build scalable and high performance applications Learn how to create secure and blazingly fast programs in Rust Discover the power of Rust when developing concurrent applications for large and scalable software Book Description Rust is the new, open source, fast, and safe systems programming language for the 21st century, developed at Mozilla Research, and with a steadily growing community. It was created to solve the dilemma between high-level, slow code with minimal control over the system, and low-level, fast code with maximum system control. It is no longer necessary to learn C/C++ to develop resource intensive and low-level systems applications. This book will give you a head start to solve systems programming and application tasks with Rust. We start off with an argumentation of Rust's unique place in today's landscape of programming languages. You'll install Rust and learn how to work with its package manager Cargo. The various concepts are introduced step by step: variables, types, functions, and control structures to lay the groundwork. Then we explore more structured data such as strings, arrays, and enums, and you'll see how pattern matching works. Throughout all this, we stress the unique ways of reasoning that the Rust compiler uses to produce safe code. Next we look at Rust's specific way of error handling, and the overall importance of traits in Rust code. The pillar of memory safety is treated in depth as we explore the various pointer kinds. Next, you'll see how macros can simplify code generation, and how to compose bigger projects with modules and crates. Finally, you'll discover how we can write safe concurrent code in Rust and interface with C programs, get a view of the Rust ecosystem, and explore the use of the standard library. What you will learn Set up your Rust environment to achieve the highest productivity Bridge the performance gap between safe and unsafe languages Use pattern matching to create
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值