1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2024-11-29 18:29:40 +02:00
Commit Graph

779 Commits

Author SHA1 Message Date
Martin Geisler
f02facd56d
Add missing newlines around <details> (#647)
The newlines makes the text more uniform when extracted into the POT
file (spotted while doing #646).
2023-05-19 09:43:44 -04:00
Martin Geisler
b9959bfeb1
Publish the in-progress Italian translation (#645)
This makes the translation available on the official site. It's not linked yet, but having it available there should make it easier to review the state.
2023-05-19 14:25:51 +02:00
Ivan De Marino
e83140b42c
Additional Italian translation (#642)
* Additional Italian translations

* Updated base template

* git-ignoring backup copies `po/*.po~` files, generated when updating an existing translation
2023-05-19 12:52:32 +01:00
Martin Geisler
6e9b02e5f4
da: Sync translation with c45b350 (#616)
da: sync with c45b350

This is the result of running

    MDBOOK_OUTPUT='{"xgettext": {"pot-file": "messages.pot"}}' mdbook build -d po
    msgmerge --update po/da.po po/messages.pot
2023-05-18 06:59:45 -07:00
rbehjati
83663daaa2
Add the description of the chat-app exercise (#641)
* Adds a description of the async chat exercise
* Simplifies the use of Error in chat-async
* Links the solution to the async chat exercise
* Removes the elevator exercise
2023-05-17 18:22:11 +01:00
Edward Liaw
8406697449
Add code for speaker notes in trait inheritance (#643)
Give code samples of trait inheritance and a blanket implementation.

Signed-off-by: Edward Liaw <edliaw@google.com>
2023-05-17 09:02:02 +00:00
Dustin J. Mitchell
caeabdae3e
Beginnings of an async chat exercise (#627)
* beginnings of an async chat exercise

* really basic solution

* format
2023-05-16 15:51:01 +00:00
Martin Geisler
b4fb870af6
Enable imports_granularity for rustfmt (#637)
This requires us to run a nightly Rust for our formatting check[1]. Other
users will see a warning when invoking `rustfmt`:

  Warning: can't set `imports_granularity = Module`, unstable features
  are only available in nightly channel.

This should be harmless overall and help us ensure better consistency
in our import formatting.

[1]: https://rust-lang.github.io/rustfmt/?version=v1.5.1&search=#imports_granularity
2023-05-16 12:35:49 +02:00
Diogo Anderson
a788680d5e
Fixing a typo in a "details" close tag (#638) 2023-05-15 22:20:54 +00:00
Martin Geisler
490b20e245
Link badges to the main branch (#636)
This is the only branch for which there is any expectation of
stability, so it makes sense to send people here.
2023-05-15 18:12:10 -04:00
Martin Geisler
1274260201
Fix broken link to trait objects (#633) 2023-05-15 15:06:50 +01:00
Martin Geisler
d56298fc84
Add redirect for old async/concurrency/ directory (#635)
It seems we had a link to async/concurrency/channels.html for a brief
period. This got indexed and now show up as 404 errors in my reports.
2023-05-15 15:05:28 +01:00
Per Larsen
c45b35011c
da: Update translation (#632)
A few more translations in order for me to get my feet wet.
2023-05-15 11:46:33 +00:00
Martin Geisler
0036843f0c
Fix typo in dining-philosophers-async.md (#631) 2023-05-12 14:34:11 +02:00
Per Larsen
780c23e610
Update CODEOWNERS for Danish (#630) 2023-05-12 13:38:25 +02:00
Martin Geisler
9c6bb081d4
Update "Running the course" based on latest experience (#628) 2023-05-11 17:23:01 +00:00
Dustin J. Mitchell
e9be072190
Upgrade mdbook-i18n-helpers link (#626) 2023-05-11 09:55:43 -04:00
Martin Geisler
bbbc0601a9
Fix broken README links (#629)
Links inside the course are automatically turned into `.html` by
mdbook, but this is a regular README and so we need proper links.
2023-05-11 08:37:35 -04:00
Martin Geisler
ba50f568df
Add CODEOWNERS for Danish, Greek, Spanish, French, and Italian (#615) 2023-05-10 10:25:14 +02:00
rbehjati
11571d0d1a
Add dining philosophers as an async exercise (#624)
* Adds dining philosophers as an async exercise
* Adds a solution for async dining philosophers
* Adds a solution page for the afternoon session on concurrency
2023-05-09 17:34:47 +01:00
Martin Geisler
4c91965224
pt-BR: Fix broken links (#622) 2023-05-09 16:44:26 +01:00
rbehjati
00664d82b8
Fixes in the README (#623) 2023-05-09 13:43:29 +01:00
Martin Geisler
e19fc8bfd2
Simplify GitHub actions (#621)
* Remove unnecessary jobs names

They are inconsistent with the rest of the jobs and they overflow the
horizontal space in the GitHub UI.

* Remove unnecessary toolchain action

The GitHub runners include rustup and a recent stable Rust. We only
need to add the necessary target and we’re good to go.

This removes a lot of warnings because the action used an outdated
GitHub API: https://github.com/actions-rs/toolchain/issues/219

* Simplify job name

The job is testing a single translation, so it should be singular.

* Test English source with translations

This simplifies the workflow a little and ensures that we get
artifacts uploaded of the English version for every PR.

* Avoid shell command chain

GitHub actions supports setting the working directory directly.

* Upload only the book artifact

Right now, the artifacts all contain the same two top-level folders:
html/ and exerciser/. The former is what we actually deploy, the
second is a side-effect of the exerciser plugin.

With this change, we only upload the HTML and we ensure the zip file
for the xx language has a top-level comprehensive-rust-xx/ folder.
This makes it much nicer to use the generated artifacts.
2023-05-08 16:32:25 +02:00
Martin Geisler
661f51b06b
Fix page redirects (#620)
* Fix broken redirects

A few of these were wrong since they assumed the target path is
relative to the root of the course (the path is relative to the page
being redirected).

* Sort redirects
2023-05-08 16:31:54 +02:00
Carlos Jimenez
ce7c5fdf22
Fix mistakes in book-library.rs (#619)
---------

Co-authored-by: Martin Geisler <martin@geisler.net>
2023-05-08 08:20:42 +00:00
Bradford Hovinen
5bbb68be2c
Add a file which references some useful crates to use for writing tests (#617)
* Add a slide referencing recommended testing crates

---------

Co-authored-by: Martin Geisler <martin@geisler.net>
2023-05-05 14:59:25 +00:00
Andrew Walbran
5a495a508e
Update Cargo.lock. (#614)
This was missed in #583.
2023-05-05 11:25:45 +01:00
Louis Stanko
2706c3f532
de: Translated Chapter 1 (#577)
* Updated base translations

Co-authored-by: ronaldfw <wotzlaw@gmail.com>
2023-05-05 10:08:33 +02:00
Ivan De Marino
853c80a854
Italian: Google Translate API submission (#613)
* First pass of automated translation, using https://github.com/mgeisler/cloud-translate

I think it can give this a leg start.

* First batch of corrections from automatic translations
2023-05-05 10:05:26 +02:00
Tanuj
d83d1f1c48
Fix pluralisation inconsistency (#612) 2023-05-05 09:57:44 +02:00
Dustin J. Mitchell
d0bf0d7a44
Order Send/Sync before Arc/Mutex (#605)
The Arc/Mutex chapters mention Send/Sync in the speaker notes, and in
fact serve as good illustrations of the traits, so let's define the
traits before referencing them.
2023-05-05 09:50:17 +02:00
Andrew Walbran
9cff14ca31
Link arm-gic to main documentation page rather than crate page (#610) 2023-05-04 14:42:08 +00:00
Andrew Walbran
226aa21f3c
Use hyphen rather than underscore for gic-version (#611)
Older versions of QEMU seem to only accept a hyphen, while new versions accept either.
2023-05-04 15:41:15 +01:00
Andrew Walbran
93c1c814c3
Improve phrasing of comment (#609)
Some people interpreted the previous comment as meaning the RTC itself needed to be initialised or started somehow, but this is not the case.
2023-05-04 15:08:44 +01:00
Dustin J. Mitchell
cce3fff0d0
Minor fixes to async notes (#607)
* `join!( .., time::sleep(..))` isn't really a "timeout"

* Remove suggestion to make `sleep` take `&mut self`

I'm not sure what doing so demonstrates.

* Update src/async/control-flow/join.md

Co-authored-by: rbehjati <razieh@google.com>

---------

Co-authored-by: rbehjati <razieh@google.com>
2023-05-04 11:59:19 +00:00
Dustin J. Mitchell
1288d11adb
Fix title of 'Runtimes' (#606) 2023-05-04 07:56:43 -04:00
Martin Geisler
3b07b4768a
Add unit tests to Safe FFI exercise (#588) 2023-05-04 12:20:47 +02:00
Martin Geisler
84650b2af1
Add a style guide (#591)
This is an attempt at documenting some things to do and don’t do when
updating the course text or a translation.

Fixes #560.
2023-05-04 12:20:22 +02:00
Dustin J. Mitchell
09c996ad96
Move closures to the top level (#604)
move closures to the top level
2023-05-03 09:30:13 -04:00
Martin Geisler
841359f5df
Simplify methods slide (#594)
This tightens the language slightly. I also added a speaker note with
suggestions for more methods to add (if there is time).
2023-05-03 12:01:21 +02:00
Martin Geisler
789abc1028
Wrap comments at 80 columns (#592)
When teaching the class, I notice that these comments (which are
wrapped at 100 columns) cause a horizontal scrollbar which makes them
hard to read at a glance.

Here I wrapped them at 80 columns, which fits on the screen and which
avoids overly long lines.
2023-05-03 12:00:58 +02:00
Martin Geisler
4a09d053ac
Simplify fizz buzz slide (#595)
There is no need to introduce `match` here where we don’t have time to
talk about it in detail.
2023-05-03 09:56:58 +02:00
Martin Geisler
3b21053ff2
Cleanup references to "Day 4" (#603)
* Align outline with new spin-off course structure

With the new structure, the section on Android is a spin-off course
from the main 3-day course on Rust Fundamentals. The Bare-metal and
Concurrency days are spin-off courses in the same way.

* Explain new course structure

* Align Bare-Metal welcome page with other deep dives

* Merge Day 4 page into Course Structure page

* Remove Day 4 Welcome page

This aligns the Concurrency in Rust section with the Bare-Metal Rust
deep dive.

* Show subsections for Android deep dive

This aligns the Rust in Android section with the other deep dives.

* Clean up welcome page and README

We now cover async Rust and the course is no longer a four day course.

* Remove reference to the old Day 4

* Remove Day 4 references from exercises
2023-05-02 08:02:28 +02:00
Martin Geisler
c67922ce8c
Cleanup control flow slides (#587)
* Cleanup control flow slides

This avoids calling all the looping constructs “expressions” since
they all (except for `loop`) return trivial values.

---------

Co-authored-by: Dustin J. Mitchell <djmitche@google.com>
2023-04-29 03:12:24 +00:00
Martin Geisler
244e5b99c6
Provide more instructions in the library exercise (#589) 2023-04-29 05:11:12 +02:00
Martin Geisler
fc68829e14
Improve language around ownership of OsString (#602)
Based on discussion in #598.
2023-04-28 10:00:07 +02:00
Martin Geisler
251782aac3
Small copy-edit for TRANSLATIONS.md (#590) 2023-04-28 09:42:05 +02:00
Martin Geisler
b051b04afa
Use explicit Arc::clone instead of calling .clone() method (#596)
This is to highlight that the clones are cheap: they run custom logic
in the reference counted type, they don’t do a deep clone.
2023-04-27 23:46:09 +02:00
Martin Geisler
6ade739651
Ensure code blocks are editable (#597)
We should default to making code blocks editable: this ensures
consistent syntax highlighting (see #343) and it allows the instructor
to freely edit anything they want.
2023-04-27 23:45:41 +02:00
Martin Geisler
5074b1751c
Hint at the list of conversions in FFI exercise (#598)
I see people struggle a lot with guessing why they need to convert
between all these types. The explanations here should help with that.
2023-04-27 23:45:15 +02:00