build: install Diesel

This commit is contained in:
Matouš Volf 2024-08-16 09:30:16 +02:00
parent c35d5c4464
commit 708bcf7638
5 changed files with 96 additions and 1 deletions

1
.env.dev Normal file
View File

@ -0,0 +1 @@
DATABASE_URL=postgres://app:app@db/todo_baggins

3
.gitignore vendored
View File

@ -5,3 +5,6 @@
/node_modules/ /node_modules/
**/*.rs.bk **/*.rs.bk
.env
.env.prod

90
Cargo.lock generated
View File

@ -110,6 +110,12 @@ version = "3.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
[[package]]
name = "byteorder"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]] [[package]]
name = "bytes" name = "bytes"
version = "1.7.1" version = "1.7.1"
@ -276,6 +282,7 @@ dependencies = [
"ident_case", "ident_case",
"proc-macro2", "proc-macro2",
"quote", "quote",
"strsim",
"syn", "syn",
] ]
@ -303,6 +310,41 @@ dependencies = [
"parking_lot_core", "parking_lot_core",
] ]
[[package]]
name = "diesel"
version = "2.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf97ee7261bb708fa3402fa9c17a54b70e90e3cb98afb3dc8999d5512cb03f94"
dependencies = [
"bitflags",
"byteorder",
"diesel_derives",
"itoa",
"pq-sys",
]
[[package]]
name = "diesel_derives"
version = "2.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6ff2be1e7312c858b2ef974f5c7089833ae57b5311b334b30923af58e5718d8"
dependencies = [
"diesel_table_macro_syntax",
"dsl_auto_type",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "diesel_table_macro_syntax"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "209c735641a413bc68c4923a9d6ad4bcb3ca306b794edaa7eb0b3228a99ffb25"
dependencies = [
"syn",
]
[[package]] [[package]]
name = "dioxus" name = "dioxus"
version = "0.5.6" version = "0.5.6"
@ -612,6 +654,26 @@ dependencies = [
"syn", "syn",
] ]
[[package]]
name = "dsl_auto_type"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c5d9abe6314103864cc2d8901b7ae224e0ab1a103a0a416661b4097b0779b607"
dependencies = [
"darling",
"either",
"heck",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "either"
version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
[[package]] [[package]]
name = "enumset" name = "enumset"
version = "1.1.5" version = "1.1.5"
@ -1025,6 +1087,12 @@ dependencies = [
"allocator-api2", "allocator-api2",
] ]
[[package]]
name = "heck"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]] [[package]]
name = "http" name = "http"
version = "0.2.12" version = "0.2.12"
@ -1331,6 +1399,15 @@ dependencies = [
"futures-io", "futures-io",
] ]
[[package]]
name = "pq-sys"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a24ff9e4cf6945c988f0db7005d87747bf72864965c3529d259ad155ac41d584"
dependencies = [
"vcpkg",
]
[[package]] [[package]]
name = "prettyplease" name = "prettyplease"
version = "0.2.20" version = "0.2.20"
@ -1626,6 +1703,12 @@ dependencies = [
"lock_api", "lock_api",
] ]
[[package]]
name = "strsim"
version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]] [[package]]
name = "syn" name = "syn"
version = "2.0.74" version = "2.0.74"
@ -1692,6 +1775,7 @@ checksum = "c7c4ceeeca15c8384bbc3e011dbd8fccb7f068a440b752b7d9b32ceb0ca0e2e8"
name = "todo-baggins" name = "todo-baggins"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"diesel",
"dioxus", "dioxus",
"dioxus-logger", "dioxus-logger",
] ]
@ -1820,6 +1904,12 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
[[package]]
name = "vcpkg"
version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
[[package]] [[package]]
name = "version_check" name = "version_check"
version = "0.9.5" version = "0.9.5"

View File

@ -7,6 +7,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
diesel = { version = "2.2.2", features = ["postgres"] }
dioxus = { version = "0.5", features = ["web", "router"] } dioxus = { version = "0.5", features = ["web", "router"] }

View File

@ -1,7 +1,7 @@
FROM rust:1.80-bookworm FROM rust:1.80-bookworm
RUN rustup target add wasm32-unknown-unknown RUN rustup target add wasm32-unknown-unknown
RUN cargo install dioxus-cli RUN cargo install dioxus-cli diesel_cli
RUN apt-get update && apt-get install -y nodejs npm RUN apt-get update && apt-get install -y nodejs npm
COPY . /srv/app COPY . /srv/app