#fishshell rewrite-it-in #rust progress, 2024-01-15
87029 rust lines added
76776 / 76776 C++ lines removed
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100%
--
So, we're done? Well, yes and no.
#fishshell rewrite-it-in #rust progress, 2024-01-15
87029 rust lines added
76776 / 76776 C++ lines removed
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100%
--
So, we're done? Well, yes and no.
Yes, in the sense that almost all the C++ has been rewritten in Rust (at a raw line count about 10% more, which is not a particularly insightful number). The fish_test_helper standalone binary remains in C++, because it's basically entirely libc calls, uses no other fish code and never gets run by end users.
No, in the sense that none of this code is shipped to users. We've still got work to do to get this into a tarball that someone can (say) `brew install` - at this stage I think it looks like CMake will be hanging around, much simplified, to handle some of the configure/install targets, while cargo is used for the actual build.
Even if it we could shipped to today, there's not really any point. Performance is a bit better in some areas, a bit worse in others, but most importantly the technical rationale for the whole rewrite (see thread safety in https://github.com/fish-shell/fish-shell/blob/27c8845075078041a3376b33bea5898f2369ebe3/doc_internal/fish-riir-plan.md) has not been achieved yet. And there are significant downsides for platform support, at least in the short term: it looks like Cygwin (and I think MSys2) is not going to be supported for a while, and building our own packages on old versions of Linux distributions is a headache.
However, some of the social goals have definitely been achieved. Large parts of the rewrite came from contributors who had never worked on fish before. There's been a lot of buzz in various online fora. Vibes are just as important to free/open source software as proprietary software and although there were solid technical reasons for the port, the PR outcomes are added benefits.
Finally, this is definitely not proof that you should rewrite your software in Rust. It's a data point at best, and maybe check back when the answer to "are we done" is "yes for sure". Joel Spolsky's classic article is worth a read, if you haven't, and many of his points remain accurate. We fixed some bugs as part of the port! We also definitely introduced some more, not all of which have been found.
https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/
#fishshell rewrite-it-in #rust progress, 2025-02-27
76776 / 76776 C++ lines removed
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100%
--
We pushed out a beta a couple of months ago, but we finally sorted the full release!
https://github.com/fish-shell/fish-shell/releases/tag/4.0.0
It should be in your favourite package manager reasonably soon.