Skip to content

Commit 2b7fdba

Browse files
committed
WIP feat: create sqlx.toml format
1 parent 7c7cbee commit 2b7fdba

File tree

11 files changed

+721
-36
lines changed

11 files changed

+721
-36
lines changed

Cargo.toml

+6-4
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ authors.workspace = true
4848
repository.workspace = true
4949

5050
[package.metadata.docs.rs]
51-
features = ["all-databases", "_unstable-all-types"]
51+
features = ["all-databases", "_unstable-all-types", "_unstable-doc"]
5252
rustdoc-args = ["--cfg", "docsrs"]
5353

5454
[features]
@@ -58,9 +58,9 @@ derive = ["sqlx-macros/derive"]
5858
macros = ["derive", "sqlx-macros/macros"]
5959
migrate = ["sqlx-core/migrate", "sqlx-macros?/migrate", "sqlx-mysql?/migrate", "sqlx-postgres?/migrate", "sqlx-sqlite?/migrate"]
6060

61-
# Enable parsing of `sqlx.toml` for configuring macros, migrations, or both
62-
config-macros = ["sqlx-core/config-macros"]
63-
config-migrate = ["sqlx-core/config-migrate"]
61+
# Enable parsing of `sqlx.toml` for configuring macros, migrations, or both.
62+
config-macros = ["sqlx-macros?/config-macros"]
63+
config-migrate = ["sqlx-macros?/config-migrate"]
6464
config-all = ["config-macros", "config-migrate"]
6565

6666
# intended mainly for CI and docs
@@ -76,6 +76,8 @@ _unstable-all-types = [
7676
"uuid",
7777
"bit-vec",
7878
]
79+
# Render documentation that wouldn't otherwise be shown (e.g. `sqlx_core::config`).
80+
_unstable-doc = ["config-all"]
7981

8082
# Base runtime features without TLS
8183
runtime-async-std = ["_rt-async-std", "sqlx-core/_rt-async-std", "sqlx-macros?/_rt-async-std"]

sqlx-core/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ features = ["offline"]
1212

1313
[features]
1414
default = []
15-
migrate = ["sha2", "crc"]
15+
migrate = ["sha2", "crc", "config-migrate"]
1616

1717
any = []
1818

@@ -28,9 +28,9 @@ _tls-none = []
2828
# support offline/decoupled building (enables serialization of `Describe`)
2929
offline = ["serde", "either/serde"]
3030

31-
config-toml = ["serde", "toml/parse"]
32-
config-macros = ["config-toml"]
33-
config-migrate = ["config-toml"]
31+
config = ["serde", "toml/parse"]
32+
config-macros = ["config"]
33+
config-migrate = ["config"]
3434

3535
[dependencies]
3636
# Runtimes

0 commit comments

Comments
 (0)