Add the diesel crate with the sqlite and libsqlite3-sys/bundled features to your Cargo.toml to compile SQLite directly into your binary.
[dependencies]
diesel = { version = "2.2", features = ["sqlite", "libsqlite3-sys/bundled"] }
In your Rust code, import the connection type and establish a connection to your database file:
use diesel::prelude::*;
use diesel::SqliteConnection;
fn main() {
let mut connection = SqliteConnection::establish("file:my_database.sqlite?mode=ro").unwrap();
println!("Connected to SQLite");
}