4 ms·
Rust is hard. But languages live and die by mindshare. Can D run on a 20k microcontroller?
by MrBuddyCasino 9y ago
Rust is hard. But languages live and die by mindshare. Can D run on a 20k microcontroller?
- pjmlp 9y agoMaybe, if stripping the runtime and making use of the betterC compiler mode. In any case, with only 20 KB available, the only sane option is Assembly, as every byte counts. Any kind of high level programming just means using a crippled language, trying to match Assembly, while wasting more space.
- MrBuddyCasino 9y agoWell, Rust can. I‘ve spent the last week to see if its true. But I wished it was easier.
- pjmlp 9y agoWith 20KB available it hardly is Rust anymore. Just like C and Pascal compilers, the result with hacks to make the generated code fit and beat manually written Assembly is not worth it. It would also be possible to do it with D, using betterC mode and no runtime, assuming a backed for then target architecture would be available.
- MrBuddyCasino 9y agoTo clarify, I was talking about RAM, not flash. Binary size is still a problem, thats true. And yes of course you need to go the no-std route, but it works.
- chuchana 9y agoWhat about Forth ?
- pjmlp 9y agoYeah, sweet memories of FORTH, but 20 KB is not something one wants to "waste" bytes and you would need a few of them for the dictionary and basic words.