As part of the collaboration between Canonical and the University of Bristol, the project will target AppArmor and snap-confine as industrial case studies. Both are critical to Ubuntu’s security posture, and provide a substantially harder test than isolated translation examples. They will help us evaluate whether the techniques can cope with the structure and constraints of mature production software.

Note that this is not a commitment to replace AppArmor or snap-confine with what is generated, rather that we have a vested interest in the software and are keen to see the results.

The most optimistic outcome would be a system capable of translating substantial C repositories into Rust with strong evidence of behavioural equivalence and relatively little manual intervention. The research could also produce better methods for decomposing repositories, stronger validation techniques, reusable translation datasets, improved program-repair tools and a more precise understanding of where automated migration stops being reliable.

  • hackerwacker@lemmy.ml
    link
    fedilink
    arrow-up
    39
    arrow-down
    7
    ·
    edit-2
    10 hours ago

    IMO this rust shit is just an attempt to convert a GPL licensed ecosystem into the Corpo-CHUD preferred MIT license.

    Just like with Clang, the Corpo is simply intolerably offended by being asked to contribute back to the community.

    • trevor (any/all) @lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      27
      ·
      edit-2
      8 hours ago

      Using Rust in no way requires the usage of pushover licenses. While it’s true that many devs are using pushover licenses, there are plenty of GPL Rust projects. You are just focusing on the sensationalized ones that get mentioned in news cycles.

          • trevor (any/all) @lemmy.blahaj.zone
            link
            fedilink
            English
            arrow-up
            5
            ·
            6 hours ago

            Which speaks to my other comment: nothing about Rust necessitates using corpo licenses. The reason so many things are being rewritten in Rust is that it’s a great language and it provides tangible benefits to users. The owning class doesn’t need a special language as a pretext to de-GPL an ecosystem. They could do it with C, OCAML, or any other lang.

            • SocialistVibes01@lemmy.mlOP
              link
              fedilink
              arrow-up
              4
              arrow-down
              2
              ·
              edit-2
              5 hours ago

              The language, as an inanimate object, doesn’t have an ideology, sure. However, people running the show in partnership with the ruling class have.

              IMO any speech about Rust rewritings must denounce how the language can be, and it is, being used to attack software freedom.

              • trevor (any/all) @lemmy.blahaj.zone
                link
                fedilink
                English
                arrow-up
                3
                ·
                edit-2
                6 hours ago

                IMO it isn’t in bad faith any speech making that apparent.

                I’m not sure I understand what you meant (there may be a typo in there).

                The language, as an inanimate object, doesn’t have an ideology, sure. However, people running the show in partnership with the ruling class have.

                This, I agree with. It is very concerning that Rust has so much corporate buy-in. And the structure of The Rust Foundation being operated more like a business than something like the Zig Software Foundation does worry me.

                But I often feel the need to chime-in and correct the common misconception that Rust rewrite == corpo-relicense. It’s false and I think the conspiratorial coupling of Rust to corporate embrace-extend-extinguish only serves to discourage people from writing better software.

                I would love to see a community fork of Rust and its ecosystem one day, but I don’t think we get there by discouraging people from writing or using Rust software.

                • trevor (any/all) @lemmy.blahaj.zone
                  link
                  fedilink
                  English
                  arrow-up
                  4
                  arrow-down
                  1
                  ·
                  edit-2
                  6 hours ago

                  This is a bit of a tangent, so I didn’t include it in the above comment, but I don’t think “open source” is sufficiently anti-capitalist, so the (A)GPL was never going to save us to begin with. “Open source”, as defined by the OSI (a.k.a. a handful of megacorps in a trench coat) and the FSF, prevent “discrimination of use”. So if you want your software to be “open source” or “free software”, you have to accept that your software can be used by for-profit entities to exploit your labor, and potentially to perform heinous acts, such as military or surveillance usage. What we currently call “copyleft” is actually just copylib 😭

                  No open source license, not even the (A)GPL, allows you to forbid this. Unfortunately, I don’t see an alternative framework being widely adopted anytime soon. It seems that the best you can do for now is use niche licenses like this and just accept that your software can’t be considered “open source” :/

  • Ephera@lemmy.ml
    link
    fedilink
    arrow-up
    41
    arrow-down
    3
    ·
    12 hours ago

    I always feel like the much bigger challenge is whether anyone can still maintain the codebase afterwards. You throw away so much institutional knowledge by doing a conversion like this…

    • Mjb@feddit.uk
      link
      fedilink
      English
      arrow-up
      21
      ·
      11 hours ago

      You don’t just convert and sleep though. You convert and prune. You slowly rework parts post-conversion to use more sensible approaches/libraries. It’s not a one-and-done operation, it’s an ongoing thing that they judge the cost of investing in now is less than the long term maintaining C Ubuntu.

      • Skullgrid@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        5 hours ago

        Well the issue is the chosen person is going to be automating the process, not doing it by hand, so there is no refactoring going on.

  • lil_tank [any, he/him]@hexbear.net
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    1
    ·
    7 hours ago

    I’m not qualified about low level coding but isn’t it… useless? From what I get, Rust proposes to make low-level coding easier by forcing programmers into a certain workflow. But functioning C code is as good as functioning Rust code right?

    • NonWonderDog [he/him]@hexbear.net
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      1 hour ago

      But functioning C code is as good as functioning Rust code right?

      Practically yes, but also no. The C pointer aliasing rules limit the optimizations the compiler can apply, since any int * might point to any int in scope. It’s even worse than that in the Linux kernel: since it has to be compiled with -fno-strict-aliasing, the compiler has to assume that any pointer can alias any variable in scope.

      Rust simply disallows mutable aliases full stop, and the compiler prevents them in safe code (you can write them in unsafe code but it’s instantly undefined behavior, which is why unsafe rust is harder to write than C). This can sometimes allow the compiler to optimize in ways that wouldn’t be possible in C.

      But in practice the impact of this is pretty close to nil as long as you write smallish functions.

    • provectus@lemmy.ml
      link
      fedilink
      English
      arrow-up
      7
      arrow-down
      2
      ·
      edit-2
      7 hours ago

      From what I get, Rust proposes to make low-level coding easier by forcing programmers into a certain workflow.

      Yes and no. It forces programmers to a certain workflow like using a borrow checker to manage memory, but it actually makes programmer’s lives easier, because it prevents bugs from runtime. The compiler will throw a fit, over your buggy code if you try to compile, unlike C.

      The funny part is that rust is actually a high level language that can do low level stuff.

      But functioning C code is as good as functioning Rust code right?

      Yes. I prefer C because it is easier to learn than rust, and feel like rust is more comparable to C++. I also feel like llm plus rust is a good combo, these days.

  • ZkhqrD5o@lemmy.world
    link
    fedilink
    arrow-up
    7
    arrow-down
    9
    ·
    11 hours ago

    I don’t get why the rust cult mist always convert something from C to rust. Why not just make new software in rust and leave the stuff that works alone?

    • antianarchist@sopuli.xyz
      link
      fedilink
      arrow-up
      7
      ·
      edit-2
      1 hour ago

      It isn’t always about “new”. For example, some GNU binaries are decades old and were changed only to fix bugs.

      C has major disadvantages compared to Rust, which is why even Linus Torvalds said a couple of years ago, to not write any new C code anymore for the Kernel and that old code will be transpiled steadily.

      It is not about a cult. It is not about being fancy. It is quite the opposite. Choosing Rust over C is very rational.

      Also, obligatory fuck Canonical. Automatic transpiling is such a stupid thing. Have fun maintaining the new code that was written by a machine, while not having any Rust experts in your team.

    • dwt@feddit.org
      link
      fedilink
      Deutsch
      arrow-up
      3
      arrow-down
      6
      ·
      11 hours ago

      Because of the users that don’t want to change how they work. But still would like not to be owned by the onslaught of LLM wielding hackers