Fish Shell Rewritten in Rust: Progress, Statistics, and Benefits
Fish Shell, the user-friendly command-line shell for Linux and macOS, is undergoing a major rewrite from C++ to Rust, achieving a near‑complete Rust codebase, extensive contributor activity, and performance improvements while addressing legacy toolchain challenges and enhancing modern functionality.
Fish Shell is a cross‑platform command‑line shell for Linux and macOS known for its ease of use, powerful features, and user‑friendly design, offering many capabilities out‑of‑the‑box without additional configuration.
In early 2023 the Fish Shell team announced a decision to rewrite the project in Rust, citing several motivations: the difficulty of maintaining C++/CMake toolchains, the declining pool of C++ contributors, Rust’s active community, its suitability for concurrent execution, and the desire to keep the shell modern and valuable.
The first Rust‑based beta of Fish 4.0 was recently released, containing 0% C++ and almost 100% pure Rust code.
1155 files changed with 110,247 additions and 88,941 deletions (excluding transpiled code).
Over 200 contributors submitted 2,604 commits.
498 issues were addressed.
The development spanned nearly two years.
Approximately 57,000 lines of C++ were rewritten into 75,000 lines of Rust (plus 400 lines of C).
The C++ codebase has been completely cleaned out.
The migration has already resolved long‑standing problems such as curses dependencies by switching to Rust crates that provide terminfo access, eliminating global state issues and simplifying builds for users.
However, some challenges remain, notably the lack of a mature installation solution comparable to CMake; Cargo excels at building but its installation model does not yet fit the project’s needs.
Overall, the rewrite progress is smooth, delivering a codebase the team loves, adding features previously difficult in C++, and paving the way for further development.
“The migration is not without bumps, but overall the progress is satisfactory.” “We now have a codebase we’re proud of, with new capabilities and many more in the pipeline.”
IT Services Circle
Delivering cutting-edge internet insights and practical learning resources. We're a passionate and principled IT media platform.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.