A tour of the Axum web framework for Rust (while explaining a few error messages)

preview_player
Показать описание
Skip to 02:05 to go straight to the code.

Axum, a sub-project of Tokio that works together with sibling crates tower, tonic and hyper, promises ergonomics and modularity. Is that fair? This video introduces viewer to some of the introductory concepts of Axum including response types and its extractor system.

00:00:00 Welcome
00:00:39 Github code repository
00:01:03 Warning about conflicting versions
00:02:05 Introduction to Axum
00:03:02 First web backend
00:08:22 Extractors
00:10:20 Enabling the ConnectInfo extractor to access the peer's IP address and port
00:14:02 Fixing trait bound Handler is not satisfied
00:17:20 Accessing parameters from the URL's query string
00:20:46 Summary and wrap up

📚 Resources:

🦀 Rust resources:

👋 Connect with Tim:

👍 Like this video if you found it helpful, and share it with your friends who are also interested in Rust programming.
Рекомендации по теме
Комментарии
Автор

Yes! Watching this when I get home. More Axum!

ohmyvgatron
Автор

another video on tracing please, badly needed.

AbhishekBajpaiHere
Автор

Great video, love to see more like this

LeviNotik
Автор

I always thought the promise is "If it compiles, it runs". Seeing the extractor error at 13:00 is a real bummer

bode-fun
Автор

Axum is great, ive combined it with rpc, works great 👍

not_yet_implemented
Автор

Regarding the cryptic error messages, there is a handy little helper in the form of the axum::debug_handler macro which can help there. Not sure about the particular case discussed in the video. Great content!

beebakrizzle
Автор

Thank you! - Please could you do part 2 and show how we could add Swagger UI maybe?! 👍

learning_rust
Автор

thanks for this. Would love for you to do a comparison of axum to actix web.

jimii_
Автор

quite a nice framework, ive used warp in the past but am going to make a simple api with axum next

johnwilliams
Автор

If I remember correctly, tokio is utilising tower to build services that are stackable. It already had some helper functions to quickly make services. My hunch is that make_service thing is related to that. There is probably a trait somewhere in tokio, that can be implemented to make your handler into a service in tower, that is stackable. Hence "into make service", which will then has blanker implementation of "into service".

ekarademir
Автор

hello guys. I’m a Rust programmer. Does anyone want to hire?

attariarash
Автор

This honestly looks like a terrible development experience

welcome to shbcf.ru