Most active commenters

    ←back to thread

    Introducing tmux-rs

    (richardscollin.github.io)
    857 points Jtsummers | 13 comments | | HN request time: 1.245s | source | bottom
    1. echelon ◴[] No.44456424[source]
    I wonder if the tmux maintainers would be interested in switching to this?

    Transitioning more software from C to Rust is a great idea.

    replies(5): >>44456588 #>>44456671 #>>44456845 #>>44457370 #>>44457456 #
    2. joshka ◴[] No.44456588[source]
    Taking a look at the source earlier, I'd guess probably not.

    If you're going to move a project to rust, you'd want to actually make it look like rust. Currently it looks like C written in rust. That doesn't make anyone happy really.

    (Obv. not a slight on the maintainer here, it's a personal project with a specific approach)

    3. uecker ◴[] No.44456671[source]
    It is a horrible idea.
    4. zppln ◴[] No.44456845[source]
    Seems like a bit entitled to expect being able to go around rewriting stuff and then have the old maintainers maintain it.
    replies(1): >>44458815 #
    5. yjftsjthsd-h ◴[] No.44457370[source]
    My understanding is that tmux is primarily an OpenBSD project, and rust isn't a good fit for them (for reasons that summarize to portability problems), so it is extremely unlikely. Also, this is a hobby project that currently is all unsafe, so there's not even any particular point. (EDIT: Of course, as it gets rewritten the latter point is likely to diminish)
    replies(1): >>44459316 #
    6. aniforprez ◴[] No.44458069[source]
    Seems like you didn't read the article at all. The author talks about writing it themselves after finding the automatically generated code not up to snuff.
    replies(1): >>44458511 #
    7. johnisgood ◴[] No.44458511{3}[source]
    I did, but I am not having high hopes. Have you read the conclusion?
    replies(4): >>44459463 #>>44463121 #>>44463139 #>>44464358 #
    8. echelon ◴[] No.44458815[source]
    > to expect

    I wonder, I don't expect.

    This would require first for the Rust implementation to grow beyond a POC with code translation. In its current state I doubt it could entice any of the original authors or maintainers. But if it became capable and hardened and picked up velocity, then it would pose some major questions for having two similar pieces of software.

    9. zozbot234 ◴[] No.44459316[source]
    > rust isn't a good fit for them (for reasons that summarize to portability problems)

    These problems are largely solved now that there's a working transpiler from Rust to C - https://github.com/FractalFir/rustc_codegen_clr

    replies(1): >>44459780 #
    10. yjftsjthsd-h ◴[] No.44459780{3}[source]
    > This project is still early in its developement. Bugs, crashes and miscompilations are expected. DO NOT USE IT FOR ANYTHING SERIOUS.

    > rustc_codegen_clr is only tested on Linux x86_64, with the CoreCLR runtime (more commonly known as simply the .NET runtime), on .NET 8. It should work on other platforms, but it is not guaranteed.

    I guess it could eventually be an option, but today it looks more like a neat tech demo.

    11. ◴[] No.44463121{4}[source]
    12. ◴[] No.44463139{4}[source]
    13. johnisgood ◴[] No.44464350[source]
    Even if it is not c2rust, it is worth checking out the source code, available here: https://github.com/richardscollin/tmux-rs/tree/main/src.