11 ms·
Not sure the author is posting here, but I'm curious about people's experiences with Rust in these non-stdlib scenarios. In my Rust I rely so heavily on the st
by bluejekyll 9y ago
Not sure the author is posting here, but I'm curious about people's experiences with Rust in these non-stdlib scenarios.
In my Rust I rely so heavily on the stdlib, and other crates, that it's hard for me to imagine working in an environment where I would not have access to that.
- eloisius 9y agoIn my experience, lots of what you rely on in the stdlib is available in the core crate, which has no dependencies on the OS. You aren't stuck with an entirely naked language.
- wyldfire 9y agoIt's analogous to when you're using C to write a bootloader or OS or something. Yes, it's restricting, but that's typically the nature of those environments. The cool thing about Rust is that at least you have powerful abstractions you can use. But the cool thing is that you can conveniently compose other no_std crates into your stuff. No more futzing about with m4 or global namespace collisions or did-they-leverage-some-weird-dependency-that-I-can't-build-here.
- johncolanduoni 9y agoWith the nightly compiler, you can get most of the non-OS dependent parts of the stdlib via the core, alloc, and collections crates. As others have mentioned, a lot of the more basic stdlib functionality is a re-export of core.
- stestagg 9y agoHi! It generally didnt matter too much to me, there were a couple of times where I missed a container that could help, but for such a constrained environment it wasn't too much of a burden.