O'Reilly logo

Mastering Rust by Vesa Kaihlavirta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Introduction to Rust and web programming

Developing web programs in Rust works how one might expect for a compiled language. The application you build listens to HTTP requests. Routing logic inside the application directs those requests to handler functions, which return responses. Since Rust programs are statically linked by default, deploying such a program to a production environment means simply copying the executable over and restarting the application.

Hyper is the de facto HTTP library that most of the higher level frameworks build on. It's designed as a type-safe abstraction of raw HTTP, as opposed to a common theme in HTTP libraries: describing everything as strings. As an example, HTTP status codes are defined in hyper::status::StatusCode ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required