Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
I

idiomatic-rust

> 编程语言
Open source

A peer-reviewed collection of articles/talks/repos which teach concise, idiomatic Rust.

7.8K stars0 likes2 views
WebsiteGitHub

About

A peer-reviewed collection of articles/talks/repos which teach concise, idiomatic Rust.

This repository collects resources for writing clean, idiomatic Rust code. You can find a sortable/searchable version of this list [here](https://corrode.dev/idiomatic-rust/).

Idiomatic coding means following the conventions of a given language. It is the most concise, convenient, and common way of accomplishing a task in that language, rather than forcing it to work in a way the author is familiar with from a different language. - Adapted from Tim Mansfield

Contributions welcome! To add missing resources, please refer to the contributing documentation.

⚙ Projects

  • blessed.rs — An unofficial guide to the Rust ecosystem. Suggestions for popular, well-maintained crates.
  • Canonical's Rust Best Practices — A curated collection of best practices for writing Rust code, covering coding standards from naming conventions to unsafe code usage.
  • cheats.rs - Idiomatic Rust tips — A list of quick tips to make your code more idiomatic.
  • clippy — A bunch of lints to catch common mistakes and improve your Rust code.
  • Elements of Rust — A collection of software engineering techniques for effectively expressing intent with Rust.
  • Patterns — A catalogue of design patterns in Rust.
  • Possible Rust — A blog for intermediate Rust programmers exploring real-world code and design patterns.
  • Rust Anthology — The best short-form writing about Rust, collected.
  • Rust API Guidelines — An extensive list of recommendations for idiomatic Rust APIs.
  • Rust by Example — A community driven collection of example code which follow Rust best practices.

Workshops

  • Build your own JIRA with Rust — A test-driven workshop to learn Rust by building your own JIRA clone!
  • Comprehensive Rust — A four day Rust course developed by the Android team, covering all aspects of Rust.
  • Ferrous Systems Teaching Material — Free workshop material produced by Ferrous Systems for trainings.
  • Hecto: Build your own text editor in Rust — This is a series of blog posts that shows you how to build a text editor in Rust
  • Idiomatic Rust Workshop — A talk/workshop about idiomatic Rust code focusing on effective use of existing syntax and design patterns
  • PingCAP talent plan — A series of training courses about writing distributed systems in Rust.
  • Procedural Macros Workshop — A selection of projects designed to learn to write Rust procedural macros.
  • Rust 101 — A Rust University course by tweede golf.
  • Rust Development at Sentry — A document containing useful resources for getting started with Rust and adhering to Sentry coding principles.
  • rust-lang/rustlings — Small exercises to get you used to reading and writing Rust code.

Books

  • Command Line Applications in Rust — A tutorial on how to write CLI apps in Rust, learning many aspects of the ecosystem.
  • Command-Line Rust — Learn the language by writing Rust versions of common Unix coreutils.
  • Discover the world of microcontrollers through Rust! — An introductory course on microcontroller-based embedded systems using Rust.
  • High Assurance Rust — Developing secure and robust software, focusing on embedded-friendly data structures in Rust.
  • Idiomatic Rust Snippets — Beginner-friendly guide to core Rust concepts—one of the best cheat sheets for Rust developers.
  • Programming Rust: Fast, Safe Systems Development — A comprehensive Rust Programming Guide that covers most of Rust's features in detail.
  • Rust Atomics and Locks — Helps Rust programmers of all levels gain a clear understanding of low-level concurrency.
  • Rust Cookbook — Examples that demonstrate good practices to accomplish common programming tasks in Rust.
  • Rust for Rustaceans — Covers how to design reliable, idiomatic, and ergonomic Rust programs based on best principles.

Articles

2025

  • Level Up your Rust pattern matching — Advanced pattern matching techniques and idiomatic usage.
  • Be Simple — Advocates for simpler, more maintainable code in Rust.
  • Pitfalls of Safe Rust — Essential guide to avoiding pitfalls even in safe Rust code.
  • Flattening Rust's Learning Curve — Best practices for learning Rust and reducing adoption friction.
  • Patterns for Defensive Programming in Rust — Defensive coding in Rust with best practices.
  • Prototyping in Rust — Rapid development methodology and idiomatic practices showing how to prototype effectively in Rust.
  • Cancelling async Rust — Guide to cancellation safety in async Rust with patterns for resource management.
  • To panic or not to panic — Error handling strategies and when panicking is appropriate versus returning Result types.
  • Designing Error Types in Rust Libraries — Approaches to structuring error handling in library APIs for clarity and usability.

2024

  • The Mediocre Programmer's Guide to Rust — Practical Rust without perfectionism - a pragmatic development approach.
  • Rust's Sneaky Deadlock With if let Blocks — Subtle lock holding pattern that can cause critical deadlock pitfalls.
  • Rust Iterators Beyond the Basics — Advanced iterator patterns for functional programming in Rust.
  • The Ultimate Guide to Rust Newtypes — Using newtypes for type safety and compile-time domain validation.
  • How to Build Abstractions in Rust Applications — Building effective abstractions in Rust based on software design principles.
  • Don't Worry About Lifetimes — Demystifying lifetime annotations with practical lifetime management patterns.
  • When should I use String vs &str? — Guidance on choosing the right string type - a fundamental idiomatic Rust pattern.
  • Async Rust can be a pleasure to work with (without Send + Sync + 'static) — Relaxing trait bounds for simpler async code and ergonomic async patterns for single-threaded contexts.
  • Why choose async/await over threads? — Guidance on when to use async vs traditional threading to choose the right concurrency model.
  • Three Kinds Of Unwrap — Understanding when and how to use different unwrap variants to prevent common panic-related bugs.
  • Practical guide to Error Handling in Rust — Hands-on guide with practical examples for common error handling scenarios in real-world applications.

2023

  • Aim For Immutability in Rust — Explains why variables are immutable in Rust by default.
  • Compile-Time Invariants in Rust — Shows how macros can be used to enforce invariants at compile-time.

2021

  • Rust Number Conversion: Don't Follow the Book... — A blog post discussing the best practices for number conversion in Rust.
  • Hexagonal architecture in Rust — Describes how to build a Rust service using domain driven design and a test-first approach.
  • Wrapping errors in Rust — Wrapping 'reqwest::Error' and a custom error type as an enum to make library usage easier.
  • Aiming for idiomatic Rust — Discusses different ways to solve a popular coding puzzle, 'balanced brackets', in Rust.
  • Naming Your Lifetimes — Explains how using longer, declarative lifetime names can help to disambiguate which borrow is which.

2020

  • Are out parameters idiomatic in Rust? — Discusses the pros and cons of functions returning a value vs. modifying a parameter in-place.
  • Guide on how to write documentation for a Rust crate — Writing good documentation with rustdoc including many examples.
  • Learning Rust through open source and live code reviews — Covers patterns like 'FromStr' and exposing a CLI and a library in one crate.
  • Refactoring Rust Transpiled from C — Describes how to lift a C-project that was automatically converted to unsafe Rust to safer, more idiomatic Rust.
  • Context-preserving error handling — Explains how to use crates like 'thiserror' in combination with 'map_err' to add context to errors.

2019

  • Rust Patterns: Enums Instead Of Booleans — Discusses how using enums instead of booleans can express intent more clearly in Rust.
  • Taking string arguments in Rust — Discussing how to avoid subtle issues with string handling and when to use 'str' vs 'String'.
  • Await a minute — Example code for moving from raw futures to async/await syntax to improve error handling.

2018

  • [Programming an ARM microcontroller in Rust at four different levels of abstraction](https://pramode.in/2018/02/20/programming-a-microcontroller-in-rust-at-four-levels-of-abstr

Issues· 1 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustergonomicsidiomaticidiomatic-rustrust

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 2, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言