Manage your database with Diesel ORM

A little tutorial of what I learned with Diesel

TH

Thomas

@Thomas

diesel.png

First setup your rust project

Foor now you can follow the content of the documentation of Diesel

cargo new --lib diesel_demo
cd diesel_demo
cargo add diesel --features mysql
cargo add dotenvy

Install diesel_cli

Here comes the problems:

test
cargo install diesel_cli

This above code doesn't work You need to first install the mysql connector, for that run the following:

sudo apt-get install libmysqlclient-dev
# With archlinux:
paru -S libmysqlclient

Or in windows install the package from following website