Actix Web rc 1

This commit is contained in:
Aode (lion) 2022-02-01 10:07:25 -06:00
parent e29bfc921a
commit 38724f6bc1
2 changed files with 88 additions and 72 deletions

123
Cargo.lock generated
View file

@ -37,9 +37,9 @@ dependencies = [
[[package]] [[package]]
name = "actix-http" name = "actix-http"
version = "3.0.0-beta.19" version = "3.0.0-rc.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae58d21721388ea9b2cd0d4c11756b0f34424cdcd6e5cc74c3ce37b4641c8af0" checksum = "08aac516b88cb8cfbfa834c76b58607ffac75946d947dcb6a9ffc5673e1e875d"
dependencies = [ dependencies = [
"actix-codec", "actix-codec",
"actix-rt", "actix-rt",
@ -81,9 +81,9 @@ dependencies = [
[[package]] [[package]]
name = "actix-multipart" name = "actix-multipart"
version = "0.4.0-beta.12" version = "0.4.0-beta.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8362a002d669c85fea5504737a68b9f2d5538069ddd9ccd7d6d5f3eaa62cc000" checksum = "c59b1f14a8b2bc14df9be544d173f5390da5b62d531e406fd0f0ce9b825fea5a"
dependencies = [ dependencies = [
"actix-utils", "actix-utils",
"actix-web", "actix-web",
@ -99,16 +99,16 @@ dependencies = [
[[package]] [[package]]
name = "actix-router" name = "actix-router"
version = "0.5.0-rc.2" version = "0.5.0-rc.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e0b59ad08167ffbb686ddb495846707231e96908b829b1fc218198ec581e2ad" checksum = "cb6506dbef336634ff35d994d58daa0a412ea23751f15f9b4dcac4d594b1ed1f"
dependencies = [ dependencies = [
"bytestring", "bytestring",
"firestorm", "firestorm",
"http", "http",
"log", "log",
"regex", "regex",
"serde 1.0.135", "serde 1.0.136",
] ]
[[package]] [[package]]
@ -155,15 +155,14 @@ dependencies = [
[[package]] [[package]]
name = "actix-tls" name = "actix-tls"
version = "3.0.1" version = "3.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b161450ff646361005a300716e85856780ddc2fde569fd81335cc3c15b2e0933" checksum = "a31ab31563b611fa822480b4255e8750cf0af9ce1b8b7bde298afe8447ef9333"
dependencies = [ dependencies = [
"actix-codec", "actix-codec",
"actix-rt", "actix-rt",
"actix-service", "actix-service",
"actix-utils", "actix-utils",
"derive_more",
"futures-core", "futures-core",
"http", "http",
"log", "log",
@ -185,9 +184,9 @@ dependencies = [
[[package]] [[package]]
name = "actix-web" name = "actix-web"
version = "4.0.0-beta.21" version = "4.0.0-rc.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "606fc29a9bde2907243086ceb93ce56df7584276c2c46abc64a524f645c63c5e" checksum = "d7bfa913583b6cfe5f0d1588e752bcf6b107556422624fefdaf99c40ba2b7f16"
dependencies = [ dependencies = [
"actix-codec", "actix-codec",
"actix-http", "actix-http",
@ -212,20 +211,20 @@ dependencies = [
"once_cell", "once_cell",
"pin-project-lite", "pin-project-lite",
"regex", "regex",
"serde 1.0.135", "serde 1.0.136",
"serde_json", "serde_json",
"serde_urlencoded", "serde_urlencoded",
"smallvec", "smallvec",
"socket2", "socket2",
"time 0.3.6", "time 0.3.7",
"url", "url",
] ]
[[package]] [[package]]
name = "actix-web-codegen" name = "actix-web-codegen"
version = "0.5.0-rc.1" version = "0.5.0-rc.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "98a793e4a7bd059e06e1bc1bd9943b57a47f806de3599d2437441682292c333e" checksum = "4d0976042e6ddc82c7d0dedd64d39959bc26d9bba098b2f6c32a73fbef784eaf"
dependencies = [ dependencies = [
"actix-router", "actix-router",
"proc-macro2", "proc-macro2",
@ -337,9 +336,9 @@ checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
[[package]] [[package]]
name = "awc" name = "awc"
version = "3.0.0-beta.19" version = "3.0.0-beta.20"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4a4cf9b623ee9974723a10c77a3b8c1060ac2d6cfe6d3326512bbc50fe36fad8" checksum = "4a64a95bbf4905fd057ea45b70fdfeeb9c7ae09f03f091642c4e66a16ebb3ad5"
dependencies = [ dependencies = [
"actix-codec", "actix-codec",
"actix-http", "actix-http",
@ -363,7 +362,7 @@ dependencies = [
"pin-project-lite", "pin-project-lite",
"rand", "rand",
"rustls", "rustls",
"serde 1.0.135", "serde 1.0.136",
"serde_json", "serde_json",
"serde_urlencoded", "serde_urlencoded",
"tokio", "tokio",
@ -372,12 +371,12 @@ dependencies = [
[[package]] [[package]]
name = "aws-creds" name = "aws-creds"
version = "0.27.1" version = "0.27.1"
source = "git+https://github.com/asonix/rust-s3?branch=asonix/generic-client#ca6296ac13e9508c68dd5a79d1de64cf39f403b7" source = "git+https://github.com/asonix/rust-s3?branch=asonix/generic-client#c91e4ecacc8c5a351ff360df68a3cb00863b62bd"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"dirs", "dirs",
"rust-ini 0.17.0", "rust-ini 0.17.0",
"serde 1.0.135", "serde 1.0.136",
"serde-xml-rs", "serde-xml-rs",
"serde_derive", "serde_derive",
"url", "url",
@ -498,7 +497,7 @@ dependencies = [
"lazy_static", "lazy_static",
"nom 5.1.2", "nom 5.1.2",
"rust-ini 0.13.0", "rust-ini 0.13.0",
"serde 1.0.135", "serde 1.0.136",
"serde-hjson", "serde-hjson",
"serde_json", "serde_json",
"toml", "toml",
@ -529,7 +528,7 @@ dependencies = [
"futures", "futures",
"hdrhistogram", "hdrhistogram",
"humantime", "humantime",
"serde 1.0.135", "serde 1.0.136",
"serde_json", "serde_json",
"thread_local", "thread_local",
"tokio", "tokio",
@ -890,9 +889,9 @@ dependencies = [
[[package]] [[package]]
name = "h2" name = "h2"
version = "0.3.10" version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c9de88456263e249e241fcd211d3954e2c9b0ef7ccfc235a444eb367cae3689" checksum = "d9f1f717ddc7b2ba36df7e871fd88db79326551d3d6f1fc406fbfd28b582ff8e"
dependencies = [ dependencies = [
"bytes", "bytes",
"fnv", "fnv",
@ -1161,9 +1160,9 @@ dependencies = [
[[package]] [[package]]
name = "libc" name = "libc"
version = "0.2.113" version = "0.2.116"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eef78b64d87775463c549fbd80e19249ef436ea3bf1de2a1eb7e717ec7fab1e9" checksum = "565dbd88872dbe4cc8a46e527f26483c1d1f7afa6b884a3bd6cd893d4f98da74"
[[package]] [[package]]
name = "linked-hash-map" name = "linked-hash-map"
@ -1191,9 +1190,9 @@ checksum = "902eb695eb0591864543cbfbf6d742510642a605a61fc5e97fe6ceb5a30ac4fb"
[[package]] [[package]]
name = "lock_api" name = "lock_api"
version = "0.4.5" version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712a4d093c9976e24e7dbca41db895dabcbac38eb5f4045393d17a95bdfb1109" checksum = "88943dd7ef4a2e5a4bfa2753aaab3013e34ce2533d1996fb18ef591e315e2b3b"
dependencies = [ dependencies = [
"scopeguard", "scopeguard",
] ]
@ -1388,9 +1387,9 @@ dependencies = [
[[package]] [[package]]
name = "num_threads" name = "num_threads"
version = "0.1.2" version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71a1eb3a36534514077c1e079ada2fb170ef30c47d203aa6916138cf882ecd52" checksum = "97ba99ba6393e2c3734791401b66902d981cb03bf190af674ca69949b6d5fb15"
dependencies = [ dependencies = [
"libc", "libc",
] ]
@ -1512,7 +1511,7 @@ dependencies = [
[[package]] [[package]]
name = "pict-rs" name = "pict-rs"
version = "0.3.0-beta.17" version = "0.3.0-beta.18"
dependencies = [ dependencies = [
"actix-form-data", "actix-form-data",
"actix-rt", "actix-rt",
@ -1534,14 +1533,14 @@ dependencies = [
"pin-project-lite", "pin-project-lite",
"reqwest", "reqwest",
"rust-s3", "rust-s3",
"serde 1.0.135", "serde 1.0.136",
"serde_json", "serde_json",
"sha2 0.10.1", "sha2 0.10.1",
"sled", "sled",
"storage-path-generator", "storage-path-generator",
"structopt", "structopt",
"thiserror", "thiserror",
"time 0.3.6", "time 0.3.7",
"tokio", "tokio",
"tokio-uring", "tokio-uring",
"tokio-util", "tokio-util",
@ -1860,7 +1859,7 @@ dependencies = [
"pin-project-lite", "pin-project-lite",
"rustls", "rustls",
"rustls-pemfile", "rustls-pemfile",
"serde 1.0.135", "serde 1.0.136",
"serde_json", "serde_json",
"serde_urlencoded", "serde_urlencoded",
"tokio", "tokio",
@ -1917,7 +1916,7 @@ dependencies = [
[[package]] [[package]]
name = "rust-s3" name = "rust-s3"
version = "0.28.0" version = "0.28.0"
source = "git+https://github.com/asonix/rust-s3?branch=asonix/generic-client#ca6296ac13e9508c68dd5a79d1de64cf39f403b7" source = "git+https://github.com/asonix/rust-s3?branch=asonix/generic-client#c91e4ecacc8c5a351ff360df68a3cb00863b62bd"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-trait", "async-trait",
@ -1934,7 +1933,7 @@ dependencies = [
"md5", "md5",
"percent-encoding", "percent-encoding",
"reqwest", "reqwest",
"serde 1.0.135", "serde 1.0.136",
"serde-xml-rs", "serde-xml-rs",
"serde_derive", "serde_derive",
"sha2 0.9.9", "sha2 0.9.9",
@ -2015,9 +2014,9 @@ checksum = "9dad3f759919b92c3068c696c15c3d17238234498bbdcc80f2c469606f948ac8"
[[package]] [[package]]
name = "serde" name = "serde"
version = "1.0.135" version = "1.0.136"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2cf9235533494ea2ddcdb794665461814781c53f19d87b76e571a1c35acbad2b" checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789"
dependencies = [ dependencies = [
"serde_derive", "serde_derive",
] ]
@ -2041,16 +2040,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "65162e9059be2f6a3421ebbb4fef3e74b7d9e7c60c50a0e292c6239f19f1edfa" checksum = "65162e9059be2f6a3421ebbb4fef3e74b7d9e7c60c50a0e292c6239f19f1edfa"
dependencies = [ dependencies = [
"log", "log",
"serde 1.0.135", "serde 1.0.136",
"thiserror", "thiserror",
"xml-rs", "xml-rs",
] ]
[[package]] [[package]]
name = "serde_derive" name = "serde_derive"
version = "1.0.135" version = "1.0.136"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8dcde03d87d4c973c04be249e7d8f0b35db1c848c487bd43032808e59dd8328d" checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -2065,7 +2064,7 @@ checksum = "d23c1ba4cf0efd44be32017709280b32d1cea5c3f1275c3b6d9e8bc54f758085"
dependencies = [ dependencies = [
"itoa 1.0.1", "itoa 1.0.1",
"ryu", "ryu",
"serde 1.0.135", "serde 1.0.136",
] ]
[[package]] [[package]]
@ -2077,7 +2076,7 @@ dependencies = [
"form_urlencoded", "form_urlencoded",
"itoa 1.0.1", "itoa 1.0.1",
"ryu", "ryu",
"serde 1.0.135", "serde 1.0.136",
] ]
[[package]] [[package]]
@ -2164,9 +2163,9 @@ checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83"
[[package]] [[package]]
name = "socket2" name = "socket2"
version = "0.4.3" version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f82496b90c36d70af5fcd482edaa2e0bd16fade569de1330405fecbbdac736b" checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0"
dependencies = [ dependencies = [
"libc", "libc",
"winapi", "winapi",
@ -2304,14 +2303,14 @@ dependencies = [
[[package]] [[package]]
name = "time" name = "time"
version = "0.3.6" version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c8d54b9298e05179c335de2b9645d061255bcd5155f843b3e328d2cfe0a5b413" checksum = "004cbc98f30fa233c61a38bc77e96a9106e65c88f2d3bef182ae952027e5753d"
dependencies = [ dependencies = [
"itoa 1.0.1", "itoa 1.0.1",
"libc", "libc",
"num_threads", "num_threads",
"serde 1.0.135", "serde 1.0.136",
] ]
[[package]] [[package]]
@ -2331,9 +2330,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
[[package]] [[package]]
name = "tokio" name = "tokio"
version = "1.15.0" version = "1.16.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fbbf1c778ec206785635ce8ad57fe52b3009ae9e0c9f574a728f3049d3e55838" checksum = "0c27a64b625de6d309e8c57716ba93021dccf1b3b5c97edd6d3dd2d2135afc0a"
dependencies = [ dependencies = [
"bytes", "bytes",
"libc", "libc",
@ -2426,7 +2425,7 @@ version = "0.5.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa"
dependencies = [ dependencies = [
"serde 1.0.135", "serde 1.0.136",
] ]
[[package]] [[package]]
@ -2563,9 +2562,9 @@ dependencies = [
[[package]] [[package]]
name = "tracing-actix-web" name = "tracing-actix-web"
version = "0.5.0-beta.11" version = "0.5.0-rc.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71f2dfaaf009c5e9786e2f2dfbde63d5fa44409434d64190abfef5ade67d89b1" checksum = "0066b8102bdd05325d02966fac8b5e360eafd8dcdf81006c4d30f3543f488714"
dependencies = [ dependencies = [
"actix-web", "actix-web",
"opentelemetry", "opentelemetry",
@ -2589,9 +2588,9 @@ dependencies = [
[[package]] [[package]]
name = "tracing-awc" name = "tracing-awc"
version = "0.1.0-beta.20" version = "0.1.0-beta.21"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff704c1995cdf9178e6252f560823147f51f1bb2f81de3941acfcb0827a6dd90" checksum = "f6fbb546f391778848209c60f8e501e282fc00fa1dca1216fc2b947a49af485b"
dependencies = [ dependencies = [
"actix-http", "actix-http",
"actix-service", "actix-service",
@ -2659,9 +2658,9 @@ dependencies = [
[[package]] [[package]]
name = "tracing-subscriber" name = "tracing-subscriber"
version = "0.3.6" version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77be66445c4eeebb934a7340f227bfe7b338173d3f8c00a60a5a58005c9faecf" checksum = "5312f325fe3588e277415f5a6cca1f4ccad0f248c4cd5a4bd33032d7286abc22"
dependencies = [ dependencies = [
"ansi_term", "ansi_term",
"lazy_static", "lazy_static",
@ -2752,7 +2751,7 @@ dependencies = [
"idna", "idna",
"matches", "matches",
"percent-encoding", "percent-encoding",
"serde 1.0.135", "serde 1.0.136",
] ]
[[package]] [[package]]
@ -2762,7 +2761,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7"
dependencies = [ dependencies = [
"getrandom", "getrandom",
"serde 1.0.135", "serde 1.0.136",
] ]
[[package]] [[package]]
@ -2890,9 +2889,9 @@ dependencies = [
[[package]] [[package]]
name = "which" name = "which"
version = "4.2.2" version = "4.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea187a8ef279bc014ec368c27a920da2024d2a711109bfbe3440585d5cf27ad9" checksum = "2a5a7e487e921cf220206864a94a89b6c6905bfc19f1057fa26a4cb360e5c1d2"
dependencies = [ dependencies = [
"either", "either",
"lazy_static", "lazy_static",

View file

@ -1,7 +1,7 @@
[package] [package]
name = "pict-rs" name = "pict-rs"
description = "A simple image hosting service" description = "A simple image hosting service"
version = "0.3.0-beta.17" version = "0.3.0-beta.18"
authors = ["asonix <asonix@asonix.dog>"] authors = ["asonix <asonix@asonix.dog>"]
license = "AGPL-3.0" license = "AGPL-3.0"
readme = "README.md" readme = "README.md"
@ -12,16 +12,23 @@ edition = "2021"
[features] [features]
default = ["object-storage"] default = ["object-storage"]
object-storage = ["reqwest", "rust-s3"] object-storage = ["reqwest", "rust-s3"]
io-uring = ["actix-rt/io-uring", "actix-server/io-uring", "tokio-uring", "sled/io_uring"] io-uring = [
"actix-rt/io-uring",
"actix-server/io-uring",
"tokio-uring",
"sled/io_uring",
]
[dependencies] [dependencies]
actix-form-data = "0.6.0-beta.11" actix-form-data = "0.6.0-beta.11"
actix-rt = "2.2.0" actix-rt = "2.6.0"
actix-server = "2.0.0-rc.1" actix-server = "2.0.0"
actix-web = { version = "4.0.0-beta.10", default-features = false } actix-web = { version = "4.0.0-rc.1", default-features = false }
anyhow = "1.0" anyhow = "1.0"
async-trait = "0.1.51" async-trait = "0.1.51"
awc = { version = "3.0.0-beta.9", default-features = false, features = ["rustls"] } awc = { version = "3.0.0-beta.20", default-features = false, features = [
"rustls",
] }
base64 = "0.13.0" base64 = "0.13.0"
config = "0.11.0" config = "0.11.0"
console-subscriber = "0.1" console-subscriber = "0.1"
@ -33,8 +40,14 @@ once_cell = "1.4.0"
opentelemetry = { version = "0.16", features = ["rt-tokio"] } opentelemetry = { version = "0.16", features = ["rt-tokio"] }
opentelemetry-otlp = "0.9" opentelemetry-otlp = "0.9"
pin-project-lite = "0.2.7" pin-project-lite = "0.2.7"
reqwest = { version = "0.11.5", default-features = false, features = ["rustls-tls", "stream"], optional = true } reqwest = { version = "0.11.5", default-features = false, features = [
rust-s3 = { version = "0.28.0", default-features = false, features = ["fail-on-err", "with-reqwest"], optional = true, git = "https://github.com/asonix/rust-s3", branch = "asonix/generic-client" } "rustls-tls",
"stream",
], optional = true }
rust-s3 = { version = "0.28.0", default-features = false, features = [
"fail-on-err",
"with-reqwest",
], optional = true, git = "https://github.com/asonix/rust-s3", branch = "asonix/generic-client" }
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0" serde_json = "1.0"
sha2 = "0.10.0" sha2 = "0.10.0"
@ -51,12 +64,16 @@ tracing-error = "0.2.0"
tracing-futures = "0.2.4" tracing-futures = "0.2.4"
tracing-log = "0.1.2" tracing-log = "0.1.2"
tracing-opentelemetry = "0.16" tracing-opentelemetry = "0.16"
tracing-subscriber = { version = "0.3.0", features = ["env-filter", "fmt", "tracing-log"] } tracing-subscriber = { version = "0.3.0", features = [
"env-filter",
"fmt",
"tracing-log",
] }
url = { version = "2.2", features = ["serde"] } url = { version = "2.2", features = ["serde"] }
uuid = { version = "0.8.2", features = ["v4", "serde"] } uuid = { version = "0.8.2", features = ["v4", "serde"] }
[dependencies.tracing-actix-web] [dependencies.tracing-actix-web]
version = "0.5.0-beta.5" version = "0.5.0-rc.1"
default-features = false default-features = false
features = ["emit_event_on_error", "opentelemetry_0_16"] features = ["emit_event_on_error", "opentelemetry_0_16"]