I learn Rust by reading The Rust Programming Language (aka. TRPL) book.
This is my mind map and collection of resources for learning Rust in early 2019.
I plan to continuously update this list if time allows in future. I will move this into its own GitHub repo or something more permanent when this grow.
My notes while working through TRPL.
Programming paradigm: functional, imperative, structured, generic, concurrent
Rust focus: type and memory safety, precision, concurrency, performance, reliability
Rust enforces memory safety. Compile time memory safety guarantees protects us from:
- Uninitialized variables
- Use-after-free (UAV)
- Double-frees
- Exception due to NULL pointers (Rust does not have NULL)
- Impossible to forget to lock the mutex
- Data races between threads
- Mostly no memory leaks
- Iterator invalidation
In the safe subset of Rust, there's no undefined behavior at runtime:
- Integer overflow is defined
- Array access is bounds checked
Rust is modern — built with the experience learned in the past 40 years of programming languages.
Modern language features:
- Generics
- Enums and pattern matching
- No overhead FFI
Modern tooling:
- Great compiler errors
- Built-in dependency manager
- Built-in support for testing
- Users forum - official forum
- Internals forum - official forum
- The #beginners channel on Discord
- Get started with Rust - Official learning resources.
- Rust Cookbook - A collection of simple examples that demonstrate good practices to accomplish common programming tasks, using the crates of the Rust ecosystem.
- Rust by Example - A collection of runnable examples that illustrate various Rust concepts and standard libraries.
- Learn Rust With Entirely Too Many Linked Lists
- https://github.com/rust-lang/rustlings - Small exercises to get you used to reading and writing Rust code!
- Tour of Rust - A step by step guide through the features of the Rust programming language.
- A half-hour to learn Rust - 'similar' style to "Learn X in Y Minutes". It covers variable bindings, pattern matching, immutability, references, lifetimes, borrow rules, structs, traits, enums, generics, closures, and more.
- Read Rust: Getting Started - Introductory posts, guides and tutorials for getting started with Rust.
- Learning Rust - Rust programming language tutorials.
- Rust-101 - A tutorial for the Rust language.
- https://github.com/learning-rust/site - Rust Programming Language Tutorials for Everyone!
- Comprehensive Rust 🦀 - This is the Rust course used by the Android team at Google. It provides you the material to quickly teach Rust to everyone. The course covers the full spectrum of Rust, from basic syntax to advanced topics like generics and error handling. It also includes Android-specific content on the last day.
Rust stream on YouTube and/or Twitch:
- Jon Gjengset's stream on Rust - I first discovered Jon's stream while looking at Noria data-flow for high-performance web apps. Jon's stream covers mostly advanced concepts in Rust but not until recently (2020) where he started to covers more "advanced beginners" stuffs.
- Ryan Levick's "advanced beginners" stream on Rust who are familiar with the concepts of ownership, closures and threads but don't yet have a firm grip on them.
- Visualizing memory layout of Rust's data types
- Intorust screencasts by Niko Matsakis.
- Rust for Rustaceans by Jon Gjengset - a book that covers the next steps of Rust after TRPL/"the book". The book is written for people who are already familiar with Rust. The idea is that you read The Rust Programming Language (TRPL) first, play around with Rust for a bit on your own, maybe start using it "for real", and then pick this up to hone your skills. It is fairly fast paced, but is still has a good amount of low level details. (TLDR; if you're comfortable in Rust, this book is the next step up for intermediate developers.)
- Rust in Action by Tim McNamara - Systems programming concepts and techniques.
- Programming Rust by Jim Blandy, Jason Orendorff, Leonora F. S. Tindall - This revised, second edition covers the Rust 2021 Edition. It expands on many concepts in TRPL book. I like that it explains the memory layout of common Rust data structures.
- The Rustonomicon book - Meet Safe and Unsafe.
- https://github.com/psibi/rust-book-summary - Summary of the Rust book.
- Rust: A Language for the Next Forty Years by Carol Nichols - A talk about Rust's safety and stability. And a little bit about railroads.
- Learning systems programming with Rust - Closing keynote at the first RustConf 2016 by Julia Evans.
Useful libraies. Some created by Rust core members.
Blessed - An unofficial guide to the Rust ecosystem.
Not-Yet-Awesome Rust - A curated list of Rust code and resources that do NOT exist yet, but would be beneficial to the Rust community.
See more
-
https://github.com/getzola/zola - Static site engine. An alternative to Hugo and Jekyll.
-
https://github.com/TimelyDataflow/differential-dataflow - Similar to Noria.
-
https://github.com/getsentry/symbolicator - using actix-web for their symbolicator project
- https://github.com/sfackler/rust-antidote - Poison-free versions of the Rust standard library
Mutex
andRwLock
types.
- https://github.com/valeriansaliou/sonic
- https://github.com/toshi-search/Toshi - An Elasticsearch competitor written in Rust.
- https://github.com/xi-editor/xi-editor - an example of real-world usage of Rust.
- Real Time For the Masses (RTFM) framework for ARM Cortex-M microcontrollers
Cross-platform, desktop UI:
- https://github.com/anp/moxie
- https://github.com/KenSuenobu/rust-pushrod
- https://github.com/tauri-apps/tauri
- https://github.com/hecrj/iced
-
https://medium.com/@cevans3326/rust-in-2018-lets-fix-where-the-bullet-holes-aren-t-7e94cea0bd53
-
Read Rust collects interesting posts related to the Rust programming language.
Note-to-self: I found the writer through Mastodon
-
Official Posts:
See more
-
https://internals.rust-lang.org/t/production-user-research-summary/2530/3
-
https://blog.skylight.io/rust-means-never-having-to-close-a-socket/
- https://softwareengineeringdaily.com/2018/06/19/rust-networking-with-carl-lerche/
- http://arthurtw.github.io/2014/11/30/rust-borrow-lifetimes.html
-
https://medium.com/@saschagrunert/a-web-application-completely-in-rust-6f6bdb6c4471
-
https://gendignoux.com/blog/2017/09/05/rust-vs-cpp-ocaml-part1.html
-
Production/real-world usage: The Firecracker virtual machine monitor
-
https://corecursive.com/013-rust-and-bitter-c-developers-with-jim-blandy/
Blogs
- Manish Goregaokar's blog
- Mara's blog
- Steve Klabnik's blog
- Amos's blog
- Yoshua Wuyts's blog
- Llogiq's blog
- Raph Levien’s blog
- Sean McArthur's blog
- https://github.com/rustasync/areweasyncyet.rs - A website for tracking development progress of
async
/await
syntax of Rust programming language in the language itself as well as its ecosystem.
Things I discovered:
- https://github.com/racer-rust/racer - Rust code completion utility.
- explaine.rs - An interactive playground to explore the syntax of the Rust code.
Status: https://www.arewewebyet.org/
- https://brandur.org/rust-web
- https://larder.io/blog/larder-links-09-rust-web-frameworks/
- https://github.com/iron/iron
- https://github.com/nickel-org/nickel.rs
- https://github.com/tokio-rs/tokio-minihttp
- https://github.com/trezm/Thruster
- https://github.com/graphql-rust/juniper
- Tower-Web and Warp joint effort
- Warp on Zeit Now or AWS Lambda: https://zeit.co/blog/introducing-now-rust
- Templates
- Actix-web 1.0 – A small, pragmatic, and fast web framework for Rust
- https://www.reddit.com/r/rust/comments/cbn1no/rust_is_leading_most_of_the_techempower_web/
- TechEmpower/FrameworkBenchmarks#4834
- 1.0 summary: https://www.reddit.com/r/rust/comments/bwy99w/actixweb_10_released/eq2t499/
- https://www.reddit.com/r/programming/comments/cbgv6f/rust_async_frameworks_dominate_techempower/
- https://www.reddit.com/r/rust/comments/axy0hp/patterns_to_scale_actixweb_and_diesel/
- https://www.reddit.com/r/rust/comments/ce09id/why_we_need_alternatives_to_actix/
- https://64.github.io/actix/
- Examples:
- https://render.com/docs/deploy-actix-todo
Actor Model
Rust bindings for native Node.js modules:
- https://www.reddit.com/r/rust/comments/azit15/i_made_a_super_simple_example_guide_of_how_to/
- https://www.reddit.com/r/rust/comments/abfoe0/my_experience_converting_a_python_library_to_rust/
- https://alantrick.ca/writings/programming/python_to_rust/
- http://lucumr.pocoo.org/2015/5/27/rust-for-pythonistas/
WebAssembly (abbrevated a wasm) is an emerging technology.
- https://www.rust-lang.org/what/wasm
- https://blog.mgattozzi.dev/rust-wasm/
- https://github.com/rustwasm
See more
- https://github.com/wasmerio/wasmer
- https://hacks.mozilla.org/2017/02/a-cartoon-intro-to-webassembly/
- https://twitter.com/DasSurma/status/1034138207091187712
- https://medium.com/@robaboukhalil/hit-the-ground-running-with-webassembly-56cf9b2fa35d
- https://dev.to/talentlessguy/let-s-write-frontend-in-go-6ch
- https://v8.dev/blog/emscripten-llvm-wasm
- https://hacks.mozilla.org/2017/09/bootcamps-webassembly-and-computer-vision/
- https://dev.to/sendilkumarn/tiny-go-to-webassembly-5168
- https://github.com/WebAssembly/wabt
Updates from Web teams at Google:
- https://developers.google.com/web/updates/tags/webassembly#emscripting_a_c_library_to_wasm
- https://developers.google.com/web/updates/2018/03/emscripting-a-c-library
- https://developers.google.com/web/updates/2018/10/wasm-threads
- https://developers.google.com/web/updates/2018/04/loading-wasm
- https://developers.google.com/web/updates/2019/01/emscripten-npm
AWS Lambda:
- https://github.com/softprops/lando
- https://github.com/srijs/rust-aws-lambda
- Related: https://github.com/LegNeato/aws-lambda-events
- Related: https://github.com/graphql-rust
- Related: https://github.com/LegNeato/aws-lambda-events
- https://github.com/softprops/serverless-rust
Use Rust with Android NDK:
- https://www.reddit.com/r/rust/comments/b14wah/rust_library_for_ios_and_android_native/
- https://users.rust-lang.org/t/rust-on-android-today/17884/12
Users of the Rust programming language: https://communitywiki.org/trunk/grab/Rustaceans
- https://www.reddit.com/r/rust/comments/b3vw8w/alexis_beingessners_learning_rust_with_entirely/
- https://www.reddit.com/r/rust/comments/cra26t/sonata_100_rust_audio_decoders_media_demuxers_and/
- https://www.reddit.com/r/rust/comments/cysvjh/what_are_some_amazing_softwaresoftware_clones/
- https://www.reddit.com/r/rust/comments/cxmki8/introduction_to_rust_web_applications/
- https://www.reddit.com/r/rust/comments/cm7rje/rust_language_cheat_sheet/
See more
-
https://www.reddit.com/r/rust/comments/dbtgr8/accurate_mental_model_for_rusts_reference_types/
-
https://www.reddit.com/r/rust/comments/dhbpm9/announcing_displaydoc_a_doc_comment_based_derive/
-
https://www.reddit.com/r/rust/comments/dh96ta/zerocopylmdb_would_love_security_and_soundness/
-
https://www.reddit.com/r/rust/comments/dh8lev/mullvad_vpn_desktop_and_mobile_app_written_in/
-
https://www.reddit.com/r/rust/comments/dfvyzt/announcing_alexandrie_a_modular_alternative_crate/
-
https://www.reddit.com/r/rust/comments/dfv8er/alass_2_automatic_lanugageagnostic_subtitle/
-
https://www.reddit.com/r/rust/comments/dfei9l/the_node_experiment_exploring_async_basics_with/
-
https://www.reddit.com/r/rust/comments/de5hvu/writing_an_os_in_rust_updates_in_september_2019/
-
https://www.reddit.com/r/rust/comments/dc5kky/writing_linux_kernel_modules_in_safe_rust_linux/
-
https://www.reddit.com/r/rust/comments/di8bh9/paste_a_selfhostable_pastebin_written_in_rust/
-
https://www.reddit.com/r/rust/comments/ddhieo/how_cheap_is_a_channel/
-
https://www.reddit.com/r/rust/comments/ddul57/fledgeling_rustacean_here_please_provide_feedback/
-
https://www.reddit.com/r/rust/comments/ddsqsu/looking_for_medium_sized_project_ideas/
-
https://www.reddit.com/r/rust/comments/ddu1dq/announcing_asuran_a_new_deduplicating_archiver/
-
https://www.reddit.com/r/rust/comments/ddpuc4/using_rust_for_critical_embedded_software/
-
https://www.reddit.com/r/rust/comments/ddtbpm/this_month_in_rust_gamedev_2_september_2019/
-
https://www.reddit.com/r/rust/comments/dekxcw/experimental_pure_rust_implementation_of_aesgcm/
-
https://www.reddit.com/r/rust/comments/desc3q/dev_time_optimization_part_1_19x_speedup_65_less/
-
https://www.reddit.com/r/rust/comments/deyz3h/how_do_rust_references_work/
-
https://www.reddit.com/r/rust/comments/dfkwfo/announcing_thiserror_a_convenient_modern/
-
https://www.reddit.com/r/rust/comments/dj4pev/asynchronous_destructors/
-
https://www.reddit.com/r/rust/comments/djgd2c/middle_school_robotics_lab_im_teaching_uses_the/
-
https://www.reddit.com/r/rust/comments/dj8ki0/lemmy_a_reddit_alternative_written_in_rust/
-
https://www.reddit.com/r/rust/comments/dj5q1p/rusts_journey_to_asyncawait/
-
https://www.reddit.com/r/rust/comments/dj8wo3/bootstrapping_a_5_node_kubernetes_cluster_in_40/
-
https://www.reddit.com/r/rust/comments/deyz3h/how_do_rust_references_work/
-
https://www.reddit.com/r/rust/comments/dcx0k4/introducing_my_coworker_to_rust_via_the_intorust/
-
https://www.reddit.com/r/rust/comments/dcdwur/static_assertions_10/
-
https://www.reddit.com/r/rust/comments/dcporr/compile_stress_test/
-
https://www.reddit.com/r/rust/comments/dcsc3k/announcing_the_inside_rust_blog/
-
https://www.reddit.com/r/rust/comments/djhfkp/need_opinionated_articles_aboutagainst_rust/
-
https://www.reddit.com/r/rust/comments/dkck8s/opensource_contributions_stream_rust_tools_and/
-
https://www.reddit.com/r/rust/comments/dk8hky/the_rust_ui_working_group/
-
https://www.reddit.com/r/rust/comments/dkiuy6/question_about_design_principles_design_patterns/
-
https://www.reddit.com/r/rust/comments/dl5klz/video_a_quiet_session_of_rust_refactoring/
-
https://www.reddit.com/r/rust/comments/dl1sw2/a_tiny_static_fulltext_search_engine_using_rust/
-
https://www.reddit.com/r/rust/comments/dltdmm/spark_implemented_in_rust_with_promising_results/
-
https://www.reddit.com/r/rust/comments/dlz3fb/nannou_the_creative_coding_framework_awarded/
-
https://www.reddit.com/r/rust/comments/e2ssqr/redox_os_real_hardware_breakthroughs_and_focusing/
-
https://www.reddit.com/r/rust/comments/e1jckj/iced_a_crossplatform_gui_library_new_release/
-
https://www.reddit.com/r/rust/comments/e217z6/tokio_02_released_roadmap_to_10/
- https://www.reddit.com/r/rust/comments/cwfgqv/announcing_actixraft_raft_distributed_consensus/
-
https://www.reddit.com/r/rust/comments/cldzyt/understanding_rust_through_avl_trees_a_long_intro/
-
https://www.reddit.com/r/rust/comments/dorinl/a_call_for_blogs_2020/
Projects for learning
- Learn Embedded Rust: https://www.reddit.com/r/rust/comments/dj6ylq/rotary_encoders_in_embedded_rust/
- https://www.reddit.com/r/rust/comments/dct3fm/writing_an_http_server_in_rust_part_i/
- https://www.reddit.com/r/rust/comments/dk2km3/i_made_a_nes_emulator_in_rust_using_generators/
- https://www.reddit.com/r/rust/comments/cmra8k/where_to_find_small_rust_todosprojects_to_hack/
A sad day in Rust - related to actix-web debacle
- https://www.reddit.com/r/rust/comments/eq11t3/a_sad_day_for_rust/
- https://www.reddit.com/r/rust/comments/epoloy/ive_smoketested_rust_http_clients_heres_what_i/
- https://www.reddit.com/r/rust/comments/epszt7/actixnet_unsoundness_patch_is_boring/
- https://www.reddit.com/r/rust/comments/eq5l6s/actixsupportletter/
- https://www.reddit.com/r/rust/comments/eq4xsu/gauging_interest_in_an_actixweb_and_siblings_fork/
- https://www.reddit.com/r/rust/comments/epzukc/actix_web_repository_cleared_by_author_who_says/
- https://www.reddit.com/r/rust/comments/eq0375/what_should_i_choose_in_post_actixweb_era_for_web/
- https://www.reddit.com/r/rust/comments/epo5w3/warp_v02_the_composable_web_server_framework/
- Operating Systems (Kernel hacking)
- Create a small operating system in Rust - You can learn Rust by creating a small OS. This is an ongoing blog series. I find this pair well with OS theory from the "Operating Systems: Three Easy Pieces" book (a.k.a. the comet book) and CS-537 class by Remzi. (If anyone have compared xv6 to Blog OS, please let me know.)
- Low-level Programming (core utilities, tools, emulators, embedded programming)
Problems and issues I encountered.
- Solutions from StackOverflow
Not so useful knowledge.
- Rust history
- Rust Core team
- Awesome Rust
- rust-learning - A bunch of links to blog posts, articles, videos, etc for learning Rust.
Stuffs I referenced in Nov 2019 while learning Rust again by reading "The Rust Programmming Language" book.
- Rust for loop odd step
- Rust system of ownership Euler
- Rust ownership guide / mastering rust ownership / rust ownership kata / rust ownership practice
- Destructure tuple struct
- What is Rust Trait
- Rust match expression and Option enum
- PostgreSQL Extension in C with Rustlang
- Rust crates to use in multithreaded
- https://stjepang.github.io/2019/01/29/lock-free-rust-crossbeam-in-2019.html
- ... and many more.
- Rust at speed — building a fast concurrent database
- Project Idea: