5 ms·
> The problem is multi copies of the same dependencies everywhere most binaries would be statically linked and compiled, so there wouldn't be copies, but you d
by bluejekyll 9y ago
> The problem is multi copies of the same dependencies everywhere
most binaries would be statically linked and compiled, so there wouldn't be copies, but you do have a valid point of an issue with needing to upgrade an tool that was build with a static dependency that has an issue.
If I understand you, you're saying Rust, a general purpose language, with it's own build tool should do what exactly? I see that you believe it's doing it wrong, but every package manager for every OS out there does things differently, Rust can not fix this.
> That's a recipe for dll hell if I've ever heard one.
The package managers can be configured to work with Rust, and likewise Cargo can be configured to work with the various package managers, but it takes work.
I think what you want is every crate on crates.io to be packaged as an installable rlib and dylib for every package manager out there, with the cargo manifest used to generate the various package managers dependency graphs as necessary. This would probably look a lot like, or actually be an integration with, FPM.
- flukus 9y ago> but every package manager for every OS out there does things differently, Rust can not fix this. Exactly, it can't fix it but it tries to cover over this fact by bundling dependencies with every app. > I think what you want is every crate on crates.io to be packaged as an installable rlib and dylib for every package manager out there Basically, but more to the point, when a bug or security issue is fixed I don't want to rely on individual programs updating their dependencies. Let's say 10 years from now the rust version of gstreamer is widely used and a security issue is discovered, I want to be able to "apt-get upgrade" and know that it's patched. This is how things work now with the c version, but this can't be done with cargo, every app using the library has to update it's dependencies and many (particularly any corporate ones) will never update. Rust might be a boon for security but cargo could undermine the effort. Aside from that, static linking creates a tonne of bloat, memory and disk. There is a reason windows apps are often so bloated compared to their linux counterparts. > The package managers can be configured to work with Rust, and likewise Cargo can be configured to work with the various package managers, but it takes work. I don't think that's good enough, if rust wants to be a systems language then it has to work with the system, not be a layer on top of it like java/.net/node. It can do this technically, but culturally it's looking more like node and less like c.
- kbenson 9y agoWhile I understand your point, there is a difference between something installed through cargo for use in building software (in the manner rust does, where it's generally statically compiled), and something installed through the package manager for use in running the system. If I'm installed zlib for general system use, I want a package manager. If I'm installing a Rust compression library to be compiled into the program I'm working on, I want that to be managed by my build chain (especially since the version I'm using in my build may not necessarily match what I have installed on my system to run). As another example, if someone makes a cook general purpose library using Rust, eventually it should be packaged up and shipped in the normal distro package format by the distro if it's useful. I wouldn't expect cargo to be the normal way to distribute software. It's the Rust equivalent of the old tar -zxvf package-1.2.3.tar.gz && cd package-1.2.3 && ./configure && make && make install. You can do it, but if you have a distro package, use that first.
- steveklabnik 9y ago> I wouldn't expect cargo to be the normal way to distribute software To be clear, neither does the Rust team. You're exactly on point here.
- flukus 9y ago> Next, I'll introduce you to a tool called Cargo, which will help you write real-world Rust programs. From the getting started chapter of the rust book (which I believe you wrote?). That implies that rust can't be used without cargo right there. And I'm not seeing any libraries published as ubuntu packages. After this conversation I thought I should expriment more with rust and it's linking options and quickly ran into an error of some sort (quite possibly a system one) trying to buils hello world with dynamic linking: http://stackoverflow.com/questions/44012802/rustc-and-prefer-dynamic-not-compliling-helloworld http://stackoverflow.com/questions/44012802/rustc-and-prefer...
- steveklabnik 9y ago