跳转到主要内容
Chinese, Simplified

为Rust初学者完全免费的资源

Image for post

内容列表

介绍

  • 🦀Rust的工具链
  • 🦀Rust在线书籍和资源
  • 🦀Rust官方链接
  • 🦀视频教程
  • 🦀播客
  • 🦀交互式学习
  • 🦀在线书籍和教程
  • 🦀备忘单
  • 🦀Rust社区
  • 🦀编码的挑战
  • 🦀Rust IDE扩展
  • 🦀Rust的生态系统
  • 🦀中级用户资源

结论

介绍

[最新更新:2020年9月12日]

Rust是一种注重安全性、速度和并发性的现代系统编程语言。

下面的图表来自评测游戏,显示了Rust与其他编程语言相比是多么的快。你可以在这里找到Go语言的对比。

Image for post

 

在本文中,您将找到基本的Rust工具、最新的文档、教程、视频和在线资源。

阅读这篇文章后,你可以自己导航,并开始有效地学习Rust编程语言,以适合你的学习风格。

当你安装Rust时,你安装的是rustc, cargo, rustup和其他标准工具。所以,在找到所有资源之前,让我们先看看Rust工具链做什么。

Image for post

Rust的工具链

工具链是帮助语言生成功能代码的一组工具。它们可以从简单的编译器和链接器程序,或附加库、IDE或调试器中提供扩展功能。

rustup

rustup安装Rust编程语言,使您能够轻松地在稳定编译器、测试版编译器和夜间编译器之间切换,并保持它们的更新。

你可以更新Rust:

$ rustup update

Image for post

rustc

rustc是Rust编程语言的编译器。编译器接受您的源代码并生成二进制代码,可以作为库,也可以作为可执行文件。你将使用Cargo来运行Rust程序而不是rustc。

您可以在关于outrustc的参考资料中找到更多细节。

Cargo

Image for post

Cargo是Rust包管理员。Cargo下载Rust包的依赖项,编译您的包,制作可分发的包,并将它们上传到crates.io, Rust社区的包注册表。

Image for post

其他官方工具

  • Clippy is a Rust linter.
  • rustfmt formats Rust code according to style guidelines.

您可以在此链接中找到官方工具状态。

Rust免费的在线书籍和资源

在尝试其他资源之前,您不能避免使用Rust编程语言。这是你需要阅读的关于Rust的第一本完整的书。这本书涵盖了初学者到高级用户的主题。它用大量的例子和图表解释了所有的细节。

Image for post

如果你从例子中学到更多,Rust的例子是为你。它是一个可运行示例的集合,演示了各种Rust概念和标准库。你可以找到20多个例子。

Image for post

您可以编辑和运行Rust代码从您的浏览器。

Image for post

最后你会找到中级和高级的在线资源。

 Rust Cookbook是一个简单示例的集合,它展示了使用Rust生态系统中的板条箱来完成常见编程任务的良好实践。

Image for post

Rust的官方链接

你可以在Rust的Rust official website.上找到很多信息。

crate 是Rust二进制或库,你可以在https://crates.io/找到Rust社区的crate 注册表。

包是提供一组功能的一个或多个crate .包裹内装Cargo.toml文件,描述如何构建这些板条箱。

Rust标准库提供了The Rust Standard Library

The Rust Playground provides the top 100 most downloaded crates from craits.io and the crates from the Rust Cookbook.

其他资源

Learn Rust 提供您需要的指南和文档。

你可以在 Awesome Rust通过类别找到项目工具库。

Ferrous Teaching Material 覆盖基础到高级主题幻灯片。它提供了示例代码和解释是简洁的。

Rust的错误

如果你想详细了解Rust错误,Rust编译器错误索引列举所有锈错误的例子。

终端错误:

Image for post

Rust编译器错误索引的错误细节:

Rust视频教程

如果你喜欢从视频中学习,那么下面的视频将会帮助你。

Rust播客

The Rustacean Station Podcast 是一个为Rust编程语言创建播客内容的社区项目。

Image for post

The unofficial mascot for Rust

Rust交互式学习

如果你喜欢边做边学,那么这些就适合你。

Tour of Rust 是一个循序渐进的指南,通过Rust编程语言的特点。它涵盖了基础、基本控制流、基本数据结构类型和泛型类型。

Image for post

rustlings提供了一些小练习,让您习惯于阅读和编写Rust代码。您可以将它与Rust编程语言一起使用。

你可以开始练习:

rultlings watch

当你保存文件时,它会自动检查答案并给你反馈。

Image for post

一旦你完成了一个练习,你需要删除这一行:

// I AM NOT DONE

保存文件后,它将转到下一个练习。

rustlings 为文档链接提供了有用的提示。

Image for post

Exercism 是100%免费的代码实践和指导。它是完全开源的,依赖于成千上万志愿者的贡献。

它会指导你如何在你的电脑上安装它。你不仅可以学习Rust,还可以学习其他50种编程语言。

当你在电脑上完成一个编码挑战时,你上传你的解决方案,并与导师一起审查它。

Image for post

Online Books & Tutorials

Cheat Sheets

Rust Community

Blog and newsletter

Where can I get help?

Rust Discord has many active members and one of the sections is for beginners.

Rust Users Forum  是关于Rust编程语言的帮助、讨论和公告。

Image for post

Stackoverflow有超过16000个问题。 Shepmaster是世界上第一家Rust咨询公司的联合创始人,他回答了许多Rust 问题。

Reddit’s “The Rust Programming Language” 拥有10万5千名会员。

Image for post

People to follow on Twitter

· #rustlang#learnrust, and #learningrust
· Rust Language
· Steve Klabnik
· Aidan Hobson Sayers
· Ashley Williams
· Carol Nichols
· Niko Matsakis
· Nick Cameron
· Pietro Albini
· Lin Clark
· Florian Gilcher
· Kyle J Strand
· This Week in Rust
· Jonathan Turner

Rust Meetup

There are many Rust Meetup groups running online meetings. You can find meetings in Rust Community Calendar as well.

编码挑战

  • LeetCode has many problems you can solve online with Rust.
  • exercism.io has 92 exercises on the Rust track.
  • Sphere online judge has many problems you can challenge.
  • You take part in writing the code for games that you play directly online at CodinGame. You can write your code in Rust.

Rust的IDE扩展

你可以在这里here.为你的编辑器找到Rust集成。如果你是一个VS Code用户,你可以安装 rls-vscode扩展。

RLS提供了一个在后台运行的服务器,提供ide、编辑器和其他带有Rust程序信息的工具。它支持代码自动完成、跳转到定义、代码格式化等等many more.。

Rust Lang编译团队创建rls-2.0工作组 ( rls-2.0 working group.)。目标是让用户有更好的RLS体验。

您可以在rust-analyzer 中找到它们的实现,并且rust-analyzer支持不同的IDEs

你可以在Are we (I)DE yet?找到你的编辑是如何支持Rust的?

Rust的生态系统

你可以在crats .io找到很多库。下面是一些你可能会感兴趣的类别。

Web框架

根据Web框架基准测试(Web Framework Benchmarks.),Actix是最快的框架。目前有10个活跃的Rust web框架。 ActixRocketGothamSeed等。您可以从web框架比较(web framework comparison.)中找到更多的信息。

简单的火箭网络框架教程|发布请求

Web开发

最快的Rust模板引擎,旗鱼。它号称比车把快200倍。

WebAssembly(最新更新:2020年6月29日)

如果您对WebAssembly感兴趣,那么下面的链接将帮助您。

网络

Rust official page on Networking.

嵌入式设备

桌面开发

Rust绑定FLTK图形用户界面库 fltk-rs。视频教程在这里(here.)。

数据科学

游戏开发(最新更新,2020年7月13日)

 

终端(最新更新,2020年7月13日)

  • Rust official page on Command-line apps.
  • Rustbox is a library that provides API which allows the programmer to write text-based user interfaces.
  • Tui-rs is a Rust library to build rich terminal user interfaces and dashboards.
  • Termion is a pure Rust, bindless library for low-level handling, manipulating, and reading information about terminals.
  • Crossterm is a pure-rust, terminal manipulation library that makes it possible to write cross-platform text-based interfaces.
  • Pancurses is a curses library for Rust to provide a more Rustic interface over the usual curses functions for ease of use while remaining close enough to curses to make porting easy.
  • StructOpt parses command line arguments by defining a struct. It combines clap with custom derive.
  • clap or Command Line Argument Parser is a simple-to-use, efficient, and fully-configurable library for parsing command line arguments.
  • Gtk-rs is Rust bindings for GTK+ 3CairoGtkSourceView and other GLib-compatible libraries. It provides many UI widgets out-of-the-box.

操作系统开发

在Rust的帖子中,OSDev,操作系统开发给出了RustOSDev工具和库的最重要变化的常规概述。

Rust绑定为其他语言

bindgen automatically generates Rust FFI bindings to C (and some C++) libraries.

PyO3 includes running and interacting with Python code from a Rust binary.
Mara’s Blog goes through the process of creating inline-python.

You can find more bindings at carates.io.

序列化和反序列化

Serde是一个序列化和反序列化Rust数据结构的框架。

序列化采用内存中的数据结构,并将其转换为一系列可以存储和传输的字节。反序列化接受一系列字节,并将其转换为可编程使用的内存数据结构。

ORM

Diesel是一个安全的、可扩展的针对Rust的ORM和查询生成器。

中级用户资源

如果你喜欢冒险,你可以看看下面的一条。

Post-Beginners教程

边做边学

嵌入式系统

结论

网上有成千上万的资源。希望你找到最适合的学习资源,开始学习Rust编程语言。

如果我漏掉了什么,请告诉我。

 

原文:https://towardsdatascience.com/you-want-to-learn-rust-but-you-dont-know-where-to-start-fc826402d5ba

本文:http://jiagoushi.pro/node/1398

讨论:请加入知识星球【全栈和低代码开发】或者小号【it_training】或者QQ群【11107767】

 

Tags
 
Article
知识星球
 
微信公众号
 
视频号