3 ms·
Out in embedded land, where you will have C, assembler and a tiny library if you are lucky, the luxuries of Rust just aren't widely available yet. Its also a v
by smackeyacky 5y ago
Out in embedded land, where you will have C, assembler and a tiny library if you are lucky, the luxuries of Rust just aren't widely available yet. Its also a very valuable language to learn since the big 3 operating systems are made out of it. You can't wish that away.
- glowmeg 5y agoOut of curiosity, what kind of embedded device has only C and asm support? Usually, the compiler used for these is gcc which, for a really long time is written in C++. It shouldn't be hard to use even go on embedded now. Also Rust gets rustc_codegen_gcc[1], so you will be able to use it everywhere. [1] https://github.com/rust-lang/rust/tree/master/compiler/rustc_codegen_gcc https://github.com/rust-lang/rust/tree/master/compiler/rustc...
- pjc50 5y agoPIC16?
- smackeyacky 5y agoSometimes the compiler is gcc, but the libraries are...some weird hybrid. Texas Instruments RTOS used their own compiler and a strange mashup of C/C++ (xdctools they call it). I don't understand it, it kind of looks like if somebody had been described the original cfront over the telephone. The latest versions are undoing some of that and they even have the option of using a clang compiler, but on their older chips you are stuck with the original weirdness, which basically means you are restricted to C and assembly in a practical sense.
- avgcorrection 5y agoYou’re implementing hash tables on your 0.05$, 44.5 byte RAM, uphill-both-ways embedded devices?
- smackeyacky 5y agoOh hell no. There are some useful uses of hashing in them though, such as verifying the contents of flash memory before loading it. I was recommended Murmer[0] and use it as a kind of "is what is contained in the flash memory consistent with what was written" check for an app that has to keep some state between reboots. You could use it in an embedded device for a hash table but it's probably faster to make a b-tree or just brute force an array. [0] https://en.wikipedia.org/wiki/MurmurHash https://en.wikipedia.org/wiki/MurmurHash