Andrew Walbran
c5863f6642
Add optional extension to RTC exercise ( #562 )
...
* Add methods to mask and clear interrupts.
* Start on GICv3 driver.
* Enable and use RTC interrupt.
* WFI
* Add newtype for interrupt ID.
* Add extension to use interrupt.
* Add method to send an SGI.
* Silence warnings about unused methods in provided drivers.
* Implement Debug manually for IntId.
It's useful to say what kind of interrupt it is.
* Acknowledge and log interrupt.
We should end it as well, but doing so results in a loop unless we first
clear the match.
* cargo fmt with imports_granularity = "module"
* Use arm-gic crate rather than including driver in the example.
2023-04-17 15:38:51 +01:00
Dustin J. Mitchell
d143528e07
Minor fix-ups to the async section. ( #566 )
...
These address some comments in #496 .
2023-04-16 19:20:24 -04:00
Andrew Walbran
87f1976589
cargo fmt with imports_granularity = "module" ( #564 )
2023-04-16 20:57:59 +02:00
Dustin J. Mitchell
0d30da7f23
Add an "async" session ( #496 )
...
* beginning of an Async section
* address review comments
* Add futures page (#497 )
NOTE: `mdbook test` does not allow code samples to reference other crates, so
they must be marked as `compile_fail`; see #175 .
* Add Runtimes & Tasks (#522 )
These concepts are closely related, and there's not much else to know
about runtimes other than "they exist".
This removes the bit about futures being "inert" because it doesn't
really lead anywhere.
* Async chapter (#524 )
* Add async channels chapter
* Async control flow
* Async pitfalls
* Separate in multiple chapters + add daemon section
* Merge reentering threads in blocking-executor
* async_trait
* Async fixes (#546 )
* Async: some ideas for simplifying the content (#550 )
* Simplify the async-await slide
* Shorten futures and move it up
* Add a page on Tokio
* Modifications to the async section (#556 )
* Modifications to the async section
* Remove the "Daemon" slide, as it largely duplicates the "Tasks" slide.
The introduction to the "Control Flow" section mentions tasks as a
kind of control flow.
* Reorganize the structure in SUMMARY.md to correspond to the directory
structure.
* Simplify the "Pin" and "Blocking the Executor" slides with steps in
the speaker notes to demonstrate / fix the issues.
* Rename "join_all" to "Join".
* Simplify some code samples to shorten them, and to print output rather
than asserting.
* Clarify speaker notes and include more "Try.." suggestions.
* Be consistent about where `async` blocks are introduced (in the
"Tasks" slide).
* Explain `join` and `select` in prose.
* Fix formatting of section-header slides.
* Add a note on async trait (#558 )
---------
Co-authored-by: sakex <alexandre@senges.ch>
Co-authored-by: rbehjati <razieh@google.com>
2023-04-14 14:06:50 +00:00
Dustin J. Mitchell
6c97e1a7be
Add a new async exercise: elevator simulation. ( #557 )
2023-04-13 16:26:57 +02:00
Andrew Walbran
d8e442b9cb
Extend bare metal afternoon exercise ( #561 )
...
* Add methods to set match register and check whether it matches.
* Add first extension to RTC exercise, using match register.
* No need for constants to be public.
2023-04-13 10:58:06 +01:00
Martin Geisler
5b316b8b5b
Prevent accidental publishing the link-checker exercise
2023-04-11 10:47:18 +01:00
Andrew Walbran
bf18b33e39
Use exerciser for day 4 exercises too.
2023-04-11 10:47:18 +01:00
Yuri Astrakhan
5cdb73387f
Inline format vars to make the format str simpler ( #551 )
2023-04-06 12:00:10 +02:00
Andrew Walbran
86d8c4ae54
Rename exercise template directory and archive.
2023-04-05 16:28:07 +01:00
Andrew Walbran
9375126b3c
Use comment rather than inline code to find filename.
2023-04-05 16:28:07 +01:00
Andrew Walbran
c17e8abbd7
Add links to exercise template archive.
2023-04-05 16:28:07 +01:00
Andrew Walbran
b85c893390
Explain entry point and entry.S
.
2023-04-05 15:13:10 +01:00
Andrew Walbran
2e94a80d9d
Discuss use of unsafe functions and safe wrappers.
2023-04-05 15:13:10 +01:00
Andrew Walbran
5068b1288d
Add notes about running examples.
2023-04-05 15:13:10 +01:00
Martin Geisler
907608c504
Format title consistently ( #526 )
2023-04-04 17:29:33 +02:00
Martin Geisler
a3eaeca212
Update scraper
dependency ( #547 )
...
* Update scraper dependency to 0.15.0
No code changes required because of this.
* Update dependencies in lock file
2023-04-04 14:27:46 +02:00
dependabot[bot]
64ee862f26
Bump spin from 0.9.6 to 0.9.8 in /src/bare-metal/alloc-example ( #544 )
...
Bumps [spin](https://github.com/mvdnes/spin-rs ) from 0.9.6 to 0.9.8.
- [Release notes](https://github.com/mvdnes/spin-rs/releases )
- [Changelog](https://github.com/mvdnes/spin-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/mvdnes/spin-rs/commits )
---
updated-dependencies:
- dependency-name: spin
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-04 08:54:39 +02:00
dependabot[bot]
4338cd5744
Bump spin from 0.9.6 to 0.9.8 in /src/exercises/bare-metal/rtc ( #543 )
...
Bumps [spin](https://github.com/mvdnes/spin-rs ) from 0.9.6 to 0.9.8.
- [Release notes](https://github.com/mvdnes/spin-rs/releases )
- [Changelog](https://github.com/mvdnes/spin-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/mvdnes/spin-rs/commits )
---
updated-dependencies:
- dependency-name: spin
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-04 08:54:30 +02:00
dependabot[bot]
b32af58a5f
Bump spin from 0.9.5 to 0.9.8 in /src/bare-metal/aps/examples ( #542 )
...
Bumps [spin](https://github.com/mvdnes/spin-rs ) from 0.9.5 to 0.9.8.
- [Release notes](https://github.com/mvdnes/spin-rs/releases )
- [Changelog](https://github.com/mvdnes/spin-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/mvdnes/spin-rs/commits )
---
updated-dependencies:
- dependency-name: spin
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-04 08:54:20 +02:00
Yuri Astrakhan
acf2990243
Update if-let-expressions.md ( #540 )
...
* Update if-let-expressions.md
add a note about let-else expressions. Closes #536
* Remove old mention of let-else
* Indent code block to match the bullet point
---------
Co-authored-by: Martin Geisler <martin@geisler.net>
2023-04-03 12:04:26 +02:00
rbehjati
739b3a01e0
Restructure Day-3 morning ( #503 )
...
* Restructure Day-3 morning
2023-03-30 13:25:34 +01:00
Dustin J. Mitchell
780368b4f7
Minor fixes for Day 3 Morning ( #532 )
...
* don't explain default trait methods early
* talk about Iterator before IntoIterator
* Defer discussion of trait objects to that chapter
* be more specific about turbofish, in speaker notes
2023-03-28 15:42:56 -04:00
Andrew Walbran
8c56c949ef
Fix GCC package name.
2023-03-27 17:20:31 +01:00
Andrew Walbran
4427241ca7
cargo-binutils requires llvm-tools-preview
2023-03-27 17:20:31 +01:00
Andrew Walbran
aa1036af66
Add more hints for bare metal morning exercise.
2023-03-27 17:20:31 +01:00
Andrew Walbran
956c137e51
Format hints as bullet-points.
2023-03-27 17:20:31 +01:00
Andrew Walbran
d513109b92
Add Mac OS instructions for picocom too.
2023-03-27 17:20:31 +01:00
Andrew Walbran
6f83b97e69
Fix Markdown formatting.
2023-03-27 17:20:31 +01:00
Andrew Walbran
357f62e137
A compass doesn't tell us the temperature.
2023-03-27 17:20:31 +01:00
Andrew Walbran
8ed300d620
Fix Linux build of bare metal AP code.
2023-03-27 17:20:31 +01:00
Andrew Walbran
ae83778173
Show actual driver code on solution page.
2023-03-27 17:20:31 +01:00
Andrew Walbran
9c166d4e97
Set publish = false in examples and exercises.
2023-03-23 15:12:23 +00:00
Andrew Walbran
f8dea1df2f
Use title case in SUMMARY.
2023-03-23 15:12:23 +00:00
Andrew Walbran
fa56c70dcb
Get AP examples working on Mac OS too.
2023-03-23 15:06:23 +00:00
Andrew Walbran
fc36e40eef
Make base address constants a pointer rather than a usize.
2023-03-23 15:06:23 +00:00
Andrew Walbran
782313e16e
Add commands to run examples to speaker notes.
2023-03-23 15:06:23 +00:00
Andrew Walbran
72ff50e60b
Build bare-metal examples in presubmit.
2023-03-23 15:06:23 +00:00
Andrew Walbran
b670098ab1
Update Cargo.lock, and no need for beta toolchain.
2023-03-23 15:06:23 +00:00
Andrew Walbran
b2ce958f2e
Add pages about Android and vmbase.
2023-03-23 15:06:23 +00:00
Andrew Walbran
8aef12bf1d
Add page about spin.
2023-03-23 15:06:23 +00:00
Andrew Walbran
f5b6e47f31
Put tinyvec example inline.
2023-03-23 15:06:23 +00:00
Andrew Walbran
fb3fd3979c
Add RTC exercise.
2023-03-23 15:06:23 +00:00
Andrew Walbran
8b21f5070e
Add page about inline assembly.
2023-03-23 15:06:23 +00:00
Andrew Walbran
f293ede958
Add page about tinyvec.
2023-03-23 15:06:23 +00:00
Andrew Walbran
8d1f903202
Add MacOS instructions.
2023-03-23 15:06:23 +00:00
Andrew Walbran
56319e016b
Add page about buddy_system_allocator.
2023-03-23 15:06:23 +00:00
Andrew Walbran
f0043637e2
Write page about aarch64-paging.
2023-03-23 15:06:23 +00:00
Andrew Walbran
dc95bd1dae
Write page about zerocopy.
2023-03-23 15:06:23 +00:00
Andrew Walbran
f3edffd1a7
Fix mdbook test failure.
2023-03-23 15:06:23 +00:00
Andrew Walbran
ada6a53942
Improve makefile.
2023-03-23 15:06:23 +00:00
Andrew Walbran
31c7b283c2
Add example implementing logger.
2023-03-23 15:06:23 +00:00
Andrew Walbran
15518aa177
Add separate binary for minimal UART driver.
2023-03-23 15:06:23 +00:00
Andrew Walbran
d6027f5080
Add notes about traits.
2023-03-23 15:06:23 +00:00
Andrew Walbran
bc21369dcb
Add example of using UART driver.
2023-03-23 15:06:23 +00:00
Andrew Walbran
1f315da903
Write a more complete UART driver.
2023-03-23 15:06:23 +00:00
Andrew Walbran
f6fc0edb11
We need qemu-system-arm too.
2023-03-23 15:06:23 +00:00
Andrew Walbran
790f4c88d5
Add note about QEMU UART.
2023-03-23 15:06:23 +00:00
Andrew Walbran
c7831953bb
QEMU virt machine uses PL011 UART not 16550.
2023-03-23 15:06:23 +00:00
Andrew Walbran
08c0c53412
Add section about Android bare-metal Rust support.
2023-03-23 15:06:23 +00:00
Andrew Walbran
7eee892195
Start on AP UART driver example.
2023-03-23 15:06:23 +00:00
Andrew Walbran
76ad4b2939
Add first AP slide and mention other projects.
2023-03-23 15:06:23 +00:00
Andrew Walbran
dee3e64442
Start writing about MMIO.
2023-03-23 15:06:23 +00:00
Dustin J. Mitchell
3b538b582d
Add a brief mention of doc comments ( #509 )
2023-03-21 12:15:07 -04:00
dependabot[bot]
259dfcb1eb
Bump cortex-m-rt from 0.7.2 to 0.7.3 in /src/exercises/bare-metal/compass ( #517 )
...
Bump cortex-m-rt in /src/exercises/bare-metal/compass
Bumps [cortex-m-rt](https://github.com/rust-embedded/cortex-m ) from 0.7.2 to 0.7.3.
- [Release notes](https://github.com/rust-embedded/cortex-m/releases )
- [Changelog](https://github.com/rust-embedded/cortex-m/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-embedded/cortex-m/compare/v0.7.2...v0.7.3 )
---
updated-dependencies:
- dependency-name: cortex-m-rt
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-20 14:44:56 +00:00
Andrew Walbran
3b02b09901
Fix line numbers in debugging example.
2023-03-20 14:44:43 +00:00
Andrew Walbran
6dd2a9f002
Mention why we need extern crate panic_halt
.
2023-03-20 14:44:43 +00:00
dependabot[bot]
4f9b354019
Bump cortex-m-rt from 0.7.2 to 0.7.3 in /src/bare-metal/microcontrollers/examples ( #516 )
...
Bump cortex-m-rt in /src/bare-metal/microcontrollers/examples
Bumps [cortex-m-rt](https://github.com/rust-embedded/cortex-m ) from 0.7.2 to 0.7.3.
- [Release notes](https://github.com/rust-embedded/cortex-m/releases )
- [Changelog](https://github.com/rust-embedded/cortex-m/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-embedded/cortex-m/compare/v0.7.2...v0.7.3 )
---
updated-dependencies:
- dependency-name: cortex-m-rt
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-20 14:44:25 +00:00
Andrew Walbran
e31df488f3
Explain what the udev rule does.
2023-03-20 14:26:57 +00:00
Andrew Walbran
3afc10fbfd
cargo-embed needs libudev-dev.
2023-03-20 14:26:57 +00:00
Andrew Walbran
e2d7bc56ec
Add other files for compass exercise to exercise page.
2023-03-20 14:26:57 +00:00
Andrew Walbran
8513adfd3c
Add more hints for compass exercise.
2023-03-20 14:26:57 +00:00
Andrew Walbran
fe32d06862
Note where commands should be run.
2023-03-20 14:26:57 +00:00
Andrew Walbran
a070573867
Expand IMU acronym first time.
2023-03-20 14:26:57 +00:00
Andrew Walbran
52f0c9ef64
Rename Day 5A to Bare Metal Rust.
2023-03-20 14:26:57 +00:00
Andrew Walbran
ecbb7e41bb
Format imports with imports_granularity = "Module".
2023-03-20 14:26:57 +00:00
Andrew Walbran
94eafee6bb
Add more notes.
2023-03-20 14:26:57 +00:00
Andrew Walbran
f40261646c
Add option to display accelerometer rather than compass.
2023-03-20 14:26:57 +00:00
Andrew Walbran
8f2a851e95
Display accelerometer rather than compass.
2023-03-20 14:26:57 +00:00
Andrew Walbran
44a4b4b234
Display compass values on LEDs.
2023-03-20 14:26:57 +00:00
Andrew Walbran
82f4dab523
Get compass solution working and add more information.
2023-03-20 14:26:57 +00:00
Andrew Walbran
17bbf5f0b7
Explain how to run other examples too.
2023-03-20 14:26:57 +00:00
Andrew Walbran
53223d3581
Add page about debugging with cargo-embed.
2023-03-20 14:26:57 +00:00
Andrew Walbran
0c3664bef3
Add slide about probe-rs and cargo-embed.
2023-03-20 14:26:57 +00:00
Andrew Walbran
948c44b66d
Explain audience.
2023-03-20 14:26:57 +00:00
Andrew Walbran
b1fa8da341
Wrap comments in example at 80 columns to fit in code block.
2023-03-20 14:26:57 +00:00
Andrew Walbran
e751c30061
Add minimal microcontroller example.
2023-03-20 14:26:57 +00:00
Andrew Walbran
6490657dcf
Need to specify linker script for examples.
2023-03-20 14:26:57 +00:00
Andrew Walbran
2d64edf0d6
Explain a bit about example and how to run it.
2023-03-20 14:26:57 +00:00
Andrew Walbran
790597bae2
Mention that instructions are for Debian.
2023-03-20 14:26:57 +00:00
Andrew Walbran
271c4f36b1
Add udev rule for micro:bit.
2023-03-20 14:26:57 +00:00
Andrew Walbran
a5e784e010
Add more details about micro:bit.
2023-03-20 14:26:57 +00:00
Andrew Walbran
de1be63b82
Add more details about alloc.
2023-03-20 14:26:57 +00:00
Andrew Walbran
84cd822080
Speaker notes about TockOS and FreeRTOS.
2023-03-20 14:26:57 +00:00
Andrew Walbran
e123c08b00
Mention FreeRTOS bindings and Hubris.
2023-03-20 14:26:57 +00:00
Andrew Walbran
40d590b594
Use table layout for no_std page.
2023-03-20 14:26:57 +00:00
Andrew Walbran
005d6a5ed4
Mention micro:bit on welcome page.
2023-03-20 14:26:57 +00:00
Andrew Walbran
0fa73286b9
Add raw MMIO example.
2023-03-20 14:26:57 +00:00
Andrew Walbran
2545e40d21
Note use of embedded_hal trait.
2023-03-20 14:26:57 +00:00
Andrew Walbran
16b8efefa2
Add config for cargo-embed.
2023-03-20 14:26:57 +00:00
Andrew Walbran
2c8eb761c4
Use micro:bit v2 for PAC and HAL examples too.
2023-03-20 14:26:57 +00:00
Andrew Walbran
5ad0a593f8
Add board support crate example.
2023-03-20 14:26:57 +00:00
Andrew Walbran
b852b6195f
xgettext doesn't like formatting in SUMMARY.
2023-03-20 14:26:57 +00:00
Andrew Walbran
af0d97d1a7
Fix mdbook test.
2023-03-20 14:26:57 +00:00
Andrew Walbran
354834c711
Template, hint and extension for compass exercise.
2023-03-20 14:26:57 +00:00
Andrew Walbran
062129546a
Temperature logger is no more.
2023-03-20 14:26:57 +00:00
Andrew Walbran
95099e29a6
Mention tools to install.
2023-03-20 14:26:57 +00:00
Andrew Walbran
deff63f9a5
cargo-embed config
2023-03-20 14:26:57 +00:00
Andrew Walbran
78d1fc2836
Fill in solution for compass exercise.
2023-03-20 14:26:57 +00:00
Andrew Walbran
fb2a81186b
Initialise I2C bus.
2023-03-20 14:26:57 +00:00
Andrew Walbran
026cdca2b7
Use micro:bit v2 for temperature logger example.
2023-03-20 14:26:57 +00:00
Andrew Walbran
b8b387c504
Mention board support crates and other tools.
2023-03-20 14:26:57 +00:00
Andrew Walbran
b02af7be50
Keep alloc-example out of workspace.
2023-03-20 14:26:57 +00:00
Andrew Walbran
e21a83d5e8
Start or temperature logger exercise.
2023-03-20 14:26:57 +00:00
Andrew Walbran
5e0f4da4b3
Mention some other projects.
2023-03-20 14:26:57 +00:00
Andrew Walbran
baf81ee795
Note some supported devices.
2023-03-20 14:26:57 +00:00
Andrew Walbran
ac046661bf
Exclude imports and other boilerplate from page.
...
It was getting too long.
2023-03-20 14:26:57 +00:00
Andrew Walbran
100341aa9f
Add page about type-state pattern.
2023-03-20 14:26:57 +00:00
Andrew Walbran
65749777c9
Write about embedded-hal
2023-03-20 14:26:57 +00:00
Andrew Walbran
1d92abb1a7
Note lack of main function.
2023-03-20 14:26:57 +00:00
Andrew Walbran
120ef6331f
Write welcome page for bare-metal Rust.
2023-03-20 14:26:57 +00:00
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
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
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
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
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
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
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
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
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
Adam MacBeth
4690f19e8c
Fix typo in drop.md ( #457 )
2023-02-26 22:04:39 +00:00
Andrew Jones
db7a6044b4
Remove extraneous trailing parenthesis ( #453 )
...
The text currently looks like this:
> See the Rust Reference).
And should look like this:
> See the Rust Reference.
Closer #452
2023-02-24 16:27:24 +01:00
Charisee Chiw
60aa747aca
Add Speaker notes string.md ( #368 )
...
* Update string.md
* Update src/std/string.md
Co-authored-by: Martin Geisler <mgeisler@google.com>
* Update src/std/string.md
Co-authored-by: Martin Geisler <mgeisler@google.com>
* Update string.md
---------
Co-authored-by: Martin Geisler <mgeisler@google.com>
2023-02-22 18:01:07 +00:00
Alexey Sokolov
e616f66593
Clarify box ( #448 )
2023-02-22 16:08:50 +01:00
Charisee Chiw
bb3b17b6bd
Additional speaker notes for variant payloads ( #200 )
...
* Additional speaker notes for variant payloads
* Update variant-payloads.md
* Update variant-payloads.md
2023-02-22 15:00:45 +00:00
Charisee Chiw
3f6bd6aa14
Speaker Notes for Field Shorthand ( #198 )
...
* Speaker Notes for Field Shorthand
* Update field-shorthand.md
2023-02-22 14:55:29 +00:00
Charisee Chiw
8ee637d886
Lecture notes for Destructing Arrays ( #266 )
...
* Lecture notes for Destructing Arrays
* Update destructuring-arrays.md
2023-02-22 13:41:12 +01:00
Adam MacBeth
9bb586689a
Minor grammar fixes to type-inference.md ( #437 )
2023-02-19 09:27:56 +01:00
Adam MacBeth
e6d6ee28fe
Update move-semantics.md ( #438 )
2023-02-19 09:27:41 +01:00
Adam MacBeth
aef4c3ca72
Update example.md ( #441 )
2023-02-19 04:53:11 +00:00
Adam MacBeth
9510e80165
Update receiver.md ( #440 )
2023-02-19 04:52:41 +00:00
Jiyong Park
92d00f2fd4
Fix typo: patten -> pattern ( #430 )
2023-02-17 18:34:35 +09:00
Jiyong Park
eb57ba9e51
Publish Korean translation ( #428 )
...
* Publish Korean translation
* 한국어 -> 한국어 (Korean)
* Add translator names for the Korean translation
2023-02-17 17:58:33 +09:00
Andrew Jones
9a4cda6f35
Fix references within options returned from Args ( #427 )
...
This fixes #426
2023-02-16 21:54:18 +00:00
Martin Geisler
bc2dbd0fd3
Add a page which mentions the translations ( #424 )
...
This is to help people discover the language picker.
2023-02-16 13:21:45 +01:00
gendx
29b6b90bfc
Add example where breaking UTF-8 encoding leads to a crash. ( #387 )
2023-02-16 03:19:44 +00:00
Marko Zagar
fe21b773e7
Day2: Afternoon - speaker note details and minor cosmetic changes. ( #408 )
...
* A few speaker notes in Day2: Afternoon and minor cosmetic changes.
* Do not test filesystem example code block.
2023-02-16 03:19:25 +00:00
Martin Geisler
f16b41f012
Further simplify Box
diagrams ( #409 )
...
* Further simplify `Box` diagrams
I think we can improve the drawing by simplifying them and making them
more symbolic. Followup to #374 .
* Apply suggestions from code review
2023-02-15 18:10:50 +00:00
Jan Wilken Dörrie
8e4bf245d3
Add Too Many Lists book to other resources ( #410 )
...
As suggested by @mgeisler in https://news.ycombinator.com/item?id=34092980 . Wording taken from https://github.com/rust-unofficial/awesome-rust#resources .
2023-02-14 21:25:06 +00:00
Charisee Chiw
2436560e40
Let user know they can modify the tests, but do not need to. ( #401 )
2023-02-14 12:28:22 -08:00
Charisee Chiw
c06709838f
Update visibility.md ( #403 )
2023-02-14 12:24:32 -08:00
Charisee Chiw
cd79cc41a3
Remove code markers for compiler message ( #402 )
...
Follow up on comment in merged PR #360 , working on issue #274
2023-02-14 20:22:49 +00:00
gendx
8dd5a78626
Clarify the Box layout diagrams. ( #374 )
2023-02-14 20:03:46 +01:00
Matt Smith
916c297d8c
Remove explicit typing in Mutex example ( #405 )
...
Example contained unnecessary explicit type info for the vector in Mutex v. Rust will magically do the needful conversions for us. Code looks cleaner/simpler without the explicit typing.
2023-02-14 18:40:22 +01:00
Charisee Chiw
2b1dc9ec66
Fix typo in args().next() ( #400 )
...
* Fix typo in args().next()
Follow up on #367
* Update match-expressions.md
2023-02-13 21:56:38 +00:00
Charisee Chiw
faaf2eacdc
Speaker Notes for hashmap.md ( #295 )
...
* Update hashmap.md
* Update hashmap.md
* Update hashmap.md
* Update src/std/hashmap.md
Co-authored-by: gendx <gendx@users.noreply.github.com>
* Update hashmap.md
* Wording
---------
Co-authored-by: gendx <gendx@users.noreply.github.com>
Co-authored-by: Andrew Walbran <qwandor@google.com>
2023-02-13 20:42:35 +00:00
Charisee Chiw
6f878dcf8f
Speaker Notes for tuple-structs ( #197 )
...
* Speaker Notes for tuple-structs
* Update tuple-structs.md
2023-02-13 16:31:15 +01:00
gendx
957f2a70f0
Add speaker notes for visibility. ( #348 )
2023-02-13 08:25:57 +00:00
Matt Smith
9fe0b68a2d
Fix an English grammatical typo ( #386 )
2023-02-10 15:53:27 +01:00
gendx
710fd526b4
Clarification in Trait Objects. ( #379 )
2023-02-09 21:51:08 +00:00
gendx
91eec89c52
Clarify that trait bounds give access to methods and add example of impl Trait. ( #378 )
2023-02-09 21:50:34 +00:00
gendx
f912825411
Add documentation links to the important traits. ( #377 )
...
* Add documentation links to the important traits.
* Also add links in the sub-pages.
2023-02-09 21:47:47 +00:00
gendx
fbb12161eb
Mention rc::Weak and add an example with a cycle in the speaker notes. ( #375 )
2023-02-09 21:46:40 +00:00
gendx
f9f04651ce
Add more example methods to Vec and HashMap. ( #373 )
2023-02-09 21:45:43 +00:00
Charisee Chiw
3a734230c9
Update visibility.md ( #357 )
2023-02-09 21:19:56 +00:00
Charisee Chiw
cf931075d5
Update destructuring-arrays.md ( #369 )
...
* Update destructuring-arrays.md
* Update destructuring-arrays.md
2023-02-09 13:17:33 -08:00
Charisee Chiw
6a1282c166
Update for-expressions.md ( #359 )
...
* Update for-expressions.md
* Update for-expressions.md
* Update for-expressions.md
* Fix formatting.
---------
Co-authored-by: Andrew Walbran <qwandor@google.com>
2023-02-09 21:17:15 +00:00
Charisee Chiw
65340c4ca1
Update match-expressions.md ( #367 )
...
* Update match-expressions.md
* Apply suggestions from code review
Fine tuning the casing and explanations.
---------
Co-authored-by: Martin Geisler <mgeisler@google.com>
2023-02-09 13:16:30 -08:00
Marko Zagar
36ce63cb10
Updates and minor fixes to Day 2: Morning ( #372 )
2023-02-09 21:15:47 +00:00
Charisee Chiw
e3b4b6a5c7
Update box.md ( #363 )
2023-02-09 20:55:19 +00:00
Charisee Chiw
736de71c7c
Update loop-expressions.md ( #362 )
...
* Update loop-expressions.md
* Update loop-expressions.md
* Fix formatting.
---------
Co-authored-by: Andrew Walbran <qwandor@google.com>
2023-02-09 20:52:37 +00:00
Charisee Chiw
1587d796cb
Update modules.md ( #358 )
...
* Update modules.md
* Update modules.md
* Fix capitalisation and formatting.
---------
Co-authored-by: Andrew Walbran <qwandor@google.com>
2023-02-09 20:50:43 +00:00
Charisee Chiw
426d7d91c2
Update points-polygons.md ( #361 )
2023-02-09 20:49:35 +00:00
Charisee Chiw
aa316544c3
Update box-recursive.md ( #360 )
2023-02-09 20:49:00 +00:00
Martin Geisler
c4bc10e31d
Inline variables printed with println!
and friends ( #315 )
...
The course follows the style of inlining variable names where possible
in `println!` statements.
2023-02-09 07:48:18 +01:00
gendx
ce19841249
Add highly-unsafe speaker notes to inspect the memory layout of string. ( #341 )
2023-02-09 07:47:15 +01:00
Charisee Chiw
1835896e58
Speaker notes for destructuring-structs.md ( #265 )
...
* Update destructuring-structs.md
* Update destructuring-structs.md
2023-02-07 07:42:57 +00:00
Igor Petruk
ab831de1da
Suggesting to add Default
to important traits. ( #243 )
...
* Suggesting to add `Default` to important traits.
This is a great trait to know about, it is used very often.
* Change `Implemented` to tuple struct.
It saves vertical space.
2023-02-06 20:17:21 +01:00
karthicktamil
fd82a95e85
Update welcome-day-1.md ( #350 )
...
Co-authored-by: Martin Geisler <mgeisler@google.com>
2023-02-06 18:47:53 +00:00
gendx
0be6f639bd
Add a totally-unsafe example to show the discriminant optimization of Options. ( #345 )
2023-02-06 17:41:54 +01:00
gendx
c3e3dc6020
Add speaker notes for pattern-matching/destructuring-arrays.md ( #346 )
2023-02-06 17:38:01 +01:00
Becker A
6361b2ed63
Update welcome-day-1.md ( #349 )
...
fix grammar typo
2023-02-06 07:34:55 +00:00
gendx
2e076cabe7
Reference mdbook installation instructions from running-the-course.md. ( #329 )
2023-02-03 15:52:06 +00:00
gendx
cc4509f90c
Add historical reference to the Rust 1.0 release. ( #335 )
2023-02-03 15:51:41 +00:00
gendx
bd98d03b44
Remove dangling links in cargo/rust-ecosystem.md. ( #332 )
2023-02-03 15:50:15 +00:00
gendx
ace97aaeb2
Fix typo in basic-syntax/variables.md. ( #339 )
2023-02-03 15:30:44 +00:00
gendx
b5518e9b16
Add a solution for day 1's bonus question with generics. ( #338 )
2023-02-03 15:29:49 +00:00
gendx
1936cd5c85
Mention that the syntax is similar to Java as well. ( #337 )
2023-02-03 15:28:38 +00:00
gendx
22d2bd36e4
Add reference to rustfmt for Debian instructions. ( #331 )
2023-02-03 15:18:03 +00:00
Andrew Gaul
f33b1f923a
Use f-string in example for consistency ( #328 )
...
Also fix typo.
2023-02-03 13:07:29 +00:00
Andrew Walbran
1be641203e
Split out example to separate page. ( #319 )
...
The example is quite long and so the page didn't easily fit on the
same screen as the explanation
2023-02-03 10:12:31 +00:00
Andrew Walbran
20f02db5f5
Add a cargo workspace containing both crates ( #321 )
...
* Move Cargo.toml for exercises to exercises directory.
* Create a workspace with both exercises and i18n-helpers.
* Build in CI as well as testing.
* Binaries must have a main function.
* No need for workspaces configuration for caching anymore.
2023-02-02 16:14:34 +00:00
Martin Geisler
a07bfa108f
Wrap long line of code ( #312 )
...
This line was too big to show during class.
2023-02-01 12:34:10 +01:00
Martin Geisler
476ee283c6
Simplify Vec
slide ( #313 )
...
The code is probably meant to illustrate the `vec!` macro, but it
feels out of place when teaching: there is already enough material
here to get through.
2023-02-01 10:49:11 +01:00
Martin Geisler
d6182ea498
Fix missing word ( #311 )
2023-01-31 20:09:00 +00:00
Martin Geisler
c6a54ce9a9
Show the pair returned by duplicate
( #314 )
...
This makes it easier to talk about the code as you make changes to the
`duplicate` function.
2023-01-31 21:08:09 +01:00
Martin Geisler
dee5e654c8
Fix order of standard library slides ( #310 )
...
The slides now follow the order on the intro slide.
2023-01-31 15:04:17 -05:00
Frieder Bluemle
fd65ff0f0c
Fix JetBrains capitalization ( #305 )
...
* Fix JetBrains capitalization
* Revert change to da.po
---------
Co-authored-by: Martin Geisler <martin@geisler.net>
2023-01-31 19:45:54 +00:00
lodisy
330d21ef02
Update traits.md
2023-01-31 11:07:24 +00:00
Igor Petruk
100ee591ed
Update unsafe.md ( #252 )
...
* Update unsafe.md
Adding a paragraph explaining that unsafe code is not necessary broken or evil, but it is a mode
where compiler safety features are off.
* Move explanation to speaker notes
To avoid slide being too long. Also edited text slightly.
* Remove extra space
---------
Co-authored-by: Andrew Walbran <qwandor@google.com>
2023-01-30 13:12:51 +00:00
Charisee Chiw
601dc8258b
Speaker notes for vec.md ( #296 )
...
* Speaker notes for vec.md
* Fix grammar and formatting
* Fix formatting and spelling.
---------
Co-authored-by: Andrew Walbran <qwandor@google.com>
2023-01-30 11:56:30 +00:00
Charisee Chiw
49d24f89cf
Speaker notes for while-let-expressions.md ( #294 )
...
* Speaker notes for while-let-expressions.md
#274
* Update while-let-expressions.md
---------
Co-authored-by: Andrew Walbran <qwandor@google.com>
2023-01-30 11:47:56 +00:00
CodeMaster7000
31ae4ac56b
Rename LICENSE.txt to LICENSE ( #293 )
...
* Rename LICENSE.txt to LICENSE
* Update credits.md
2023-01-29 14:20:55 +01:00
focksor surooi
43c5344785
Fix typos ( #297 )
...
* fix typo in running-the-course.md
* Update modern.md
2023-01-29 11:54:51 +00:00
Mao Yufeng
49e06ffe03
Fix link to solution on Day 3 exercise ( #299 )
...
* fix day-3 solutions link
* Fix link description by making it singular
---------
Co-authored-by: Martin Geisler <martin@geisler.net>
2023-01-29 12:52:32 +01:00
Andrew Walbran
27b6165202
Implement Error.
2023-01-27 17:54:37 +00:00
Andrew Walbran
caaca140ca
Another note for anyhow.
2023-01-27 17:54:37 +00:00
Andrew Walbran
79f5f0dade
Add slide about Box<dyn Error> before introducing anyhow.
2023-01-27 17:54:37 +00:00
Andrew Walbran
e5c97e12cb
No need for thiserror as well as anyhow.
2023-01-27 17:54:37 +00:00
Andrew Walbran
9fa0e89e90
It makes no sense to use both return and ?.
2023-01-27 17:54:37 +00:00
Andrew Walbran
52d28b155b
Mention std::error::Error in speaker notes, and other useful traits.
2023-01-27 17:54:37 +00:00
Andrew Walbran
5dd87192e8
Mention that Send and Sync are unsafe traits.
2023-01-27 17:34:31 +00:00
Andrew Walbran
81cf02ffbe
Fix typos and details.
2023-01-27 17:34:31 +00:00
Andrew Walbran
cc402a7788
Add some speaker notes to concurrency chapter.
2023-01-27 17:34:31 +00:00
Andrew Walbran
c066ab5664
Mention other ABI options.
2023-01-27 17:17:37 +00:00
Andrew Walbran
95c0447e4b
Remove comment inside unsafe block.
...
Martin thinks the safety comment at the top is enough.
2023-01-27 17:17:37 +00:00
Andrew Walbran
facbac4601
Fix typo, and this is not specific to glibc.
2023-01-27 17:17:37 +00:00
Andrew Walbran
6e7916c29b
Add a slide about writing unsafe functions.
2023-01-27 17:17:37 +00:00
Andrew Walbran
3cadad4e0a
Add slide for unsafe traits.
2023-01-27 17:17:37 +00:00
Andrew Walbran
8c2b3781bb
Move extern functions slide under unsafe functions.
2023-01-27 17:17:37 +00:00
Andrew Walbran
7deb5532ea
Add speaker notes for extern functions.
2023-01-27 17:17:37 +00:00
Andrew Walbran
d07171e76d
Add safety comment.
2023-01-27 17:17:37 +00:00
Andrew Walbran
47e28e87c0
Add speaker notes for unions.
2023-01-27 17:17:37 +00:00
Andrew Walbran
d7fcf8216a
Mutable statics are generally a bad idea.
2023-01-27 17:17:37 +00:00
Andrew Walbran
9bed4fce3c
Add speaker notes and safety comment for raw pointers.
2023-01-27 17:17:37 +00:00
Andrew Walbran
062905e7d7
There's no name involved here.
2023-01-27 17:17:37 +00:00
Andrew Walbran
e0cb292624
Put unsafe slides in same order as they are introduced in unsafe.md.
2023-01-27 17:17:37 +00:00
Charisee Chiw
1453e1d5bb
Update blocks.md
2023-01-27 12:03:49 +00:00
Igor Petruk
585509bb0a
Update points-polygons.md ( #234 )
...
Adding speaker notes with key things that might be present in the solution.
2023-01-26 19:04:03 +01:00
Charisee Chiw
4588d95427
Update match-guards.md
2023-01-26 12:08:21 +00:00