4 ms·
As a newcomer to Rust (specifically Async/Threads) why are their multiple runtimes and thus different code for embedded async/threads between desktop and embedd
by mgoetzke 3y ago
As a newcomer to Rust (specifically Async/Threads) why are their multiple runtimes and thus different code for embedded async/threads between desktop and embedded ? I know it isn't in the standard library, so things just happened, but there is still no clear winner that does it all ?
How can we make code be portable (e.g node.js like) between embedded and other platforms if they differ so much?
- steveklabnik 3y agoThere is no one set of tradeoffs that you can perfectly make across situations. Each have different needs, and so have executors that provide for those different needs.
- arlort 3y ago> How can we make code be portable (e.g node.js like) between embedded and other platforms if they differ so much? By embedded here we are talking about running bare metal on single core microcontrollers with kilobytes of memory and megabytes of storage which are more interested in driving or reading gpio/adc pins than serving a rest api or rendering a webpage To answer your question, you can't because the difference in code comes from huge differences in the use case and requirements. And trying to force using the same runtime for anything from webservers with dozens of processors and hundreds of gigabytes of ram to the kind of device that barely draws any power at all is going to make no one happy I only have a passing knowledge of embedded programming but it already seems to me that being able to effectively use this kind of abstractions in this domain is already halfway through a miracle, and probably only possible because the rust team decided to decouple the async model from a specific runtime