Rust has become one of the hot new programming languages because it combines the ease of programming and memory safety of languages like Python with the performance and execution speed of C and C++. It’s no surprise that developers have jumped on it to create real applications. Here’s a grab bag of applications, ranging from simple terminal apps to games.
Amp
A Vim-like text editor
The emergence of Rust as a language of choice is evidenced by the proliferation of programming tools written in it. Any serious development environment needs a good editor. It’s not surprising that someone would write a text editor in Rust. Amp is such an editor. I’m a big fan of Vim, and I’m glad this one uses the same Vi/Vim keystrokes.
eza
A stylish replacement for ls
I covered this app in another piece recently. eza is an app that can replace ls. One thing that distinguishes eza from ls is that eza uses colors by default, which may not be the case with ls depending on your system. This means that you can easily distinguish file types at a glance.
rhex
A Rust-based roguelike game
NetHack is one of my favorite games. Maybe someday I’ll finally ascend with the Amulet of Yendor. If you like NetHack and other roguelikes, there’s one that’s been written in Rust called rhex. The games uses hexagonal tiles. If you’ve ever played NetHack in the default ASCII mode, you’ll have an idea of what to expect.
MartyPC
Classic PC emulation
I first cut my computing teeth on a Packard Bell 386. While I prefer modern OSes like Linux I still have some nostalgia for the PCs of the past. MartyPC is an emulator of the PC XT class of machines from the 1980s. My first PC was a bit more advanced than that. It’s also written in Rust.
The best part is that you don’t even have to install it on your machine. There’s a version that can run online. You can even play Prince of Persia on it, albeit in the yucky purple and blue color palette that you got on RGB screens or rather VGA screens without any composite output. (A lot of the bad rap that CGA got was people viewing it on RGB screens, when game developers targeted composite mode to be used with a composite monitor or a TV using an RF modulator. The 8-bit Guy explains it in a YouTube video.)
Linus Torvalds also played the game as a college student and it was the inspiration for dual-booting, as he wanted to be able to keep playing the game while working on what became the Linux kernel. And now the Linux kernel has parts written in Rust, and MartyPC also happens to play Prince of Persia while being written in Rust. Could that be a coincidence?
bat/batcat
A replacement for the Linux cat utility
Bat (alternately known as batcat) is another utility written in Rust that’s meant to supplant a common Unix/Linux command, similar to eza. Where eza is meant to replace ls, bat replaces the venerable cat utility to print text to the screen. One advantage that bat has over the original cat is that it prints line numbers and includes syntax highlighting for common programming languages. It will automatically page the output, similar to using less to scroll by screenfuls.
Pixi
Fast dev environments for data science and more
This is a programming tool that’s become handy for my Python work, particularly in statistics and data science. I used to use Mamba to create a development environment that included my favorite libraries, such as NumPy, pandas, and statsmodels. Then I noticed that it would take a ridiculously long time to update my environment. Mamba would spend minutes “solving” the dependencies. I looked around and found Pixi.
Pixi is similar. It lets me create reproduceable environments. Pixi is project-based. The files and dependencies live in ordinary directories, but I can also define a global environment. I use this feature to have my data science environment at my fingertips. Pixi is also much faster, being written in Rust where Mamba is written in Python. Pixi takes much less time to update my environment.
ripgrep
Recursively search directories
ripgrep is yet another utility that’s meant to replace a standard Unix/Linux utility. ripgrep replaces the classic grep utility grep for regular expression pattern searches of text. Ripgrep recursively searches the current directory for occurrences of the search string, which means that it will automatically look in subdirectories.
brush
A Rust-based shell
brush is a command-line shell that has been written in Rust. This rounds out the Rust programs that can replace standard Unix and Linux components. It advertises itself as “Bash-compatible” and ready for use as a daily driver.
It’s got some nice features on its own. It will autocomplete the command line based on what you previously typed, and it has syntax highlighting built right into the shell.
rip
No more rm oopsies
Nearly everyone who uses the Linux command line has accidentally deleted that file or directory that they didn’t want to delete with the rm command. rip is a safer utility that lets you undelete files and directories that you delete with rip. Make sure you deleted the file with the rip command:
rip file
You can get it back with the -u option:
rip -u
The list of Rust apps is growing every day
There are more Rust apps than I can cover in a short piece like this, as evidenced by this list of Rust programs. The number of Rust apps will likely only grow as more developers discover its power.
Source: Read Full Article
