sqlx/sqlx-macros-core/Cargo.toml
Austin Bonander 388c424f48
fix(macros): smarter .env loading, caching, and invalidation (#4053)
* fix(macros): smarter `.env` loading, caching, and invalidation

* feat(mysql): test `.env` loading in CI

* feat(postgres): test `.env` loading in CI

* feat(macros): allow `DATABASE_URL` to be empty

* fix(examples/postgres): make `cargo-sqlx` executable

* fix(examples/postgres): `cargo sqlx` invocation

* feat(examples/postgres): check offline prepare on more examples

* fix(examples/postgres): the name of this step

* fix(cli): don't suppress error from `dotenv()`

* fix(ci/examples/postgres): don't use heredoc in this step

* fix(ci/examples/postgres): multi-tenant

* fix(ci/examples/sqlite): test `.env` loading

* chore: add CHANGELOG entry
2025-10-14 17:31:12 -07:00

85 lines
3.3 KiB
TOML

[package]
name = "sqlx-macros-core"
description = "Macro support core for SQLx, the Rust SQL toolkit. Not intended to be used directly."
version.workspace = true
license.workspace = true
edition.workspace = true
authors.workspace = true
repository.workspace = true
rust-version.workspace = true
[features]
default = []
# for conditional compilation
_rt-async-global-executor = ["async-global-executor", "sqlx-core/_rt-async-global-executor"]
_rt-async-std = ["async-std", "sqlx-core/_rt-async-std"]
_rt-smol = ["smol", "sqlx-core/_rt-smol"]
_rt-tokio = ["tokio", "sqlx-core/_rt-tokio"]
_tls-native-tls = ["sqlx-core/_tls-native-tls"]
_tls-rustls-aws-lc-rs = ["sqlx-core/_tls-rustls-aws-lc-rs"]
_tls-rustls-ring-webpki = ["sqlx-core/_tls-rustls-ring-webpki"]
_tls-rustls-ring-native-roots = ["sqlx-core/_tls-rustls-ring-native-roots"]
_sqlite = []
# SQLx features
derive = []
macros = ["thiserror"]
migrate = ["sqlx-core/migrate"]
sqlx-toml = ["sqlx-core/sqlx-toml", "sqlx-sqlite?/sqlx-toml"]
# database
mysql = ["sqlx-mysql"]
postgres = ["sqlx-postgres"]
sqlite = ["_sqlite", "sqlx-sqlite/bundled"]
sqlite-unbundled = ["_sqlite", "sqlx-sqlite/unbundled"]
# Enables `drivers.sqlite.unsafe-load-extensions` in sqlx.toml
sqlite-load-extension = ["sqlx-sqlite/load-extension"]
# type integrations
json = ["sqlx-core/json", "sqlx-mysql?/json", "sqlx-postgres?/json", "sqlx-sqlite?/json"]
bigdecimal = ["sqlx-core/bigdecimal", "sqlx-mysql?/bigdecimal", "sqlx-postgres?/bigdecimal"]
bit-vec = ["sqlx-core/bit-vec", "sqlx-postgres?/bit-vec"]
chrono = ["sqlx-core/chrono", "sqlx-mysql?/chrono", "sqlx-postgres?/chrono", "sqlx-sqlite?/chrono"]
ipnet = ["sqlx-core/ipnet", "sqlx-postgres?/ipnet"]
ipnetwork = ["sqlx-core/ipnetwork", "sqlx-postgres?/ipnetwork"]
mac_address = ["sqlx-core/mac_address", "sqlx-postgres?/mac_address"]
rust_decimal = ["sqlx-core/rust_decimal", "sqlx-mysql?/rust_decimal", "sqlx-postgres?/rust_decimal"]
time = ["sqlx-core/time", "sqlx-mysql?/time", "sqlx-postgres?/time", "sqlx-sqlite?/time"]
uuid = ["sqlx-core/uuid", "sqlx-mysql?/uuid", "sqlx-postgres?/uuid", "sqlx-sqlite?/uuid"]
[dependencies]
sqlx-core = { workspace = true, features = ["offline"] }
sqlx-mysql = { workspace = true, features = ["offline", "migrate"], optional = true }
sqlx-postgres = { workspace = true, features = ["offline", "migrate"], optional = true }
sqlx-sqlite = { workspace = true, features = ["offline", "migrate"], optional = true }
async-global-executor = { workspace = true, optional = true }
async-std = { workspace = true, optional = true }
smol = { workspace = true, optional = true }
tokio = { workspace = true, optional = true }
cfg-if = { workspace = true}
dotenvy = { workspace = true }
thiserror = { workspace = true, optional = true }
hex = { version = "0.4.3" }
heck = { version = "0.5" }
either = "1.6.1"
proc-macro2 = { version = "1.0.79", default-features = false }
serde = { version = "1.0.132", features = ["derive"] }
serde_json = { version = "1.0.73" }
sha2 = { version = "0.10.0" }
syn = { version = "2.0.52", default-features = false, features = ["full", "derive", "parsing", "printing", "clone-impls"] }
quote = { version = "1.0.26", default-features = false }
url = { version = "2.2.2" }
[lints.rust.unexpected_cfgs]
level = "warn"
check-cfg = ['cfg(sqlx_macros_unstable)', 'cfg(procmacro2_semver_exempt)']