首頁>技術>

為Rust初學者完全免費的資源

內容列表

介紹

Rust的工具鏈Rust線上書籍和資源Rust官方連結影片教程播客互動式學習線上書籍和教程備忘單Rust社群編碼的挑戰Rust IDE擴充套件Rust的生態系統中級使用者資源

結論

介紹

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

Rust是一種注重安全性、速度和併發性的現代系統程式語言。

下面的圖表來自評測遊戲,顯示了Rust與其他程式語言相比是多麼的快。你可以在這裡找到Go語言的對比。

在本文中,您將找到基本的Rust工具、最新的文件、教程、影片和線上資源。

閱讀這篇文章後,你可以自己導航,並開始有效地學習Rust程式語言,以適合你的學習風格。

當你安裝Rust時,你安裝的是rustc, cargo, rustup和其他標準工具。所以,在找到所有資源之前,讓我們先看看Rust工具鏈做什麼。

Rust的工具鏈

工具鏈是幫助語言生成功能程式碼的一組工具。它們可以從簡單的編譯器和連結器程式,或附加庫、IDE或偵錯程式中提供擴充套件功能。

rustup

rustup安裝Rust程式語言,使您能夠輕鬆地在穩定編譯器、測試版編譯器和夜間編譯器之間切換,並保持它們的更新。

你可以更新Rust:

$ rustup update

rustc

rustc是Rust程式語言的編譯器。編譯器接受您的原始碼並生成二進位制程式碼,可以作為庫,也可以作為可執行檔案。你將使用Cargo來執行Rust程式而不是rustc。

您可以在關於outrustc的參考資料中找到更多細節。

Cargo

Cargo是Rust包管理員。Cargo下載Rust包的依賴項,編譯您的包,製作可分發的包,並將它們上傳到crates.io, Rust社群的包登錄檔。

其他官方工具Clippy is a Rust linter.rustfmt formats Rust code according to style guidelines.

您可以在此連結中找到官方工具狀態。

Rust免費的線上書籍和資源

在嘗試其他資源之前,您不能避免使用Rust程式語言。這是你需要閱讀的關於Rust的第一本完整的書。這本書涵蓋了初學者到高階使用者的主題。它用大量的例子和圖表解釋了所有的細節。

如果你從例子中學到更多,Rust的例子是為你。它是一個可執行示例的集合,演示了各種Rust概念和標準庫。你可以找到20多個例子。

您可以編輯和執行Rust程式碼從您的瀏覽器。

最後你會找到中級和高階的線上資源。

Rust Cookbook是一個簡單示例的集合,它展示了使用Rust生態系統中的板條箱來完成常見程式設計任務的良好實踐。

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編譯器錯誤索引列舉所有鏽錯誤的例子。

終端錯誤:

Rust編譯器錯誤索引的錯誤細節:

Rust影片教程

如果你喜歡從影片中學習,那麼下面的影片將會幫助你。

Rust: What is Ownership and Borrowing? by Gary Explains.Ryan Levick created a series of Rust tutorials.Genus-v Programming has Actix related video tutorials including authentication service, web development, and GraphQL with Actix.Rust Web development | Boilerplate free with Rocket, June 2020, 22 min.Rust Programming: Browser computation with WebAssembly, June 2020, 1 hr 55 min.Video material curated by the Rust team.Intro to Rust | COM209 teaches some of the basics of Rust, and then build and run a simple app. The video was taken in May 2020.David Pedersen posted his live coding on Youtube and Twich.tv. They are from June 2020.In Jonathan Teaches Jason Rust!, Jonathan attempts to teach Jason Turner Rust fundamentals in a couple of hours. This video was taken in May 2020, 3 hrs 36 min.In 12 Things to Help You Learn Rust Gary explains loops, variables, functions, tuples, strings, and more. The video was taken in April 2020.Learning Rust: Rustlings shows pair programming on some Rustlings exercises. The video was taken in August 2019.Streaming Rust with Ryan LevickCrust of Rust: Iterators from May 2020.Build a Bitcoin-like Blockchain in Rust and Substrate from May 2020.into_rust() is from 2016, but it explains the basic concepts such as ownership, shared borrows, and mutable borrows.Baseline.Rust by zaitt.works.Hello Rust!Choosing Rust — Clint Frederickson Clint shares Iron his experience with choosing Rust and why it might be the right choice for your next project.Rust播客

The Rustacean Station Podcast 是一個為Rust程式語言建立播客內容的社群專案。

The unofficial mascot for Rust

Rust互動式學習

如果你喜歡邊做邊學,那麼這些就適合你。

Tour of Rust 是一個循序漸進的指南,透過Rust程式語言的特點。它涵蓋了基礎、基本控制流、基本資料結構型別和泛型型別。

rustlings提供了一些小練習,讓您習慣於閱讀和編寫Rust程式碼。您可以將它與Rust程式語言一起使用。

你可以開始練習:

rultlings watch

當你儲存檔案時,它會自動檢查答案並給你反饋。

// I AM NOT DONE

儲存檔案後,它將轉到下一個練習。

rustlings 為文件連結提供了有用的提示。

Exercism 是100%免費的程式碼實踐和指導。它是完全開源的,依賴於成千上萬志願者的貢獻。

它會指導你如何在你的電腦上安裝它。你不僅可以學習Rust,還可以學習其他50種程式語言。

當你在電腦上完成一個編碼挑戰時,你上傳你的解決方案,並與導師一起審查它。

Online Books & TutorialsNelson Elhage is creating the Ultimate Tic Tac Toe with Rust.Clear explanation of Rust’s module system by Sheshbabu ChinnakondaDEV 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 DonovanBuild a Smart Bookmarking Tool with Rust and Rocket by Joe PreviteExtremely Simple Rust Rocket Framework TutorialLearning RustYou can find about Rust libraries/crates in 24daysofrust.Rust + Actix + CosmosDB (MongoDB) tutorial apiExtremely Simple Rust Rocket Framework TutorialBuild a Smart Bookmarking Tool with Rust and RocketRust 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 SheetsThe Periodic Table of Rust Types: This table organizes Rust types into an orthogonal tabular form, making them easier to understand and reason.Rust String ConversionsRust Iterator Cheat SheetRust Container Cheet SheetRust CommunityBlog and newsletterRust 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 stuffNiko MatsakisWhere can I get help?

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

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 WebAssemblyWASM working group and Rust and WebAssembly book by the group.Rust and WebAssembly from Scratch: Hello World with StringsGetting started with WebAssembly and RustWebAssembly with Rust and React (Using create-react-app)Using Rust and WebAssembly to Process Pixels from a Video FeedUnderstanding WebAssembly text formatCompiling from Rust to WebAssemblyBringing 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 book rustc 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 SamsonSecure Rust Guidelines — ANSSI (National Cybersecurity Agency of France)Rust OpenCV bindingsEmbedded developmentRust Design PatternsTips for Faster Rust Compile TimesRust verification toolsPost-Beginners教程Learning Rust: Let’s Build a ParserSmall strings in RustServo 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-rsvulkann-tutorial-rs嵌入式系統Ferrous Teaching Materialembedded-trainings-2020結論

網上有成千上萬的資源。希望你找到最適合的學習資源,開始學習Rust程式語言。

如果我漏掉了什麼,請告訴我。

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

13
  • BSA-TRITC(10mg/ml) TRITC-BSA 牛血清白蛋白改性標記羅丹明
  • 微服務架構實戰:Nginx的安裝及負載均衡配置、開機啟動