Go to file
dependabot[bot] ae93369daf
build(deps): bump actions/configure-pages from 4 to 5 (#402)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: simonsan <14062932+simonsan@users.noreply.github.com>
2024-06-11 08:04:10 +00:00
.github build(deps): bump actions/configure-pages from 4 to 5 (#402) 2024-06-11 08:04:10 +00:00
po Add cloud-translated es translation as a starter (#360) 2023-04-09 03:01:02 +02:00
src style: dprint fmt 2024-04-23 13:34:08 +02:00
styles feat: use mdbook-last-changed to indicate when a file has been last updated 2024-03-17 03:25:39 +01:00
theme feat(pdf): add pdf download (#399) 2024-03-17 03:35:42 +01:00
third_party/mdbook style: format book.js with dprint to make diffing easier with upstream (#400) 2024-03-17 04:15:28 +01:00
.dprint.json style: format code blocks 2024-03-18 02:34:08 +01:00
.env feat(pdf): add pdf download (#399) 2024-03-17 03:35:42 +01:00
.gitignore chore: reformat repository with dprint (#370) 2023-08-18 20:08:03 +02:00
.markdownlint.yaml Shorten lines to line-length 80 (#208) 2021-01-22 00:00:02 +01:00
book.toml style: use smaller margin 2024-03-18 01:25:13 +01:00
CONTRIBUTING.md chore: reformat repository with dprint (#370) 2023-08-18 20:08:03 +02:00
LICENSE Initial commit 2015-08-31 10:06:10 +12:00
README.md chore: update build instructions to account for new dependencies 2024-03-17 04:17:15 +01:00
template.md chore: reformat repository with dprint (#370) 2023-08-18 20:08:03 +02:00

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

# 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.