Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"cargo build && done" only works if every crate author has taken my OS into consideration and not used OS specific API or file locations.

And it is more like "cargo build && off to lunch".

I am usually on Windows, and most commercial vendors nicely sell us their already compiled binaries. No need to hunt for anything.

Regarding Linux distros, if it isn't on the official repositories, Conan provides exactly the same experience as cargo, only faster because it supports binary libraries.



>Regarding Linux distros, if it isn't on the official repositories, Conan provides exactly the same experience as cargo, only faster because it supports binary libraries.

Don't use the operating system binaries unless you are packaging your application for use by that same repo. Instead, use Conan or you will find yourself in dependency hell trying to get users running it on Fedora, Ubuntu 12.04, 14.04, 16.04, 18.04, 20.04, Debian, etc where they all use different versions of the dependencies you want.

The official repositories are for the sysadmin and for other packages in the official repositories.


> But unlike C++, dependency management isn't hell

There is nothing hell into C++ if you are using the right tools: meaning proper package manager, meaning Nix/Guix, Conan or Spack.

It is currently much more hell to integrate Rust+Cargo behind other build system ( behind pip/gem/npm for instance ) than it is with C++.


I think you wanted to reply to the upper comment. :)


And how many C/C++ projects use Conan by default, versus those who don't?

For comparison all rust projects uses cargo.

The ergonomic value of that is something you simply can not overstate.


For many users of AOT compiled languages, the ergonomic factor is being able to enjoy fast builds, without getting a compiler rig.

Turbo Pascal 7, which was already relatively complex, was already compiling several thousand lines per minute on a single core 4Mhz computer bounded to 640KB.

More modern examples with complexer type systems, are languages like Delphi, FreePascal, Ada/SPARK, D, F# via .NET AOT, OCaml.

So yeah cargo is nice, but not if I have to build everything from scratch, Rust isn't a scripting language.


>So yeah cargo is nice, but not if I have to build everything from scratch, Rust isn't a scripting language.

FWIW, Rust builds faster than node applications as my laptop can only handle so many iops.

And Rust compiles are in line with Ocaml (probably faster by now due to the optimization work over the past year)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: