Rust Design Patterns

  • repo
  • site
  • description: A catalogue of Rust design patterns, anti-patterns and idioms

book.toml

[book]
title = "Rust Design Patterns"
authors = ["the rust-unofficial authors"]
description = "A catalogue of Rust design patterns, anti-patterns and idioms"
language = "en"
multilingual = false
src = "src"

[build]
create-missing = false
extra-watch-dirs = ["po", "third_party"]

[preprocessor.gettext]
after = ["links"]

[rust]
edition = "2021"

[output.html]
curly-quotes = true
default-theme = "rust"
site-url = "/patterns/"
git-repository-url = "https://github.com/rust-unofficial/patterns"
git-repository-icon = "fa-github"
edit-url-template = "https://github.com/rust-unofficial/patterns/edit/main/{path}"
additional-css = [
  "./theme/css/language-picker.css",
  "./styles/last-changed.css",
]

[preprocessor.last-changed]
command = "mdbook-last-changed"
renderer = ["html"]

[output.html.fold]
enable = true
level = 1

[output.html.playground]
editable = false

# [output.linkcheck]  # enable the "mdbook-linkcheck" renderer, disabled due to gh-actions

[output.html.redirect]
# Redirects in the form of "old-path" = "new-path", where the new path
# is relative to the old path.
"functional/lenses.html" = "optics.html"

[output.pandoc]
optional = true
hosted-html = "https://rust-unofficial.github.io/patterns/"

[output.pandoc.profile.pdf]
output-file = "rust-design-patterns.pdf"
pdf-engine = "lualatex"

[output.pandoc.profile.pdf.variables]
mainfont = "Noto Serif"
sansfont = "Noto Sans"
monofont = "Noto Sans Mono"
mainfontfallback = ["NotoSerifCJKSC:"]
geometry = ["margin=1in"]
linkcolor = "blue"
urlcolor = "red"