Rust交互式学习
如果你喜欢边做边学,那么这些就适合你。
Tour of Rust 是一个循序渐进的指南,通过Rust编程语言的特点。它涵盖了基础、基本控制流、基本数据结构类型和泛型类型。
rustlings提供了一些小练习,让您习惯于阅读和编写Rust代码。您可以将它与Rust编程语言一起使用。
你可以开始练习:
rultlings watch
当你保存文件时,它会自动检查答案并给你反馈。
一旦你完成了一个练习,你需要删除这一行:
// I AM NOT DONE
保存文件后,它将转到下一个练习。
rustlings 为文档链接提供了有用的提示。
Exercism 是100%免费的代码实践和指导。它是完全开源的,依赖于成千上万志愿者的贡献。
它会指导你如何在你的电脑上安装它。你不仅可以学习Rust,还可以学习其他50种编程语言。
当你在电脑上完成一个编码挑战时,你上传你的解决方案,并与导师一起审查它。
Online Books & Tutorials
- Nelson Elhage is creating the Ultimate Tic Tac Toe with Rust.
- Clear explanation of Rust’s module system by Sheshbabu Chinnakonda
- DEV has more than 70 Rust related articles in June 2020.
- If you are a JavaScript developer, Shesh has posts for you. e.g. Rust for JavaScript Developers — Functions and Control Flow.
- A Gentle Introduction to Rust by Steve J Donovan
- Build a Smart Bookmarking Tool with Rust and Rocket by Joe Previte
- Extremely Simple Rust Rocket Framework Tutorial
- Learning Rust
- You can find about Rust libraries/crates in 24daysofrust.
- Rust + Actix + CosmosDB (MongoDB) tutorial api
- Extremely Simple Rust Rocket Framework Tutorial
- Build a Smart Bookmarking Tool with Rust and Rocket
- Rust Sokoban is an extended tutorial on making a Sokoban copy in Rust. It uses an existing 2D game engine, pre-made assets and by the end, it’ll have a fully working game. You can find examples of how to use it.
- Learn Rust With Entirely Too Many Linked Lists. The online book teaches basic and advanced Rust programming by implement 6 linked lists.
- A half-hour to learn Rust explains Rust keywords and symbols.
Cheat Sheets
- The Periodic Table of Rust Types: This table organizes Rust types into an orthogonal tabular form, making them easier to understand and reason.
- Rust String Conversions
- Rust Iterator Cheat Sheet
- Rust Container Cheet Sheet
Rust Community
Blog and newsletter
- Rust Community page.
- I highly recommend “This week in Rust”. It delivers weekly most up-to-date information about Rust.
- “Rust Blog” is the main Rust blog. The core team uses this blog to announce big developments in the world of Rust.
- “Inside Rust blog” is aimed a those who wish to follow along with Rust development.
- Brian’s “Rust blog articles” page is organized by categories and has many blog articles.
- If you are a C programmer, Cliff L. Biffle’s “Learn Rust the Dangerous Way” is for you.
- Llogiq on stuff
- Niko Matsakis
Where can I get help?
Rust Discord has many active members and one of the sections is for beginners.
Rust Users Forum 是关于Rust编程语言的帮助、讨论和公告。
Stackoverflow有超过16000个问题。Shepmaster是世界上第一家Rust咨询公司的联合创始人,他回答了许多Rust 问题。
Reddit’s “The Rust Programming Language” 拥有10万5千名会员。
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框架。 Actix, Rocket, Gotham, Seed等。您可以从web框架比较(web framework comparison.)中找到更多的信息。
简单的火箭网络框架教程|发布请求
Web开发
最快的Rust模板引擎,旗鱼。它号称比车把快200倍。
WebAssembly(最新更新:2020年6月29日)
如果您对WebAssembly感兴趣,那么下面的链接将帮助您。
- Rust official page on WebAssembly
- WASM working group and Rust and WebAssembly book by the group.
- Rust and WebAssembly from Scratch: Hello World with Strings
- Getting started with WebAssembly and Rust
- WebAssembly with Rust and React (Using create-react-app)
- Using Rust and WebAssembly to Process Pixels from a Video Feed
- Understanding WebAssembly text format
- Compiling from Rust to WebAssembly
- Bringing WebAssembly outside the web with WASI by Lin Clark explains how WASI works and explore how different use cases can benefit from it.
- Yew is a Rust/Wasm framework for building client web apps.
- Rust + WebAssembly — EdgeXR @ Netlight by Aleksander Heintz
网络
Rust official page on Networking.
嵌入式设备
- Rust official page on Embedded devices.
- The Embedded Rust Book.
桌面开发
Rust绑定FLTK图形用户界面库 fltk-rs。视频教程在这里(here.)。
数据科学
- Data Science at Home has a series of podcasts on Rust and machine learning.
- Amadeus provides a harmonious distributed data analysis in Rust.
- ndarray is equivalent to Python’s numpy.
游戏开发(最新更新,2020年7月13日)
- Porting Godot Games To Rust (Part 1)
- Rust Game Development Working Group has monthly newsletters.
- The ggez is a lightweight game framework for making 2D games with minimum friction. It aims to implement an API based on (a Rustified version of) the LÖVE game framework. It contains portable 2D drawing, sound, resource loading, and event handling.
- Specs is an Entity-Component System(ESC) written in Rust. It is the most popular ESC library.
- godot-rust is Rust bindings to the Godot game engine.
- Gorgeous Godot games in Rust.
- Legion ECS with Godot and Rust.
终端(最新更新,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+ 3, Cairo, GtkSourceView 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和查询生成器。
中级用户资源
如果你喜欢冒险,你可以看看下面的一条。
- Command Line Applications in Rust has great exercises for a beginner who is new to the language and writing a program with a simple command-line interface (CLI). You’ll be exposed to a few of the core concepts of Rust as well as the main aspects of CLI applications.
- Rust API Guidelines is a set of recommendations on how to design and present APIs for the Rust programming language.
- The rustc bookrustc is the compiler for the Rust programming language. Compilers take your source code and produce binary code, either as a library or executable.
- The Cargo book tells you all about Cargo.
- You can read about Rust’s new large changes in The Edition Guide.
- Rust Language Cheat Sheet is for experienced programmers and intermediate Rust users. If you prefer visual example-driven content, this is for you. You can download a PDF from it’s Github repo.
- Rust Forge serves as a repository of supplementary documentation useful for members of The Rust Programming Language.
- The Rust Reference is the primary reference for the Rust programming language. It provides language construct and use, the memory model, concurrency model, runtime services, and more.
- Philipp Oppermann wrote Writing an OS in Rust.
- Michael F Bryan wrote about ArrayVec in Implementing ArrayVec Using Const Generics.
- Diving into Rust with a CLI shows how to create a CLI application.
- dtolnay wrote about Rust macro development case studies.
- A practical guide to async in Rust by Carl Fredrik Samson
- Secure Rust Guidelines — ANSSI (National Cybersecurity Agency of France)
- Rust OpenCV bindings
- Embedded development
- Rust Design Patterns
- Tips for Faster Rust Compile Times
- Rust verification tools
Post-Beginners教程
- Learning Rust: Let’s Build a Parser
- Small strings in Rust
- Servo is a modern, high-performance browser engine designed for both application and embedded use.
- MICHAEL-F-BRYAN is writing Rust articles.
- Barely Functional is writing Rust articles.
- Niko Matsakis writes his ideas on Rust.
边做边学
- learn-opengl-rs
- vulkann-tutorial-rs
嵌入式系统
- Ferrous Teaching Material
- embedded-trainings-2020
结论
网上有成千上万的资源。希望你找到最适合的学习资源,开始学习Rust编程语言。
如果我漏掉了什么,请告诉我。
需要知道链接的可以看原文或者私信小编。