[workspace] members = [ ".", "sqlx-core", "sqlx-macros", "sqlx-macros-core", "sqlx-test", "sqlx-cli", # "sqlx-bench", "sqlx-mysql", "sqlx-postgres", "sqlx-sqlite", "examples/mysql/todos", "examples/postgres/axum-social-with-tests", "examples/postgres/chat", "examples/postgres/files", "examples/postgres/json", "examples/postgres/listen", "examples/postgres/todos", "examples/postgres/mockable-todos", "examples/postgres/transaction", "examples/sqlite/todos", ] [workspace.package] version = "0.7.9" license = "MIT OR Apache-2.0" edition = "2021" repository = "https://github.com/launchbadge/sqlx" keywords = ["database", "async", "postgres", "mysql", "sqlite"] categories = ["database", "asynchronous"] authors = [ "Ryan Leckey ", "Austin Bonander ", "Chloe Ross ", "Daniel Akhterov ", ] [package] name = "sqlx-build-trust" 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 [package.metadata.docs.rs] features = ["all-databases", "_unstable-all-types"] rustdoc-args = ["--cfg", "docsrs"] [features] default = ["any", "macros", "migrate", "json"] macros = ["sqlx-macros"] migrate = ["sqlx-build-trust-core/migrate", "sqlx-macros?/migrate", "sqlx-mysql?/migrate", "sqlx-build-trust-postgres?/migrate", "sqlx-build-trust-sqlite?/migrate"] # intended mainly for CI and docs all-databases = ["mysql", "sqlite", "postgres", "any"] _unstable-all-types = [ "bigdecimal", "rust_decimal", "json", "time", "chrono", "ipnetwork", "mac_address", "uuid", "bit-vec", ] # Base runtime features without TLS runtime-async-std = ["_rt-async-std", "sqlx-build-trust-core/_rt-async-std", "sqlx-macros?/_rt-async-std"] runtime-tokio = ["_rt-tokio", "sqlx-build-trust-core/_rt-tokio", "sqlx-macros?/_rt-tokio"] # TLS features tls-native-tls = ["sqlx-build-trust-core/_tls-native-tls", "sqlx-macros?/_tls-native-tls"] tls-rustls = ["sqlx-build-trust-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"] # for conditional compilation _rt-async-std = [] _rt-tokio = [] # database any = ["sqlx-build-trust-core/any", "sqlx-mysql?/any", "sqlx-build-trust-postgres?/any", "sqlx-build-trust-sqlite?/any"] postgres = ["sqlx-build-trust-postgres", "sqlx-macros?/postgres"] mysql = ["sqlx-mysql", "sqlx-macros?/mysql"] sqlite = ["sqlx-build-trust-sqlite", "sqlx-macros?/sqlite"] # types json = ["sqlx-macros?/json", "sqlx-mysql?/json", "sqlx-build-trust-postgres?/json", "sqlx-build-trust-sqlite?/json"] bigdecimal = ["sqlx-build-trust-core/bigdecimal", "sqlx-macros?/bigdecimal", "sqlx-mysql?/bigdecimal", "sqlx-build-trust-postgres?/bigdecimal"] bit-vec = ["sqlx-build-trust-core/bit-vec", "sqlx-macros?/bit-vec", "sqlx-build-trust-postgres?/bit-vec"] chrono = ["sqlx-build-trust-core/chrono", "sqlx-macros?/chrono", "sqlx-mysql?/chrono", "sqlx-build-trust-postgres?/chrono", "sqlx-build-trust-sqlite?/chrono"] ipnetwork = ["sqlx-build-trust-core/ipnetwork", "sqlx-macros?/ipnetwork", "sqlx-build-trust-postgres?/ipnetwork"] mac_address = ["sqlx-build-trust-core/mac_address", "sqlx-macros?/mac_address", "sqlx-build-trust-postgres?/mac_address"] rust_decimal = ["sqlx-build-trust-core/rust_decimal", "sqlx-macros?/rust_decimal", "sqlx-mysql?/rust_decimal", "sqlx-build-trust-postgres?/rust_decimal"] time = ["sqlx-build-trust-core/time", "sqlx-macros?/time", "sqlx-mysql?/time", "sqlx-build-trust-postgres?/time", "sqlx-build-trust-sqlite?/time"] uuid = ["sqlx-build-trust-core/uuid", "sqlx-macros?/uuid", "sqlx-mysql?/uuid", "sqlx-build-trust-postgres?/uuid", "sqlx-build-trust-sqlite?/uuid"] regexp = ["sqlx-build-trust-sqlite?/regexp"] [workspace.dependencies] # Core Crates sqlx-build-trust-core = { version = ">=0.7.7", path = "sqlx-core" } sqlx-macros-core = { version = ">=0.7.4", path = "sqlx-macros-core" } sqlx-macros = { version = ">=0.7.4", path = "sqlx-macros" } # Driver crates sqlx-mysql = { version = ">=0.7.4", path = "sqlx-mysql" } sqlx-build-trust-postgres = { version = ">=0.7.7", path = "sqlx-postgres" } sqlx-build-trust-sqlite = { version = ">=0.7.7", path = "sqlx-sqlite" } # Facade crate (for reference from sqlx-cli) sqlx-build-trust = { version = ">=0.7.7", 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" 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.12" [workspace.dependencies.tokio] version = "1" features = ["time", "net", "sync", "fs", "io-util", "rt"] default-features = false [dependencies] sqlx-build-trust-core = { workspace = true, features = ["offline", "migrate"] } sqlx-macros = { workspace = true, optional = true } sqlx-mysql = { workspace = true, optional = true } sqlx-build-trust-postgres = { workspace = true, optional = true } sqlx-build-trust-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.11" async-std = { version = "1.12.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" tempfile = "3.9.0" criterion = { version = "0.5.1", features = ["async_tokio"] } # If this is an unconditional dev-dependency then Cargo will *always* try to build `libsqlite3-sys`, # even when SQLite isn't the intended test target, and fail if the build environment is not set up for compiling C code. [target.'cfg(sqlite_test_sqlcipher)'.dev-dependencies] # Enable testing with SQLCipher if specifically requested. libsqlite3-sys = { version = "0.27", features = ["bundled-sqlcipher"] } # # Any # [[test]] name = "any" path = "tests/any/any.rs" required-features = ["any"] [[test]] name = "any-pool" path = "tests/any/pool.rs" required-features = ["any"] # # Migrations # [[test]] name = "migrate-macro" path = "tests/migrate/macro.rs" required-features = ["macros", "migrate"] # # SQLite # [[test]] name = "sqlite" path = "tests/sqlite/sqlite.rs" required-features = ["sqlite"] [[test]] name = "sqlite-any" path = "tests/sqlite/any.rs" required-features = ["sqlite"] [[test]] name = "sqlite-types" path = "tests/sqlite/types.rs" required-features = ["sqlite"] [[test]] name = "sqlite-describe" path = "tests/sqlite/describe.rs" required-features = ["sqlite"] [[test]] name = "sqlite-macros" path = "tests/sqlite/macros.rs" required-features = ["sqlite", "macros"] [[test]] name = "sqlite-derives" path = "tests/sqlite/derives.rs" 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 # [[test]] name = "mysql" path = "tests/mysql/mysql.rs" required-features = ["mysql"] [[test]] name = "mysql-types" path = "tests/mysql/types.rs" required-features = ["mysql"] [[test]] name = "mysql-describe" path = "tests/mysql/describe.rs" required-features = ["mysql"] [[test]] name = "mysql-macros" path = "tests/mysql/macros.rs" 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 # [[test]] name = "postgres" path = "tests/postgres/postgres.rs" required-features = ["postgres"] [[test]] name = "postgres-types" path = "tests/postgres/types.rs" required-features = ["postgres"] [[test]] name = "postgres-describe" path = "tests/postgres/describe.rs" required-features = ["postgres"] [[test]] name = "postgres-macros" path = "tests/postgres/macros.rs" required-features = ["postgres", "macros"] [[test]] name = "postgres-derives" path = "tests/postgres/derives.rs" required-features = ["postgres", "macros"] [[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"]