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

Overview

Logo

Build Status - Check Links

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

βš™ Projects

  • Rust Anthology - The best short-form writing about Rust, collected.
  • cheat.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.
  • Patterns - A catalogue of Rust design patterns.
  • Elements of Rust - A collection of software engineering techniques for effectively expressing intent with Rust.
  • 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.

πŸ‹ Workshops

  • Build your own JIRA with Rust - A test-driven workshop to learn Rust building your own JIRA clone!
  • Ferrous Systems Teaching Material - Free workshop material produced by Ferrous Systems for trainings. The time for the full course is around three to four days.
  • PingCAP talent plan - A series of training courses about writing distributed systems in Rust. The courses primarily consist of projects where coding problems are presented, along with a partial implementation or API description, and a test suite.
  • Procedural Macros Workshop - This repo contains a selection of projects designed to learn to write Rust procedural macros β€” Rust code that generates Rust code.

πŸ“– Articles and Books

2021

2020

2019

  • Await a minute by David Tolnay - Example code for moving from raw futures to async/await syntax to improve error handling, native control flow, and borrowing.
  • Taking string arguments in Rust by @Xion - Discussing how to avoid subtle issues with string handling and when to use str (the string slice) and String (the owned/allocated string).

2018

2017

2016

2015

🎀 Talks

2020

Macros for a More Productive Rust [Video] by @jam1garner - RustConf 2020

2019

Making Rust Delightful [Video] by @nrc - RustCon Asia 2019

2018

Idiomatic Rust - Writing Concise and Elegant Rust Code [Video] [Slides] by @mre - FOSDEM 2018

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

πŸ’¬ Forum

2017

πŸ“œ History

Coming from Python I loved to have some 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.

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. If this becomes a thing I plan to move it to some "semi-official" place like rust-nursery or so. But first I need YOUR help for that ;-)

πŸ” 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.

Comments
  • Link Checker Report

    Link Checker Report

    opened by github-actions[bot] 1
  • Link to rust-lang-nursery Rust Cookbook repository

    Link to rust-lang-nursery Rust Cookbook repository

    The current Rust Cookbook repository link points to a fork that hasn't been updated in almost 2 years, so I've updated it to point to the original which was updated quite recently.

    opened by drguildo 1
  • Link Checker Report

    Link Checker Report

    opened by github-actions[bot] 0
  • Link Checker Report

    Link Checker Report

    opened by github-actions[bot] 0
  • Link Checker Report

    Link Checker Report

    opened by github-actions[bot] 0
  • Link Checker Report

    Link Checker Report

    Summary

    | Status | Count | |---------------|-------| | πŸ” Total | 108 | | βœ… Successful | 105 | | ⏳ Timeouts | 1 | | πŸ”€ Redirected | 0 | | πŸ‘» Excluded | 2 | | ❓ Unknown | 0 | | 🚫 Errors | 0 |

    Errors per input

    Errors in README.md

    Full Github Actions output

    report automated issue 
    opened by github-actions[bot] 0
  • Link Checker Report

    Link Checker Report

    opened by github-actions[bot] 0
  • Link Checker Report

    Link Checker Report

    Errors were reported while checking the availability of links.

    
    πŸ“ Summary
    ---------------------
    πŸ” Total...........98
    βœ… Successful......96
    ⏳ Timeouts.........0
    πŸ”€ Redirected.......0
    πŸ‘» Excluded.........0
    🚫 Errors...........2
    
    Errors in CONTRIBUTING.md
    βœ— https://www.reddit.com/r/rust/top/?t=week (HTTP status client error (429 Too Many Requests) for url (https://www.reddit.com/r/rust/top/?t=week))
    
    Errors in README.md
    βœ— https://www.reddit.com/r/rust/comments/cekeq9/preferred_way_of_passing_pathlike_types_around/ (HTTP status client error (429 Too Many Requests) for url (https://www.reddit.com/r/rust/comments/cekeq9/preferred_way_of_passing_pathlike_types_around/))
    

    Full Github Actions output

    report automated issue 
    opened by github-actions[bot] 0
  • Link Checker Report

    Link Checker Report

    Errors were reported while checking the availability of links.

    
    πŸ“ Summary
    ---------------------
    πŸ” Total...........98
    βœ… Successful......96
    ⏳ Timeouts.........0
    πŸ”€ Redirected.......0
    πŸ‘» Excluded.........0
    🚫 Errors...........2
    
    Errors in CONTRIBUTING.md
    βœ— https://www.reddit.com/r/rust/top/?t=week (HTTP status client error (429 Too Many Requests) for url (https://www.reddit.com/r/rust/top/?t=week))
    
    Errors in README.md
    βœ— https://www.reddit.com/r/rust/comments/cekeq9/preferred_way_of_passing_pathlike_types_around/ (HTTP status client error (429 Too Many Requests) for url (https://www.reddit.com/r/rust/comments/cekeq9/preferred_way_of_passing_pathlike_types_around/))
    

    Full Github Actions output

    report automated issue 
    opened by github-actions[bot] 0
  • Link Checker Report

    Link Checker Report

    Errors were reported while checking the availability of links.

    
    πŸ“ Summary
    ---------------------
    πŸ” Total...........98
    βœ… Successful......96
    ⏳ Timeouts.........0
    πŸ”€ Redirected.......0
    πŸ‘» Excluded.........0
    🚫 Errors...........2
    
    Errors in README.md
    βœ— https://www.reddit.com/r/rust/comments/cekeq9/preferred_way_of_passing_pathlike_types_around/ (HTTP status client error (429 Too Many Requests) for url (https://www.reddit.com/r/rust/comments/cekeq9/preferred_way_of_passing_pathlike_types_around/))
    
    Errors in CONTRIBUTING.md
    βœ— https://www.reddit.com/r/rust/top/?t=week (HTTP status client error (429 Too Many Requests) for url (https://www.reddit.com/r/rust/top/?t=week))
    

    Full Github Actions output

    report automated issue 
    opened by github-actions[bot] 0
  • Link Checker Report

    Link Checker Report

    Errors were reported while checking the availability of links.

    
    πŸ“ Summary
    ---------------------
    πŸ” Total...........98
    βœ… Successful......96
    ⏳ Timeouts.........0
    πŸ”€ Redirected.......0
    πŸ‘» Excluded.........0
    🚫 Errors...........2
    
    Errors in CONTRIBUTING.md
    βœ— https://www.reddit.com/r/rust/top/?t=week (HTTP status client error (429 Too Many Requests) for url (https://www.reddit.com/r/rust/top/?t=week))
    
    Errors in README.md
    βœ— https://www.reddit.com/r/rust/comments/cekeq9/preferred_way_of_passing_pathlike_types_around/ (HTTP status client error (429 Too Many Requests) for url (https://www.reddit.com/r/rust/comments/cekeq9/preferred_way_of_passing_pathlike_types_around/))
    

    Full Github Actions output

    report automated issue 
    opened by github-actions[bot] 0
Owner
Matthias
Curious person. Maker. Rustacean
Matthias
A webapp that reads your articles to you while you're on the subway

ReadToMyShoe Video Demo A website that reads articles to you, even when you're offline. Still in early development. This is a full-stack Rust webapp,

Michael Rosenberg 20 Dec 10, 2022
CBOR: Concise Binary Object Representation

CBOR 0x(4+4)9 0x49 β€œThe Concise Binary Object Representation (CBOR) is a data format whose design goals include the possibility of extremely small cod

quininer 37 Dec 27, 2022
This is the Rust course used by the Android team at Google. It provides you the material to quickly teach Rust to everyone.

Comprehensive Rust ?? This repository has the source code for Comprehensive Rust ?? , a four day Rust course developed by the Android team. The course

Google 5.2k Jan 3, 2023
The Rust Compiler Collection is a collection of compilers for various languages, written with The Rust Programming Language.

rcc The Rust Compiler Collection is a collection of compilers for various languages, written with The Rust Programming Language. Compilers Language Co

null 2 Jan 17, 2022
Rust-idiomatic, compliant, flexible and performant BIP21 crate

Rust implementation of BIP21 Rust-idiomatic, compliant, flexible and performant BIP21 crate. About Important: while lot of work went into polishing th

Martin HabovΕ‘tiak 6 Dec 15, 2022
alto provides idiomatic Rust bindings for OpenAL 1.1 and extensions (including EFX).

alto alto provides idiomatic Rust bindings for OpenAL 1.1 and extensions (including EFX). WARNING Because Alto interacts with global C state via dynam

null 80 Aug 7, 2022
Safe, idiomatic bindings to cFE and OSAL APIs for Rust

n2o4 The n2o4 crate provides safe, idiomatic Rust bindings to the APIs of cFE and OSAL, the libraries of the Core Flight System (cFS). IMPORTANT NOTE

null 3 Aug 29, 2022
Idiomatic Rust implementations for various Windows string types (like UNICODE_STRING)

nt-string by Colin Finck <[email protected]> Provides idiomatic Rust implementations for various Windows string types: NtUnicodeString (with NtUnicode

Colin Finck 5 Jun 4, 2023
A Collection of Rust Tips and Tricks

Table of Contents Using Nested Paths in Rust Struct Update Syntax in Rust Field Init Shorthand in Rust Shadowing in Rust Using Nested Paths in Rust So

Vandad Nahavandipoor 156 Dec 31, 2022
"Crates for Cheese" is a Rust collection library of those crates I consider a useful "extended standard".

cfc The purpose of this library is to provide a minimal list of currated crates which enhance the std library. In addition, most or all crates in this

null 0 Dec 23, 2021
a collection of well-tested, serializable CRDTs for Rust

crdts: family of thoroughly tested hybrid crdt's. A family of CRDT's supporting both State and Op based replication. what is a CRDT? CRDT's are the so

null 1k Jan 8, 2023
A collection of crates to make minecraft development (client, server) with rust possible.

rust-craft rust-craft is a collection of crates to make minecraft development (client, server) with rust possible. Motivation There's no better way of

JoΓ£o Victor 15 Mar 23, 2023
A collection (eventually) of examples that use some non-beginner things.

nannou examples A collection (eventually) of examples that use some non-beginner things. Right now the only example combines nannou's standard draw AP

Alexis Andre 22 Oct 21, 2022
A SCALE-compatible collection of bits

scale-bits Β· This small utility crate provides two separate things: A Bits type that can be SCALE encoded and decoded, and is fully SCALE compatible w

Parity Technologies 3 Sep 25, 2022
A simple collection of formatters focused on speed, reliability, correctness and most importantly readability.

EFC The Enoki Formatter Collection (name inspired by the GNU Compiler Collection) is a simple to use colelction of next generation language agnostic f

Enoki 3 Nov 21, 2022
Diosic is an open source web-based music collection server and streamer

Diosic is an open source web-based music collection server and streamer. Mainly suitable for users who need to deploy on servers with low hardware specifications.

Jinker 45 Jan 28, 2023
A collection of comparison-benchmarks for Nova & related Proving systems

Nova benchmarks Here's a list of some of the benchmarks we've been taking to better understand how Nova performs vs other proof systems. Live version:

Privacy & Scaling Explorations (formerly known as appliedzkp) 18 Apr 17, 2023
A simpler and 5x faster alternative to HashMap in Rust, which doesn't use hashing and doesn't use heap

At least 5x faster alternative of HashMap, for very small maps. It is also faster than FxHashMap, hashbrown, ArrayMap, and nohash-hasher. The smaller

Yegor Bugayenko 12 Apr 19, 2023
A Matrix bot which can generate "This Week in X" like blog posts

hebbot A Matrix bot which can help to generate periodic / recurrent summary blog posts (also known as "This Week in X"). The bot was inspired by twim-

HΓ€cker Felix 43 Dec 17, 2022