From e4006301fd9d9407917df609f4700dbefc3e31fc Mon Sep 17 00:00:00 2001 From: louisgariepy Date: Sat, 30 Jul 2022 16:25:32 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Split=20client=20into=20`core`,?= =?UTF-8?q?=20`async`=20and=20`sync`=20crates.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.lock | 40 +- Cargo.toml | 2 +- bench/Cargo.toml | 6 +- .../cornucopia_client_async}/Cargo.toml | 16 +- .../cornucopia_client_async}/README.md | 0 .../cornucopia_client_async}/src/deadpool.rs | 2 +- .../src/generic_client.rs | 34 - clients/cornucopia_client_async/src/lib.rs | 15 + .../cornucopia_client_async/src/private.rs | 32 + clients/cornucopia_client_core/Cargo.toml | 18 + clients/cornucopia_client_core/README.md | 47 + .../src/array_iterator.rs | 5 +- .../cornucopia_client_core/src/domain.rs | 16 +- clients/cornucopia_client_core/src/lib.rs | 7 + clients/cornucopia_client_core/src/utils.rs | 14 + clients/cornucopia_client_sync/Cargo.toml | 17 + clients/cornucopia_client_sync/README.md | 47 + clients/cornucopia_client_sync/src/lib.rs | 10 + .../cornucopia_client_sync/src/private.rs | 8 +- codegen_test/Cargo.toml | 4 +- cornucopia_client/Cargo.lock | 820 ------------------ cornucopia_client/src/lib.rs | 38 - examples/auto_build/Cargo.toml | 3 +- examples/basic_async/Cargo.toml | 2 +- examples/basic_sync/Cargo.toml | 4 +- 25 files changed, 261 insertions(+), 946 deletions(-) rename {cornucopia_client => clients/cornucopia_client_async}/Cargo.toml (58%) rename {cornucopia_client => clients/cornucopia_client_async}/README.md (100%) rename {cornucopia_client => clients/cornucopia_client_async}/src/deadpool.rs (98%) rename cornucopia_client/src/async_.rs => clients/cornucopia_client_async/src/generic_client.rs (85%) create mode 100644 clients/cornucopia_client_async/src/lib.rs create mode 100644 clients/cornucopia_client_async/src/private.rs create mode 100644 clients/cornucopia_client_core/Cargo.toml create mode 100644 clients/cornucopia_client_core/README.md rename {cornucopia_client => clients/cornucopia_client_core}/src/array_iterator.rs (95%) rename cornucopia_client/src/private.rs => clients/cornucopia_client_core/src/domain.rs (89%) create mode 100644 clients/cornucopia_client_core/src/lib.rs create mode 100644 clients/cornucopia_client_core/src/utils.rs create mode 100644 clients/cornucopia_client_sync/Cargo.toml create mode 100644 clients/cornucopia_client_sync/README.md create mode 100644 clients/cornucopia_client_sync/src/lib.rs rename cornucopia_client/src/sync.rs => clients/cornucopia_client_sync/src/private.rs (73%) delete mode 100644 cornucopia_client/Cargo.lock delete mode 100644 cornucopia_client/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index fb588446..2d612ecc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -62,7 +62,7 @@ name = "auto-build" version = "0.1.0" dependencies = [ "cornucopia", - "cornucopia_client", + "cornucopia_client_async", "deadpool-postgres", "futures", "postgres-types", @@ -101,7 +101,7 @@ checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" name = "basic-async" version = "0.1.0" dependencies = [ - "cornucopia_client", + "cornucopia_client_async", "deadpool-postgres", "futures", "postgres-types", @@ -113,7 +113,7 @@ dependencies = [ name = "basic_sync" version = "0.1.0" dependencies = [ - "cornucopia_client", + "cornucopia_client_sync", "postgres", "postgres-types", ] @@ -123,7 +123,8 @@ name = "bench" version = "0.1.0" dependencies = [ "cornucopia", - "cornucopia_client", + "cornucopia_client_async", + "cornucopia_client_sync", "criterion", "diesel", "futures", @@ -259,7 +260,8 @@ dependencies = [ name = "codegen_test" version = "0.1.0" dependencies = [ - "cornucopia_client", + "cornucopia_client_async", + "cornucopia_client_sync", "eui48", "futures", "postgres", @@ -308,16 +310,30 @@ dependencies = [ ] [[package]] -name = "cornucopia_client" +name = "cornucopia_client_async" version = "0.2.2" dependencies = [ "async-trait", + "cornucopia_client_core", "deadpool-postgres", + "tokio-postgres", +] + +[[package]] +name = "cornucopia_client_core" +version = "0.2.2" +dependencies = [ "fallible-iterator", - "postgres", "postgres-protocol", "postgres-types", - "tokio-postgres", +] + +[[package]] +name = "cornucopia_client_sync" +version = "0.2.2" +dependencies = [ + "cornucopia_client_core", + "postgres", ] [[package]] @@ -1639,9 +1655,9 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.35" +version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a400e31aa60b9d44a52a8ee0343b5b18566b03a8321e0d321f695cf56e940160" +checksum = "2fce9567bd60a67d08a16488756721ba392f24f29006402881e43b19aac64307" dependencies = [ "cfg-if", "pin-project-lite", @@ -1650,9 +1666,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.28" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b7358be39f2f274f322d2aaed611acc57f382e8eb1e5b48cb9ae30933495ce7" +checksum = "5aeea4303076558a00714b823f9ad67d58a3bbda1df83d8827d21193156e22f7" dependencies = [ "once_cell", ] diff --git a/Cargo.toml b/Cargo.toml index 0942ff77..ba35f05d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [workspace] members = [ "examples/*", - "cornucopia_client", + "clients/*", "integration", "codegen_test", "bench", diff --git a/bench/Cargo.toml b/bench/Cargo.toml index 70c136f7..a16c5a56 100644 --- a/bench/Cargo.toml +++ b/bench/Cargo.toml @@ -12,10 +12,12 @@ criterion = "0.3.6" postgres = "0.19.3" tokio-postgres = "0.7.6" postgres-types = "0.2.3" -cornucopia = { path = "../cornucopia" } -cornucopia_client = { path = "../cornucopia_client", features = ["sync"] } diesel = { version = "2.0.0-rc.0", features = ["postgres"] } +cornucopia = { path = "../cornucopia" } +cornucopia_client_sync = { path = "../clients/cornucopia_client_sync" } +cornucopia_client_async = { path = "../clients/cornucopia_client_async" } + [[bench]] name = "usage" harness = false diff --git a/cornucopia_client/Cargo.toml b/clients/cornucopia_client_async/Cargo.toml similarity index 58% rename from cornucopia_client/Cargo.toml rename to clients/cornucopia_client_async/Cargo.toml index 9bc23258..8da7d7e3 100644 --- a/cornucopia_client/Cargo.toml +++ b/clients/cornucopia_client_async/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "cornucopia_client" +name = "cornucopia_client_async" version = "0.2.2" edition = "2021" license = "MIT/Apache-2.0" @@ -12,17 +12,13 @@ keywords = ["postgresql", "query", "generator", "sql", "tokio-postgres"] [features] default = ["deadpool"] -async = ["dep:tokio-postgres", "dep:async-trait"] -deadpool = ["async", "dep:deadpool-postgres"] -sync = ["dep:postgres"] +deadpool = ["dep:deadpool-postgres"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -tokio-postgres = { version = "0.7.6", optional = true } -postgres = { version = "0.19.3", optional = true } -async-trait = { version = "0.1.56", optional = true } +tokio-postgres = { version = "0.7.6" } +async-trait = { version = "0.1.56" } deadpool-postgres = { version = "0.10.2", optional = true } -fallible-iterator = "0.2" -postgres-protocol = "0.6.4" -postgres-types = { version = "0.2.3" } + +cornucopia_client_core = { path = "../cornucopia_client_core" } diff --git a/cornucopia_client/README.md b/clients/cornucopia_client_async/README.md similarity index 100% rename from cornucopia_client/README.md rename to clients/cornucopia_client_async/README.md diff --git a/cornucopia_client/src/deadpool.rs b/clients/cornucopia_client_async/src/deadpool.rs similarity index 98% rename from cornucopia_client/src/deadpool.rs rename to clients/cornucopia_client_async/src/deadpool.rs index 7d33d7b9..8d0a78cd 100644 --- a/cornucopia_client/src/deadpool.rs +++ b/clients/cornucopia_client_async/src/deadpool.rs @@ -7,7 +7,7 @@ use tokio_postgres::{ Transaction as PgTransaction, }; -use crate::async_::GenericClient; +use crate::generic_client::GenericClient; #[async_trait] impl GenericClient for DeadpoolClient { diff --git a/cornucopia_client/src/async_.rs b/clients/cornucopia_client_async/src/generic_client.rs similarity index 85% rename from cornucopia_client/src/async_.rs rename to clients/cornucopia_client_async/src/generic_client.rs index fc3b4cb9..e0042c9b 100644 --- a/cornucopia_client/src/async_.rs +++ b/clients/cornucopia_client_async/src/generic_client.rs @@ -169,37 +169,3 @@ impl GenericClient for Client { Client::query_raw(self, statement, params).await } } - -/// Cached statement -pub struct Stmt { - query: &'static str, - cached: Option, -} - -impl Stmt { - #[must_use] - pub fn new(query: &'static str) -> Self { - Self { - query, - cached: None, - } - } - - pub async fn prepare<'a, C: GenericClient>( - &'a mut self, - client: &C, - ) -> Result<&'a Statement, Error> { - if self.cached.is_none() { - let stmt = client.prepare(self.query).await?; - self.cached = Some(stmt); - } - // the statement is always prepared at this point - Ok(unsafe { self.cached.as_ref().unwrap_unchecked() }) - } -} - -/// This trait allows you to bind parameters to a query using a single -/// struct, rather than passing each bind parameter as a function parameter. -pub trait Params<'a, P, O, C> { - fn params(&'a mut self, client: &'a C, params: &'a P) -> O; -} diff --git a/clients/cornucopia_client_async/src/lib.rs b/clients/cornucopia_client_async/src/lib.rs new file mode 100644 index 00000000..83516f65 --- /dev/null +++ b/clients/cornucopia_client_async/src/lib.rs @@ -0,0 +1,15 @@ +#[doc(hidden)] +pub mod private; + +pub use crate::generic_client::GenericClient; +pub use cornucopia_client_core::ArrayIterator; + +#[cfg(feature = "deadpool")] +mod deadpool; +mod generic_client; + +/// This trait allows you to bind parameters to a query using a single +/// struct, rather than passing each bind parameter as a function parameter. +pub trait Params<'a, P, O, C> { + fn params(&'a mut self, client: &'a C, params: &'a P) -> O; +} diff --git a/clients/cornucopia_client_async/src/private.rs b/clients/cornucopia_client_async/src/private.rs new file mode 100644 index 00000000..5ab675d9 --- /dev/null +++ b/clients/cornucopia_client_async/src/private.rs @@ -0,0 +1,32 @@ +pub use cornucopia_client_core::{slice_iter, Domain, DomainArray}; + +use crate::generic_client::GenericClient; +use tokio_postgres::{Error, Statement}; + +/// Cached statement +pub struct Stmt { + query: &'static str, + cached: Option, +} + +impl Stmt { + #[must_use] + pub fn new(query: &'static str) -> Self { + Self { + query, + cached: None, + } + } + + pub async fn prepare<'a, C: GenericClient>( + &'a mut self, + client: &C, + ) -> Result<&'a Statement, Error> { + if self.cached.is_none() { + let stmt = client.prepare(self.query).await?; + self.cached = Some(stmt); + } + // the statement is always prepared at this point + Ok(unsafe { self.cached.as_ref().unwrap_unchecked() }) + } +} diff --git a/clients/cornucopia_client_core/Cargo.toml b/clients/cornucopia_client_core/Cargo.toml new file mode 100644 index 00000000..e53c97f1 --- /dev/null +++ b/clients/cornucopia_client_core/Cargo.toml @@ -0,0 +1,18 @@ +[package] +name = "cornucopia_client_core" +version = "0.2.2" +edition = "2021" +license = "MIT/Apache-2.0" +description = "Generic client trait for Cornucopia users" +homepage = "https://github.com/cornucopia-rs/cornucopia" +repository = "https://github.com/cornucopia-rs/cornucopia" +readme = "README.md" +categories = ["database"] +keywords = ["postgresql", "query", "generator", "sql", "tokio-postgres"] + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +postgres-protocol = "0.6.4" +postgres-types = { version = "0.2.3" } +fallible-iterator = "0.2" diff --git a/clients/cornucopia_client_core/README.md b/clients/cornucopia_client_core/README.md new file mode 100644 index 00000000..f07d4f12 --- /dev/null +++ b/clients/cornucopia_client_core/README.md @@ -0,0 +1,47 @@ +
+

Cornucopia

+
+ + Generate type checked Rust from your SQL + +
+ +
+ +
+ + actions status + + + Crates.io version + + + + Download + +
+ +
+

+ + Install + + | + + Example + +

+
+ +--- + +This crate is a small library exposing Cornucopia's `GenericClient`. You probably need this if you're a Cornucopia user. + +The `GenericClient` is an abstraction over four types of connections (`deadpool_postgres::Client`, `deadpool_postgres::Transaction`, `tokio_postgres::Client`, `tokio_postgres::Transaction`). Its meant to allow you to mix-and-match these connection types in Cornucopia Queries. + +| | non-pooled | pooled | +| ---------------- | ----------------------------- | -------------------------------- | +| single-statement | `tokio_postgres::Client` | `deadpool_postgres::Client` | +| multi-statement | `tokio_postgres::Transaction` | `deadpool_postgres::Transaction` | \ No newline at end of file diff --git a/cornucopia_client/src/array_iterator.rs b/clients/cornucopia_client_core/src/array_iterator.rs similarity index 95% rename from cornucopia_client/src/array_iterator.rs rename to clients/cornucopia_client_core/src/array_iterator.rs index 8b12d7e0..4675042b 100644 --- a/cornucopia_client/src/array_iterator.rs +++ b/clients/cornucopia_client_core/src/array_iterator.rs @@ -1,9 +1,10 @@ use fallible_iterator::FallibleIterator; use postgres_protocol::types::{array_from_sql, ArrayValues}; use postgres_types::{FromSql, Kind, Type}; -use std::{fmt::Debug, marker::PhantomData}; +use std::fmt::Debug; +use std::marker::PhantomData; -use crate::private::escape_domain; +use crate::utils::escape_domain; /// Iterator over the items in a PostgreSQL array. You only need this if you are /// working with custom zero-cost type mapping of rows containing PostgreSQL arrays. diff --git a/cornucopia_client/src/private.rs b/clients/cornucopia_client_core/src/domain.rs similarity index 89% rename from cornucopia_client/src/private.rs rename to clients/cornucopia_client_core/src/domain.rs index 521bfd75..70e831f1 100644 --- a/cornucopia_client/src/private.rs +++ b/clients/cornucopia_client_core/src/domain.rs @@ -5,6 +5,8 @@ use std::{ fmt::{Debug, Formatter}, }; +use crate::utils::escape_domain; + pub struct Domain(pub T); impl Debug for Domain { @@ -37,7 +39,6 @@ impl ToSql for Domain { } } -/// Wrapper for slice `ToSql` which ignore pub struct DomainArray<'a, T: ToSql>(pub &'a [T]); impl<'a, T: ToSql> Debug for DomainArray<'a, T> { @@ -87,12 +88,6 @@ impl<'a, T: ToSql + 'a> ToSql for DomainArray<'a, T> { } } -pub fn slice_iter<'a>( - s: &'a [&'a (dyn ToSql + Sync)], -) -> impl ExactSizeIterator + 'a { - s.iter().map(|s| *s as _) -} - fn downcast(len: usize) -> Result> { if len > i32::max_value() as usize { Err("value too large to transmit".into()) @@ -100,10 +95,3 @@ fn downcast(len: usize) -> Result> { Ok(len as i32) } } - -pub fn escape_domain(ty: &Type) -> &Type { - match ty.kind() { - Kind::Domain(ty) => ty, - _ => ty, - } -} diff --git a/clients/cornucopia_client_core/src/lib.rs b/clients/cornucopia_client_core/src/lib.rs new file mode 100644 index 00000000..3956474c --- /dev/null +++ b/clients/cornucopia_client_core/src/lib.rs @@ -0,0 +1,7 @@ +mod array_iterator; +mod domain; +mod utils; + +pub use array_iterator::ArrayIterator; +pub use domain::{Domain, DomainArray}; +pub use utils::slice_iter; diff --git a/clients/cornucopia_client_core/src/utils.rs b/clients/cornucopia_client_core/src/utils.rs new file mode 100644 index 00000000..d046783d --- /dev/null +++ b/clients/cornucopia_client_core/src/utils.rs @@ -0,0 +1,14 @@ +use postgres_types::{Kind, ToSql, Type}; + +pub fn escape_domain(ty: &Type) -> &Type { + match ty.kind() { + Kind::Domain(ty) => ty, + _ => ty, + } +} + +pub fn slice_iter<'a>( + s: &'a [&'a (dyn ToSql + Sync)], +) -> impl ExactSizeIterator + 'a { + s.iter().map(|s| *s as _) +} diff --git a/clients/cornucopia_client_sync/Cargo.toml b/clients/cornucopia_client_sync/Cargo.toml new file mode 100644 index 00000000..e3989010 --- /dev/null +++ b/clients/cornucopia_client_sync/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "cornucopia_client_sync" +version = "0.2.2" +edition = "2021" +license = "MIT/Apache-2.0" +description = "Generic client trait for Cornucopia users" +homepage = "https://github.com/cornucopia-rs/cornucopia" +repository = "https://github.com/cornucopia-rs/cornucopia" +readme = "README.md" +categories = ["database"] +keywords = ["postgresql", "query", "generator", "sql", "tokio-postgres"] + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +postgres = { version = "0.19.3" } +cornucopia_client_core = { path = "../cornucopia_client_core" } diff --git a/clients/cornucopia_client_sync/README.md b/clients/cornucopia_client_sync/README.md new file mode 100644 index 00000000..f07d4f12 --- /dev/null +++ b/clients/cornucopia_client_sync/README.md @@ -0,0 +1,47 @@ +
+

Cornucopia

+
+ + Generate type checked Rust from your SQL + +
+ +
+ +
+ + actions status + + + Crates.io version + + + + Download + +
+ + + +--- + +This crate is a small library exposing Cornucopia's `GenericClient`. You probably need this if you're a Cornucopia user. + +The `GenericClient` is an abstraction over four types of connections (`deadpool_postgres::Client`, `deadpool_postgres::Transaction`, `tokio_postgres::Client`, `tokio_postgres::Transaction`). Its meant to allow you to mix-and-match these connection types in Cornucopia Queries. + +| | non-pooled | pooled | +| ---------------- | ----------------------------- | -------------------------------- | +| single-statement | `tokio_postgres::Client` | `deadpool_postgres::Client` | +| multi-statement | `tokio_postgres::Transaction` | `deadpool_postgres::Transaction` | \ No newline at end of file diff --git a/clients/cornucopia_client_sync/src/lib.rs b/clients/cornucopia_client_sync/src/lib.rs new file mode 100644 index 00000000..0f95d6b9 --- /dev/null +++ b/clients/cornucopia_client_sync/src/lib.rs @@ -0,0 +1,10 @@ +#[doc(hidden)] +pub mod private; + +pub use cornucopia_client_core::ArrayIterator; + +/// This trait allows you to bind parameters to a query using a single +/// struct, rather than passing each bind parameter as a function parameter. +pub trait Params<'a, P, O, C> { + fn params(&'a mut self, client: &'a mut C, params: &'a P) -> O; +} diff --git a/cornucopia_client/src/sync.rs b/clients/cornucopia_client_sync/src/private.rs similarity index 73% rename from cornucopia_client/src/sync.rs rename to clients/cornucopia_client_sync/src/private.rs index 9d71fa4e..fa01d7c8 100644 --- a/cornucopia_client/src/sync.rs +++ b/clients/cornucopia_client_sync/src/private.rs @@ -1,3 +1,5 @@ +pub use cornucopia_client_core::{slice_iter, Domain, DomainArray}; + use postgres::Statement; /// Cached statement @@ -27,9 +29,3 @@ impl Stmt { Ok(unsafe { self.cached.as_ref().unwrap_unchecked() }) } } - -/// This trait allows you to bind parameters to a query using a single -/// struct, rather than passing each bind parameter as a function parameter. -pub trait Params<'a, P, O, C> { - fn params(&'a mut self, client: &'a mut C, params: &'a P) -> O; -} diff --git a/codegen_test/Cargo.toml b/codegen_test/Cargo.toml index e147bd95..1fe61507 100644 --- a/codegen_test/Cargo.toml +++ b/codegen_test/Cargo.toml @@ -18,7 +18,6 @@ tokio-postgres = { version = "0.7.6", features = [ "with-uuid-1", "with-eui48-1", ] } -cornucopia_client = { path = "../cornucopia_client", features = ["sync"] } postgres-types = { version = "0.2.3", features = ["derive"] } serde = { version = "1.0.138", features = ["derive"] } serde_json = { version = "1.0.82", features = ["raw_value"] } @@ -26,3 +25,6 @@ time = { version = "0.3.11", features = ["parsing", "serde"] } uuid = { version = "1.1.2", features = ["serde"] } eui48 = { version = "1.1.0", features = ["serde"] } futures = "0.3.21" + +cornucopia_client_sync = { path = "../clients/cornucopia_client_sync" } +cornucopia_client_async = { path = "../clients/cornucopia_client_async" } diff --git a/cornucopia_client/Cargo.lock b/cornucopia_client/Cargo.lock deleted file mode 100644 index 2e7c0409..00000000 --- a/cornucopia_client/Cargo.lock +++ /dev/null @@ -1,820 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "async-trait" -version = "0.1.53" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6aa3524a2dfcf9fe180c51eae2b58738348d819517ceadf95789c51fff7600" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "base64" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "block-buffer" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" -dependencies = [ - "generic-array", -] - -[[package]] -name = "byteorder" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" - -[[package]] -name = "bytes" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "cornucopia_client" -version = "0.1.0" -dependencies = [ - "async-trait", - "deadpool-postgres", - "tokio", - "tokio-postgres", -] - -[[package]] -name = "cpufeatures" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b" -dependencies = [ - "libc", -] - -[[package]] -name = "crypto-common" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "deadpool" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81731b43e2a0cb022e7ff483346c276cdfc0c0de118e0b58aee3f3b39c70c978" -dependencies = [ - "async-trait", - "deadpool-runtime", - "num_cpus", - "retain_mut", - "tokio", -] - -[[package]] -name = "deadpool-postgres" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c668a58063c6331e3437e3146970943ad82b1b36169fd979bb2645ac2088209a" -dependencies = [ - "deadpool", - "log", - "tokio", - "tokio-postgres", -] - -[[package]] -name = "deadpool-runtime" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaa37046cc0f6c3cc6090fbdbf73ef0b8ef4cfcc37f6befc0020f63e8cf121e1" -dependencies = [ - "tokio", -] - -[[package]] -name = "digest" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" -dependencies = [ - "block-buffer", - "crypto-common", - "subtle", -] - -[[package]] -name = "fallible-iterator" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" - -[[package]] -name = "futures" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f73fe65f54d1e12b726f517d3e2135ca3125a437b6d998caf1962961f7172d9e" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3" - -[[package]] -name = "futures-executor" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9420b90cfa29e327d0429f19be13e7ddb68fa1cccb09d65e5706b8c7a749b8a6" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" - -[[package]] -name = "futures-macro" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "futures-sink" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868" - -[[package]] -name = "futures-task" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" - -[[package]] -name = "futures-util" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "generic-array" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.10.2+wasi-snapshot-preview1", -] - -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest", -] - -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "libc" -version = "0.2.124" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21a41fed9d98f27ab1c6d161da622a4fa35e8a54a8adc24bbf3ddd0ef70b0e50" - -[[package]] -name = "lock_api" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6389c490849ff5bc16be905ae24bc913a9c8892e19b2341dbc175e14c341c2b8" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "md-5" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658646b21e0b72f7866c7038ab086d3d5e1cd6271f060fd37defb241949d0582" -dependencies = [ - "digest", -] - -[[package]] -name = "memchr" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" - -[[package]] -name = "mio" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52da4364ffb0e4fe33a9841a98a3f3014fb964045ce4f7a45a398243c8d6b0c9" -dependencies = [ - "libc", - "log", - "miow", - "ntapi", - "wasi 0.11.0+wasi-snapshot-preview1", - "winapi", -] - -[[package]] -name = "miow" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" -dependencies = [ - "winapi", -] - -[[package]] -name = "ntapi" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f" -dependencies = [ - "winapi", -] - -[[package]] -name = "num_cpus" -version = "1.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "once_cell" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9" - -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.5", -] - -[[package]] -name = "parking_lot" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58" -dependencies = [ - "lock_api", - "parking_lot_core 0.9.2", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" -dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall", - "smallvec", - "winapi", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "995f667a6c822200b0433ac218e05582f0e2efa1b922a3fd2fbaadc5f87bab37" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-sys", -] - -[[package]] -name = "percent-encoding" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" - -[[package]] -name = "phf" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" -dependencies = [ - "phf_shared", -] - -[[package]] -name = "phf_shared" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" -dependencies = [ - "siphasher", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "postgres-protocol" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79ec03bce71f18b4a27c4c64c6ba2ddf74686d69b91d8714fb32ead3adaed713" -dependencies = [ - "base64", - "byteorder", - "bytes", - "fallible-iterator", - "hmac", - "md-5", - "memchr", - "rand", - "sha2", - "stringprep", -] - -[[package]] -name = "postgres-types" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04619f94ba0cc80999f4fc7073607cb825bc739a883cb6d20900fc5e009d6b0d" -dependencies = [ - "bytes", - "fallible-iterator", - "postgres-protocol", -] - -[[package]] -name = "ppv-lite86" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" - -[[package]] -name = "proc-macro2" -version = "1.0.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec757218438d5fda206afc041538b2f6d889286160d649a86a24d37e1235afd1" -dependencies = [ - "unicode-xid", -] - -[[package]] -name = "quote" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" -dependencies = [ - "getrandom", -] - -[[package]] -name = "redox_syscall" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" -dependencies = [ - "bitflags", -] - -[[package]] -name = "retain_mut" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c31b5c4033f8fdde8700e4657be2c497e7288f01515be52168c631e2e4d4086" - -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "sha2" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "signal-hook-registry" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" -dependencies = [ - "libc", -] - -[[package]] -name = "siphasher" -version = "0.3.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" - -[[package]] -name = "slab" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32" - -[[package]] -name = "smallvec" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" - -[[package]] -name = "socket2" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "stringprep" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ee348cb74b87454fff4b551cbf727025810a004f88aeacae7f85b87f4e9a1c1" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "subtle" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" - -[[package]] -name = "syn" -version = "1.0.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b683b2b825c8eef438b77c36a06dc262294da3d5a5813fac20da149241dcd44d" -dependencies = [ - "proc-macro2", - "quote", - "unicode-xid", -] - -[[package]] -name = "tinyvec" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" - -[[package]] -name = "tokio" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2af73ac49756f3f7c01172e34a23e5d0216f6c32333757c2c61feb2bbff5a5ee" -dependencies = [ - "bytes", - "libc", - "memchr", - "mio", - "num_cpus", - "once_cell", - "parking_lot 0.12.0", - "pin-project-lite", - "signal-hook-registry", - "socket2", - "tokio-macros", - "winapi", -] - -[[package]] -name = "tokio-macros" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tokio-postgres" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b6c8b33df661b548dcd8f9bf87debb8c56c05657ed291122e1188698c2ece95" -dependencies = [ - "async-trait", - "byteorder", - "bytes", - "fallible-iterator", - "futures", - "log", - "parking_lot 0.11.2", - "percent-encoding", - "phf", - "pin-project-lite", - "postgres-protocol", - "postgres-types", - "socket2", - "tokio", - "tokio-util", -] - -[[package]] -name = "tokio-util" -version = "0.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e99e1983e5d376cd8eb4b66604d2e99e79f5bd988c3055891dcd8c9e2604cc0" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "log", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "typenum" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" - -[[package]] -name = "unicode-bidi" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f" - -[[package]] -name = "unicode-normalization" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-xid" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-sys" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5acdd78cb4ba54c0045ac14f62d8f94a03d10047904ae2a40afa1e99d8f70825" -dependencies = [ - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_msvc" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17cffbe740121affb56fad0fc0e421804adf0ae00891205213b5cecd30db881d" - -[[package]] -name = "windows_i686_gnu" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2564fde759adb79129d9b4f54be42b32c89970c18ebf93124ca8870a498688ed" - -[[package]] -name = "windows_i686_msvc" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cd9d32ba70453522332c14d38814bceeb747d80b3958676007acadd7e166956" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfce6deae227ee8d356d19effc141a509cc503dfd1f850622ec4b0f84428e1f4" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d19538ccc21819d01deaf88d6a17eae6596a12e9aafdbb97916fb49896d89de9" diff --git a/cornucopia_client/src/lib.rs b/cornucopia_client/src/lib.rs deleted file mode 100644 index dbd7a384..00000000 --- a/cornucopia_client/src/lib.rs +++ /dev/null @@ -1,38 +0,0 @@ -mod array_iterator; - -/// Hidden modules -/// -/// The following modules are public because the generated code needs -/// to access them, but users should not depend on them. - -#[cfg(feature = "async")] -#[doc(hidden)] -pub mod async_; - -#[cfg(feature = "deadpool")] -#[doc(hidden)] -mod deadpool; - -#[cfg(feature = "sync")] -#[doc(hidden)] -pub mod sync; - -#[doc(hidden)] -pub mod private; - -/// Public items -/// -/// These items are the real public part of the API. -pub use array_iterator::ArrayIterator; - -#[cfg(feature = "async")] -pub use async_::GenericClient; - -#[cfg(all(feature = "async", not(feature = "sync")))] -pub use async_::Params; -#[cfg(all(feature = "sync", feature = "async"))] -pub use async_::Params as AsyncParams; -#[cfg(all(feature = "sync", not(feature = "async")))] -pub use sync::Params; -#[cfg(all(feature = "sync", feature = "async"))] -pub use sync::Params as SyncParams; diff --git a/examples/auto_build/Cargo.toml b/examples/auto_build/Cargo.toml index d9a34918..b5a001d2 100644 --- a/examples/auto_build/Cargo.toml +++ b/examples/auto_build/Cargo.toml @@ -8,10 +8,11 @@ edition = "2021" [dependencies] tokio = { version = "1.18.2", features = ["full"] } tokio-postgres = "0.7.6" -cornucopia_client = { path = "../../cornucopia_client" } deadpool-postgres = "0.10.2" futures = "0.3.21" postgres-types = "0.2.3" +cornucopia_client_async = { path = "../../clients/cornucopia_client_async" } + [build-dependencies] cornucopia = { path = "../../cornucopia" } diff --git a/examples/basic_async/Cargo.toml b/examples/basic_async/Cargo.toml index 6db9a837..b34c8f2e 100644 --- a/examples/basic_async/Cargo.toml +++ b/examples/basic_async/Cargo.toml @@ -9,4 +9,4 @@ deadpool-postgres = "0.10.2" futures = "0.3.21" postgres-types = { version = "0.2.3", features = ["derive"] } tokio-postgres = "0.7.6" -cornucopia_client = { path = "../../cornucopia_client" } +cornucopia_client_async = { path = "../../clients/cornucopia_client_async" } diff --git a/examples/basic_sync/Cargo.toml b/examples/basic_sync/Cargo.toml index 5cf4cef3..56665944 100644 --- a/examples/basic_sync/Cargo.toml +++ b/examples/basic_sync/Cargo.toml @@ -8,6 +8,4 @@ edition = "2021" [dependencies] postgres-types = { version = "0.2.3", features = ["derive"] } postgres = "0.19.3" -cornucopia_client = { path = "../../cornucopia_client", default-features = false, features = [ - "sync", -] } +cornucopia_client_sync = { path = "../../clients/cornucopia_client_sync" }