Skip to content

Commit

Permalink
WIP feat: create sqlx.toml format
Browse files Browse the repository at this point in the history
  • Loading branch information
abonander committed Jul 27, 2024
1 parent 7c7cbee commit 2b7fdba
Show file tree
Hide file tree
Showing 11 changed files with 721 additions and 36 deletions.
10 changes: 6 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ authors.workspace = true
repository.workspace = true

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

[features]
Expand All @@ -58,9 +58,9 @@ derive = ["sqlx-macros/derive"]
macros = ["derive", "sqlx-macros/macros"]
migrate = ["sqlx-core/migrate", "sqlx-macros?/migrate", "sqlx-mysql?/migrate", "sqlx-postgres?/migrate", "sqlx-sqlite?/migrate"]

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

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

# Base runtime features without TLS
runtime-async-std = ["_rt-async-std", "sqlx-core/_rt-async-std", "sqlx-macros?/_rt-async-std"]
Expand Down
8 changes: 4 additions & 4 deletions sqlx-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ features = ["offline"]

[features]
default = []
migrate = ["sha2", "crc"]
migrate = ["sha2", "crc", "config-migrate"]

any = []

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

config-toml = ["serde", "toml/parse"]
config-macros = ["config-toml"]
config-migrate = ["config-toml"]
config = ["serde", "toml/parse"]
config-macros = ["config"]
config-migrate = ["config"]

[dependencies]
# Runtimes
Expand Down
Loading

0 comments on commit 2b7fdba

Please sign in to comment.