News for hackers. Stuff that matters.
Re:rustup in official apt repositories: starting from Debian... by rcxdude on Thursday March 21, 2024 @05:48AM (#39776568)
I don't think rust is 'fanatic' about it, there's no cultural or organisational push of 'thou shalt static link'. It's simply not a big priority to stabilise an ABI, in large part because it's quite hard to do right, especially with the other things rust does prioritise. And the rest of the world doesn't seem to think it's a huge deal either. Distro maintainers are more or less the only people I've seen who really care about it.
Re:rustup in official apt repositories: starting from Debian... by zozbot234 on Thursday March 21, 2024 @09:40AM (#39778395)
This, pretty much. You can code a shared object/dynamically linked library in Rust, and it will work as a drop-in replacement for one that's coded in C. Rust also has extensive support for interfacing with C shared objects.
Re:rustup in official apt repositories: starting from Debian... by rstuart4133 on Friday March 22, 2024 @12:06AM (#39787379)
> I don't think rust is 'fanatic' about it, there's no cultural or organisational push of 'thou shalt static link'.

Rust users have a "fanatic" ideology about static linking is a stretch. But rust is indeed now firmly wedded to recompiling everything. This is true despite the fact that ever growing compile times are a major complaint about the language.

What Rust users are fanatic about is monomorphisation. That boils down to the compiler implementing generic types using C++ style templates instead of C++ style vtables. Monomorphisation means the compiler produces a custom version of most libraries for your application or more precisely, the types your application uses. It probably contributes it's speed. But since they are customised to your application there is no point sharing them, so shared libraries are kinda pointless.

Like C++ Rust supports both the vtable a template style, but assumption the compiler knows the Size of every object is baked in pretty deep. Parameters have the Sized constraint by default for example, and a standard trick to get around the borrow checker is to copy everything, which you can only do if you know its size. I don't see it changing now - the language will life or die by the choice.