remove sqlx from wasm-exclusion, add futures-timer

This commit is contained in:
bitfl0wer 2023-11-13 15:29:37 +01:00
parent ba3acd8d08
commit 5fff060f4b
No known key found for this signature in database
GPG Key ID: 0ACD574FCF5226CF
2 changed files with 39 additions and 12 deletions

24
Cargo.lock generated
View File

@ -197,6 +197,7 @@ dependencies = [
"chorus-macros", "chorus-macros",
"chrono", "chrono",
"custom_error", "custom_error",
"futures-timer",
"futures-util", "futures-util",
"getrandom", "getrandom",
"hostname", "hostname",
@ -623,6 +624,12 @@ version = "0.3.29"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2"
[[package]]
name = "futures-timer"
version = "3.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c"
[[package]] [[package]]
name = "futures-util" name = "futures-util"
version = "0.3.29" version = "0.3.29"
@ -756,6 +763,12 @@ dependencies = [
"unicode-segmentation", "unicode-segmentation",
] ]
[[package]]
name = "hermit-abi"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7"
[[package]] [[package]]
name = "hex" name = "hex"
version = "0.4.3" version = "0.4.3"
@ -1196,6 +1209,16 @@ dependencies = [
"libm", "libm",
] ]
[[package]]
name = "num_cpus"
version = "1.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"
dependencies = [
"hermit-abi",
"libc",
]
[[package]] [[package]]
name = "object" name = "object"
version = "0.32.1" version = "0.32.1"
@ -2316,6 +2339,7 @@ dependencies = [
"bytes", "bytes",
"libc", "libc",
"mio", "mio",
"num_cpus",
"pin-project-lite", "pin-project-lite",
"socket2 0.5.5", "socket2 0.5.5",
"tokio-macros", "tokio-macros",

View File

@ -11,8 +11,10 @@ website = ["https://discord.com/invite/m3FpcapGDD"]
[features] [features]
default = ["client"] default = ["client", "rt-multi-thread"]
backend = ["dep:poem", "dep:sqlx"] backend = ["dep:poem", "dep:sqlx"]
rt-multi-thread = ["tokio/rt-multi-thread"]
rt = ["tokio/rt"]
client = [] client = []
[dependencies] [dependencies]
@ -38,17 +40,6 @@ jsonwebtoken = "8.3.0"
log = "0.4.20" log = "0.4.20"
async-trait = "0.1.73" async-trait = "0.1.73"
chorus-macros = "0.2.0" chorus-macros = "0.2.0"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
rustls = "0.21.8"
rustls-native-certs = "0.6.3"
rand = "0.8.5"
hostname = "0.3.1"
tokio-tungstenite = { version = "0.20.0", features = [
"rustls-tls-native-roots",
"rustls-native-certs",
] }
native-tls = "0.2.11"
sqlx = { version = "0.7.1", features = [ sqlx = { version = "0.7.1", features = [
"mysql", "mysql",
"sqlite", "sqlite",
@ -58,6 +49,18 @@ sqlx = { version = "0.7.1", features = [
"runtime-tokio-native-tls", "runtime-tokio-native-tls",
"any", "any",
], optional = true } ], optional = true }
futures-timer = "3.0.2"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
rustls = "0.21.8"
rustls-native-certs = "0.6.3"
rand = "0.8.5"
tokio-tungstenite = { version = "0.20.0", features = [
"rustls-tls-native-roots",
"rustls-native-certs",
] }
native-tls = "0.2.11"
hostname = "0.3.1"
[target.'cfg(target_arch = "wasm32")'.dependencies] [target.'cfg(target_arch = "wasm32")'.dependencies]
ws_stream_wasm = "0.7.4" ws_stream_wasm = "0.7.4"