• edinbruh@feddit.it
    link
    fedilink
    English
    arrow-up
    5
    ·
    edit-2
    8 hours ago

    Correction, uv isn’t in any way less an option. pypi is only the registry. If you are using pip you will end up in dependency hell, you might use something like poetry to avoid that, but uv is just better.

    But… wait a minute… uv is inspired by cargo, and it’s also written in rust. That’s quite the coincidence, huh?

    Also, cargo is fast, it’s rustc that’s slow, and that’s because rustc is doing advanced code analysis. Compiling rust is actually NP-hard, but in exchange for that, the compiler will catch bugs in place of the developer. Which is a good tradeoff considering that you only compile once and run many times.

    “countless projects that use it that way” isn’t proof of anything. Countless projects tell you to curl a 2000 lines script into sudo bash that will fill your os with bullshit.

    • nesc@lemmy.cafe
      link
      fedilink
      English
      arrow-up
      1
      arrow-down
      1
      ·
      edit-2
      4 hours ago

      Pip is a sane default that works for absolute majority of cases, anyway correct tool for installing programs from pypi is pipx that eliminates ‘dependency hell’, but ofc new cool tool is the only way to do things.

      When little program in rust that replaced previous one compiles two hours compared to previous that compiled in a few minutes it matters.

      • rtxn@lemmy.worldM
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        4 hours ago

        None of the issues you’ve described are Cargo’s fault. The long compilation time is simply rustc’s compile-time checks (ensuring type and memory safety is much more involved than lexing in GCC), and the number of dependencies to compile is a result of the crate ecosystem. Cargo is just the front-end that automates fetching dependencies and compilation with rustc. Blaming it for slow compilation is like hitting your monitor when the computer is acting up.

        • nesc@lemmy.cafe
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          4 hours ago

          I’m not blaming cargo specifically for building it is slow to download deps as well, which was clearly stated in my first post. I’m going to edit it now.