Login
You're viewing the functional.cafe public feed.
  • Nov 18, 2026, 6:47 PM

    @mort To play the devil's advocate, it didn't go that well for rust coreutils rewrite (I think it happened before the slop) and it was full of bugs and TOCTOU vulns.

    AFAIR that was mostly because the way to operate on files that prevents TOCTOU is through file descriptors/handles and rust fs APIs are structured mostly around paths.

    There was also something about not supporting paths that were not valid Unicode, because String type must be valid unicode

    Maybe this changed, I don't know.

    💬 2🔄 0⭐ 0

Replies

  • Nov 18, 2026, 6:50 PM

    @mort I don't want to sound defeatist (although maybe I am a bit on this topic) and think that the entire "rewrite in another language” is simply not enough to be the solution.

    💬 0🔄 0⭐ 0
  • Nov 18, 2026, 7:55 PM

    @mlen I am in favor of a Ruat coreutils rewrite, but I don't think Canonical's approach to it made sense.

    uutils was literally some person's side project that they used to learn Rust. That's not the right starting point for such a rewrite.

    I think Canonical (or anyone else) should've started a new open source project, where they started out by writing a safe Rust interface to POSIX APIs which makes TOCTOU etc easy to avoid, *and then* you can write a new coreutils on top of the new abstraction

    💬 1🔄 0⭐ 1
  • Nov 18, 2026, 7:56 PM

    @mlen Still, the problems with the coreutils rewrite are particular to that specific project. Rewriting memory-unsafe software in Rust can be a good idea in general even if a specific effort to do so makes mistakes

    💬 1🔄 0⭐ 0
  • Nov 18, 2026, 8:05 PM

    @mort I agree with both of your points. I was trying to make a point that just rewriting is not enough to make it good. Even in the days before the slop one could hear the claims that rust rewrites are better because they are in rust.

    💬 0🔄 0⭐ 1