What does HackerNews think of tide?
Fast and friendly HTTP server framework for async Rust
For people starting out building stuff in rust - understand that there is a distinction of async code and libraries and can lead to confusing compiler errors if you don't realize there is a distinction. It's simple in hindsight but did cause me to waste hours barking up the wrong trees at first. Other wise just learn about `match` and Result/Option types asap, they're fundamental.
https://github.com/http-rs/tide tide is great to create an http server / routes
https://github.com/djc/askama I use this to template out HTML and it checks all my boxes, dynamic data, passing in functions, control flow.
https://github.com/launchbadge/sqlx sql interface for a variety of backend, async safe.
https://github.com/seanmonstar/reqwest http client to make requests
Rust is amazing, don't let the initial few speed bumps discourage you - building real things with rust is no more challenging today than any other modern language stack.
from Swift using https://www.perfect.org/
to Rust using https://github.com/http-rs/tide
Rust shares many of the benefits of Go:
- statically linked binaries for ease of deployment
- good concurrency
- builtin testing framework
But it's a much sharper tool than Go:
- Really great error handling with Result/Option and the ? marker
- Like, really really good error handling, esp compared to Go
- Very pleasant logging and tracing
- Serde is fantastic at automatically serializing/deserializing datastructures
- Generics make Map/Reduce/Filter really easy and readable
- Really good project management through modules/Cargo.toml
- Crates.io is like NPM - really discoverable and easy to upload (with its goods and bads)
- FFI with Swift, C, C++, Node, etc to share code everywhere
- Builtin documentation
- Builtin benchmarking
- Powerful hygienic and non-hygienic macros
There's a lot more. I would say people choose Rust over other web frameworks not because of the language, but the emphasis on great tooling. Being able to test, document, benchmark, deploy, package, with a language that feels like a child between Go, JavaScript, and C++ is very attractive. Plus, it's fast - like really fast - and it's really obvious where optimizations can be made when the time comes.
I've worked a decent amount with Go, but I'm also frustrated with the size of projects balloon. When I compare my Rust and Go code, the Rust code ends up being much smaller (LoC) and much more dense/terse.
I've been working with it for a few years now, and I'm 100% willing to trade some complexity when doing Advanced Stuff (tm) for the 1st-class tooling. I hate having to decide which testing/documentation/building/benchmark/etc framework to use in other languages. I just want to build, not futz around with Jest/Babel/Webpack/Poetry/PyEnv/Opam/CMAKE etc.
If you're looking into using Rust for web, I recommend https://github.com/http-rs/tide - it's the most pleasant web framework I've ever used.