Are we web yet?
You can build stuff!
Rust has a mature HTTP stack and various frameworks enable you to build APIs and backend services quickly. While increasingly more databases drivers become available, ORMs and connections to external services (like search or worker queues) are still scarce. Looking farther, it doesn't necessarily get better. Though there is significant support for base needs (like data compression or logging ), a lot more web-specific needs are still unmet and immature.
Can I replace my Rails/Django/Flask already?
Well, probably not yet. While the basics are there, many of the handy utility libs that make working with many popular frameworks so quick and easy are still missing. If your service primarily provides an API to be consumed by other computers, requires little external services and you are happy with writing most SQL yourself, then Yes, You Can! Otherwise, we would not recommend it just yet.
What should I replace it with?
The web frameworks of choice in the community are:
For data storage there are mature drivers for:
If you’d like to use an ORM there is:
If you need to (or want to) go lower in the stack:
After you’ve set up your Rust and worked yourself through “The Book”, we highly recommend taking a look at fully annotated source code of the clippy-service, an iron-based microservice, which shows how to use many common features like redis database connections or JSON parsing. Otherwise you might want to check any of these blog posts (ordered latest published first):
- Using Stainless with Rocket
- REST in Rust
- Connecting a webservice to a database in Rust
- Let’s Build a Web Server in Rust
- Creating a basic webservice in Rust
- Build an API in Rust with JWT Authentication using Nickel.rs
learn more about the state of web developer in Rust by topic:
- HTTP Clients
- Content Management Systems
- Compression Libs
- Database Support
- En- & Decoding
- Web Development Frameworks
- JSON Support
- External Services
- Lower Web-Stack
- Templating in rust
- Web Utils
- External Web APIs
- : everything is awesome™: stable, tested and mature
- : stuff's pretty great
- : getting there, stable but still maturing
- : not yet stable, but progressing
- : unstable/incomplete, needs work
- : barely there, needs serious work
- : basically non-existant