Update on the rust port #10123
Replies: 5 comments 24 replies
-
But but but turbofish! |
Beta Was this translation helpful? Give feedback.
-
Another thing: We plan on not doing any partial-rust release. That means we would be doing e.g. fish 4.0 as fully rust and zero C++, and I think, contrary to what we usually do that warrants a beta. (Ordinarily we've stopped doing betas and release candidates because they simply don't get any testing). We also still want to do a 3.7.0 in-between release that is still purely C++, so we have a better jumping off point for platforms that can't handle the rust version. It would be 3.6.1 with some neat changes backported. |
Beta Was this translation helpful? Give feedback.
-
You have done a really hard work to port the code from C++ to Rust. As a user of fish, I admire your perseverance. I'm also a Windows user. I use fish with MSYS2 environment, which is a fork of cygwin. Fish ran really well on it because it provides POSIX utilities. However, Rust doesn't provide a cygwin or MSYS2 target, which means fish cannot be compiled target cygwin or MSYS2 after rewritten by Rust. The language was not a problem with a Windows port, but it will be. I'm just a user, so this comment is just a reminder, that the rewriting work might block some fish users on Windows to update their favorite shell. I'm not blaming the work or the language. Anyway, Windows is not Unix:) Thanks again for all of your hard work. |
Beta Was this translation helpful? Give feedback.
-
These are the remaining files:
|
Beta Was this translation helpful? Give feedback.
-
Sorry if this is a tiny bit off-topic. I'm the author complgen -- a tool that (hopefully) makes writing shell completions easier, faster and less error-prone. It shines especially if you're writing a completion script for a command with subcommands, like |
Beta Was this translation helpful? Give feedback.
-
As asked by @PoignardAzur:
In short: We're "mostly" done. Quantifying that isn't all that easy because there are separate measurements - do you use lines or bytes, do you use rust vs C++ or do you use the amount of C++ that was removed?
Depending on how you count, we're at anywhere between 60% (c++ sloc removed) and 74% (rust sloc vs c++ sloc) done.
And a lot of that is scaffolding we've duplicated that can be removed once the last caller is gone, so you get a bit of a domino effect. E.g. we have already translated wgetopt, but kept the C++ version around until the last caller is translated, which is simpler than adding translation gunk to all the C++ callers.
What is left to do?
The last big component that remains to be translated is the reader with the input system. This is 3.5k for the reader plus 1.3k for the screen handling plus 1k line for input plus 700 lines for the pager. This is pretty tightly coupled.
After that the rest is some stragglers and the de-C++ifying of the build system - removing cmake, getting cargo to do everything we want (cmake still substantially drives the build, and we need e.g. cargo to build and install the documentation and completion files. this isn't just compiling a bunch of rust, we have a lot of auxilliary stuff!)
This isn't really the sort of thing drive-by contributions are good for, I'm afraid.
Alright, that's the update, now for answering some questions / correcting some misconceptions I've seen in what I assume is this reddit thread:
Beta Was this translation helpful? Give feedback.
All reactions