A Deep Dive into the Rust crate Tower

Quickwit
3,689 views February 13, 2024

Tower is a crate of “modular and reusable components for building robust networking clients and servers” widely used in prominent projects within the Rust ecosystem, including Hyper*, Axum, or Tonic. This ubiquity means Rust developers invariably engage with the Service trait, Tower's core abstraction while working with these libraries. Despite its conciseness, reading and understanding code that abstracts over the Service trait proves challenging because of the heavy use of generics and intricacies of implementing non-boxed futures. This complexity raises the learning curve for beginner and intermediate Rust developers to become proficient in their favorite frameworks. In this talk, we will demystify the Service trait, explore practical examples from real-world codebases, and construct increasingly complex Tower layers from scratch. *Hyper actually relies on its own very similar hyper::Service trait. Author: Adrien Guillo, co-founder of Quickwit

Keyboard shortcuts

On. Switch them off if they collide with your assistive tools; ? still opens this sheet.

Go to

Press g then the letter.

  • gh Latest
  • gs Sources
  • gm Media
  • gv Videos
  • gp Podcasts
  • gc Calendar
  • gd Decoder
  • gz Dataviz
  • ga Datasets
  • gb Blog
  • gk Markets
  • gj Careers
  • gn Prompt Notebook

On this page

  • / Focus search, where there is one
  • t Back to top
  • ? This list
  • Esc Close