I normally build web apps with PHP. 6 months ago I decided I wanted to learn a new language and after some research decided to give Rust a try. I wanted something I could build desktop applications with. I had also just switched from OSX to Linux so wanted something that built natively for Linux and didn’t rely on some sort of virtual machine.
Coder’s Toolbox is my first project. https://github.com/ericfernance/coderstoolbox
I used GTK for the UI. I was initially going to try GTK4 but trying to build a UI by hand seemed a bit ambitious for a first project. Instead I used GTK3 so that I could use Glade.
It took a lot of experimentation to come to terms with the borrow checker. I also found the strict typing took some getting used to; in particular passing strings around, and the variety of types for a string. For a PHP developer a string is a string, not so with Rust and it’s variety of ways of representing strings.
Fortunately the Rust compiler is one of the most helpful compilers I have ever encountered and the type hinting in IntelliJ was very good.
By far the biggest challenge was learning GTK. This may have been easier if I had a stronger C / C++ background.
So, what does Coder’s Toolbox do?
Coder’s Toolbox is a collection of utilities to make my development life easier. All run locally without the need to paste possibly sensitive data into random websites. Coder’s Toolbox can convert a string to an md5 representation, and return a string length; meh pretty boring I know. My favorite feature, is converting a json based object into a PHP array. I use this multiple times per day building and testing integrations with third party APIs.
Coder’s Toolbox is a work in progress and hasn’t been published to any package repositories yet. To take it for a test drive download, and run