Set Up Diesel
Explore how to set up Diesel, a popular Rust ORM, by installing necessary database drivers and configuring your project environment. Understand setting up SQLite, MySQL, or PostgreSQL, creating your project structure, and connecting to the database in Rust. This lesson prepares you to integrate databases effectively into your scalable web development projects.
We'll cover the following...
As web developers, we might need access to a database. One of the resources used in most web frameworks is an ORM (object-relational mapping) tool.
Diesel is one of the most popular and stable ORM tools in Rust.
In this lesson, we’ll learn to install and configure it for our projects.
We want to install the required database drivers. Instructions for installing these drivers for Linux/Mac can be found here.
Install database drivers on Windows
Instructions for installing the three most popular relational database management systems (RDBMS) on Windows are below.
SQLite
- Download precompile Windows binaries.
- Extract both archives to folder
C:\sqlite3