• 30p87@feddit.de
    link
    fedilink
    arrow-up
    14
    arrow-down
    5
    ·
    11 months ago

    I find it especially weird that it’s almost always labeled like something special if it’s written in Rust, even though as the end user the only thing I know will be different is the compile time, as it usually takes around 10-20 times longer than if it would be written in c, with 500 dependencies being pulled and recompiled every time. Which means if tests fail, even though the app works fine, and I had that happen twice in Rust, it will take three tries or so until I manage to fully remove the test section from the pkgbuild, resulting in an hour loss for just installing something that could’ve taken 5 minutes.

    • simple@lemm.ee
      link
      fedilink
      arrow-up
      26
      arrow-down
      2
      ·
      11 months ago

      > Decide to create a very basic GUI app in Rust, as everyone is saying it’s a great language for it

      > First compilation takes over 15 minutes to download and compile 100 libraries

      > Debug files take up 2GB of storage

      > Output binary file comes out massive for no reason

      > “Yeah you’re supposed to write a few lines to optimize for size in your release profile”

      > Compiling now takes 30 minutes instead

      • 30p87@feddit.de
        link
        fedilink
        arrow-up
        17
        arrow-down
        2
        ·
        11 months ago

        Reimplements in C

        Compiles in 5 Minutes (you accidentally did it on the RPi Zero W, on a PC it’s done in 30 secs)

        • beeb@lemm.ee
          link
          fedilink
          arrow-up
          38
          arrow-down
          1
          ·
          11 months ago

          Reimplements in C

          Segmentation fault (core dumped)

          • snowfalldreamland@lemmy.ml
            link
            fedilink
            arrow-up
            25
            arrow-down
            1
            ·
            11 months ago

            Reimplements in C

            Segmentation fault (core dumped)

            change code so it no longer segfaults

            still is UB, has arbitrary code execution vulnerability

            everybody dies

      • CannotSleep420@lemmygrad.ml
        link
        fedilink
        English
        arrow-up
        3
        ·
        11 months ago

        I write rust on a meh computer alot and have never had compile times be that bad (at least not for debug). The target dir is massive though.

    • Ephera@lemmy.ml
      link
      fedilink
      arrow-up
      11
      arrow-down
      2
      ·
      11 months ago

      You seem to be a rather specific user, if the compile time is something you notice, let alone the only thing…

      • 30p87@feddit.de
        link
        fedilink
        arrow-up
        3
        ·
        11 months ago

        It’s just weirdly noticeable when one rust program with ~150 lines of code, designed to connect to a specific device and send commands according to the intensity of music, takes longer to compile than updating a typical Arch testing setup after a month without maintenance, including the (non Rust) AUR packages.

        • Ephera@lemmy.ml
          link
          fedilink
          arrow-up
          9
          arrow-down
          1
          ·
          11 months ago

          Well, I’m not here to claim that Rust’s compile times aren’t comparatively long, especially for non-incremental builds. It’s a trade-off that was chosen to not need a runtime environment, nor be as simplistic/footgun as C.

          What I’m saying is that this trade-off was chosen and continues to be popular, because the vast majority of users will never notice (nor will programmers really, as they have incremental builds).
          Maybe you can download the fully built package from somewhere? Maybe Arch can package it in the proper repos?

    • rushaction@programming.dev
      link
      fedilink
      arrow-up
      3
      arrow-down
      6
      ·
      11 months ago

      Every time I see a project decide to use rust I groan knowing my build/packaging time is about to skyrocket. Case in point, the Python cryptography project.

      And given cryptography’s importance in the Python ecosystem what used to be an easy pip install of a package now almost always going to include is an enormous and horribly slow rust build environment.

      Seeing a rust libraryjust makes me sad now 😭

      • dsemy@lemm.ee
        link
        fedilink
        English
        arrow-up
        1
        ·
        11 months ago

        I seem to recall when the switch was made it took me about a week to figure out how get it to work on OpenBSD, because the Rust build step failed there (for a reason I can’t remember now).

        • rushaction@programming.dev
          link
          fedilink
          arrow-up
          1
          ·
          11 months ago

          Yeeap. My FreeBSD box has such pain with 'em. Because unfortunately *bsd is not in Python’s precompiled wheels. So one is almost building from the source.

          Now every time I pip install something there’s a high likelihood I’m going to end up having to install the rust tool chain and burn so much time on building libraries. I get why the project made the switch, but man does it hurt being downstream of it.