Three questions and answers: These Rust tools for Linux are worthwhile

Rust is coming to Linux, promising to revolutionize admin tasks with new tools—is it just hype, or the future?

Save to Pocket listen Print view
Robot with speech bubble

(Image: iX)

6 min. read

New Rust tools for Linux have been the talk of the town recently - after years of little change in most shell tools for everyday admin work, experimental developers are now taking a fresh look at userland. Martin Gerhard Loschwitz, cover author of the new iX 8/2024, has taken a closer look at the projects.

Martin Gerhard Loschwitz

Martin Gerhard Loschwitz is a freelance journalist, trainer and consultant on the topics of OpenStack, Ceph, Kubernetes and everything related to them.

The existing Linux tools have proven themselves. Why are so many programmers now starting to develop alternatives?

Because it works. And because they can. Joking aside: "We've always done it this way" has never been a valid reason in the open source scene for someone to leave something undone or, as in this case, to do it. And fortunately that's the case: if it weren't for (young and wild) developers regularly questioning existing conventions, some of today's great software would probably never have seen the light of day. After all, much of what started out as supposedly academic crackpotism later became established on the market, not least the Linux kernel itself.

The classic command line tools in particular also offer the advantage that you work very closely with the core of the operating system - so you learn a lot about the basic functions of Linux systems and also expand your knowledge of Rust. Finally, it is not the case that everyone would be perfectly happy with the existing CLI tools of today. For example, many people would like a faster ls. In my opinion, there is nothing to stop someone from making the first move and developing something and then putting it up for discussion. However, most Rust alternatives to the classic coreutils have long since moved beyond the discussion stage anyway.

How do the developers' approaches differ? Do administrators have to get used to them completely or are only a few changes necessary for scripts and so on?

The classic lawyer's answer: It depends. If, as an administrator, I simply want to replace the existing C tools of the Coreutils with their Rust counterparts, there is a separate project for this, which is trimmed for full CLI compatibility with the GNU versions. The expectation here is clearly that the tools written in Rust support the same parameters and can be used in the same way as the tools that are included with classic Linux systems today. The CLI output should also be identical so that the tools can be used in scripts as a one-to-one replacement. The maintainers of the Rust Coreutils project consider it a bug if the project's tools are not fully compatible with their GNU counterparts.

The situation is different for the other way in which developers today implement classic tools in Rust. Here things are more relaxed: various replicas of ps in Rust, for example, offer a different view, other CLI parameters and more performance. The aim here is to create a more user-friendly and faster successor tool to ps, rather than simply replicating it. There are no limits to the imagination, but in return the tools can no longer be used as a drop-in replacement for the classic coreutils. For some projects, this would already fail because they present their output in a pager view, i.e. they do not lead directly back to the shell.

Which of the tools can you recommend in particular - and which ones are better left alone?

I really liked procs as a replacement for ps, and the ls replacement eza also had a very slim foot in personal testing - even on macOS, i.e. an operating system for which the Rust tools are not primarily developed. Using Homebrew, however, it was also possible to install most of the test subjects from the test quite easily.

I was also impressed by Rio, an extremely practical Rust-based terminal emulator that pays homage to the classic Kitty. There is also a Rust replacement for Tmux in the form of Zellij, which I have also come to love because it feels a tick faster than its role model. All in all, what the Rust community has already achieved so far in terms of basic shell tools is absolutely impressive. And I'm excited to see what else we can look forward to in the future.

Martin, thank you very much for your answers! An overview of the new Rust tools for Linux can be found in the new iX. We also show how developers are reimplementing the GNU coreutils in Rust- and take a critical look at Rust versus C in the Linux kernel. Readers can find all this and many other topics in the August issue, which is now available in the heise Shop or from newsagents.

In the series "Three questions and answers", iX aims to get to the heart of today's IT challenges - whether it's the user's view in front of the PC, the manager's view or the everyday life of an administrator. Do you have any suggestions from your day-to-day work or that of your users? Whose tips on which topic would you like to read in a nutshell? Then please write to us or leave a comment in the forum.

(fo)

Don't miss any news – follow us on Facebook, LinkedIn or Mastodon.

This article was originally published in German. It was translated with technical assistance and editorially reviewed before publication.