rs-db-driver-mysql-diesel 0.1.0
MySQL / MariaDB: diesel (the driver, re-exported, with a runnable example)
Install
cargo add rs-db-driver-mysql-diesel --registry rupm
In Ruststudio: Packages, search for rs-db-driver-mysql-diesel, Install.
Owner: Rust Studio. Licence: MIT OR Apache-2.0. Total downloads: 0. Published 2026-11-23.
Versions
- 0.1.0 2026-11-23
README
# rs-db-driver-mysql-diesel
MySQL / MariaDB - diesel: ORM and query builder
Add it with `rupm add rs-db-driver-mysql-diesel` (or `cargo add rs-db-driver-mysql-diesel --registry rupm`). The driver `diesel` is re-exported as `rs_db_driver_mysql_diesel::diesel`.
Also serves: MariaDB
**Needs on the PC:** the MySQL client library (libmysqlclient or the MariaDB connector) at build time
## Example
```rust
use diesel::prelude::*;
use diesel::sql_query;
fn main() -> Result<(), diesel::result::Error> {
let mut conn = MysqlConnection::establish("mysql://user:password@localhost/mydb").expect("cannot connect");
sql_query("SELECT 1").execute(&mut conn)?;
println!("connected");
Ok(())
}
```