Aardwolf-Social/aardwolf

[Backend] - Explore migration to Actix-Web

BanjoFox opened this issue · 12 comments

Due to the very volatile nature of rust nightlies I would like to know what it would take to switch away from Rocket.rs to Actix-Web, or perhaps Hyper.rs to reduce the need for rust-nightly.

Actix - https://actix.rs/
Hyper.rs - https://hyper.rs/

Hyper.rs is a lower level HTTP library. You can implement servers with it, but it's probably not ergonomic for our target.

This is an article on migrating from Rocket to Actix-Web for this same reason: https://nbsoftsolutions.com/blog/migrating-to-actix-web-from-rocket-for-stability

My Rust isn't strong enough yet to decide between them; Rocket seems more familiar to me, but I'd really rather @asonix judge this.

oh hey.

I've played with both of these and I do like Actix. There's seems to be more boilerplate involved, though. I can try my hand at migrating to actix-web this weekend, though.

@asonix -- Hey hey! Before you go doing any work... does it make -sense- ?
I suppose we could just solidly nail a rust-nightly to the floor, and never change it?

Alternatively.... there are whispers that Rocket is migrating towards Rust-Stable so.... perhaps simply being patient will pay off.

Yes, here is the tracking issue: rwf2/Rocket#19

@BanjoFox No need for whispers! It's an active concern for Rocket, and one that I've been working on personally. Already, 0.4 (to be imminently released) will bring significantly more stability at the rustc/library layer, thanks largely to migrating to to-be-stable APIs. Rocket's APIs themselves are already stable, of course. For the next major release, one of two primary goals is being able to compile without any feature flags. All signs points to being able to realize this within a few months time.

@SergioBenitez -- woah.. now I feel honored to have a Rust-celebrity on my humble repository ;D
I didn't mean to say that I was whispering more so that, I did not immediately find a roadmap/timeline for 0.4, but I have been hearing from others that this is going to happen.

Much excitement for 0.4, it will help out a LOT because I/we are having trouble with certain package version combinations.

it might also be worthwhile looking at warp, tower-web, or gotham. I think warp and tower-web are going to merge eventually.

That said, I do want to see how much of what we have can be ported

I don't mind entertaining other options. There is a temporary work around with very old (and future) Rocket builds. If Warp, and Tower-web have a fourm I may snoop a bit regarding the merge. That and to learn more.

Welp... I am eating shoe right now because our dear friend @SergioBenitez released 0.4rc1 about 4 hours ago! Haha. Very excited about this as it will probably stabilize a LOT of things.

I do -greatly- appreciate all the hard work that @asonix has been doing (and has done) with "modularizing" the code. It will give us opportunities to test Rocket, and Actix without having to gut everything completely.

Looking forward to hearing more thoughts.

I think we can close this one, since I'm now maintaining both Actix Web and Rocket.

Agreed.