Compare commits

..

10 Commits

Author SHA1 Message Date
Adalfarus c437f75fcf
Update lib.rs, added info that needed panic messages can be found in the tests. (#157) 2024-10-09 09:44:47 +02:00
Marco Otte-Witte f839fc00f9
Merge pull request #161 from mainmatter/cover-for-pdf
add cover and back to downloadable pdf
2024-10-08 11:22:45 +02:00
Marco Otte-Witte 954dd0ff14
add real back and front cover 2024-10-08 11:11:20 +02:00
Marco Otte-Witte 33bcaf0a7a
add cover and back to downloadable pdf 2024-10-02 16:00:32 +02:00
Marco Otte-Witte 0aecb5380e
Merge pull request #159 from mainmatter/style-ebook
simplify ebook styling
2024-10-02 15:40:46 +02:00
Marco Otte-Witte 276bdbbcdc
simplify ebook styling config 2024-10-02 15:30:40 +02:00
Remo Senekowitsch a899ecec96
Fix typo (#160) 2024-10-02 15:20:17 +02:00
Luca Palmieri a0537f8c51 chore: Shorten links 2024-09-27 14:47:00 +02:00
Luca Palmieri 73649001ba
Add link to paperback. 2024-09-27 10:13:15 +02:00
David Parra 99ee4b27c5
Typo (#154)
Thanks for such a great book, found a small typo.
2024-09-22 08:12:14 +02:00
10 changed files with 13 additions and 20 deletions

View File

@ -31,11 +31,11 @@ jobs:
run: cargo install --path helpers/mdbook-exercise-linker
- name: Install link shortener plugin
run: cargo install --path helpers/mdbook-link-shortener
- name: Install mdbook-pandoc, calibre and related dependencies
- name: Install mdbook-pandoc, calibre, pdftk and related dependencies
run: |
cargo install mdbook-pandoc --locked --version 0.7.1
sudo apt-get update
sudo apt-get install -y fonts-noto calibre
sudo apt-get install -y fonts-noto calibre pdftk
export PANDOC_VERSION=3.3
curl -LsSf https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION}-linux-amd64.tar.gz | tar zxf -
@ -81,6 +81,10 @@ jobs:
run: |
cd book
mdbook build
- name: Add cover and back to downloadable PDF
run: |
pdftk book/assets/cover.pdf book/book/pandoc/pdf/100-exercises-to-learn-rust.pdf book/assets/back.pdf cat output book/book/pandoc/pdf/100-exercises-to-learn-rust-with-cover.pdf
mv book/book/pandoc/pdf/100-exercises-to-learn-rust-with-cover.pdf book/book/pandoc/pdf/100-exercises-to-learn-rust.pdf
- name: Convert HTML to ePUB
run: |
cd book/book/pandoc/html

BIN
book/assets/back.pdf Normal file

Binary file not shown.

BIN
book/assets/cover.pdf Normal file

Binary file not shown.

View File

@ -119,18 +119,6 @@ standalone = true
metadata-file = "metadata.yml"
[output.pandoc.profile.html.variables]
mainfont = "CoreSansA45.ttf"
mainfontoptions = [
"BoldFont=CoreSansA65.ttf",
"ItalicFont=CoreSansA45It.ttf",
"BoldItalicFont=CoreSansA65It.ttf",
]
sansfont = "CoreSansA45.ttf"
sansfontoptions = [
"BoldFont=CoreSansA65.ttf",
"ItalicFont=CoreSansA45It.ttf",
"BoldItalicFont=CoreSansA65It.ttf",
]
# You can get these fonts here: https://fonts.google.com/selection?query=noto+color+
monofont = "Noto Sans Mono"
mainfontfallback = ["Noto Color Emoji:mode=harf"]
@ -138,6 +126,4 @@ sansfontfallback = ["Noto Color Emoji:mode=harf"]
monofontfallback = [
"Noto Color Emoji:mode=harf",
]
linkcolor = "Links"
urlcolor = "Links"
urlstyle = "rm"

View File

@ -181,6 +181,7 @@
"https://valgrind.org/docs/manual/dh-manual.html": "f2t",
"https://veykril.github.io/tlborm/": "fz5",
"https://without.boats/blog/the-scoped-task-trilemma/": "f67",
"https://www.amazon.com/dp/B0DJ14KQQG/": "f6g",
"https://www.lpalmieri.com/": "ffv",
"https://www.lpalmieri.com/posts/2020-12-11-zero-to-production-6-domain-modelling/": "f4t",
"https://www.oreilly.com/library/view/programming-rust-2nd/9781492052586/": "f6y",

View File

@ -34,8 +34,8 @@ also find solutions to all exercises in the
## Formats
You can go through the course material [in the browser](https://rust-exercises.com/100-exercises/).\
You can also [download it as a PDF file](https://rust-exercises.com/100-exercises-to-learn-rust.pdf), for offline reading.
You can go through the course material [in the browser](https://rust-exercises.com/100-exercises/) or [download it as a PDF file](https://rust-exercises.com/100-exercises-to-learn-rust.pdf), for offline reading.\
If you prefer to have the course material printed out, [buy a paperback copy on Amazon](https://www.amazon.com/dp/B0DJ14KQQG/).
## Structure

View File

@ -1,7 +1,7 @@
# Combinators
Iterators can do so much more than `for` loops!\
If you look at the documentation for the `Iterator` trait, you'll find a **vast** collections of
If you look at the documentation for the `Iterator` trait, you'll find a **vast** collection of
methods that you can leverage to transform, filter, and combine iterators in various ways.
Let's mention the most common ones:

View File

@ -107,7 +107,7 @@ asynchronous programming in Rust.
The entrypoint of your executable, the `main` function, must be a synchronous function.
That's where you're supposed to set up and launch your chosen async runtime.
Most runtimes provides a macro to make this easier. For `tokio`, it's `tokio::main`:
Most runtimes provide a macro to make this easier. For `tokio`, it's `tokio::main`:
```rust
#[tokio::main]

View File

@ -12,6 +12,7 @@ impl Ticket {
// - the `title` should be at most 50 bytes long.
// - the `description` should be at most 500 bytes long.
// The method should panic if any of the requirements are not met.
// You can find the needed panic messages in the tests.
//
// You'll have to use what you learned in the previous exercises,
// as well as some `String` methods. Use the documentation of Rust's standard library

View File

@ -180,6 +180,7 @@
/f2t https://valgrind.org/docs/manual/dh-manual.html
/fz5 https://veykril.github.io/tlborm/
/f67 https://without.boats/blog/the-scoped-task-trilemma/
/f6g https://www.amazon.com/dp/B0DJ14KQQG/
/ffv https://www.lpalmieri.com/
/f4t https://www.lpalmieri.com/posts/2020-12-11-zero-to-production-6-domain-modelling/
/f6y https://www.oreilly.com/library/view/programming-rust-2nd/9781492052586/