Will there be performance and security improvements?

  • apt_install_coffee@lemmy.ml
    link
    fedilink
    arrow-up
    19
    ·
    edit-2
    1 year ago

    Memory safety is likely to prevent a lot of bugs. Not necessarily in the kernel proper, I honestly don’t see it being used widely there for a while.

    In third party drivers is where I see the largest benefit; there are plenty of manufacturers who will build a shitty driver for their device, say that it targets Linux 4.19, and then never support/update it. I have seen quite a few third party drivers for my work and I am not impressed; security flaws, memory leaks, disabling of sensible warnings. Having future drivers written in rust would force these companies to build a working driver that didn’t require months of trawling through to fix issues.

    Now that I think about it, in 10 years I’ll probably be complaining about massive unsafe blocks everywhere…

    • ozymandias117@lemmy.world
      link
      fedilink
      English
      arrow-up
      6
      ·
      1 year ago

      Haha. At least you immediately caught exactly what they’ll end up doing if they bother to use Rust at all 😂

  • dinosaurdynasty@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    1 year ago

    Potentially stability improvements as well (for the same reasons as the security improvements), especially for lesser used drivers and stuff.

  • PuppyOSAndCoffee@lemmy.ml
    link
    fedilink
    arrow-up
    2
    arrow-down
    4
    ·
    1 year ago

    I would choose zig over rust; while zig isn’t as safe as rust (nor is that zig’s aim) zig also is also safer than C. Zig still has a bit to go.

    Also rust compile times … in the kernel … that might matter more?

      • PuppyOSAndCoffee@lemmy.ml
        link
        fedilink
        arrow-up
        2
        arrow-down
        1
        ·
        1 year ago

        multi-arch compile that is getting faster by the release, sweeter & safer than C — it isn’t unsafe, mind you — why wouldn’t you pick zig for systems development? And it’s compiled bins sizzle!

        Plus, there is no C interop; C just plugs in.

        The grammar is still in the oven, but once it bakes, I predict zig takes over C as a perf layer in script pkgs (python, node, etc).

        Compile times are crisp but some foundational elements (incremental compile etc) will help it positively fly. Already it’s smoking rust however we expect more.

        The grammar is why it is one to watch.

            • JulianRR@lemmy.world
              link
              fedilink
              arrow-up
              2
              ·
              1 year ago

              I think at some level you can’t really get both. The rust compiler is constantly being sped up, but the amount of checking it does simply takes time.

              It’s the age old adage “The fastest code is the one that doesn’t exist”. The fastest compilation checks are the ones you don’t do.

              • PuppyOSAndCoffee@lemmy.ml
                link
                fedilink
                arrow-up
                1
                ·
                1 year ago

                Situation is everything.

                speed matters when it comes to systems-level logic/code. Zig strikes that balance very nicely.

                Industry cares at the systems level. If a “safe” kernel is 4x slower (compilation, run-time) and there is an “unsafe” option that is just as secure, outside of a cadre of philosopher kings/queens (more power to 'em), practical teams will hit that unsafe performance boosting switch every time.

                C is as safe as the situation & the code dictates. Zig makes it easier to be safe in most situations and excels at promoting systems-level safety.

                App level, or app API? Where there is more of an x-factor? rust has a great use case. In “user-land”, availability matters almost as much as performance.. An app that always crashes is not as valuable as a slower app that never crashes…