Re:Rust After the Honeymoon
by saurik on Monday October 12, 2020 @03:31AM
(#24752214)
If you are using no_std isn't that the same as just not having a C standard library? I have been programming in C/C++ for over 25 years in ridiculously restricted contexts--even using it to compile tiny trampolines and the such--and I have no clue what you might mean that Rust could possibly have a smaller runtime library than C's "literally it comes with and uses nothing as the C standard library is nothing more than an optional library that most embedded people don't use".
[ Parent
| on HN ]
> If you are using no_std isn't that the same as just not having a C standard library
No. no_std means that all standard library functions that involve allocation aren't available. Things like std::collections::{Vec, HashMap} etc. You have access to std::core (https://doc.rust-lang.org/core/index.html), which is pretty useful.
Re:Rust After the Honeymoon
by chrismorgan on Monday October 12, 2020 @05:47AM
(#24752845)
Technical correction: core is a crate, not a module in the std crate. Your paths will be core::, not std::core::.
The context was with respect to memory overhead, so can you explain this difference with respect to that axis, showing that C with no standard library somehow has higher memory overhead than Rust with no_std? With respect to the actual conversational context, I stand by my comparison.