zero-to-production
axum
zero-to-production | axum | |
---|---|---|
87 | 156 | |
5,857 | 19,507 | |
- | 2.9% | |
6.1 | 9.4 | |
3 months ago | 4 days ago | |
Rust | Rust | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
zero-to-production
-
Dependency management fatigue, or why I forever ditched React for Go+Htmx+Templ
I'd highly recommend reading some articles by Luca Palmieri[1], or even buying his book[2]. Although I didn't learn this stack by working through his book, whenever I had questions through the years, my searches usually led me to his articles which are often excerpts from the larger book.
The high level of API stability and lack of churn in the Actix ecosystem makes the book a particularly good investment for someone looking to settle on this stack in my opinion. In keeping with the topic of this submission, I doubt I'd be comfortable spending money on a similar book about building web apps with React.
[1]: https://www.lpalmieri.com/posts/2020-08-09-zero-to-productio...
[2]: https://www.zero2prod.com
- Rust for Rustaceans
-
Empowering Web Privacy with Rust: Building a Decentralized Identity Management System
Zero to Production in Rust - Book by Luca Palmieri: An in-depth book that guides readers through building a fully functional backend application in Rust, from zero to production.
-
Rust books to read
And the book "Zero To Production In Rust - An introduction to backend development", I didn’t read it yet but seems pretty good
-
How to read a YAML configuration file in my Rust service?
It’s a lot simpler if you add serde to the mix (derive Deserialize for your settings types). Have a look at the example from the Zero to Production book: https://github.com/LukeMathWalker/zero-to-production/blob/main/src/configuration.rs
-
Ask HN: What to use for a Rest API written in Rust?
You probably want to check out the Zero to Production book which is about using Rust for back-end development.
https://www.zero2prod.com/
-
I’ve fallen in love with rust so now what?
If your'e more into a tutorial with a book https://www.zero2prod.com/ is really good. You gonna build a newsletter service. With all the good stuff in backend development.
-
Hyper – A fast and correct HTTP implementation for Rust
If you want to build a backend in Rust, Axum (which uses hyper underneath) is pretty recommended these days, as it's all in the tokio ecosystem. Actix Web is good too, but it has its own ecosystem of libraries. I read the book Zero To Production in Rust [0] which was a great overview on not just Rust but scalable backend architectures as a whole.
Interestingly, Cloudflare wanted to use hyper but found that it was too correct, so they had to build their own [1].
[0] https://www.zero2prod.com
[1] https://blog.cloudflare.com/how-we-built-pingora-the-proxy-t...
-
Conversion?
In addition to the book, which has already been recommended. If you’re specifically into backend you should try Zero to Production. Luca really knows what he’s talking about, and it’s an excellent overview of backend rust and the development process in general.
-
Do you know any programming tutorials where somebody explains how to write an app from the architecture point of view?
I highly recommend the book Zero to Production in Rust which also has an associated GitHub. I like the style of the writing and the explanations used within the book. Even though it uses Rust, the concepts seem to work in any language - I have applied the concepts to both Go and Python in the past.
axum
-
Step-by-Step Guide to Server-Side Render React with Rust
For this example, we will use axum, a web framework that works on top of tokio.
-
How to Deploy Your Rig App on AWS Lambda: A Step-by-Step Guide
If your lambda handles multiple endpoints of your API, the crate axum facilitates the routing within the lambda.
-
Using Polars in Rust for high-performance data analysis
We’ll use Axum with Tokio to build a web backend, Tracing for logging, and Serde for serialization and deserialization.
-
Replacing Nginx with Axum
After I read a bit about axum [1], it says it's a relatively thin wrapper on top of hyper [2], a fast and correct HTTP library.
In other words, what can be done with NGINX, it can be achieved with axum (assuming you know Rust).
It looks interesting, I'm not going to lie!
[1] https://github.com/tokio-rs/axum
[2] https://crates.io/crates/hyper
-
Declarative macro magic from Axum in Rust
If you are familiar with API development in Rust, you may recognize this syntax from Axum. This puzzling question piqued my curiosity and led me to build Cairo, where I re-implemented some key Axum concepts in a simpler way as a learning exercise. I’ve long been fascinated by the intermediate + advanced concepts library authors employ to make their interfaces feel frictionless. Rust sits in a brilliant space because of the way it melds high-level expressiveness with low-level control and performance. One of the ways it accomplishes this is using macros.
-
Axum/Tera & Real Shortcodes in Rust: A WordPress-Like Implementation
Let's create a small prototype in Rust to demonstrate the concept using Tera and Axum.
-
Bundle frontend into axum binary using include_dir
There are some proposals on how to do it already such as https://github.com/tokio-rs/axum/issues/1698.
-
Prodzilla: From Zero to Prod with Rust and Shuttle
Moreover, I especially like where Rust is right now in the web space. It really feels like there’s a lot of smart people working on the next generation of web development tools - it feels like the place to be. There are a range of great open-source web dev tools that are just reaching critical levels of maturity. Axum, which I used to build Prodzilla, feels ready for out of the box web dev, and is crazy-performant, as I write about later. More recently available is Loco, a Rails-like framework for building web applications in Rust that's picking up steam. And in dev-tooling and hosting there’s Shuttle, a 1-line hosting solution for Rust backends.
-
CryptoFlow: Building a secure and scalable system with Axum and SvelteKit - Part 1
CryptoFlow is a full-stack web application built with Axum and SvelteKit. It's a Q&A system tailored towards the world of cryptocurrency!
-
Cryptoflow: Building a secure and scalable system with Axum and SvelteKit - Part 0
You also get to specify the accepted HTTP method of the URL via axum::routing. To answer its name, modularity, Axum also supports nested routes as we'll see later in this series. Next is the layer, a method used to apply tower::Layer to all routes before it. This means that routes added after the layer method will not have such a layer applied to their requests. In our case, we used the layer to add tracing to all HTTP requests and responses to our routes. This is needed for proper logging. The tower_http::trace::TraceLayer can even be really customised.
What are some alternatives?
rust-by-example - Learn Rust with examples (Live code editor included)
actix-web - Actix Web is a powerful, pragmatic, and extremely fast web framework for Rust.
realworld-axum-sqlx - A Rust implementation of the Realworld demo app spec using Axum and SQLx.
Rocket - A web framework for Rust.
black-hat-rust - Applied offensive security with Rust - https://kerkour.com/black-hat-rust
poem - A full-featured and easy-to-use web framework with the Rust programming language.
rust-blog - Educational blog posts for Rust beginners
warp - A super-easy, composable, web server framework for warp speeds.
tour_of_rust - A tour of rust's language features
ntex - framework for composable networking services
book - The Rust Programming Language
rust-web-framework-comparison - A comparison of some web frameworks and libs written in Rust