mirror of
https://github.com/nkbai/book.git
synced 2026-09-04 21:52:46 +08:00
Update comments on heap availability on no_std.
As per https://github.com/rust-embedded/book/issues/33.
This commit is contained in:
@@ -44,13 +44,20 @@ bootstrapping (stage 0) code like bootloaders, firmware or kernels.
|
||||
|
||||
| feature | no\_std | std |
|
||||
|-----------------------------------------------------------|--------|-----|
|
||||
| heap (dynamic memory) | ✘ | ✓ |
|
||||
| heap (dynamic memory) | * | ✓ |
|
||||
| collections (Vec, HashMap, etc) | ** | ✓ |
|
||||
| stack overflow protection | ✘ | ✓ |
|
||||
| runs init code before main | ✘ | ✓ |
|
||||
| libstd available | ✘ | ✓ |
|
||||
| libcore available | ✓ | ✓ |
|
||||
| writing firmware, kernel, or bootloader code | ✓ | ✘ |
|
||||
|
||||
\* Only if you use the `alloc` crate and use a suitable allocator like [alloc-cortex-m].
|
||||
|
||||
\** Only if you use the `collections` crate and configure a global default allocator.
|
||||
|
||||
[alloc-cortex-m]: https://github.com/rust-embedded/alloc-cortex-m
|
||||
|
||||
## See Also
|
||||
* [FAQ](https://www.rust-lang.org/en-US/faq.html#does-rust-work-without-the-standard-library)
|
||||
* [RFC-1184](https://github.com/rust-lang/rfcs/blob/master/text/1184-stabilize-no_std.md)
|
||||
|
||||
Reference in New Issue
Block a user