So you think you know C?
medium.com
medium.com
I can't wait till rustc prodyces smaller executables so I can switch to it.
I use musl day-to-day to cross compile statically linked executables, which tend to be 1500kb or so. (Embedded systems with around 10mb of memory or less).
I used to bash glibc into compliance, and musl was like a gift from heaven.
Unfortunately rustc isn't there yet - though it is on the radar for the future.
[0]: https://blog.rust-lang.org/2016/05/13/rustup.html#example-bu...
[1]: https://lifthrasiir.github.io/rustlog/why-is-a-rust-executab...
Unfortunately I'd have to agree with this, C is just easier.
> We have knocked debug symbols down, now let’s get rid of the remaining libraries. Some bad news: From this point on you are entering the realm of nightly Rust. This realm is not as scary as you might think, as it doesn't break in your face, but it may break in smaller ways (which is why we have nightlies!). That’s the major reason that we don’t yet have nightly features in stable– they may change.
Relying on a nightly for production code is simply not something I would ever get approved.
I sort of hope that as Rust solves these issues, tools like rustup and Cargo will get to the state of Red and its cross-compilation state. (Compile for Linux-86, Linux-ARM, Windows, macOS, Android with one flag from the one compiler. Which is less than 1mb, statically linked.)
C leaves a lot undefined. These were tiny examples, and many were undefined for more than one reason. Experienced C programmers rely on undefined behavior all the time: http://www.metzdowd.com/pipermail/cryptography/2015-October/....
The author or Medium corrupted their line of C with pretty printing operations.