3 ms·
Rust does it well with [no_std] but then seems to be dropping the ball with [restricted_std]. I recently set up an embedded-hal project for cortex-m and after
by therein 2y ago
Rust does it well with [no_std] but then seems to be dropping the ball with [restricted_std].
I recently set up an embedded-hal project for cortex-m and after some struggle, I was happy to get dynamic memory allocation and std working but the platform had a tier 2.5 support so I had to put [restricted_std] if I wanted to use it.
But that means none of your dependencies can use std unless they also declare [restricted_std]. So now I have the stdlib but none of my dependencies can use it.
- sureglymop 2y agoInteresting. I never went as far as trying to make dynamic memory allocation work. But I really did have a good experience with rust. So many helper crates to make things just work (hal, pac, cortex-m, embedded-graphics, etc). And not to forget things like heapless which work quite well. Now I never did embedded development in any other language but in rust it was definitely nice for a beginner with everything already there and easily installable.