News for hackers. Stuff that matters.
Re:Next steps for Rust in the kernel by ok123456 on Wednesday September 21, 2022 @11:31AM (#32926555)
I'm not sure how useful that would be since people pin specific version of libraries with Rust. They don't care about ABI stability so even if you could just update links to a library, the interface would be horribly broken.

Part of the discipline of writing C++ and C libraries is writing around a stable interface, that you can link against. In C++ that means using the pImpl pattern.

Re:Next steps for Rust in the kernel by gspr on Wednesday September 21, 2022 @12:13PM (#32927310)
> They don't care about ABI stability so even if you could just update links to a library, the interface would be horribly broken.

Which is, of course, the actual gripe we're discussing. The lack of dynamic linking is just a consequence.

Re:Next steps for Rust in the kernel by ok123456 on Wednesday September 21, 2022 @02:50PM (#32929626)
If there's an exploit/problem in, say, a crypto library, Rust's ecosystem seems less resilient. Instead of just updating the library system wide, you have to get everyone to rebuild their applications with a safe version of the library (if it's even possible).

This has happened and will absolutely happen again. Just being "memory safe" will not prevent protocol errors, bad IVs, preventing timing attacks, or the other subtle things involved when doing cryptography on the wider internet.

Re:Next steps for Rust in the kernel by brundolf on Wednesday September 21, 2022 @05:19PM (#32931658)
On the other hand- crates.io + the toolchain make it way easier for fixes to propagate outward into the ecosystem, and then for new builds to be created with them (even for multiple platforms at once)

There's a huge list of tradeoffs between dynamic and static linking, and Rust is betting that in today's world, with modern tooling, internet availability, hardware speeds, and memory size, the benefits of static linking outweigh the costs. I guess time will tell

But- traditionally Linux has really leaned into the opposite approach, so it'll be interesting to see how that dissonance plays out, and whether one or both is forced to compromise, as Rust gets more embedded in the Linux ecosystem

Re:Next steps for Rust in the kernel by gspr on Thursday September 22, 2022 @07:15AM (#32937332)
> On the other hand- crates.io + the toolchain make it way easier for fixes to propagate outward into the ecosystem, and then for new builds to be created with them (even for multiple platforms at once)

As a Rust fan who subscribes to the classical Linux distro model (and even exclusively gets his Rust crates from there), I disagree. What you suggest comes with a cost, namely having to accept software in constant flux. To me, that cost in unacceptably big.

I write a bit more about this gripe here: https://news.ycombinator.com/item?id=32925491

Re:Next steps for Rust in the kernel by gspr on Thursday September 22, 2022 @07:01AM (#32937227)
I wholeheartedly agree. It's the one worry I have with a language that I otherwise love.

(Of course the problem is technically hard, or possibly unsolvable, so I don't blame the Rust folks for its existence.)