News for hackers. Stuff that matters.
Re:Porting Rust's Std to Rustix by samhw on Tuesday January 04, 2022 @07:43AM (#29794106)
Is there a reason "native" and "should" are in scare quotes? I think "should" is pretty well defined - after all, we've got an RFC for it!

Edit: I'm not altogether sure why this is being downvoted, but in case it wasn't clear: this is a sincere question and not some kind of pedantic rhetorical question. (I don't really mind whether people upvote or downvote the comment, except to the extent that it's a signal that I perhaps wasn't clear in what I was asking.)

Re:Porting Rust's Std to Rustix by CodesInChaos on Tuesday January 04, 2022 @09:44AM (#29795258)
There isn't anything objectively wrong with using libc as an abstraction on Windows, especially since Win10 ships the "Universal C Runtime" out of the box (earlier you had to deploy a separate crt for each Visual Studio version).

Personally I'm also in favour of cutting out libc and invoking the windows API directly. But others might argue that using it as a shared abstraction that's very similar on Windows, Linux, OSX, BSD, is worth it.

And "native" is ill defined. It's just one more abstraction layer in the libc -> Win32-API -> NT-API -> Kernel chain. Libc isn't comparable to a java runtime or electron, which is what people usually mean when they talk about applications not being "native".

Re:Porting Rust's Std to Rustix by pjmlp on Tuesday January 04, 2022 @10:25AM (#29795720)
Kind of, it is still a language runtime specially on non-UNIX OSes.

The recent thread about cutting down the startup of C applications on Linux proves the point it isn't a zero cost library.

Re:Porting Rust's Std to Rustix by codeflo on Tuesday January 04, 2022 @08:53AM (#29794702)
I didn’t downvote, in fact, I’m a bit amused because the reason I used quotes is exactly because I’m not using any official definition! There’s no consensus definition of “native”, and I’m using “should” purely in the colloquial sense of “something I’d like to see”.