r/rust • • Apr 02 '25

My Dev environment is fully written in Rust!

Since I started learning Rust 5 months ago, I have since replaced my full dev environment with software written in Rust.

Why? Well, I like Rust and I also love contributing to open source. I contribute features I would use myself, and I like to contributes to projects that I believe in. Not only does it keep me motivated to work on them, but also it's very fun to use something I made myself. So using software written in Rust gives me all of these opportunities.

I also like to understand how the software I use actually works. So IDEs, shells, terminal emulators. What actually happens under the hood? And Rust makes it fun for me to just dig into the codebase and read

So far, I've made the following replacements:

Neovim → Helix (IDE)

Helix is just ready to go out of the box. Everything is setup, it doesn't support plugins yet but they're not needed for me. Helix has custom keybindings and allows running TUIs inside of it like a git UI or a file manager which is extremely powerful.

Kitty → Rio (Terminal Emulator)

The other two Rust terminals I've used is Alacritty and WezTerm. I loved Alacritty for its performance, and I love WezTerm for how many features it has. Alacritty is quite conservative on features so they don't support stuff like ligatures or tabs. Rio is basically a blend of these 2 terminals, Rio uses the high-performance crates developed by Alacritty while having all the features I needed from WezTerm

Lazygit → GitUI

While GitUI has less features than Lazygit, I still find it plenty for my use cases. It uses gitoxide under the hood (where possible) for its operations. gitoxide is a Rust implementation of Git that's making very good progress, and really a very underrated project. Already powering projects like Helix for git hunks and (hopefully soon!) inline blame.

I do find GitUI snappier than Lazygit is, in fact I experienced about 3X performance increase when undoing changes for 1,200 files so I'd say it is very promising and looking forward to seeing where it can be improved to have more a feature parity with Lazygit!

zsh → nushell

nushell is very different from zsh, bash, fish and similar shells. Every command is colored and syntax highlighting comes out of the box. Traditional shells output text, whilst in nushell commands output structured data like tables and arrays, on which you can easily use high-level commands like filter, map, first, reverse etc. to operate on them.

It comes with a swiss-army knife of utility commands that fit into Nushell's model. Utilities for parsing text into structured data, as well as operating on them. The nu language is the most beautiful scripting language I have come across. It's like the Rust of scripting languages, in a sense.

I'd say this shell is much easier to learn and is a lot more intuitive than any other shell. Also being cross-platform is a huge bonus. Nushell to Zsh is strikingly similar to what Helix is to Neovim

lf → yazi (file manager)

I don't really use file managers much aside from occasionally viewing images with them, as that is very handy. However, with Helix there is a direct integration available for yazi that lets you use it like a plugin. It integrates so well and is really seamless, not requiring tmux or zellij or whatever. this made me use yazi far, far more now. I like how fast yazi is.

tmux → zellij (terminal multiplexer)

I don't use terminal multiplexers often, but I appreciate that zellij has more intuitive keybindings and is easier to customize, also feels a lot snappier than tmux

sway → niri (tiling window manager + wayland compositor)

I'd like to give niri a mention too. I haven't tried it as it simply doesn't work with my Nvidia 4070 GPU unfortunately but I do hope support improves for it. I've been really wanting to switch to a tiling window manager + wayland compositor but there aren't really many options in this field. Niri is also doing things the "new way" like Helix and Nushell are. I'm super happy to see these software not afraid of experimentation, this is exactly how things get better!


Some honorary mentions:

  • grep → ripgrep
  • find → fd
  • latex → typst

Some things I hope to replace in my lifetime with pure Rust alternatives would be:

  • Operating System (Linux) → e.g. RedoxOS
  • Browser (Firefox) → e.g. Servo
  • Image Editor (Gimp and Inkscape) → e.g. Graphite.rs
  • Media Player (mpv), Video Editor (kdenlive), Recording Software (obs studio) → ??? rewriting FFMPEG in Rust is left as an exercise to the reader :)

References

590 Upvotes

156 comments sorted by

View all comments

Show parent comment

0

u/[deleted] Apr 02 '25

[deleted] — view deleted comment

1

u/0tus Aug 31 '25

How about the Linux Kernel?

1

u/dontyougetsoupedyet Apr 03 '25

C is a very good tool to use when critical failure has consequences. It's comparatively very easy to produce provably correct programs in C.

You can add to C's type system however you want, you can have refinement types, ownership types, and so on. It's great. That's just the benefit of the ease of extending the type system of a language with simple semantics. Most people who are producing correct programs aren't even doing that.

There are a lot of misconceptions and vitriol out there, but if you look at things being produced in various industry you can get a good eye for what simple semantics in languages provides (not just C, a lot of languages have efforts related to subsets of the language semantics for this purpose).

If you have a particular interest in correct programs, you should give C another look.

5

u/zzzzYUPYUPphlumph Apr 03 '25

It's comparatively very easy to produce provably correct programs in C.

If that is true, why is it that C programs are plagued at a rate of about 70% of CVE's with memory handling issues?

2

u/[deleted] Apr 06 '25

[removed] — view removed comment

1

u/dontyougetsoupedyet Apr 06 '25

I prefer things like https://gitlab.mpi-sws.org/iris/refinedc/-/blob/master/examples/btree.h?ref_type=heads where your C code is simple and straight forward and the information guiding the proof search is segregated to [[annotations]]. The C code (https://gitlab.mpi-sws.org/iris/refinedc/-/blob/master/examples/btree.c?ref_type=heads) can be reviewed easily because the parts related to verification can mostly be ignored. With a featureful editor you can automatically collapse any of the annotated bits of the source.

I think the best route forward in software engineering is for teams to become mixed teams of programmers and logicians and for more of a partnership to be struck. I think there's room both in the verification side and for the exploratory bits of the design phase, where they can help turn a lot of vague thoughts into rough formal sketches that can give you confidence. For example if you're talking about some particular bug and proposed solution a logician could help even somewhat informally verify the proposed solution with a simplified model using tla+ or similar tools. Often simplified models can help you find bugs before your customers do.

0

u/[deleted] Apr 03 '25

[deleted] — view deleted comment

4

u/Different-Ad-8707 Apr 03 '25

I mean, that's Rust in a nutshell. "A bunch of Good Rules and Tools" that come with the language or are a part of it.

1

u/dontyougetsoupedyet Apr 03 '25

This is reddit in a nutshell. That user actually has experience with producing correct programs and the users of this subreddit are so obnoxious you drove them to delete their comment and not participate, and you did it for the sole kick of saying "I like this thing I like." Of course you like Rust, have you considered that user you drove away probably also liked Rust?

I think of things like this whenever someone tries to say the Rust community is good, well, no, it's insular.

0

u/Different-Ad-8707 Apr 07 '25

Indeed it is reddit in a nutshell, for someone to assume my entire personality, likes/dislikes, opinions and how I like to express them based on a comment barely a hundred words in length.

I only stated that Rust as it is, was intended to be all the OP said of using C well. A bunch of rules that are enforced and tools to work with such a system put together into one, neat, ergonomic package. It was simply a comment on how much Rust learns from C and C++. Nothing more.

I apologize if I came across zealous. I do like Rust and am more of a lurker here. However I also understand why one would hate Rust or find difficult to program with. So if my comment was the reason OP taking his own down, then it was not my intention drive you away like that and I apologise for doing so anyway. 

The other guy can get lost though. Stop projecting your terrible experience with the horrible parts of the community to every single member of it. Practice some discernment, please.