I decided to adventure myself in Tauri development for a personal project, I read the entire Rust official book and followed the exercises. When I first started developing it was like if nothing I learned helped for real life projects.

Now after getting betting up every single time I touch my project, it seems I’m catching things slowly.

But I’ve never seen such a hard modern language, I used C and C++ before and it’s incomparable.

  • JohnHammerSky@lemmy.todayOP
    link
    fedilink
    arrow-up
    4
    ·
    9 days ago

    No I’m not professional, maybe I’m mistaken. I just know C++ and made a few simple things, and then I tried to do a few simple things in Rust but it’s almost killing me. I’m asking myself if it’s worth it.

    • Mikina@programming.dev
      link
      fedilink
      arrow-up
      9
      ·
      9 days ago

      I think that is kind of the main point of Rust, though.

      It’s pretty easy to make something in C++. But it will very probably have a lot of hidden issues with memory, undefined behaviors and the like. Rust doesn’t let you make those mistakes that much, and forces you to do it correctly and securely the first time, which is why it is harder to get into.

      They are mostly harmless and may never cause problems for you, but that’s how you get critical RCEs that are 8 years old in a software that’s now widely used.

      If you don’t need this kind “ease traded for security”, in my personal opinion I’d go with Zig instead.

    • one_old_coder@piefed.social
      link
      fedilink
      English
      arrow-up
      2
      ·
      9 days ago

      It’s worth it because it’s not C++. If I could, I would get a job writing Rust. Or Zig as that other guy said. My shitty opinion:

      • Zig <-> C
      • Rust <-> C++
    • kewjo@lemmy.world
      link
      fedilink
      arrow-up
      1
      arrow-down
      1
      ·
      9 days ago

      if it’s a hobby project you might check out zig, it has a lot of safety like rust but much simpler. just be aware major changes can happen as it’s not a 1.0.0 release yet but from my experience their change guide is really thoughtful and lists any breaking changes and how to upgrade.