2021-05-31 16:15:00 +00:00
|
|
|
[package]
|
|
|
|
name = "rocket_db_pools"
|
2023-11-03 23:26:07 +00:00
|
|
|
version = "0.1.0"
|
2021-05-31 16:15:00 +00:00
|
|
|
authors = ["Sergio Benitez <sb@sergio.bz>", "Jeb Rosen <jeb@jebrosen.com>"]
|
|
|
|
description = "Rocket async database pooling support"
|
2023-11-18 17:57:25 +00:00
|
|
|
repository = "https://github.com/rwf2/Rocket/tree/master/contrib/db_pools"
|
2021-05-31 16:15:00 +00:00
|
|
|
readme = "../README.md"
|
|
|
|
keywords = ["rocket", "framework", "database", "pools"]
|
|
|
|
license = "MIT OR Apache-2.0"
|
2022-03-19 18:25:24 +00:00
|
|
|
edition = "2021"
|
2024-01-30 17:18:40 +00:00
|
|
|
rust-version = "1.75"
|
2021-05-31 16:15:00 +00:00
|
|
|
|
2021-07-09 23:34:54 +00:00
|
|
|
[package.metadata.docs.rs]
|
|
|
|
all-features = true
|
|
|
|
|
2024-05-20 18:39:14 +00:00
|
|
|
[lints]
|
|
|
|
workspace = true
|
|
|
|
|
2021-05-31 16:15:00 +00:00
|
|
|
[features]
|
2021-07-09 23:34:54 +00:00
|
|
|
# deadpool features
|
|
|
|
deadpool_postgres = ["deadpool-postgres", "deadpool"]
|
|
|
|
deadpool_redis = ["deadpool-redis", "deadpool"]
|
|
|
|
# sqlx features
|
Finalize 'tracing' migration.
This commit complete the migration to 'tracing' for all logging. Below
is a summary of all relevant commits, including this one:
Log improvements:
- All log (trace) messages are structured which means they contain fields
that can formatted by any subscriber.
- Logging can be disabled entirely by disabling the default `trace` feature.
- Routes and catchers now contain location (file/line) information.
- Two log format kinds: pretty and compact via ROCKET_LOG_FORMAT
- Coloring is not disabled globally. Thus applications can color even if
Rocket is configured not to.
- Rocket is more conservative about 'warn' and 'error' messages, reserving
those log levels for messages useful in production.
- Errors from guards logged by codegen now use the 'Display' implementation of
those errors when one exists.
- Secrets are never logged, even when directly asked for.
New features:
- Many Rocket types know how to trace themselves via a new `Trace` trait.
- `Either` types can now be used in `uri!()` calls.
- A `RequestIdLayer` tags all requests with a unique ID.
Breaking changes to configuration:
- `Config::log_level` is of type `Option<Level>`. `None` disables tracing.
- `log_level` now uses the traditional log level names: "off", "error",
"warn", "info", "debug", "trace", or 0-5. This replace the Rocket-specific
"normal", "debug", "critical".
- A new option, `log_format`, which is either `compact` or `pretty`,
determines how Rocket's tracing subscriber log trace messages.
Breaking changes:
- Hidden `rocket::Either` is now publicly available at `rocket::either::Either`.
- `rocket::Error` no longer panics when dropped.
- `main` generated by `#[launch]` returns an `ExitCode`.
- `FromParam` `Err` now always returns the actual error as opposed to the
string that failed to parse. To recover the original string, use `Either<T,
&str>`, where `T: FromParam`, as a parameter guard.
- Many types that implemented `Display` now instead implement `Trace`.
- `Error::pretty_print()` was removed. Use `Error::trace()` via `Trace` impl.
Internal improvements:
- Made more space in CI machines for tasks.
- Cleaned up testbench code using `inventory`.
Resolves #21.
2024-05-17 03:23:26 +00:00
|
|
|
sqlx_mysql = ["sqlx", "sqlx/mysql", "log"]
|
|
|
|
sqlx_postgres = ["sqlx", "sqlx/postgres", "log"]
|
|
|
|
sqlx_sqlite = ["sqlx", "sqlx/sqlite", "log"]
|
2021-07-09 23:34:54 +00:00
|
|
|
sqlx_macros = ["sqlx/macros"]
|
2023-06-09 23:46:24 +00:00
|
|
|
# diesel features
|
2023-12-16 01:23:24 +00:00
|
|
|
diesel_postgres = ["diesel-async/postgres", "diesel-async/deadpool", "diesel", "deadpool_09"]
|
|
|
|
diesel_mysql = ["diesel-async/mysql", "diesel-async/deadpool", "diesel", "deadpool_09"]
|
2021-07-09 23:34:54 +00:00
|
|
|
# implicit features: mongodb
|
2021-05-31 16:15:00 +00:00
|
|
|
|
|
|
|
[dependencies.rocket]
|
|
|
|
path = "../../../core/lib"
|
2023-11-18 10:30:50 +00:00
|
|
|
version = "0.6.0-dev"
|
2021-05-31 16:15:00 +00:00
|
|
|
default-features = false
|
|
|
|
|
2021-07-09 23:34:54 +00:00
|
|
|
[dependencies.rocket_db_pools_codegen]
|
|
|
|
path = "../codegen"
|
2023-11-03 23:26:07 +00:00
|
|
|
version = "0.1.0"
|
2021-07-09 23:34:54 +00:00
|
|
|
|
2023-12-16 01:23:24 +00:00
|
|
|
[dependencies.deadpool_09]
|
|
|
|
package = "deadpool"
|
2024-05-23 00:48:17 +00:00
|
|
|
version = "0.9.5"
|
2021-07-09 23:34:54 +00:00
|
|
|
default-features = false
|
|
|
|
features = ["rt_tokio_1", "managed"]
|
|
|
|
optional = true
|
|
|
|
|
|
|
|
[dependencies.deadpool-postgres]
|
2024-05-23 00:48:17 +00:00
|
|
|
version = "0.13.2"
|
2021-07-09 23:34:54 +00:00
|
|
|
default-features = false
|
|
|
|
features = ["rt_tokio_1"]
|
|
|
|
optional = true
|
|
|
|
|
2023-12-16 01:23:24 +00:00
|
|
|
[dependencies.deadpool]
|
2024-05-23 00:48:17 +00:00
|
|
|
version = "0.12.1"
|
2023-12-16 01:23:24 +00:00
|
|
|
default-features = false
|
|
|
|
features = ["rt_tokio_1", "managed"]
|
|
|
|
optional = true
|
|
|
|
|
2021-07-09 23:34:54 +00:00
|
|
|
[dependencies.deadpool-redis]
|
2024-05-23 00:48:17 +00:00
|
|
|
version = "0.15"
|
2021-07-09 23:34:54 +00:00
|
|
|
default-features = false
|
|
|
|
features = ["rt_tokio_1"]
|
|
|
|
optional = true
|
|
|
|
|
|
|
|
[dependencies.mongodb]
|
2022-02-16 19:01:35 +00:00
|
|
|
version = "2"
|
2021-07-09 23:34:54 +00:00
|
|
|
default-features = false
|
|
|
|
features = ["tokio-runtime"]
|
|
|
|
optional = true
|
|
|
|
|
2023-06-09 23:46:24 +00:00
|
|
|
[dependencies.diesel-async]
|
2023-11-07 18:29:47 +00:00
|
|
|
version = "0.4.1"
|
2023-06-09 23:46:24 +00:00
|
|
|
default-features = false
|
|
|
|
optional = true
|
|
|
|
|
|
|
|
[dependencies.diesel]
|
|
|
|
version = "2.1"
|
|
|
|
default-features = false
|
|
|
|
optional = true
|
|
|
|
|
2021-07-09 23:34:54 +00:00
|
|
|
[dependencies.sqlx]
|
2023-08-22 21:19:37 +00:00
|
|
|
version = "0.7"
|
2021-07-09 23:34:54 +00:00
|
|
|
default-features = false
|
|
|
|
features = ["runtime-tokio-rustls"]
|
|
|
|
optional = true
|
2021-05-31 16:15:00 +00:00
|
|
|
|
Finalize 'tracing' migration.
This commit complete the migration to 'tracing' for all logging. Below
is a summary of all relevant commits, including this one:
Log improvements:
- All log (trace) messages are structured which means they contain fields
that can formatted by any subscriber.
- Logging can be disabled entirely by disabling the default `trace` feature.
- Routes and catchers now contain location (file/line) information.
- Two log format kinds: pretty and compact via ROCKET_LOG_FORMAT
- Coloring is not disabled globally. Thus applications can color even if
Rocket is configured not to.
- Rocket is more conservative about 'warn' and 'error' messages, reserving
those log levels for messages useful in production.
- Errors from guards logged by codegen now use the 'Display' implementation of
those errors when one exists.
- Secrets are never logged, even when directly asked for.
New features:
- Many Rocket types know how to trace themselves via a new `Trace` trait.
- `Either` types can now be used in `uri!()` calls.
- A `RequestIdLayer` tags all requests with a unique ID.
Breaking changes to configuration:
- `Config::log_level` is of type `Option<Level>`. `None` disables tracing.
- `log_level` now uses the traditional log level names: "off", "error",
"warn", "info", "debug", "trace", or 0-5. This replace the Rocket-specific
"normal", "debug", "critical".
- A new option, `log_format`, which is either `compact` or `pretty`,
determines how Rocket's tracing subscriber log trace messages.
Breaking changes:
- Hidden `rocket::Either` is now publicly available at `rocket::either::Either`.
- `rocket::Error` no longer panics when dropped.
- `main` generated by `#[launch]` returns an `ExitCode`.
- `FromParam` `Err` now always returns the actual error as opposed to the
string that failed to parse. To recover the original string, use `Either<T,
&str>`, where `T: FromParam`, as a parameter guard.
- Many types that implemented `Display` now instead implement `Trace`.
- `Error::pretty_print()` was removed. Use `Error::trace()` via `Trace` impl.
Internal improvements:
- Made more space in CI machines for tasks.
- Cleaned up testbench code using `inventory`.
Resolves #21.
2024-05-17 03:23:26 +00:00
|
|
|
[dependencies.log]
|
|
|
|
version = "0.4"
|
|
|
|
default-features = false
|
|
|
|
optional = true
|
|
|
|
|
2021-05-31 16:15:00 +00:00
|
|
|
[dev-dependencies.rocket]
|
|
|
|
path = "../../../core/lib"
|
|
|
|
default-features = false
|
|
|
|
features = ["json"]
|
2021-07-09 23:34:54 +00:00
|
|
|
|
|
|
|
[build-dependencies]
|
|
|
|
version_check = "0.9"
|