1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-03-23 07:06:19 +02:00

Add notes about running examples.

This commit is contained in:
Andrew Walbran 2023-04-05 14:15:37 +01:00
parent 49bf110b31
commit 5068b1288d
6 changed files with 8 additions and 0 deletions

View File

@ -17,5 +17,6 @@ To use `alloc` you must implement a
allocator defined in your binary. Usually this is done in the top-level binary crate.
* `extern crate panic_halt as _` is necessary to ensure that the `panic_halt` crate is linked in so
we get its panic handler.
* This example will build but not run, as it doesn't have an entry point.
</details>

View File

@ -28,6 +28,7 @@ idmap.activate();
* For now it only supports EL1, but support for other exception levels should be straightforward to
add.
* This is used in Android for the [Protected VM Firmware][2].
* There's no easy way to run this example, as it needs to run on real hardware or under QEMU.
</details>

View File

@ -12,6 +12,8 @@ we might want to allocate MMIO space for PCI BARs:
<details>
* PCI BARs always have alignment equal to their size.
* Run the example with `cargo run` under `src/bare-metal/useful-crates/allocator-example/`. (It won't
run in the Playground because of the crate dependency.)
</details>

View File

@ -25,6 +25,7 @@ fn main() {
from `std::sync`; and `Lazy` for lazy initialisation.
* The [`once_cell`][2] crate also has some useful types for late initialisation with a slightly
different approach to `spin::once::Once`.
* The Rust Playground includes `spin`, so this example will run fine inline.
</details>

View File

@ -21,6 +21,7 @@ fn main() {
<details>
* `tinyvec` requires that the element type implement `Default` for initialisation.
* The Rust Playground includes `tinyvec`, so this example will run fine inline.
</details>

View File

@ -17,6 +17,8 @@ working with structures shared with hardware e.g. by DMA, or sent over some exte
* Attempting to derive `FromBytes` for these types would fail, because `RequestType` doesn't use all
possible u32 values as discriminants, so not all byte patterns are valid.
* `zerocopy::byteorder` has types for byte-order aware numeric primitives.
* Run the example with `cargo run` under `src/bare-metal/useful-crates/zerocopy-example/`. (It won't
run in the Playground because of the crate dependency.)
</details>