Skip to content

Commit 0d27f44

Browse files
committed
wip crate refactors
1 parent 7f0d1af commit 0d27f44

File tree

285 files changed

+599
-6605
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

285 files changed

+599
-6605
lines changed

Cargo.lock

+57-1,686
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+28-30
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,21 @@ members = [
33
".",
44
"sqlx-core",
55
"sqlx-macros",
6-
"sqlx-test",
7-
"sqlx-cli",
8-
"sqlx-bench",
9-
"examples/mysql/todos",
10-
"examples/postgres/axum-social-with-tests",
11-
"examples/postgres/files",
12-
"examples/postgres/json",
13-
"examples/postgres/listen",
14-
"examples/postgres/todos",
15-
"examples/postgres/mockable-todos",
16-
"examples/postgres/transaction",
17-
"examples/sqlite/todos",
6+
# "sqlx-test",
7+
# "sqlx-cli",
8+
# "sqlx-bench",
9+
"sqlx-mysql",
10+
"sqlx-postgres",
11+
"sqlx-sqlite",
12+
# "examples/mysql/todos",
13+
# "examples/postgres/axum-social-with-tests",
14+
# "examples/postgres/files",
15+
# "examples/postgres/json",
16+
# "examples/postgres/listen",
17+
# "examples/postgres/todos",
18+
# "examples/postgres/mockable-todos",
19+
# "examples/postgres/transaction",
20+
# "examples/sqlite/todos",
1821
]
1922

2023
[package]
@@ -51,9 +54,8 @@ tls = []
5154
offline = ["sqlx-macros/offline", "sqlx-core/offline"]
5255

5356
# intended mainly for CI and docs
54-
all = ["tls", "all-databases", "all-types"]
55-
all-databases = ["mysql", "sqlite", "postgres", "mssql", "any"]
56-
all-types = [
57+
#all-databases = ["mysql", "sqlite", "postgres", "mssql", "any"]
58+
_unstable_all-types = [
5759
"bigdecimal",
5860
"decimal",
5961
"json",
@@ -64,18 +66,15 @@ all-types = [
6466
"uuid",
6567
"bit-vec",
6668
"bstr",
67-
"git2",
6869
]
6970

7071
# Base runtime features without TLS
71-
runtime-actix = ["_rt-tokio", "sqlx-core/runtime-tokio", "sqlx-macros/runtime-tokio"]
72-
runtime-async-std = ["_rt-async-std", "sqlx-core/runtime-async-std", "sqlx-macros/runtime-async-std"]
73-
runtime-tokio = ["_rt-tokio", "sqlx-core/runtime-tokio", "sqlx-macros/runtime-tokio"]
72+
runtime-async-std = ["_rt-async-std", "sqlx-core/_rt-async-std", "sqlx-macros/_rt-async-std"]
73+
runtime-tokio = ["_rt-tokio", "sqlx-core/_rt-tokio", "sqlx-macros/_rt-tokio"]
7474

7575
# TLS features
76-
# didn't call this `tls-native-tls` because of the annoying tautology
77-
tls-native = ["sqlx-core/tls-native", "sqlx-macros/tls-native"]
78-
tls-rustls = ["sqlx-core/tls-rustls", "sqlx-macros/tls-rustls"]
76+
tls-native-tls = ["sqlx-core/_tls-native-tls", "sqlx-macros/_tls-native-tls"]
77+
tls-rustls = ["sqlx-core/_tls-rustls", "sqlx-macros/_tls-rustls"]
7978

8079
# No-op feature used by the workflows to compile without TLS enabled. Not meant for general use.
8180
tls-none = []
@@ -84,10 +83,10 @@ tls-none = []
8483
runtime-actix-native-tls = ["runtime-tokio-native-tls"]
8584
runtime-actix-rustls = ["runtime-tokio-rustls"]
8685

87-
runtime-async-std-native-tls = ["runtime-async-std", "tls-native"]
86+
runtime-async-std-native-tls = ["runtime-async-std", "tls-native-tls"]
8887
runtime-async-std-rustls = ["runtime-async-std", "tls-rustls"]
8988

90-
runtime-tokio-native-tls = ["runtime-tokio", "tls-native"]
89+
runtime-tokio-native-tls = ["runtime-tokio", "tls-native-tls"]
9190
runtime-tokio-rustls = ["runtime-tokio", "tls-rustls"]
9291

9392
# for conditional compilation
@@ -96,10 +95,10 @@ _rt-tokio = []
9695

9796
# database
9897
any = ["sqlx-core/any"]
99-
postgres = ["sqlx-core/postgres", "sqlx-macros/postgres"]
100-
mysql = ["sqlx-core/mysql", "sqlx-macros/mysql"]
101-
sqlite = ["sqlx-core/sqlite", "sqlx-macros/sqlite"]
102-
mssql = ["sqlx-core/mssql", "sqlx-macros/mssql"]
98+
#postgres = ["sqlx-core/postgres", "sqlx-macros/postgres"]
99+
#mysql = ["sqlx-core/mysql", "sqlx-macros/mysql"]
100+
#sqlite = ["sqlx-core/sqlite", "sqlx-macros/sqlite"]
101+
#mssql = ["sqlx-core/mssql", "sqlx-macros/mssql"]
103102

104103
# types
105104
bigdecimal = ["sqlx-core/bigdecimal", "sqlx-macros/bigdecimal"]
@@ -112,7 +111,6 @@ json = ["sqlx-core/json", "sqlx-macros/json"]
112111
time = ["sqlx-core/time", "sqlx-macros/time"]
113112
bit-vec = ["sqlx-core/bit-vec", "sqlx-macros/bit-vec"]
114113
bstr = ["sqlx-core/bstr"]
115-
git2 = ["sqlx-core/git2"]
116114

117115
[dependencies]
118116
sqlx-core = { version = "0.6.2", path = "sqlx-core", default-features = false }
@@ -137,7 +135,7 @@ rand_xoshiro = "0.6.0"
137135
hex = "0.4.3"
138136
tempdir = "0.3.7"
139137
# Needed to test SQLCipher
140-
libsqlite3-sys = { version = "0.24", features = ["bundled-sqlcipher"] }
138+
libsqlite3-sys = { version = "0.25", features = ["bundled-sqlcipher"] }
141139

142140
#
143141
# Any

sqlx-cli/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ filetime = "0.2"
5252
backoff = { version = "0.4.0", features = ["futures", "tokio"] }
5353

5454
[features]
55-
default = ["postgres", "sqlite", "mysql", "native-tls"]
55+
#default = ["postgres", "sqlite", "mysql", "native-tls"]
5656
rustls = ["sqlx/runtime-tokio-rustls"]
5757
native-tls = ["sqlx/runtime-tokio-native-tls"]
5858

5959
# databases
60-
mysql = ["sqlx/mysql"]
61-
postgres = ["sqlx/postgres"]
62-
sqlite = ["sqlx/sqlite"]
60+
#mysql = ["sqlx/mysql"]
61+
#postgres = ["sqlx/postgres"]
62+
#sqlite = ["sqlx/sqlite"]
6363

6464
# workaround for musl + openssl issues
6565
openssl-vendored = ["openssl/vendored"]

sqlx-core/Cargo.toml

+26-77
Original file line numberDiff line numberDiff line change
@@ -16,36 +16,33 @@ authors = [
1616
features = ["all-databases", "all-types", "offline", "runtime-tokio-native-tls"]
1717

1818
[features]
19-
default = ["migrate"]
19+
default = []
2020
migrate = ["sha2", "crc"]
2121

2222
# databases
23-
all-databases = ["postgres", "mysql", "sqlite", "mssql", "any"]
24-
postgres = [
25-
"md-5",
26-
"sha2",
27-
"base64",
28-
"sha1",
29-
"rand",
30-
"hmac",
31-
"futures-channel/sink",
32-
"futures-util/sink",
33-
"json",
34-
"dirs",
35-
"whoami",
36-
"hkdf"
37-
]
38-
mysql = [
39-
"sha1",
40-
"sha2",
41-
"generic-array",
42-
"num-bigint",
43-
"digest",
44-
"rand",
45-
"rsa",
46-
]
47-
sqlite = ["libsqlite3-sys", "futures-executor", "flume"]
48-
mssql = ["uuid", "encoding_rs", "regex"]
23+
#postgres = [
24+
# "md-5",
25+
# "sha2",
26+
# "base64",
27+
# "sha1",
28+
# "rand",
29+
# "hmac",
30+
# "futures-channel/sink",
31+
# "futures-util/sink",
32+
# "json",
33+
# "dirs",
34+
# "whoami",
35+
# "hkdf"
36+
#]
37+
#mysql = [
38+
# "sha1",
39+
# "sha2",
40+
# "generic-array",
41+
# "num-bigint",
42+
# "digest",
43+
# "rand",
44+
# "rsa",
45+
#]
4946
any = []
5047

5148
# types
@@ -64,35 +61,6 @@ bigdecimal = ["bigdecimal_", "num-bigint"]
6461
decimal = ["rust_decimal", "num-bigint"]
6562
json = ["serde", "serde_json"]
6663

67-
# runtimes
68-
runtime-actix-native-tls = ["runtime-tokio-native-tls"]
69-
runtime-async-std-native-tls = [
70-
"sqlx-rt/runtime-async-std-native-tls",
71-
"sqlx/runtime-async-std-native-tls",
72-
"_tls-native-tls",
73-
"_rt-async-std",
74-
]
75-
runtime-tokio-native-tls = [
76-
"sqlx-rt/runtime-tokio-native-tls",
77-
"sqlx/runtime-tokio-native-tls",
78-
"_tls-native-tls",
79-
"_rt-tokio",
80-
]
81-
82-
runtime-actix-rustls = ['runtime-tokio-rustls']
83-
runtime-async-std-rustls = [
84-
"sqlx-rt/runtime-async-std-rustls",
85-
"sqlx/runtime-async-std-rustls",
86-
"_tls-rustls",
87-
"_rt-async-std",
88-
]
89-
runtime-tokio-rustls = [
90-
"sqlx-rt/runtime-tokio-rustls",
91-
"sqlx/runtime-tokio-rustls",
92-
"_tls-rustls",
93-
"_rt-tokio"
94-
]
95-
9664
# for conditional compilation
9765
_rt-async-std = []
9866
_rt-tokio = ["tokio-stream"]
@@ -106,8 +74,6 @@ offline = ["serde", "either/serde"]
10674
paste = "1.0.6"
10775
ahash = "0.7.6"
10876
atoi = "1.0"
109-
sqlx-rt = { path = "../sqlx-rt", version = "0.6.2" }
110-
base64 = { version = "0.13.0", default-features = false, optional = true, features = ["std"] }
11177
bigdecimal_ = { version = "0.3.0", optional = true, package = "bigdecimal" }
11278
rust_decimal = { version = "1.19.0", optional = true }
11379
bit-vec = { version = "0.6.3", optional = true }
@@ -118,36 +84,22 @@ chrono = { version = "0.4.19", default-features = false, features = ["clock"], o
11884
crc = { version = "3", optional = true }
11985
crossbeam-queue = "0.3.2"
12086
digest = { version = "0.10.0", default-features = false, optional = true, features = ["std"] }
121-
dirs = { version = "4.0.0", optional = true }
12287
encoding_rs = { version = "0.8.30", optional = true }
12388
either = "1.6.1"
12489
futures-channel = { version = "0.3.19", default-features = false, features = ["sink", "alloc", "std"] }
12590
futures-core = { version = "0.3.19", default-features = false }
91+
futures-io = "0.3.24"
12692
futures-intrusive = "0.4.0"
12793
futures-util = { version = "0.3.19", default-features = false, features = ["alloc", "sink"] }
128-
# used by the SQLite worker thread to block on the async mutex that locks the database handle
129-
futures-executor = { version = "0.3.19", optional = true }
130-
flume = { version = "0.10.9", optional = true, default-features = false, features = ["async"] }
13194
generic-array = { version = "0.14.4", default-features = false, optional = true }
13295
hex = "0.4.3"
133-
hmac = { version = "0.12.0", default-features = false, optional = true }
134-
itoa = "1.0.1"
13596
ipnetwork = { version = "0.19.0", default-features = false, optional = true }
13697
mac_address = { version = "1.1.2", default-features = false, optional = true }
137-
libc = "0.2.112"
138-
libsqlite3-sys = { version = "0.25.1", optional = true, default-features = false, features = [
139-
"pkg-config",
140-
"vcpkg",
141-
"bundled",
142-
"unlock_notify"
143-
] }
14498
log = { version = "0.4.14", default-features = false }
145-
md-5 = { version = "0.10.0", default-features = false, optional = true }
14699
memchr = { version = "2.4.1", default-features = false }
147100
num-bigint = { version = "0.4.0", default-features = false, optional = true, features = ["std"] }
148101
once_cell = "1.9.0"
149102
percent-encoding = "2.1.0"
150-
rand = { version = "0.8.4", default-features = false, optional = true, features = ["std", "std_rng"] }
151103
regex = { version = "1.5.5", optional = true }
152104
rsa = { version = "0.6.0", optional = true }
153105
rustls = { version = "0.20.1", features = ["dangerous_configuration"], optional = true }
@@ -164,19 +116,16 @@ smallvec = "1.7.0"
164116
url = { version = "2.2.2", default-features = false }
165117
uuid = { version = "1.0", default-features = false, optional = true, features = ["std"] }
166118
webpki-roots = { version = "0.22.0", optional = true }
167-
whoami = { version = "1.2.1", optional = true }
168119
stringprep = "0.1.2"
169120
bstr = { version = "0.2.17", default-features = false, features = ["std"], optional = true }
170-
git2 = { version = "0.14", default-features = false, optional = true }
171121
hashlink = "0.8.0"
172122
# NOTE: *must* remain below 1.7.0 to allow users to avoid the `ahash` cyclic dependency problem by pinning the version
173123
# https://github.com/tkaitchuck/aHash/issues/95#issuecomment-874150078
174124
indexmap = "1.6.0"
175-
hkdf = { version = "0.12.0", optional = true }
176125
event-listener = "2.5.2"
177126

178127
dotenvy = "0.15"
179128

180129
[dev-dependencies]
181-
sqlx = { version = "0.6.2", path = "..", features = ["postgres", "sqlite", "mysql"] }
130+
#sqlx = { version = "0.6.2", path = "..", features = ["postgres", "sqlite", "mysql"] }
182131
tokio = { version = "1", features = ["rt"] }

0 commit comments

Comments
 (0)