Fish 4.0: The Fish Of Theseus

https://fishshell.com/blog/rustport/index.html

Fish 4.0: The Fish Of Theseus

This article details the journey and motivations behind porting the Fish shell from C++ to Rust for its 4.0 release. It highlights the challenges faced with C++ regarding tooling, ergonomics, safety, and community engagement, contrasting them with Rust's advantages in these areas, including better tooling, ergonomics, and fearless concurrency. The port, a "Fish Of Theseus" approach, involved migrating components incrementally while maintaining a working shell. The article covers the timeline, difficulties encountered with inter-language bindings, and the gripes with Rust concerning portability and localization. Ultimately, the project was a success, leading to a more maintainable codebase, new features like self-installable packages, improved performance, and a more enjoyable development experience for the team, despite some drawbacks like retaining CMake and losing Cygwin support.

Note

i've read a number of "we used AI to port X and from Y", so this was a refreshing reminder of what can easily be lost if you are not too careful.

this was an extremely thoughtful port. they not only migrated the userbase, but carried along their developers and their community together.

even losing cygwin users was a careful and deliberate choice made with appropriate gravity.

i remain a very happy fish user.

Published

2024

Summary

This article details the journey and motivations behind porting the Fish shell from C++ to Rust for its 4.0 release. It highlights the challenges faced with C++ regarding tooling, ergonomics, safety, and community engagement, contrasting them with Rust's advantages in these areas, including better tooling, ergonomics, and fearless concurrency. The port, a "Fish Of Theseus" approach, involved migrating components incrementally while maintaining a working shell. The article covers the timeline, difficulties encountered with inter-language bindings, and the gripes with Rust concerning portability and localization. Ultimately, the project was a success, leading to a more maintainable codebase, new features like self-installable packages, improved performance, and a more enjoyable development experience for the team, despite some drawbacks like retaining CMake and losing Cygwin support.