Closed
Description
The book currently says:
When You Might Want to Use the Core Library (no_std)
- Small memory footprint: If your embedded system has limited resources and needs to have a small memory footprint, you will likely want to use bare-metal because std features add a significant amount of final binary size and compilation time.
- Direct hardware control: If your embedded system requires more direct control over the hardware, such as low-level device drivers or access to specialized hardware features you will likely want to use bare-metal because std adds abstractions that can make it harder to interact directly with the hardware.
- Real-time constraints or time-critical applications: If your embedded system requires real-time performance or low-latency response times because std can introduce unpredictable delays and overhead that can affect real-time performance.
- Custom requirements: bare-metal allows more customization and fine-grained control over the behavior of an application, which can be useful in specialized or non-standard environments.
Are these really true?
- As I understand it, esp32-rs uses
build-std
which (when using LTO) should allow unused code to be eliminated (tbf I haven't tested this). - Low level device drivers can surely work fine with
std
- any abstractions it adds (I guess you're thinking stuff like filesystem access?) are surely optional? - I guess this is talking about multithreading? But is there really any overhead if you never spawn more than one thread?
- Seems pretty nebulous?
I'm sure there are reasons to use no_std
but these descriptions didn't really convince me. More specifics would be great here!
It would also be great if there was a section on which parts of std
are implemented. Seems like threads are? Presumably std::fs
isn't, etc.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done