

Let’s BeginĪfter checking your rust and cargo version and creating a new project with Install Curl if don’t have it already on your system for testing the api locally. Another nice to have tool is Cargo Watch that lets you watch the file system and re-compile and re-run the app when you make any changes. You need to have a running postgres server and can create a database to follow this tutorial through. In this tutorial we will be using postgresql so follow the instructions to setup for postgres. Pleas head over to to get started and setup diesel_cli. We will be using diesel to create models and deal with database, queries and migrations. I will assume here that you have some knowledge of programming, preferably some rust as well. Shameless plug: sparkpost is my crate please leave feedback if you like/dislike it. If you want to know more about any of these crates please click on the name to go to crates.io. I have provided a brief info about the crates in use from their official description. uuid // A library to generate and parse UUIDs.sparkpost // Rust bindings for sparkpost email api v1.serde_derive // Macros 1.1 implementation of #.serde_json // A JSON serialization file format.serde // A generic serialization/deserialization framework.futures // An implementation of futures and streams featuring zero allocations, composability, and iterator-like interfaces.jsonwebtoken // Create and parse JWT in a strongly typed way.failure // Experimental error handling abstraction.env_logger // A logging implementation for log which is configured via an environment variable.dotenv // A dotenv implementation for Rust.diesel // A safe, extensible ORM and Query Builder for PostgreSQL, SQLite, and MySQL.chrono // Date and time library for Rust.brcypt // Easily hash and verify passwords using bcrypt.actix-web // Actix web is a simple, pragmatic and extremely fast web framework for Rust.actix // Actix is a Rust actors framework.

Login with email and password ➡ Get verified and receive jwt token.Follow the link ➡ register with same email and a password.Registers with email address ➡ Receive an 📨 with a link to verify.Please take all this with a pinch of salt as I’m a still a noob to rust 😉. I will be explaining the steps in each file as we go. We are going to create a web-server in rust that only deals with user registration and authentication. Please Read the Updated version usig actix-web 1.0 here, gitlab repo master branch now points to latest version What?
