Lobsters.

We’ve been searching for a memory-safe programming language to replace C++ in Ladybird for a while now. We previously explored Swift, but the C++ interop never quite got there, and platform support outside the Apple ecosystem was limited. Rust is a different story. The ecosystem is far more mature for systems programming, and many of our contributors already know the language. Going forward, we are rewriting parts of Ladybird in Rust.

  • fuzzywombat@lemmy.world
    link
    fedilink
    English
    arrow-up
    8
    arrow-down
    1
    ·
    9 hours ago

    I’ve suddenly lost all interest in this browser’s development. From what I’ve heard, LLMs are pretty bad at generating Rust code for some reason. If they used LLM to bulk convert C++ code to Rust, the quality of the code is questionable at best.

    • greyfrog@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      1
      ·
      6 hours ago

      Surely you read the article?

      "The requirement from the start was byte-for-byte identical output from both pipelines. "

      The bytecode from C++ is identical to the Rust output.

      • WhyJiffie@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        3 hours ago

        I don’t think it’s possible to write rust code that compiles to the exact same binary as c++. compilers make different optimizations, and make overall a different structure, especially across languages.

        I think they meant the rust library produces the same output from the same input as the c++ library.

        if llms indeed generate worse rust code than for other languages, that’s not that big of a problem because the compiler will catch a lot of mistakes. if it compiles, it will run, and no memory safety bugs unless unsafe is also used. the llm could pick the wrong functions for some uses, but that should be caught relatively easily with testing, which can be automated partly

        edit: I was wrong, they indeed say that. this is weird.