Added deps for using Diesel in Rocket

pull/11/head
Jef Roosens 2021-06-27 11:36:54 +02:00
parent 0326f6e0fd
commit 569e9c935b
Signed by: Jef Roosens
GPG Key ID: 955C0660072F691F
3 changed files with 93 additions and 2 deletions

78
Cargo.lock generated
View File

@ -186,6 +186,7 @@ dependencies = [
"byteorder",
"diesel_derives",
"pq-sys",
"r2d2",
]
[[package]]
@ -199,6 +200,16 @@ dependencies = [
"syn",
]
[[package]]
name = "diesel_migrations"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf3cde8413353dc7f5d72fa8ce0b99a560a359d2c5ef1e5817ca731cd9008f4c"
dependencies = [
"migrations_internals",
"migrations_macros",
]
[[package]]
name = "discard"
version = "1.0.4"
@ -403,7 +414,9 @@ name = "hilde"
version = "0.1.0"
dependencies = [
"diesel",
"diesel_migrations",
"rocket",
"rocket_sync_db_pools",
]
[[package]]
@ -545,6 +558,27 @@ version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b16bd47d9e329435e309c58469fe0791c2d0d1ba96ec0954152a5ae2b04387dc"
[[package]]
name = "migrations_internals"
version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b4fc84e4af020b837029e017966f86a1c2d5e83e64b589963d5047525995860"
dependencies = [
"diesel",
]
[[package]]
name = "migrations_macros"
version = "1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9753f12909fd8d923f75ae5c3258cae1ed3c8ec052e1b38c93c21a6d157f789c"
dependencies = [
"migrations_internals",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "mime"
version = "0.3.16"
@ -743,6 +777,17 @@ dependencies = [
"proc-macro2",
]
[[package]]
name = "r2d2"
version = "0.8.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "545c5bc2b880973c9c10e4067418407a0ccaa3091781d1671d46eb35107cb26f"
dependencies = [
"log",
"parking_lot",
"scheduled-thread-pool",
]
[[package]]
name = "rand"
version = "0.8.4"
@ -903,6 +948,30 @@ dependencies = [
"uncased",
]
[[package]]
name = "rocket_sync_db_pools"
version = "0.1.0-rc.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38cfdfebd552d075c368e641c88a5cd6ce1c58c5c710548aeb777abb48830f4b"
dependencies = [
"diesel",
"r2d2",
"rocket",
"rocket_sync_db_pools_codegen",
"serde",
"tokio",
]
[[package]]
name = "rocket_sync_db_pools_codegen"
version = "0.1.0-rc.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5267808c094db5366e1d8925aaf9f2ce05ff9b3bd92cb18c7040a1fe219c2e25"
dependencies = [
"devise",
"quote",
]
[[package]]
name = "rustc_version"
version = "0.2.3"
@ -924,6 +993,15 @@ version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e"
[[package]]
name = "scheduled-thread-pool"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc6f74fd1204073fa02d5d5d68bec8021be4c38690b61264b2fdb48083d0e7d7"
dependencies = [
"parking_lot",
]
[[package]]
name = "scoped-tls"
version = "1.0.0"

View File

@ -9,3 +9,9 @@ edition = "2018"
[dependencies]
rocket = "0.5.0-rc.1"
diesel = { version = "1.4.7", features = ["postgres"] }
diesel_migrations = "1.4.0"
[dependencies.rocket_sync_db_pools]
version = "0.1.0-rc.1"
default_features = false
features = ["diesel_postgres_pool"]

View File

@ -1,3 +1,10 @@
fn main() {
println!("Hello, world!");
#[macro_use]
extern crate rocket;
#[macro_use]
extern crate diesel_migrations;
#[launch]
fn rocket() -> _ {
rocket::build()
}