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

562 Commits

Author SHA1 Message Date
Andrew Walbran
d507096d31 Mention svd2rust. 2023-03-20 14:26:57 +00:00
Andrew Walbran
f8f6922b0c Add pages with PAC and HAL examples. 2023-03-20 14:26:57 +00:00
Andrew Walbran
780afddc11 Add example to turn on an LED. 2023-03-20 14:26:57 +00:00
Andrew Walbran
9068b63e76 Actually use panic_halt in example. 2023-03-20 14:26:57 +00:00
Andrew Walbran
d84c93010a no_std examples won't build in mdbook test. 2023-03-20 14:26:57 +00:00
Andrew Walbran
8e009b9674 Remove reference to panic-abort.
It doesn't build with current rustc.
2023-03-20 14:26:57 +00:00
Andrew Walbran
0a2263451d Add alloc example. 2023-03-20 14:26:57 +00:00
Andrew Walbran
2981d3856f Mention panic-abort and panic-halt crates. 2023-03-20 14:26:57 +00:00
Andrew Walbran
f71a86d942 Add minimal no_std example. 2023-03-20 14:26:57 +00:00
Andrew Walbran
27820629e2 Rename section to bare metal. 2023-03-20 14:26:57 +00:00
Andrew Walbran
51ccf44f52 Add initial outline for bare-metal Rust day. 2023-03-20 14:26:57 +00:00
Andrew Walbran
036269ec94 Add workflow to check that Rust code is formatted properly. 2023-03-20 14:26:57 +00:00
Andrew Walbran
f0b59d0818 cargo fmt 2023-03-20 14:26:57 +00:00
Jooyung Han
d1ca434023
Update Korean Translation 20230317 (#513)
* Update Korean Translation (20230217)

carg install & gen messages.pot & msgmerge

* Resolve fuzzy entries in Korean

---------

Co-authored-by: Jooyung Han <jooyung@google.com>
2023-03-20 12:41:25 +09:00
Eunsu(Daniel) Kim
dc0091882a
fix: fix typo at ko.po (#514) 2023-03-20 09:25:28 +09:00
Andrew Walbran
daf25d094b
Make Miri happy (#486)
I think this is a better solution than #308. It fixes the Miri error, and mostly keeps the original intent of demonstrating how to use raw pointers.
2023-03-15 23:18:12 +00:00
Andrew Walbran
7a22d5567a
Don't allocate in success case (#506)
`format!` was being called (and allocating a string) even in the success case.
2023-03-15 09:06:35 +01:00
Oliver Mannion
9ee562c267
Remove unnecessary Mutex::lock from shared state example (#499)
It's not necessary to explicitly take the lock to print it.
2023-03-12 10:48:52 +01:00
Charisee Chiw
59d3d7f625
Indent code in speaker notes (#476)
* Indent code in speaker notes

#475

* Update stack.md

* Update destructuring-arrays.md

* Update hashmap.md

* Update traits.md
2023-03-11 14:12:32 -08:00
Daniel Gorelik
368f3ba302
The code block at https://google.github.io/comprehensive-rust/testing/unit-tests.html probably should not be runnable (#498) 2023-03-11 10:12:37 +01:00
Jooyung Han
ef9d9e3bbe
Update Korean Translation (20230310) (#493)
* Update Korean translation

```
$ MDBOOK_OUTPUT='{"xgettext": {"pot-file": "messages.pot"}}' mdbook build -d po
$ msgmerge --no-wrap --update po/ko.po po/messages.pot
$ LANGUAGE=C msgfmt  -o /dev/null --statistics po/ko.po
 1235 translated messages, 36 fuzzy translations, 633 untranslated messages.
```

* Resolve fuzzy entries in Korean translation

```
$ LANGUAGE=C msgfmt  -o /dev/null --statistics po/ko.po
1278 translated messages, 626 untranslated messages.
```

* Remove obsolete entries

---------

Co-authored-by: Jooyung Han <jooyung@google.com>
2023-03-11 09:48:38 +09:00
Dustin J. Mitchell
bfed596d28
Generalize the day-4 afternoon (#487)
* Generalize the day-4 afternoon

This is in preparation for adding more options for this portion of the
course, and reflects an existing practice of substituting other
materials for this last half-day.

* address review comments
2023-03-10 09:07:36 -05:00
MMINO
ff66258c50
Fix typo in borrowing.md in the Speaker's Notes (#490)
the -> they
2023-03-09 14:13:04 +00:00
Dustin J. Mitchell
ba28dd2d4c
Parse Markdown in mdbook-xgettext (#449)
* Parse Markdown to support translation.

This upgrades from just splitting Markdown files on double-newlines, to
using a Markdown parser to break them into more appropriate chunks. The
upshot is that code samples are all in one message, lists are bundled
together, and generally it should be easier to translate.

* [WIP] helper to update po files for new translation

* process synthetic input file-by-file

* review comments

* remove temporary code

* fix msgfmt lints
2023-03-07 18:07:07 +00:00
Charisee Chiw
3242afae09
Create default.md (#370)
* Create default.md

* Update SUMMARY.md

* Update SUMMARY.md

* Update default.md

* Update default.md

* Update default.md
2023-03-07 17:11:43 +01:00
Martin Geisler
64340562ea
Add badges to README and welcome page (#481) 2023-03-07 12:45:00 +00:00
Martin Geisler
e366d833d0
Update mdbook to 0.4.28 (#480)
* Update mdbook to 0.4.28

This version contains https://github.com/rust-lang/mdBook/pull/1986 which will allow us to test the code in each translation.

* Fix formatting in Korean translation

The extra code block made `mdbook test` fail.
2023-03-07 10:14:26 +01:00
ronaldfw
46aeaa508c Make some more progress on the German translation 2023-03-06 15:42:11 +01:00
Martin Geisler
31500974e4
Add note about requesting a room with tables (#479)
* Add note about requesting a room with tables

The course is built on the idea of using live-coding as much as possible. This means that it's important that there are desks in the classrooms — a traditional auditorium setup does not work well.
2023-03-06 15:23:10 +01:00
JeongHyeon Lee
c7d03651ff
Fix a typo at ko translation (#477) 2023-03-06 00:04:31 +09:00
JeongHyeon Lee
05eb17a6fe
Fix typo in string.md (#473) 2023-03-04 17:22:04 +01:00
Andrew Walbran
a78d58ba56
Add note about hygienic macros (#472)
* Add note about hygienic macros

* Fix typo.

* Add link about macro hygiene.
2023-03-03 12:19:52 +00:00
Martin Geisler
449ead5575
Integrate GA4 code directly with book.js (#470)
* Integrate GA4 code directly with `book.js`

The main advantage of this is that it simplifies the setup since we
can avoid the monkey-patching we did before.

A secondary advantage is that it should make things a little faster
since we avoid a request to the server on every page load.

* Remove unreachable return

* Watch all of `third_party`

It just occurred to me that we want to refresh the page in `mdbook serve` when anything changes in `third_party`.
2023-03-02 17:50:37 +00:00
Jooyung Han
e1546235c8
Update Korean Translation (2023-03-01) (#465)
* Update po/ko.po with the latest changes

```
$ MDBOOK_OUTPUT='{"xgettext": {"pot-file": "messages.pot"}}' mdbook build -d po
$ msgmerge --update po/ko.po --no-wrap po/messages.pot
```

* Resolve fuzzy translations in Korean

* Translate new texts into Korean

* Copy code blocks as msgstr in Korean

and fix some minor typos.

* Remove #~ lines from ko.po

* Address Jiyong's comments

* Fix typos and translate untranslated messages in Korean

---------

Co-authored-by: Jooyung Han <jooyung@google.com>
2023-03-02 18:31:01 +09:00
Jooyung Han
e4205b3ac8
Remove renderers from links and index preprocessors (#464)
* Remove `renderers` from `links` and `index` preprocessors

These two preprocessors are default preprocessors and controlled by
`build.use_default_preprocessors` not by `renders`.

* Fix the order of preprocessors

I was wrong about the order in #461.

* Remove `links` and `index` preprocessor lines

These default preprocessors are run by default.

---------

Co-authored-by: Jooyung Han <jooyung@google.com>
2023-03-02 18:01:24 +09:00
Martin Geisler
2de8d7cdbb
Simplify running the course slightly (#463)
Thanks to many contributors, we now have lots of speaker notes.
2023-03-02 09:13:49 +01:00
Martin Geisler
7e47e31408
Group per-translation output in publish step (#467) 2023-03-02 06:38:32 +09:00
Martin Geisler
adc6720031 Increase playground timeout to 15 seconds
We often see timeouts when running the course. Most of the time, the
code compiles on the second try, which indicates that we just need to
wait a little longer.

Fixes #406.
2023-03-01 13:14:42 +01:00
Martin Geisler
2a2f8ec94e Add book.js generated with mdbook init --theme
This allows us to customize the JavaScript used on the page.
2023-03-01 13:14:42 +01:00
Jooyung Han
7bddf5e6d6
Remove Last-* properties in po/ko.po (#468)
* Remove Last-* properties in po/ko.po

* Remove Last* properties in other po files

---------

Co-authored-by: Jooyung Han <jooyung@google.com>
2023-03-01 20:57:47 +09:00
Kuba
4a9b679a9c
Add note about fuzzy and fix heading nesting (#466) 2023-03-01 09:17:41 +00:00
Charisee Chiw
c22b35e426
Remove silenced warnings in book-library exercise (#388)
* Update book-library.md

* Update book-library.rs

* Apply suggestions from code review

Expanding the variable makes it ever-so-slightly easier to read.

---------

Co-authored-by: Martin Geisler <mgeisler@google.com>
2023-02-28 17:53:02 -08:00
Jooyung Han
1821a3fd12
Make i18n-helpers a requirement (#461)
* Make i18n-helpers a requirement

* Skip mdbook-gettext for mdbook-xgettext

* Gettext finds PO file based on `book.language`

* Update workflow

No need to set `preprocessor.gettext.po-file`.

---------

Co-authored-by: Jooyung Han <jooyung@google.com>
2023-02-28 22:05:09 +09:00
Jooyung Han
b65c30fb5f
Update Korean Translation. (#460)
* Resolve fuzzy items in Korean

* Add missing translation in Korean (visibility)

* Translate filesystem in Korean

* Update po/ko.po

Co-authored-by: Jiyong Park <55639800+jiyongp@users.noreply.github.com>

* Update po/ko.po

Co-authored-by: Jiyong Park <55639800+jiyongp@users.noreply.github.com>

* Update po/ko.po

Co-authored-by: Jiyong Park <55639800+jiyongp@users.noreply.github.com>

---------

Co-authored-by: Jooyung Han <jooyung@google.com>
Co-authored-by: Jiyong Park <55639800+jiyongp@users.noreply.github.com>
2023-02-27 23:14:52 +00:00
Martin Geisler
1feb94e02a
Take out unnecessary code from enum size slide (#309)
The slide is way too large to comfortable use in a classroom. Instead
of printing six lines of output, the instructor should carefully walk
through the different examples. That way we can take the course
participants with us through the explanations instead of simply
showing them the end result.
2023-02-27 17:42:46 +01:00
Adam MacBeth
b1b78a9672
Fix typo in string.md (#456)
* Fix typo in string.md

* Update src/std/string.md

---------

Co-authored-by: Martin Geisler <martin@geisler.net>
2023-02-27 13:37:08 +00:00
Steve Masterman
0562771ce0
Update variant-payloads.md (#459)
Fix typo
2023-02-27 13:19:32 +00:00
Charisee Chiw
e73b163d77
Add to speaker notes rc.md (#366)
* Update rc.md

* Fix wording and formatting

* Update rc.md

---------

Co-authored-by: Andrew Walbran <qwandor@google.com>
2023-02-27 02:05:01 +00:00
Jooyung Han
973e27a322
Cleanup Korean Translation (#458)
* s/블럭/블록

* Add missing translation for Korean

* Fix spacing in Korean

along with typos.

* Add missing msgstr in Korean

---------

Co-authored-by: Jooyung Han <jooyung@google.com>
2023-02-27 09:42:50 +09:00
Adam MacBeth
4690f19e8c
Fix typo in drop.md (#457) 2023-02-26 22:04:39 +00:00