Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Resources: - Combining filters to write set of routes - A Stackoverflow question on Warp Filters - What are Filters in the warp library? - How to return a warp filter from a function in rust - An awesome blog on writing a REST API in warp which overs Filters pretty well
As you're using MongoDB, it would be better to use warp instead because in their README they've stated:
Note: A regression introduced in Rust 1.46 may cause out-of-memory errors when compiling an application that uses the driver with a framework like actix-web. Rust 1.45 or the latest nightly version can be used to work around this problem temporarily. For more information or to track progress on a fix, see https://github.com/rust-lang/rust/issues/75992.
As memory safety is an important priority, choose warp for more safety guarantee (it's built on top of hyper which is fast, correct and production-ready). Although, worth pointing out that most of the UB bugs have been resolved in actix-web as of now.