Building a micro service with Rust and Axum
Rust has been the most loved programming language for seven years straight. Rust has the expressiveness of Ruby and the performance of C++. This talk looks at Axum a high-level HTTP framework for Rust. We'll start with the basics and see how we can do HTTP Routing, using Axum extractors for Path, Query, and Body params, Parse and send JSON, maintain a connection pool with the App state and authenticate with a JWT token.
Agenda
* A quick overview of Rust * Setup a project with Rust and Cargo * Add github actions to run tests automatically * Add Tokio and setup logging * Add Axum for HTTP routing and setup a web server * An overview of Axum extractors * A quick aside on seralization and deserialization with Serde * Implement path, query and body extractors * Add SQLX and setup connection pooling. * Add handlers that read and write from the database * Add JWT authentication by writing a custom extractor.
Prerequisites
Participants need not know Rust but they need to have experience building micro services in Go, Ruby, Typescript, Java or a similar language.
Take Aways
- learn about rust
- Learn about building microservices with Rust