sqlx/Cargo.toml

343 lines
8.9 KiB
TOML
Raw Normal View History

2019-11-21 23:29:40 +00:00
[workspace]
members = [
".",
"sqlx-core",
2019-11-21 23:29:40 +00:00
"sqlx-macros",
"sqlx-macros-core",
"sqlx-test",
"sqlx-cli",
2023-02-21 21:34:42 +00:00
# "sqlx-bench",
"sqlx-mysql",
"sqlx-postgres",
"sqlx-sqlite",
"examples/mysql/todos",
"examples/postgres/axum-social-with-tests",
"examples/postgres/files",
"examples/postgres/json",
"examples/postgres/listen",
"examples/postgres/todos",
"examples/postgres/mockable-todos",
"examples/postgres/transaction",
"examples/sqlite/todos",
2019-11-21 23:29:40 +00:00
]
[workspace.package]
version = "0.7.0"
2019-06-06 13:02:55 +00:00
license = "MIT OR Apache-2.0"
edition = "2021"
repository = "https://github.com/launchbadge/sqlx"
2021-04-16 01:38:50 +00:00
keywords = ["database", "async", "postgres", "mysql", "sqlite"]
categories = ["database", "asynchronous"]
2019-11-20 17:05:21 +00:00
authors = [
2021-04-16 01:38:50 +00:00
"Ryan Leckey <leckey.ryan@gmail.com>",
"Austin Bonander <austin.bonander@gmail.com>",
"Chloe Ross <orangesnowfox@gmail.com>",
"Daniel Akhterov <akhterovd@gmail.com>",
2021-05-22 00:27:15 +00:00
]
2019-06-06 13:02:55 +00:00
[package]
name = "sqlx"
readme = "README.md"
documentation = "https://docs.rs/sqlx"
description = "🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, and SQLite."
version.workspace = true
license.workspace = true
edition.workspace = true
authors.workspace = true
repository.workspace = true
2020-01-11 11:30:03 +00:00
[package.metadata.docs.rs]
2023-03-17 00:11:46 +00:00
features = ["all-databases", "_unstable-all-types"]
2020-01-22 21:10:10 +00:00
rustdoc-args = ["--cfg", "docsrs"]
2020-01-11 11:30:03 +00:00
[features]
default = ["any", "macros", "migrate", "json"]
2021-04-16 01:38:50 +00:00
macros = ["sqlx-macros"]
migrate = ["sqlx-core/migrate", "sqlx-macros?/migrate", "sqlx-mysql?/migrate", "sqlx-postgres?/migrate", "sqlx-sqlite?/migrate"]
# intended mainly for CI and docs
all-databases = ["mysql", "sqlite", "postgres", "any"]
_unstable-all-types = [
2021-04-16 01:38:50 +00:00
"bigdecimal",
"rust_decimal",
2021-04-16 01:38:50 +00:00
"json",
"time",
"chrono",
"ipnetwork",
2021-07-19 23:55:53 +00:00
"mac_address",
2021-04-16 01:38:50 +00:00
"uuid",
"bit-vec",
]
# Base runtime features without TLS
runtime-async-std = ["_rt-async-std", "sqlx-core/_rt-async-std", "sqlx-macros/_rt-async-std"]
runtime-tokio = ["_rt-tokio", "sqlx-core/_rt-tokio", "sqlx-macros/_rt-tokio"]
# TLS features
tls-native-tls = ["sqlx-core/_tls-native-tls", "sqlx-macros/_tls-native-tls"]
tls-rustls = ["sqlx-core/_tls-rustls", "sqlx-macros/_tls-rustls"]
# No-op feature used by the workflows to compile without TLS enabled. Not meant for general use.
tls-none = []
# Legacy Runtime + TLS features
runtime-async-std-native-tls = ["runtime-async-std", "tls-native-tls"]
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"]
2020-10-20 10:21:01 +00:00
# for conditional compilation
_rt-async-std = []
_rt-tokio = []
2019-12-28 01:31:01 +00:00
# database
any = ["sqlx-core/any", "sqlx-mysql?/any", "sqlx-postgres?/any", "sqlx-sqlite?/any"]
postgres = ["sqlx-postgres", "sqlx-macros?/postgres"]
mysql = ["sqlx-mysql", "sqlx-macros?/mysql"]
sqlite = ["sqlx-sqlite", "sqlx-macros?/sqlite"]
2019-12-28 01:31:01 +00:00
# types
json = ["sqlx-macros?/json", "sqlx-mysql?/json", "sqlx-postgres?/json", "sqlx-sqlite?/json"]
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"]
chrono = ["sqlx-core/chrono", "sqlx-macros?/chrono", "sqlx-mysql?/chrono", "sqlx-postgres?/chrono", "sqlx-sqlite?/chrono"]
ipnetwork = ["sqlx-core/ipnetwork", "sqlx-macros?/ipnetwork", "sqlx-postgres?/ipnetwork"]
mac_address = ["sqlx-core/mac_address", "sqlx-macros?/mac_address", "sqlx-postgres?/mac_address"]
rust_decimal = ["sqlx-core/rust_decimal", "sqlx-macros?/rust_decimal", "sqlx-mysql?/rust_decimal", "sqlx-postgres?/rust_decimal"]
time = ["sqlx-core/time", "sqlx-macros?/time", "sqlx-mysql?/time", "sqlx-postgres?/time", "sqlx-sqlite?/time"]
uuid = ["sqlx-core/uuid", "sqlx-macros?/uuid", "sqlx-mysql?/uuid", "sqlx-postgres?/uuid", "sqlx-sqlite?/uuid"]
regexp = ["sqlx-sqlite?/regexp"]
[workspace.dependencies]
2023-02-21 21:34:42 +00:00
# Core Crates
sqlx-core = { version = "=0.7.0", path = "sqlx-core" }
sqlx-macros-core = { version = "=0.7.0", path = "sqlx-macros-core" }
sqlx-macros = { version = "=0.7.0", path = "sqlx-macros" }
2023-02-21 21:34:42 +00:00
# Driver crates
sqlx-mysql = { version = "=0.7.0", path = "sqlx-mysql" }
sqlx-postgres = { version = "=0.7.0", path = "sqlx-postgres" }
sqlx-sqlite = { version = "=0.7.0", path = "sqlx-sqlite" }
# Facade crate (for reference from sqlx-cli)
sqlx = { version = "=0.7.0", path = ".", default-features = false }
# Common type integrations shared by multiple driver crates.
# These are optional unless enabled in a workspace crate.
bigdecimal = "0.3.0"
bit-vec = "0.6.3"
chrono = { version = "0.4.22", default-features = false }
ipnetwork = "0.20.0"
2023-06-12 19:44:55 +00:00
mac_address = "1.1.5"
rust_decimal = "1.26.1"
time = { version = "0.3.14", features = ["formatting", "parsing", "macros"] }
uuid = "1.1.2"
# Common utility crates
dotenvy = { version = "0.15.0", default-features = false }
# Runtimes
[workspace.dependencies.async-std]
version = "1"
[workspace.dependencies.tokio]
version = "1"
features = ["time", "net", "sync", "fs", "io-util", "rt"]
default-features = false
2019-06-06 13:02:55 +00:00
[dependencies]
sqlx-core = { workspace = true, features = ["offline", "migrate"] }
sqlx-macros = { workspace = true, optional = true }
2019-07-26 16:20:09 +00:00
sqlx-mysql = { workspace = true, optional = true }
sqlx-postgres = { workspace = true, optional = true }
sqlx-sqlite = { workspace = true, optional = true }
[dev-dependencies]
anyhow = "1.0.52"
time_ = { version = "0.3.2", package = "time" }
futures = "0.3.19"
env_logger = "0.9.0"
async-std = { version = "1.10.0", features = ["attributes"] }
tokio = { version = "1.15.0", features = ["full"] }
dotenvy = "0.15.0"
trybuild = "1.0.53"
sqlx-test = { path = "./sqlx-test" }
paste = "1.0.6"
serde = { version = "1.0.132", features = ["derive"] }
serde_json = "1.0.73"
url = "2.2.2"
rand = "0.8.4"
rand_xoshiro = "0.6.0"
hex = "0.4.3"
tempdir = "0.3.7"
criterion = {version = "0.4", features = ["async_tokio"]}
# Needed to test SQLCipher
2023-05-11 22:43:52 +00:00
libsqlite3-sys = { version = "0.26", features = ["bundled-sqlcipher"] }
#
# Any
#
[[test]]
name = "any"
path = "tests/any/any.rs"
2021-04-16 01:38:50 +00:00
required-features = ["any"]
[[test]]
name = "any-pool"
path = "tests/any/pool.rs"
2021-04-16 01:38:50 +00:00
required-features = ["any"]
2020-07-23 21:46:27 +00:00
#
# Migrations
#
[[test]]
name = "migrate-macro"
path = "tests/migrate/macro.rs"
2021-04-16 01:38:50 +00:00
required-features = ["macros", "migrate"]
2020-07-23 21:46:27 +00:00
#
# SQLite
#
2020-01-29 02:56:25 +00:00
2020-03-11 18:01:17 +00:00
[[test]]
name = "sqlite"
path = "tests/sqlite/sqlite.rs"
2021-04-16 01:38:50 +00:00
required-features = ["sqlite"]
2020-03-11 18:01:17 +00:00
[[test]]
name = "sqlite-types"
path = "tests/sqlite/types.rs"
2021-04-16 01:38:50 +00:00
required-features = ["sqlite"]
2020-03-13 09:21:29 +00:00
2020-03-20 09:21:15 +00:00
[[test]]
name = "sqlite-describe"
path = "tests/sqlite/describe.rs"
2021-04-16 01:38:50 +00:00
required-features = ["sqlite"]
2020-03-13 09:21:29 +00:00
[[test]]
name = "sqlite-macros"
path = "tests/sqlite/macros.rs"
2021-04-16 01:38:50 +00:00
required-features = ["sqlite", "macros"]
[[test]]
name = "sqlite-derives"
path = "tests/sqlite/derives.rs"
2021-04-16 01:38:50 +00:00
required-features = ["sqlite", "macros"]
[[test]]
name = "sqlite-error"
path = "tests/sqlite/error.rs"
required-features = ["sqlite"]
[[test]]
name = "sqlite-sqlcipher"
path = "tests/sqlite/sqlcipher.rs"
required-features = ["sqlite"]
[[test]]
name = "sqlite-test-attr"
path = "tests/sqlite/test-attr.rs"
required-features = ["sqlite", "macros", "migrate"]
[[test]]
name = "sqlite-migrate"
path = "tests/sqlite/migrate.rs"
required-features = ["sqlite", "macros", "migrate"]
[[bench]]
name = "sqlite-describe"
path = "benches/sqlite/describe.rs"
harness = false
required-features = ["sqlite"]
#
# MySQL
#
2019-12-28 01:31:01 +00:00
[[test]]
name = "mysql"
path = "tests/mysql/mysql.rs"
2021-04-16 01:38:50 +00:00
required-features = ["mysql"]
2019-12-28 01:31:01 +00:00
[[test]]
name = "mysql-types"
path = "tests/mysql/types.rs"
2021-04-16 01:38:50 +00:00
required-features = ["mysql"]
[[test]]
name = "mysql-describe"
path = "tests/mysql/describe.rs"
2021-04-16 01:38:50 +00:00
required-features = ["mysql"]
[[test]]
name = "mysql-macros"
path = "tests/mysql/macros.rs"
2021-04-16 01:38:50 +00:00
required-features = ["mysql", "macros"]
[[test]]
name = "mysql-error"
path = "tests/mysql/error.rs"
required-features = ["mysql"]
[[test]]
name = "mysql-test-attr"
path = "tests/mysql/test-attr.rs"
required-features = ["mysql", "macros", "migrate"]
[[test]]
name = "mysql-migrate"
path = "tests/mysql/migrate.rs"
required-features = ["mysql", "macros", "migrate"]
#
# PostgreSQL
#
2019-12-28 01:31:01 +00:00
[[test]]
name = "postgres"
path = "tests/postgres/postgres.rs"
2021-04-16 01:38:50 +00:00
required-features = ["postgres"]
[[test]]
name = "postgres-types"
path = "tests/postgres/types.rs"
2021-04-16 01:38:50 +00:00
required-features = ["postgres"]
[[test]]
name = "postgres-describe"
path = "tests/postgres/describe.rs"
2021-04-16 01:38:50 +00:00
required-features = ["postgres"]
2020-06-06 03:28:21 +00:00
[[test]]
name = "postgres-macros"
path = "tests/postgres/macros.rs"
2021-04-16 01:38:50 +00:00
required-features = ["postgres", "macros"]
2020-06-12 22:20:32 +00:00
[[test]]
name = "postgres-derives"
path = "tests/postgres/derives.rs"
2021-04-16 01:38:50 +00:00
required-features = ["postgres", "macros"]
2020-06-12 22:20:32 +00:00
[[test]]
name = "postgres-error"
path = "tests/postgres/error.rs"
required-features = ["postgres"]
[[test]]
name = "postgres-test-attr"
path = "tests/postgres/test-attr.rs"
required-features = ["postgres", "macros", "migrate"]
[[test]]
name = "postgres-migrate"
path = "tests/postgres/migrate.rs"
required-features = ["postgres", "macros", "migrate"]