How I Rebuilt my Website with Rust

And how you can build your own blog! // dvub

Why? | Inspiration

There were a lot of factors that influenced me in building out this project. Most recently, after getting tired out by some other projects (which I should definitely write about soon), I wanted to start something new. Lately I feel like I've been on a Rust roll (and rightly so, because Rust is awesome), so I decided to revisit web development, but with a Rust-based stack.


For a while now, I've wanted to redesign my personal website to be simpler, not only in terms of the UI/UX, but also (and more importantly for me) the DX. I created the first iteration of my personal website nearly 2 years ago in Next.js, and although it was fun, there was a lot of hassle and complexity involved (a lot of it was probably due to my inexperience as a developer, but we'll ignore that).
Another influence in my decision to recreate my website was, well, influencers - specifically software streamers/YouTubers - talking about these hype, new, JS-less web dev stacks - like Go + HTMX, etc. - My impersonable self would have jumped right on that train if I knew Go, but, well, I don't. I do, however, know an even better language: Rust! I've been learning Rust for maybe 2 years now, and although I'm still very much a beginner, I'm definitely improving.

How? | The Stack

Here it is, the moment you've been waiting for, the sauce, the magic, the stack (drumroll, please!): Rust + Axum + Tera + HTML ( + Tailwind I guess). Let me break that down a bit.

DX | Worth it?

As I mentioned before, I wanted to rebuild my website (without JS) for the improved development experience. So, how much better is it? Right now, it's probably too early to say. But, considering that it only took me a few days to draft the backend architecture, styling, and a first post, I think that's really amazing.


Furthermore, considering that for the past 2 years, almost all of my web endeavours have involved React, building this project has been a deep breath of fresh air. That's not to say that React is bad, of course.

Credit

I'd like to finish this up by linking some awesome repositories that I drew a lot of inspiration (and code) from:

Diving into a new stack was challenging at first, and I definitely couldn't have done it without these awesome examples.