Re:Embassy: Modern embedded framework, using Rust and async
by alfiedotwtf on Saturday January 10, 2026 @08:29AM
(#46565578)
> I wouldn't be surprised if a C-based threading framework has similar or even better stack usage.
“… better stack usage, if you can keep it”
— Benjamin Franklin
Googling I see people attempting to use -fstack-usage and -fcallgraph-info for FreeRTOS, but in an ad hoc manner. It seems there's nothing available that handles things end-to-end, such as generating C source type info to reflect back the computed size of a call graph based on the entry function.
In principle Rust might have a much tighter bound for maximum stack usage, but in an embedded context, especially embedded C, you don't normally stack-allocate large buffers or objects, so the variance between minimum and maximum stack usage of functions should be small. And given Rust's preference for stack allocation, I wouldn't be surprised if a C-based threading framework has similar or even better stack usage.