Live data from Hacker News

What it means that Ubuntu is using Rust

smallcultfollowing.com

71–80 of 312 posts

Re: What it means that Ubuntu is using Rust

#71

One particular chasm to keep an eye on, possibly even more relevant than Ubuntu using Rust: When it comes to building important stuff, Ubuntu sticks to curl|YOLO|bash instead of trusting trust in their own distributions. https://github.com/canonical/firefox-snap/blob/90fa83e60ffef...

[flagged]

“Done software”?

Re: What it means that Ubuntu is using Rust

#72
post #37

Here's the chasm I want to see Rust cross: Dynamic linking with a safe ABI, where if you change and recompile one library then the outcome has to obey some definition of safety, and ABI stability is about as good as C or Objective-C or Swift. Until that happens, it'll be hard to adopt Rust in a lot of C/C++ strongholds where C's ABI and dynamic linking are the thing that enables the software to get huge.

C++ ABI stability is the main reason improvements to the language get rejected. You cannot change anything that would affect the class layout of something in the STL. For templated functions where the implementation is in the header, ODR means you can't add optimizations later on. Maybe this was OK in the 90s when companies deleted the source code and laid off the programmers once the software was done, but it's not…

The big question is does Rust want to play being adopted by those vendors, or it would leave them alone with languages that embrace native libraries.

Re: What it means that Ubuntu is using Rust

#73
post #63

Earlier quoted context omitted.

Here's the problem. If you told me that you rebuilt the Linux userland with Rust but you used C ABI at all of the boundaries, then I would be pretty convinced that you did not create a meaningful improvement to security because of how many dynamic linking boundaries there are. So many of the libraries involved are small, and big or small they expose ABIs that involve pointers to buffers and manual memory management.…

How could a safe dynamic linking API ever work? I think you're moving the goalposts significantly here.

I don’t think GP is moving the goalposts at all, rather I think a lot of people are willfully misrepresenting GP’s point.

Rust-to-rust code should be able to be dynamically linked with an ABI that has better safety guarantees than the C ABI. That’s the point. You can’t even express an Option via the C ABI, let alone the myriad of other things rust has that are put together to make it a safe language.

You can look to Swift for prior art on how this can be done: https://faultlore.com/blah/swift-abi/

It would be very hard to accomplish. Apple was extremely motivated to make Swift have a resilient/stable ABI, because they wanted to author system frameworks in swift and have third parties use them in swift code (including globally updating said frameworks without any apps needing to recompile.) They wanted these frameworks to feel like idiomatic swift code too, not just be a bunch of pointers and manual allocation. There’s a good argument that (1) Rust doesn’t consider this an important enough feature and (2) they don’t have enough resources to accomplish it even if they did. But if you could wave a magic wand and make it “done”, it would be huge for rust adoption.

Re: What it means that Ubuntu is using Rust

#74

Earlier quoted context omitted.

C++ is still changing quite a lot though, just not in ways that fix the existing issues (often because doing so would break ABI stability).

That is a reason why a lot of folks stick with C. In some sense, the chasm I'm describing hasn't been crossed by C++ yet

Except as you well know, C might not change as fast, but it does change, including the OS ABI.

Those folks think it doesn't.

Re: What it means that Ubuntu is using Rust

#75
post #6

Earlier quoted context omitted.

There are big pushes in pretty much every direction. The projects that really stand out to me are pyo3 (Replace c++ python modules with rust), Dioxus (react-like web framework), The ferrocine qualified compiler (automotive) I think right now the ecosystem is pretty ripe and with DARPA TRACTOR there are only more and more reasons every day to put rust on your toolbelt. I am secretly hoping that eventually we break fre…

Are mid level and junior developers being hired anywhere for any reason right now? I don't mean specifically rust developers. I mean software developers.

Sure. There was an article a week or two ago about IBM aggressively hiring juniors. Of course the fact that is noteworthy probably means something in itself....

Re: What it means that Ubuntu is using Rust

#76

One particular chasm to keep an eye on, possibly even more relevant than Ubuntu using Rust: When it comes to building important stuff, Ubuntu sticks to curl|YOLO|bash instead of trusting trust in their own distributions. https://github.com/canonical/firefox-snap/blob/90fa83e60ffef...

[flagged]

should we trust someone whos HN account is just as shiny?

Re: What it means that Ubuntu is using Rust

#77

Earlier quoted context omitted.

Rust has editions for strong stability guarantees, and has had them for nearly a decade i believe. Besides, tech backing has grown way past the risky point.

FWIW, the GP comment's claim that you're lucky if you can compile 2-year-old code is exaggerated, but so is yours. Rust does not offer "strong stability guarantees". Adding a new method to a standard type or trait can break method inference, and the Rust standard library does that all the time. In C or C++, this isn't supposed to happen: a conformant implementation claiming to support e.g. C++17 would use ifdefs to g…

> and the Rust standard library does that all the time.

I don't doubt this is true, but do you have an example? I think I haven't run into a build breaking like this in std in like maybe seven/eight years. In my experience breaking changes/experimental apis are typically ensconced in features or gated by editions.

Granted, it'd be nice to be able to enforce abi stability at the crate level, but managing that is its own can of worms.

I did find that the breakage rfc allows for breaking inference, which tbh seems quite reasonable... inference is opt-in.

Re: What it means that Ubuntu is using Rust

#78

Earlier quoted context omitted.

Don't hate me for this, but... is 20 years of Rust really new? https://en.wikipedia.org/wiki/Rust_(programming_language) I do get what you mean, but Rust has been baking for a decade, finally took off after 10 years of baking, and now that is been repeatedly tried and tested it is eating the world, as some developers suggested it could eventually do so. I however do think this shows a different problem: If nobody wri…

But the 90s was only 20-years ago! lol, you got me. Stupid old brain not calculating time correctly.

I was born in 1990 so I get it! I still say 21 when people ask me how old I am... Aka how old do I need to say I am to be able to drink alcohol LOL I don't drink that often mind you. I just don't really think about my age a whole lot...

Re: What it means that Ubuntu is using Rust

#79

Earlier quoted context omitted.

[flagged]

> Rust does not even have a specification Neither do most programming languages. > You are lucky if current version, compiles two years old code! That's not true.

> Neither do most programming languages.

My favorite nemesis and friend JavaScript does, which always gives me a laugh. Such a mess of a wonderful language.

Re: What it means that Ubuntu is using Rust

#80

Earlier quoted context omitted.

FWIW, the GP comment's claim that you're lucky if you can compile 2-year-old code is exaggerated, but so is yours. Rust does not offer "strong stability guarantees". Adding a new method to a standard type or trait can break method inference, and the Rust standard library does that all the time. In C or C++, this isn't supposed to happen: a conformant implementation claiming to support e.g. C++17 would use ifdefs to g…

Adding a new method can change the behavior of C++ code as well due to templates. Does the standard library never add new methods because of that?

> Adding a new method can change the behavior of C++ code as well due to templates.

Yes, but the code can be gated off with ifdefs to only be present when compiling for a particular version of the standard.

Post reply on HN