rust-unofficial /patterns
A catalogue of Rust design patterns, anti-patterns and idioms
★ 8,943⑂ 415👁 188⑃ 311● 144▤ 0
More from this author
+3
Daily
8,943
stars
415
forks
188
watchers
311
prs
144
issues
0
releases
README
Rust Design Patterns An open source book about design patterns and idioms in the Rust programming language that you can read here. You can also download the book in PDF format from this link. Contributing You are missing content in this repository that can be helpful for others, and you are eager to explain it? Awesome! We are always happy about new contributions (e.g. elaboration or corrections on certain topics) to this project. You can check the Umbrella issue for all the patterns, anti-patterns, and idioms that could be added. We suggest reading our Contribution guide to get more information on how contributing to this repository works. Building with mdbook This book is built with mdbook. You can install it by running cargo install mdbook. Additional dependencies - cargo install mdbook-last-changed for date changes in the footer - cargo install mdbook-pandoc for rendering the book to PDF - cargo install mdbook-i18n-helpers for translation and i8n support Texlive sh Source the .env file to get the PANDOC_VERSION . ./.env sudo apt-get update sudo apt-get install -y texlive texlive-latex-extra texlive-luatex texlive-lang-cjk librsvg2-bin fonts-noto curl -LsSf https://github.com/jgm/pandoc/releases/download/$PANDOC_VERSION/pandoc-$PANDOC_VERSION-linux-amd64.tar.gz | tar zxf - Building the book If you want to build it locally you can run one of these two commands in the root directory of the repository: - mdbook build Builds static html pages as output and place them in the /book directory by default. - mdbook serve Serves the book at http://localhost:3000 (port is changeable, take a look at the terminal output to be sure) and reloads the browser when a change occurs. License The content of this repository is licensed under MPL-2.0; see LICENSE.
Top issues
#292Translation: Newer simplified Chinese12 comments · 2022-01-16#329Clarify parts of Lenses and Prisms chapter11 comments · 2022-12-11#155Extra blank line on code block10 comments · 2021-01-03#322Rewrite RAII pattern article to adapt to OBRM terminology8 comments · 2022-10-11#145Add "Use Self in impl" idiom8 comments · 2021-01-03#54Fold pattern was confusing to me8 comments · 2017-03-05#347Translation: Persian7 comments · 2023-02-20#214Wrapping errors7 comments · 2021-01-25
Discussions
#429VS Code extension?1 comments · 2025-02-25#423Any value for an "intermediate beginner" perspective?0 comments · 2024-11-12#421Problems with the Visitor Pattern0 comments · 2024-10-31#418Module-companion for a standalone function0 comments · 2024-09-08#406SOLID principles don't really apply to Rust programs1 comments · 2024-05-20#404Idiom - Error Handling in FFI - with structured enums in Rust1 comments · 2024-05-07#389Unimplemented patterns2 comments · 2024-02-07#383Etymology of the term Folding1 comments · 2023-12-08