This is correct and fine?
It’s also a c wrapper
So? It’s
logname, what do you expect, for them to read the bits directly from memory? If you’re going to criticise this for anything, it should be that it doesn’t support Windows, not that it calls out tolibc.yeah, all of this to call libc::getlogin().
I no longer use any wrappers or utils, they’re just bloat. Now I just use my dousing rod to read and set bits in my RAM, way more efficient
I mean, have you ever looked at any low level code from any language that came out in the last 30 years? Its always C.
Sure, but they don’t usually have the audacity to market themselves as a viable alternative and cannibalize its system interfaces (or, in this case, claim to)
Good engeneering solutions are better than steering clear of hypocrisy. The rust zealots will happily tell you that this is just an implementation detail, YOU should write rust, because you will have no bugs, they instead need to ship, so concessions need to be made.
I’m not that well versed in rust, is this literally just wrapping the C library in rust, and calling it a rust implementation of it?
Yes. Unsafely.




