News for hackers. Stuff that matters.
Re:Cargo-style dependency management for C, C++ and other la... by bschwindHN on Wednesday October 21, 2020 @04:18AM (#24845793)
One of the great things about Rust is you can write platform-specific code for each platform and then package it all up into one interface so anyone can trivially use it. They get the simplicity of one interface and the performance of platform-specific code.

Though I haven't used it personally, it seems like the trust-dns project is one such example:

https://github.com/bluejekyll/trust-dns

Re:Cargo-style dependency management for C, C++ and other la... by platinumrad on Wednesday October 21, 2020 @05:56AM (#24846248)
You can do that in literally any language.
Re:Cargo-style dependency management for C, C++ and other la... by bschwindHN on Wednesday October 21, 2020 @06:06AM (#24846286)
Yep, but Rust makes it very easy to package and distribute libraries with Cargo, while maintaining performance on the level of C.

I was mostly replying to this:

> However, one of the reasons people use C and C++ is because of platform specific development. It turns out the platforms themselves are written in C.

Re:Cargo-style dependency management for C, C++ and other la... by pjmlp on Thursday October 22, 2020 @12:46AM (#24854979)
Most languages that offer AOT toolchains can do the same.
Re:Cargo-style dependency management for C, C++ and other la... by thechao on Wednesday October 21, 2020 @10:11AM (#24848044)
I think I know what you're trying to say: Cargo's existence means that each of the platform-specific variations can be packaged up into a single library, and that library becomes the de facto standard.

It's a higher bar than "just about any language supports abstraction". It fits more into a Pythonic world-view where there's a one-size-fits-all standard library mentality.