The most lightweight, barebones actix version

Hi everyone!

I'm reading and playing around with actix-web and so far loving it. My use case for actix is VERY barebones: all I need is simple request creation (to an external server) and request handling (GET, POST, PUT and DELETE).

I noticed that using actix takes up a lot of space on my machine and my Cargo.lock file is 2000 lines long just because of it. Making small changes and recompiling (via cargo build) takes a very long time too. Considering I don't need most of the features of actix, is there a very lightweight/minimal version of it (or perhaps, an alternative framework altogether considering I'm not too deep in the development of my project yet) that I can use?

I don't think there is a smaller version of actix-web, but you could use another framework such as gotham or hyper.

I have been wanting to try Tide, although if you are using tokio you might also try Warp. Each might have a smaller footprint.

If your use case does not require asynchronous functionality, Iron is intentionally bare bones as well.

Thanks alice, I'll try these out

I tried Tide just now - it's definitely faster than astix (14 seconds build compared to 22 seconds on astix) - I gotta make a design decision now if 8 seconds is worth switching to tide!

Note that to use hyper, you would probably need a crate like routerify.

As for Tide, I did not recommend it because it makes you use the async-std ecosystem over the Tokio ecosystem, and that ecosystem is much smaller.

1 Like

Got it. I ended up going with Gotham.Thanks a lot Alice!

1 Like