5 ms·
OMG, here comes a bunch of bloat into the kernel. I like rust (well, the idea and principle) but when you are doing low level stuff, something as trivial as a s
by spaintech 4y ago
OMG, here comes a bunch of bloat into the kernel. I like rust (well, the idea and principle) but when you are doing low level stuff, something as trivial as a structure to bind an address then manipulate those bits by writing to them (enabling and disabling features) it becomes a no go. If you even consider how exhaustive it is to manage OBMR at this level of code, it becomes counter productive, not to mention unreadable. Now for the bloat part, take a simple code (one of their examples) which is a showcase of their capabilities and “zero cost” abstraction for something like embedded, their blinky app is like 100KB versus a initialize the clock/ set GPIO to read mode, and write to it that come out shy of 4K in C++ with all the hall form STM for example. Object lifetime analysis is really cool at compile time, but any un defines behavior is still present when you compile the code… Show me someone doing a baremetal implementation of blinky (that is, no HAL) on rust or a struct for bit banging and I’ll be a believer that you can do “some” of the stuff needed for kernel development but not all.
- PoignardAzur 4y ago"Please show me some amazing features of your language but I'll still believe your language sucks". That's, uh, not a very compelling request.
- varajelle 4y ago> their blinky app is like 100KB I just compiled the blinky example for a cortex m4 board (the example in the rust hal crate for that board, not using any unsafe), and the striped binary is 420 bytes. So you probably want to review your stence, because you're about 3 orders of magnitude off.
- spaintech 4y agoYes its 420 bytes, which is why I’m commenting as my fingers played me on my thoughts. Do the same for one writer in C++ and report back on the orders of magnitudes… Cheers!
- AnyTimeTraveler 4y agoI am currently working with the ATTiny85 and the stripped blinky binary is 275 bytes. I was worried that the ATTiny85 wouldn't have enough flash space (6K) for Rust and now I don't know what to do with all that free space :)
- ralls_ebfe 4y agoYou can use rust on an attiny85? What a time to be alive. I wonder where mine are.