diff --git a/src/bare-metal/alloc.md b/src/bare-metal/alloc.md index 989bfb65..e600b799 100644 --- a/src/bare-metal/alloc.md +++ b/src/bare-metal/alloc.md @@ -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. diff --git a/src/bare-metal/useful-crates/aarch64-paging.md b/src/bare-metal/useful-crates/aarch64-paging.md index 3e393dc8..1d809786 100644 --- a/src/bare-metal/useful-crates/aarch64-paging.md +++ b/src/bare-metal/useful-crates/aarch64-paging.md @@ -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. diff --git a/src/bare-metal/useful-crates/buddy_system_allocator.md b/src/bare-metal/useful-crates/buddy_system_allocator.md index 194b1860..61efb6a3 100644 --- a/src/bare-metal/useful-crates/buddy_system_allocator.md +++ b/src/bare-metal/useful-crates/buddy_system_allocator.md @@ -12,6 +12,8 @@ we might want to allocate MMIO space for PCI BARs:
* 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.)
diff --git a/src/bare-metal/useful-crates/spin.md b/src/bare-metal/useful-crates/spin.md index 3d2a9976..77ded7db 100644 --- a/src/bare-metal/useful-crates/spin.md +++ b/src/bare-metal/useful-crates/spin.md @@ -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. diff --git a/src/bare-metal/useful-crates/tinyvec.md b/src/bare-metal/useful-crates/tinyvec.md index 651446d3..5522fd6f 100644 --- a/src/bare-metal/useful-crates/tinyvec.md +++ b/src/bare-metal/useful-crates/tinyvec.md @@ -21,6 +21,7 @@ fn main() {
* `tinyvec` requires that the element type implement `Default` for initialisation. +* The Rust Playground includes `tinyvec`, so this example will run fine inline.
diff --git a/src/bare-metal/useful-crates/zerocopy.md b/src/bare-metal/useful-crates/zerocopy.md index 81b3b936..fe3df8a7 100644 --- a/src/bare-metal/useful-crates/zerocopy.md +++ b/src/bare-metal/useful-crates/zerocopy.md @@ -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.)