fish is a command line shell for Linux, macOS, its name is taken from “the friendly iinteractive shThe abbreviation of “ell”, the biggest feature is that it is easy to use, powerful, intelligent and user-friendly. Many functions that other shells need to configure are provided by fish by default and do not require any configuration.

The author of fish recently submitted a PR to rewrite the Fish Shell project in Rust.

He believes that Fish Shell’s development language should be transitioned from C++ to Rust, with the goal of completing it before the next major release, and the reasons for the rewrite include:

  • Nobody really likes C++ or CMake, and there’s no clear path out of the old toolchain. Every year the “development pain” gets worse.
  • C++ is becoming a “legacy language” and finding contributors in the future will be difficult, while Rust has an active and growing community.
  • Rust is the language you need to implement concurrent function execution.
  • Being written in Rust will help fish continue to be considered modern and valuable.

Therefore, the fish authors stated that this should be called a “port” rather than a “rewrite”, because they will not start from scratch; instead, they will gradually convert from C++ to Rust module by module within the span of a version. They’ll use FFI so that the Rust and C++ bits can talk to each other until C++ goes away and tests and CI continue to pass on every commit.

To demonstrate that the “Rust rewrite plan” works, in this PR the authors ported FLOG, topic monitors, wgetopt, builtin_wait, and a few other features to Rust. The Rust bits live inside C++ and are linked against the crate. Developers can build in the usual way:

  1. Install Rust 1.67 or later
  2. As usual with cmake, it can be done via corrosion to run

For a detailed description of rewriting Fish Shell in Rust, visit this document.

#Fish #Shell #plans #rewritten #Rust #News Fast Delivery

Leave a Comment

Your email address will not be published. Required fields are marked *