• TechNom (nobody)@programming.dev
    link
    fedilink
    English
    arrow-up
    10
    ·
    10 months ago

    Choosing Rust instead of C or C++ for new projects is a rather light decision. But introducing it into or outright replacing legacy codebase with it is a rather phenomenal undertaking. Fish shell was completely rewritten. Linux is introducing it in no trivial way. I wonder if the woes with C/C++ is that bad.

    • snaggen@programming.dev
      link
      fedilink
      arrow-up
      6
      ·
      10 months ago

      Librsvg did the rewrite incrementally, so you can choose to only use rust for new code in an existing codebase.

    • LeFantome@programming.dev
      link
      fedilink
      arrow-up
      5
      ·
      10 months ago

      Other than having to know Rust, adding Rust to a C code base is not difficult. They play well together.

      There is no need to rewrite old code but, once Rust is there, you are free to.

      Linux is a bit of a special case as you cannot just blindly use the Rust standard library.

      Having to have a Rust tool chain to build with may or may not be an issue.

      For some use cases, like BSD or the Linux kernel, platform support is also a consideration.

    • raldone01@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      10 months ago

      For me the biggest issue is all the undefined behaviour and unsafe memory.

      Taking a look at libraries everyone uses where there are unsafe memory issues for years until someone finds them shows this quite nicely.