lig,
@lig@fosstodon.org avatar

I'm working on a pet project written in Rust in my spare time.

Yesterday I've migrated it from rocket to axum.

Why?
I was doing a weird thing and rocket wasn't enough.

How much time it's taken?
2 hours.

Did I have tests?
Yes. I have unit and integration tests. One test has actually helped to catch a slight difference in the way axum works.

Takeaways

  • Refactoring in Rust is an incredibly pleasant exercise.
  • Having tests helps.

ianthetechie,
@ianthetechie@fosstodon.org avatar

@lig pretty much mirrors my experiences ;) One of the main benefits of Rust is actually the ease of refactoring and other maintenance without fearing you screwed something up!

Aside: despite the name, last I checked, Rocket wasn’t all that fast. We made a decision very early on to use raw hyper and low level async. That paid off massively, and now Axum basically gives all of the benefits with an ergonomic wrapper. We’ve also migrated several backend services to it and plan to do the rest.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • rust
  • DreamBathrooms
  • thenastyranch
  • mdbf
  • khanakhh
  • Youngstown
  • slotface
  • hgfsjryuu7
  • ngwrru68w68
  • rosin
  • kavyap
  • Durango
  • PowerRangers
  • InstantRegret
  • magazineikmin
  • anitta
  • cisconetworking
  • cubers
  • vwfavf
  • tacticalgear
  • everett
  • osvaldo12
  • ethstaker
  • tester
  • normalnudes
  • modclub
  • GTA5RPClips
  • Leos
  • provamag3
  • All magazines