:3

  • 0 Posts
  • 26 Comments
Joined 1 year ago
cake
Cake day: December 31st, 2023

help-circle

  • Specifically in the Linux kernel, the 2 big reasons to use it are memory safety (huuuuggee benefit) and that a lot of younger devs like it and thus it will attract their contributions.

    The only reasons I can think of to not use it are that some people want their own toolchain and having multiple languages in the kernel adds complication. But tbh, none of that justifies banning Rust stuff that realistically wouldn’t have been written at all if C were the only option.

    And then there’s the people who show up in Phoronix, HN, Reddit, and YouTube comments saying Rust is over-hyped without showing why it’s unfit for purpose and also trying to dictate what someone does with their own project. Perhaps it’s something to do with the representation of queer people and other minorities in the Rust community, because otherwise I do not understand why people would be sooo passionate in hating the Rust community like the group I described above is.



















  • If it was on something like BTRFS it’d probably be fine, though I imagine there’s still a small window where the FS could flush while the file is being written. renameat2 has the EXCHANGE flag to atomically switch 2 files, so if arch maintainers want to fix it they could do

    1. Write to temporary file
    2. Fsync temporary file
    3. Renameat2 EXCHANGE temporary and target
    4. Fsync directory (optional, since a background flush would still be atomic, just might take some time)