2022-12-21 17:36:30 +02:00
|
|
|
[book]
|
|
|
|
authors = ["Martin Geisler"]
|
|
|
|
language = "en"
|
|
|
|
multilingual = false
|
|
|
|
src = "src"
|
|
|
|
title = "Comprehensive Rust 🦀"
|
|
|
|
|
|
|
|
[rust]
|
|
|
|
edition = "2021"
|
|
|
|
|
2023-01-20 12:36:14 +02:00
|
|
|
[build]
|
2023-03-02 19:50:37 +02:00
|
|
|
extra-watch-dirs = ["po", "third_party"]
|
2023-01-20 12:36:14 +02:00
|
|
|
|
2023-02-28 15:05:09 +02:00
|
|
|
[preprocessor.gettext]
|
2023-03-02 11:01:24 +02:00
|
|
|
after = ["links"]
|
2023-01-08 14:45:19 +02:00
|
|
|
|
2022-12-21 17:36:30 +02:00
|
|
|
[preprocessor.svgbob]
|
2023-01-08 14:45:19 +02:00
|
|
|
renderers = ["html"]
|
2023-03-02 11:01:24 +02:00
|
|
|
after = ["gettext"]
|
2022-12-21 17:36:30 +02:00
|
|
|
class = "bob"
|
|
|
|
|
2023-09-20 16:01:53 +02:00
|
|
|
[preprocessor.course]
|
2023-12-06 19:57:18 +02:00
|
|
|
verbose = false # Report timing information.
|
|
|
|
|
2023-01-27 19:30:37 +02:00
|
|
|
# Enable this preprocessor to overlay a large red rectangle on the
|
|
|
|
# pages. This will show you an estimate of what the course
|
|
|
|
# participants can see during the presentation.
|
|
|
|
#
|
|
|
|
# [preprocessor.aspect-ratio-helper]
|
|
|
|
# command = "./aspect-ratio-helper.py"
|
|
|
|
|
2024-01-16 00:02:05 +02:00
|
|
|
[output.pandoc]
|
|
|
|
optional = true
|
2024-02-20 12:04:30 +02:00
|
|
|
hosted-html = "https://google.github.io/comprehensive-rust/"
|
2024-01-16 00:02:05 +02:00
|
|
|
|
|
|
|
[output.pandoc.profile.pdf]
|
|
|
|
output-file = "comprehensive-rust.pdf"
|
|
|
|
pdf-engine = "lualatex"
|
|
|
|
|
|
|
|
[output.pandoc.profile.pdf.variables]
|
|
|
|
mainfont = "Noto Serif"
|
|
|
|
sansfont = "Noto Sans"
|
|
|
|
monofont = "Noto Sans Mono"
|
|
|
|
geometry = ["margin=1.25in"]
|
|
|
|
linkcolor = "blue"
|
|
|
|
urlcolor = "red"
|
|
|
|
|
2022-12-21 17:36:30 +02:00
|
|
|
[output.html]
|
|
|
|
curly-quotes = true
|
2023-09-21 11:00:27 +02:00
|
|
|
additional-js = ["theme/speaker-notes.js"]
|
2023-09-20 16:01:53 +02:00
|
|
|
additional-css = [
|
2023-09-21 11:00:27 +02:00
|
|
|
"theme/css/svgbob.css",
|
|
|
|
"theme/css/speaker-notes.css",
|
|
|
|
"theme/css/language-picker.css",
|
2023-10-31 08:37:04 +02:00
|
|
|
"theme/css/rtl.css",
|
2023-09-20 16:01:53 +02:00
|
|
|
]
|
2023-01-24 13:03:46 +02:00
|
|
|
site-url = "/comprehensive-rust/"
|
2022-12-21 18:28:02 +02:00
|
|
|
git-repository-url = "https://github.com/google/comprehensive-rust"
|
2022-12-21 18:29:56 +02:00
|
|
|
edit-url-template = "https://github.com/google/comprehensive-rust/edit/main/{path}"
|
2022-12-21 17:36:30 +02:00
|
|
|
|
|
|
|
[output.html.fold]
|
|
|
|
enable = true
|
|
|
|
level = 0
|
|
|
|
|
|
|
|
[output.html.playground]
|
|
|
|
editable = true
|
2023-05-24 09:25:18 +02:00
|
|
|
line-numbers = true
|
2023-02-06 18:10:01 +02:00
|
|
|
|
2023-12-07 17:51:42 +02:00
|
|
|
[output.html.search]
|
|
|
|
use-boolean-and = true
|
|
|
|
|
2023-02-06 18:10:01 +02:00
|
|
|
[output.html.redirect]
|
2023-05-02 08:02:28 +02:00
|
|
|
# Redirects in the form of "old-path" = "new-path", where the new path
|
|
|
|
# is relative to the old path.
|
2023-05-15 16:05:28 +02:00
|
|
|
"async/concurrency/channels.html" = "../channels.html"
|
2023-06-13 19:26:56 +02:00
|
|
|
"async/pitfall/async-traits.html" = "../pitfalls/async-traits.html"
|
2023-06-13 19:43:08 +02:00
|
|
|
"control-flow/while-let-expression.html" = "while-let-expressions.html"
|
2023-06-14 11:21:22 +02:00
|
|
|
"exercises/day-1/soluções-tarde.html" = "solutions-afternoon.html"
|
|
|
|
"exercises/day-2/soluções-tarde.html" = "solutions-afternoon.html"
|
|
|
|
"exercises/day-3/soluções-tarde.html" = "solutions-afternoon.html"
|
|
|
|
"exercises/day-3/simples-gui.html" = "simple-gui.html"
|
2023-05-08 16:31:54 +02:00
|
|
|
"exercises/day-4/afternoon.html" = "../android/morning.html"
|
|
|
|
"exercises/day-4/android.html" = "../android/morning.html"
|
|
|
|
"exercises/day-4/dining-philosophers.html" = "../concurrency/dining-philosophers.html"
|
|
|
|
"exercises/day-4/elevator.html" = "../concurrency/elevator.html"
|
|
|
|
"exercises/day-4/link-checker.html" = "../concurrency/link-checker.html"
|
|
|
|
"exercises/day-4/morning.html" = "../concurrency/morning.html"
|
|
|
|
"exercises/day-4/solutions-morning.html" = "../concurrency/solutions-morning.html"
|
2023-05-17 19:22:11 +02:00
|
|
|
"exercises/concurrency/elevator.html" = "chat-app.html"
|
2023-05-08 16:31:54 +02:00
|
|
|
"generics/closures.html" = "../traits/closures.html"
|
2023-05-15 16:06:50 +02:00
|
|
|
"generics/trait-objects.html" = "../traits/trait-objects.html"
|
2024-01-04 16:05:49 +02:00
|
|
|
"hello-world/basic-syntax/functions-interlude.html" = "../../control-flow-basics/functions.html"
|
2023-06-14 11:21:22 +02:00
|
|
|
"outros-recursos.html" = "other-resources.html"
|
2023-05-02 08:02:28 +02:00
|
|
|
"running-the-course/day-4.html" = "course-structure.html"
|
2023-06-14 11:21:22 +02:00
|
|
|
"sintaxe-básica/funções-interlude.html" = "../basic-syntax/functions-interlude.html"
|
2023-05-08 16:31:54 +02:00
|
|
|
"structure.html" = "running-the-course/course-structure.html"
|
2023-06-14 11:21:22 +02:00
|
|
|
"unsafe/mutable-static-variables.md" = "mutable-static-variables.html"
|
2023-02-06 18:10:01 +02:00
|
|
|
"unsafe/unsafe-functions.html" = "calling-unsafe-functions.html"
|
2023-05-02 08:02:28 +02:00
|
|
|
"welcome-bare-metal.html" = "bare-metal.html"
|
2023-08-25 17:42:31 +02:00
|
|
|
# Moving exercises between days
|
|
|
|
"exercises/day-2/luhn.html" = "../day-1/luhn.html"
|
|
|
|
"exercises/day-2/points-polygons.html" = "../day-3/points-polygons.html"
|
|
|
|
"exercises/day-1/book-library.html" = "../day-2/book-library.html"
|
|
|
|
"exercises/day-1/iterators-and-ownership.html" = "../day-2/iterators-and-ownership.html"
|
2023-07-28 17:27:31 +02:00
|
|
|
# Send people to canonical URL instead of index.html
|
|
|
|
"welcome.html" = "./"
|
2023-04-03 17:18:32 +02:00
|
|
|
|
2023-11-29 17:39:24 +02:00
|
|
|
# redirects from course v1 to v2
|
|
|
|
'welcome-day-1/what-is-rust.html' = '../hello-world/what-is-rust.html'
|
|
|
|
'hello-world/small-example.html' = '../hello-world/hello-world.html'
|
|
|
|
'why-rust.html' = 'hello-world/benefits.html'
|
|
|
|
'why-rust/compile-time.html' = '../hello-world/benefits.html'
|
|
|
|
'why-rust/runtime.html' = '../hello-world/benefits.html'
|
|
|
|
'why-rust/modern.html' = '../hello-world/benefits.html'
|
|
|
|
'why-rust/an-example-in-c.html' = '../hello-world/example.html'
|
|
|
|
'basic-syntax/variables.html' = '../types-and-values/variables.html'
|
|
|
|
'basic-syntax/scalar-types.html' = '../types-and-values/values.html'
|
|
|
|
'basic-syntax/type-inference.html' = '../types-and-values/inference.html'
|
|
|
|
'basic-syntax.html' = 'control-flow-basics.html'
|
|
|
|
'control-flow.html' = 'control-flow-basics.html'
|
|
|
|
'control-flow/if-expressions.html' = '../control-flow-basics/conditionals.html'
|
|
|
|
'control-flow/while-expressions.html' = '../control-flow-basics/loops.html'
|
|
|
|
'control-flow/for-expressions.html' = '../control-flow-basics/loops.html'
|
|
|
|
'control-flow/break-continue.html' = '../control-flow-basics/break-continue.html'
|
|
|
|
'control-flow/loop-expressions.html' = '../control-flow-basics/loops.html'
|
|
|
|
'basic-syntax/scopes-shadowing.html' = '../control-flow-basics/blocks-and-scopes.html'
|
|
|
|
'control-flow/blocks.html' = '../control-flow-basics/blocks-and-scopes.html'
|
|
|
|
'basic-syntax/functions.html' = '../control-flow-basics/functions.html'
|
|
|
|
'basic-syntax/rustdoc.html' = '../std-types/docs.html'
|
|
|
|
'basic-syntax/methods.html' = '../control-flow-basics/functions.html'
|
|
|
|
'basic-syntax/functions-interlude.html' = '../control-flow-basics/functions.html'
|
|
|
|
'exercises/day-1/morning.html' = '../../control-flow-basics/exercise.html'
|
|
|
|
'exercises/day-1/afternoon.html' = '../../control-flow-basics/exercise.html'
|
|
|
|
'exercises/day-2/morning.html' = '../../control-flow-basics/exercise.html'
|
|
|
|
'exercises/day-2/afternoon.html' = '../../control-flow-basics/exercise.html'
|
|
|
|
'exercises/day-3/morning.html' = '../../control-flow-basics/exercise.html'
|
|
|
|
'exercises/day-3/afternoon.html' = '../../control-flow-basics/exercise.html'
|
|
|
|
'basic-syntax/compound-types.html' = '../tuples-and-arrays/tuples-and-arrays.html'
|
|
|
|
'control-flow/match-expressions.html' = '../tuples-and-arrays/match.html'
|
|
|
|
'pattern-matching/match-guards.html' = '../tuples-and-arrays/match.html'
|
|
|
|
'pattern-matching/destructuring-arrays.html' = '../tuples-and-arrays/destructuring.html'
|
|
|
|
'exercises/day-1/for-loops.html' = '../../tuples-and-arrays/exercise.html'
|
|
|
|
'basic-syntax/references.html' = '../references/shared.html'
|
|
|
|
'basic-syntax/references-dangling.html' = '../references/shared.html'
|
|
|
|
'exercises/day-3/points-polygons.html' = '../../references/exercise.html'
|
|
|
|
'structs.html' = 'user-defined-types/named-structs.html'
|
|
|
|
'structs/field-shorthand.html' = '../user-defined-types/named-structs.html'
|
|
|
|
'structs/tuple-structs.html' = '../user-defined-types/tuple-structs.html'
|
|
|
|
'enums.html' = 'user-defined-types/enums.html'
|
|
|
|
'enums/variant-payloads.html' = '../user-defined-types/enums.html'
|
|
|
|
'enums/sizes.html' = '../user-defined-types/enums.html'
|
|
|
|
'traits/deriving-traits.html' = '../methods-and-traits/deriving.html'
|
|
|
|
'pattern-matching/destructuring-structs.html' = '../pattern-matching/destructuring.html'
|
|
|
|
'pattern-matching/destructuring-enums.html' = '../pattern-matching/destructuring.html'
|
|
|
|
'control-flow/novel.html' = '../pattern-matching/let-control-flow.html'
|
|
|
|
'control-flow/if-let-expressions.html' = '../pattern-matching/let-control-flow.html'
|
|
|
|
'control-flow/while-let-expressions.html' = '../pattern-matching/let-control-flow.html'
|
|
|
|
'exercises/day-1/pattern-matching.html' = '../../user-defined-types/exercise.html'
|
|
|
|
'methods.html' = 'methods-and-traits/methods.html'
|
|
|
|
'methods/receiver.html' = '../methods-and-traits/methods.html'
|
|
|
|
'methods/example.html' = '../methods-and-traits/methods.html'
|
|
|
|
'traits.html' = 'methods-and-traits/traits.html'
|
|
|
|
'traits/default-methods.html' = '../methods-and-traits/traits.html'
|
2024-01-25 16:47:50 +02:00
|
|
|
'methods-and-traits/trait-objects.html' = '../smart-pointers/trait-objects.html'
|
|
|
|
'traits/trait-objects.html' = '../smart-pointers/trait-objects.html'
|
2023-11-29 17:39:24 +02:00
|
|
|
'exercises/day-3/simple-gui.html' = '../../methods-and-traits/exercise.html'
|
|
|
|
'generics/monomorphization.html' = '../generics/generic-functions.html'
|
|
|
|
'generics/data-types.html' = '../generics/generic-data.html'
|
|
|
|
'generics/methods.html' = '../generics/generic-data.html'
|
|
|
|
'traits/trait-bounds.html' = '../generics/trait-bounds.html'
|
|
|
|
'traits/impl-trait.html' = '../generics/impl-trait.html'
|
|
|
|
'std.html' = 'std-types/std.html'
|
|
|
|
'std/option-result.html' = '../std-types/option.html'
|
|
|
|
'error-handling/result.html' = '../std-types/result.html'
|
|
|
|
'std/string.html' = '../std-types/string.html'
|
|
|
|
'std/vec.html' = '../std-types/vec.html'
|
|
|
|
'std/hashmap.html' = '../std-types/hashmap.html'
|
|
|
|
'exercises/day-2/book-library.html' = '../../std-types/exercise.html'
|
|
|
|
'traits/important-traits.html' = '../std-traits/comparisons.html'
|
|
|
|
'traits/operators.html' = '../std-traits/operators.html'
|
|
|
|
'traits/from-into.html' = '../std-traits/from-and-into.html'
|
|
|
|
'traits/read-write.html' = '../std-traits/read-and-write.html'
|
|
|
|
'traits/default.html' = '../std-traits/default.html'
|
|
|
|
'traits/closures.html' = '../std-traits/closures.html'
|
|
|
|
'exercises/day-1/implicit-conversions.html' = '../../std-traits/exercise.html'
|
|
|
|
'traits/iterator.html' = '../iterators/iterators.html'
|
|
|
|
'exercises/day-2/iterators-and-ownership.html' = '../../iterators/intoiterator.html'
|
|
|
|
'traits/from-iterator.html' = '../iterators/fromiterator.html'
|
|
|
|
'exercises/day-2/strings-iterators.html' = '../../iterators/exercise.html'
|
|
|
|
'testing/integration-tests.html' = '../testing/other.html'
|
|
|
|
'testing/doc-tests.html' = '../testing/other.html'
|
|
|
|
'exercises/day-1/luhn.html' = '../../testing/exercise.html'
|
|
|
|
'memory-management/stack-vs-heap.html' = '../memory-management/review.html'
|
|
|
|
'memory-management/stack.html' = '../memory-management/review.html'
|
|
|
|
'memory-management/manual.html' = '../memory-management/approaches.html'
|
|
|
|
'memory-management/scope-based.html' = '../memory-management/approaches.html'
|
|
|
|
'memory-management/garbage-collection.html' = '../memory-management/approaches.html'
|
|
|
|
'ownership.html' = 'memory-management/ownership.html'
|
|
|
|
'memory-management/rust.html' = '../memory-management/ownership.html'
|
|
|
|
'ownership/move-semantics.html' = '../memory-management/move.html'
|
|
|
|
'ownership/moved-strings-rust.html' = '../memory-management/move.html'
|
|
|
|
'ownership/double-free-modern-cpp.html' = '../memory-management/move.html'
|
|
|
|
'ownership/moves-function-calls.html' = '../memory-management/move.html'
|
|
|
|
'ownership/copy-clone.html' = '../memory-management/copy-types.html'
|
|
|
|
'traits/drop.html' = '../memory-management/drop.html'
|
|
|
|
'std/box.html' = '../smart-pointers/box.html'
|
|
|
|
'std/box-recursive.html' = '../smart-pointers/box.html'
|
|
|
|
'std/box-niche.html' = '../smart-pointers/box.html'
|
|
|
|
'std/rc.html' = '../smart-pointers/rc.html'
|
|
|
|
'ownership/borrowing.html' = '../borrowing/shared.html'
|
|
|
|
'ownership/shared-unique-borrows.html' = '../borrowing/shared.html'
|
|
|
|
'std/cell.html' = '../borrowing/interior-mutability.html'
|
|
|
|
'exercises/day-2/health-statistics.html' = '../../borrowing/exercise.html'
|
|
|
|
'error-handling/panic-unwind.html' = '../error-handling/panics.html'
|
|
|
|
'error-handling/try-operator.html' = '../error-handling/try.html'
|
|
|
|
'error-handling/converting-error-types.html' = '../error-handling/try-conversions.html'
|
|
|
|
'error-handling/converting-error-types-example.html' = '../error-handling/try-conversions.html'
|
|
|
|
'error-handling/deriving-error-enums.html' = '../error-handling/error.html'
|
|
|
|
'error-handling/error-contexts.html' = '../error-handling/thiserror-and-anyhow.html'
|
|
|
|
'error-handling/dynamic-errors.html' = '../error-handling/thiserror-and-anyhow.html'
|
|
|
|
'basic-syntax/slices.html' = '../slices-and-lifetimes/slices.html'
|
|
|
|
'basic-syntax/string-slices.html' = '../slices-and-lifetimes/str.html'
|
|
|
|
'ownership/lifetimes.html' = '../slices-and-lifetimes/lifetime-annotations.html'
|
|
|
|
'ownership/lifetimes-function-calls.html' = '../slices-and-lifetimes/lifetime-elision.html'
|
|
|
|
'ownership/lifetimes-data-structures.html' = '../slices-and-lifetimes/struct-lifetimes.html'
|
|
|
|
'unsafe.html' = 'unsafe-rust/unsafe.html'
|
|
|
|
'unsafe/raw-pointers.html' = '../unsafe-rust/dereferencing.html'
|
|
|
|
'basic-syntax/static-and-const.html' = '../unsafe-rust/static-and-const.html'
|
|
|
|
'unsafe/mutable-static-variables.html' = '../unsafe-rust/mutable-static.html'
|
|
|
|
'unsafe/unions.html' = '../unsafe-rust/unions.html'
|
|
|
|
'unsafe/calling-unsafe-functions.html' = '../unsafe-rust/unsafe-functions.html'
|
|
|
|
'unsafe/writing-unsafe-functions.html' = '../unsafe-rust/unsafe-functions.html'
|
|
|
|
'unsafe/extern-functions.html' = '../unsafe-rust/unsafe-functions.html'
|
|
|
|
'unsafe/unsafe-traits.html' = '../unsafe-rust/unsafe-traits.html'
|
|
|
|
'exercises/day-3/safe-ffi-wrapper.html' = '../../unsafe-rust/exercise.html'
|
|
|
|
|
2023-04-03 17:18:32 +02:00
|
|
|
[output.exerciser]
|
2023-04-05 17:15:42 +02:00
|
|
|
output-directory = "comprehensive-rust-exercises"
|