mirror of
https://github.com/mre/idiomatic-rust
synced 2024-11-22 03:53:05 +00:00
No description
idiomatic-rust.png | ||
idiomatic-rust.svg | ||
README.md |
This repository collects resources for writing clean, idiomatic Rust code. Please bring your own. 😊
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
Articles
2017
- Lessons learned redesigning and refactoring a Rust Library by @mgattozzi -
RefCell
, the builder pattern and more.
2016
- Russian Dolls and clean Rust code by @mgattozzi - How to use the full power of
Option
andResult
(especiallyand_then()
andunwrap_or()
). - Elegant Library APIs in Rust by @killercup - Many helpful tips and tricks for writing libraries in Rust.
- Teaching libraries through good documentation by @killercup - How to use the full power of Rust's documentation support (e.g. doc tests)
- Pretty State Machine Patterns in Rust by @hoverbear - How to represent a State Machine in an expressive and understandable way in Rust.
- Ripgrep Code Review by @mbrt - An analysis of the popular
ripgrep
tool's source code.
2015
- Rust traits for developer friendly libraries by @benashford - Thoughts about implementing good Rust libraries.
Talks
2017
Idiomatic Rust Libraries [Video] [Slides] by @killercup - Rustfest Kiev
What's so hard about writing a Slack Client in Rust? [Video] [Slides] by @mre - Rust Cologne Meetup
Projects
- clippy - A bunch of lints to catch common mistakes and improve your Rust code.
- Patterns - A catalogue of Rust design patterns.
- Rust by Example - A community driven collection of example code which follow Rust best practices.
- Rust Cookbook - Examples that demonstrate good practices to accomplish common programming tasks in Rust.
- rust-api-guidelines - An extensive list of recommendations for idiomatic Rust APIs.
License
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.