hirogen is a GTK-based hex editor for Linux.

This project was just an excuse to learn the Rust programming language.

Before doing this project I had never written a single line of Rust. I had done the online tutorials a few times but tutorials have never been a great way for me to learn a new language. The only way I can internalize the unique problem solving techniques that a new programming language offers is to just do a project in that language.

There are several decent hex editors for Linux but none of them are that extraordinary. HexFiend has always been my favorite hex editor for macOS and I use it all the time. I always admired its simplicity and conformance to macOS desktop paradigms. While I don’t use Windows very often, HxD is a truly terrific hex editor that is loaded with amazing features. In the end, I designed hirogen to look and feel like HxD.

The decision to write a GUI program in order to learn Rust was in retrospect not the best idea. Rust is not the best choice of language for GUI development, despite heroic efforts to make it happen. The gtk-rs crate offers very good bindings to the GTK library that are respectful of the Rust conventions. However, GUI development really requires a language and an environment that is a lot more flexible than what is allowed within the Rust paradigms.

It is typical of modern desktop applications to utilize an event-driven system for directing control flow throughout the program, and existing UI toolkits benefit from the more classical object-oriented patterns present in C++, Objective-C, and Java. I understand that the Rust community is attempting to adopt new UI development paradigms to fit within the Rust ecosystem, such as a more “reactive” approach, however none of these proposed toolkits offer a native look-and-feel on any desktop environment yet.

After this project I have written a lot more Rust and it has become one of my favorite languages. The intense constraints that the compiler imposes on the development process leads to much better code in the end. I noticed that I spent almost no time debugging my Rust programs and perhaps a little bit more time on the programming part, which is perhaps exactly the goal of the language’s design. I have also found Rust crates and other programs written in Rust to be consistently high quality.

The source code for this project is freely available and distributable. You can find it on my sourcehut page here. Simply use cargo build to build the app just like any other Rust project.

hirogen Screenshot

hirogen Screenshot

hirogen Screenshot