Cargo Features

[dependencies]
sqlx = { version = "0.7.3", default-features = false, features = ["macros", "migrate", "all-databases", "runtime-async-std", "runtime-tokio", "tls-native-tls", "tls-rustls", "tls-none", "runtime-async-std-native-tls", "runtime-async-std-rustls", "runtime-tokio-native-tls", "runtime-tokio-rustls", "any", "postgres", "mysql", "sqlite", "json", "bigdecimal", "bit-vec", "chrono", "ipnetwork", "mac_address", "rust_decimal", "time", "uuid", "regexp"] }
default = any, json, macros, migrate

These default features are set whenever sqlx is added without default-features = false somewhere in the dependency tree.

macros default = sqlx-macros

Affects sqlx::ty_match

migrate default

Enables migrate of sqlx-core, optional sqlx-macros, optional sqlx-mysql, optional sqlx-postgres, and optional sqlx-sqlite

all-databases = any, mysql, postgres, sqlite

intended mainly for CI and docs

runtime-async-std runtime-async-std-native-tls? runtime-async-std-rustls?

Base runtime features without TLS

Enables _rt-async-std of sqlx-core and optional sqlx-macros

runtime-tokio runtime-tokio-native-tls? runtime-tokio-rustls?

Enables _rt-tokio of sqlx-core and optional sqlx-macros

tls-native-tls runtime-async-std-native-tls? runtime-tokio-native-tls?

TLS features

Enables _tls-native-tls of sqlx-core and optional sqlx-macros

tls-rustls runtime-async-std-rustls? runtime-tokio-rustls?

Enables _tls-rustls of sqlx-core and optional sqlx-macros

tls-none

No-op feature used by the workflows to compile without TLS enabled. Not meant for general use.

runtime-async-std-native-tls = runtime-async-std, tls-native-tls

Legacy Runtime + TLS features

runtime-async-std-rustls = runtime-async-std, tls-rustls
runtime-tokio-native-tls = runtime-tokio, tls-native-tls
runtime-tokio-rustls = runtime-tokio, tls-rustls
any default all-databases?

database

Enables any of sqlx-core, optional sqlx-mysql, optional sqlx-postgres, and optional sqlx-sqlite

Affects sqlx::any

postgres all-databases? = sqlx-postgres

Enables postgres of optional sqlx-macros

mysql all-databases? = sqlx-mysql

Enables mysql of optional sqlx-macros

sqlite all-databases? = sqlx-sqlite

Enables sqlite of optional sqlx-macros

json default

types

Enables json of optional sqlx-macros, optional sqlx-mysql, optional sqlx-postgres, and optional sqlx-sqlite

bigdecimal

Enables bigdecimal of sqlx-core, optional sqlx-macros, optional sqlx-mysql, and optional sqlx-postgres

bit-vec

Enables bit-vec of sqlx-core, optional sqlx-macros, and optional sqlx-postgres

chrono

Enables chrono of sqlx-core, optional sqlx-macros, optional sqlx-mysql, optional sqlx-postgres, and optional sqlx-sqlite

ipnetwork

Enables ipnetwork of sqlx-core, optional sqlx-macros, and optional sqlx-postgres

mac_address

Enables mac_address of sqlx-core, optional sqlx-macros, and optional sqlx-postgres

rust_decimal

Enables rust_decimal of sqlx-core, optional sqlx-macros, optional sqlx-mysql, and optional sqlx-postgres

time

Enables time of sqlx-core, optional sqlx-macros, optional sqlx-mysql, optional sqlx-postgres, and optional sqlx-sqlite

uuid

Enables uuid of sqlx-core, optional sqlx-macros, optional sqlx-mysql, optional sqlx-postgres, and optional sqlx-sqlite

regexp

Enables regexp of optional sqlx-sqlite