The async book is built with mdbook, you can install it using cargo. cargo install mdbook cargo install mdbook-linkcheck Building To create a finished book, run mdbook build to generate it under the book/ directory. mdbook build Development While writing it can be handy to see your change...
In the first chapter, we took a brief look at async/.await and used it to build a simple server. This chapter will discuss async/.await in greater detail, explaining how it works and how async code differs from traditional Rust programs. 在第一章中,我们简要介绍了async/.await,并使用它构...
The last section of the book covers the broader async ecosystem, and provides a number of examples of how to accomplish common tasks. With that out of the way, let's explore the exciting world of Asynchronous Programming in Rust! 这本书的目的是一个全面的,最新的指南使用Rust的异步语言功能和...
asyncfnget_two_sites_async() {// Create two different "futures" which, when run to completion, 创建两个不同的`future`,你可以把`future`理解为未来某个时刻会被执行的计划任务// will asynchronously download the webpages. 当两个`future`被同时执行后,它们将并发的去下载目标页面letfuture_one=downloa...
另外如果不想手动的话直接copy这个example里的源码即可:async-book/main.rs at master · rust-lang/async-book (github.com) 另外文章同步到我的网站了:Serene Syllables,喜欢代码高亮的可以去这里看: rust异步基础学习--day9:期末大作业——用异步改写多线程服务器 ...
The async book is built withmdbook(docs), you can install it using cargo. cargo install mdbook cargo install mdbook-linkcheck To create a finished book, runmdbook buildto generate it under thebook/directory. mdbook build While writing it can be handy to see your changes,mdbook servewill laun...
出版书籍:张老师的《Rust编程之道》、范老师的《深入浅出Rust》、 吉姆·布兰迪《Rust程序设计》以及...
译者注:本译文已经合并进《Rust异步编程》中文翻译仓库huangjj27/async-book,号召大家也多多参与,期待与官方同步的中文完整版早日呈现。 Rust目前仅提供编写异步代码最基础的能力。重要的是,标准库尚未提供执行器,任务,反应器,组合器以及底层I/O futures和特质。同时,社区提供的异步生态系统填补了这些空白。
我在读完 Rust 官方文档 后,又跟着 Rust 第一步 敲了一遍代码。发现这只是个开始,在看了一遍Rust Nomicon Rust Nomicon 中文和Async Book之后,就已经想放弃了。太多晦涩的内容了,比如:Unsafe,PhantomData,Send and Sync,Pin... 直接一边写项目一边学吧。
本书是async-std的高级文档,你也可以通过它来学习 Rust 异步编程。本书着重于介绍async-std的 API 和任务模型。 请注意 Rust 官方有自己的异步编程书《Asynchronous Programming in Rust》(中文版:《Rust 异步编程》), 我们强烈建议将其与本书一同阅读,这样可以更广泛地了解 Rust 的异步编程。