/idiomatic-rust

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

Primary LanguageRust

Check Links

This repository collects resources for writing clean, idiomatic Rust code. You can find a sortable/searchable version of this list here.

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.

  • 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

📖 Books

📰 Articles

2023

2021

2020

2019

2018

2017

2016

2015

🎤 Talks

2024

  • The Four Horsemen of Bad Rust Code — A talk about common pitfalls in Rust code like overengineering and premature optimization. [Video]

2023

  • Tricks of the Trait: Enabling Ergonomic Extractors — Rust Nation UK, Feb. 2023 [Video]

2022

  • Ergonomic APIs for hard problems — RustLab Conference, October 2022 [Video]
    • Nine Rules for Elegant Rust Library APIs — Seattle Rust Meetup, Sep. 2022 [Video]

2020

  • Macros for a More Productive Rust — RustConf 2020 [Video]

2019

  • Making Rust Delightful — RustCon Asia 2019 [Video]

2018

  • Idiomatic Rust - Writing Concise and Elegant Rust Code — FOSDEM 2018 [Video]

2017

  • Idiomatic Rust Libraries — Rustfest Kiev [Video]

💬 Forum

2020

2017

📜 History

Coming from Python, I loved the guidelines on how idiomatic Python looks like. I was inspired by the likes of Peter Norvig, who wrote amazing articles on spellcheckers and sudoku solvers; and, of course, the Zen of Python. For Rust, there is no such thing as the Zen of Python, however, so I started collecting my own resources. The goal of this project is to create a peer-reviewed collection of articles/talks/repos, which teach idiomatic Rust style. It's a community project and you can contribute.

🔏 License

CC0

To the extent possible under law, Matthias Endler has waived all copyright and related or neighboring rights to this work. Logo adapted from FreePik.com.