Crate features / sqlx
Feature flags · sqlx 0.9.0 · from crates.io 2026-10-24
sqlx features: what each one does, and the line to copy
Short answersqlx 0.9.0 has 46 features. By default it turns on any, macros, migrate, json; add default-features = false to start from nothing. It needs Rust 1.94.0 or newer.
Pick features
Every feature
| Feature | In default | Turns on |
|---|---|---|
_rt-async-global-executor | nothing else (a switch the code checks) | |
_rt-async-std | nothing else (a switch the code checks) | |
_rt-smol | nothing else (a switch the code checks) | |
_rt-tokio | nothing else (a switch the code checks) | |
_sqlite | nothing else (a switch the code checks) | |
_unstable-all-types | bigdecimal, rust_decimal, json, time, chrono, ipnet, ipnetwork, mac_address, uuid, bit-vec, bstr | |
_unstable-docs | all-databases, _unstable-all-types, sqlx-sqlite/_unstable-docs | |
all-databases | mysql, sqlite, postgres, any | |
any | yes | sqlx-core/any, sqlx-mysql?/any, sqlx-postgres?/any, sqlx-sqlite?/any |
bigdecimal | sqlx-core/bigdecimal, sqlx-macros?/bigdecimal, sqlx-mysql?/bigdecimal, sqlx-postgres?/bigdecimal | |
bit-vec | sqlx-core/bit-vec, sqlx-macros?/bit-vec, sqlx-postgres?/bit-vec | |
bstr | sqlx-core/bstr | |
chrono | sqlx-core/chrono, sqlx-macros?/chrono, sqlx-mysql?/chrono, sqlx-postgres?/chrono, sqlx-sqlite?/chrono | |
derive | sqlx-macros/derive | |
ipnet | sqlx-core/ipnet, sqlx-macros?/ipnet, sqlx-postgres?/ipnet | |
ipnetwork | sqlx-core/ipnetwork, sqlx-macros?/ipnetwork, sqlx-postgres?/ipnetwork | |
json | yes | sqlx-core/json, sqlx-macros?/json, sqlx-mysql?/json, sqlx-postgres?/json, sqlx-sqlite?/json |
mac_address | sqlx-core/mac_address, sqlx-macros?/mac_address, sqlx-postgres?/mac_address | |
macros | yes | derive, sqlx-macros/macros, sqlx-core/offline, sqlx-mysql?/offline, sqlx-postgres?/offline, sqlx-sqlite?/offline |
migrate | yes | sqlx-core/migrate, sqlx-macros?/migrate, sqlx-mysql?/migrate, sqlx-postgres?/migrate, sqlx-sqlite?/migrate |
mysql | sqlx-mysql, sqlx-macros?/mysql | |
mysql-rsa | mysql, sqlx-mysql/rsa, sqlx-macros?/mysql-rsa | |
postgres | sqlx-postgres, sqlx-macros?/postgres | |
regexp | sqlx-sqlite?/regexp | |
runtime-async-global-executor | _rt-async-global-executor, sqlx-core/_rt-async-global-executor, sqlx-macros?/_rt-async-global-executor | |
runtime-async-std | _rt-async-std, sqlx-core/_rt-async-std, sqlx-macros?/_rt-async-std | |
runtime-smol | _rt-smol, sqlx-core/_rt-smol, sqlx-macros?/_rt-smol | |
runtime-tokio | _rt-tokio, sqlx-core/_rt-tokio, sqlx-macros?/_rt-tokio | |
rust_decimal | sqlx-core/rust_decimal, sqlx-macros?/rust_decimal, sqlx-mysql?/rust_decimal, sqlx-postgres?/rust_decimal | |
sqlite | sqlite-bundled, sqlite-deserialize, sqlite-load-extension, sqlite-unlock-notify | |
sqlite-bundled | _sqlite, sqlx-sqlite/bundled, sqlx-macros?/sqlite | |
sqlite-deserialize | sqlx-sqlite/deserialize | |
sqlite-load-extension | sqlx-sqlite/load-extension, sqlx-macros?/sqlite-load-extension | |
sqlite-preupdate-hook | sqlx-sqlite/preupdate-hook | |
sqlite-unbundled | _sqlite, sqlx-sqlite/unbundled, sqlx-macros?/sqlite-unbundled | |
sqlite-unlock-notify | sqlx-sqlite/unlock-notify | |
sqlx-toml | sqlx-core/sqlx-toml, sqlx-macros?/sqlx-toml, sqlx-sqlite?/sqlx-toml | |
time | sqlx-core/time, sqlx-macros?/time, sqlx-mysql?/time, sqlx-postgres?/time, sqlx-sqlite?/time | |
tls-native-tls | sqlx-core/_tls-native-tls, sqlx-macros?/_tls-native-tls | |
tls-none | nothing else (a switch the code checks) | |
tls-rustls | tls-rustls-ring | |
tls-rustls-aws-lc-rs | sqlx-core/_tls-rustls-aws-lc-rs, sqlx-macros?/_tls-rustls-aws-lc-rs | |
tls-rustls-ring | tls-rustls-ring-webpki | |
tls-rustls-ring-native-roots | sqlx-core/_tls-rustls-ring-native-roots, sqlx-macros?/_tls-rustls-ring-native-roots | |
tls-rustls-ring-webpki | sqlx-core/_tls-rustls-ring-webpki, sqlx-macros?/_tls-rustls-ring-webpki | |
uuid | sqlx-core/uuid, sqlx-macros?/uuid, sqlx-mysql?/uuid, sqlx-postgres?/uuid, sqlx-sqlite?/uuid |
dep:x turns on the optional dependency x; x/y turns on feature y of dependency x (with ?, only if x is already on).
MSRV history
The minimum Rust version sqlx declares (rust-version), and the release that changed it:
- 0.9.0-alpha.1 (2025-10-15): Rust 1.86.0
- 0.9.0 (2026-05-21): Rust 1.94.0
Stuck on an older compiler? Pin the last version that supports it, for example cargo update -p sqlx --precise <version>, or use resolver 3, which picks compatible versions for you.
More on sqlx
Real downloads, dependents and alternatives: sqlx crate data (540.4K real downloads a day, 4,124 dependents).
Security record: sqlx advisories.
docs.rs feature list · crates.io · license MIT OR Apache-2.0 · edition 2021
Up next
Before you depend on itsqlx crate dataReal downloads, dependents, alternatives.Read it next →Did this answer your question?