Skip to content

Commit 5bee820

Browse files
Merge pull request #103 from theseus-rs/default-to-native-tls
build: change default from rustls-tls to native-tls
2 parents 97975ff + 6433904 commit 5bee820

File tree

8 files changed

+48
-41
lines changed

8 files changed

+48
-41
lines changed

Cargo.lock

Lines changed: 29 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/embedded_async/src/main.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
#![forbid(unsafe_code)]
22
#![deny(clippy::pedantic)]
33

4-
use postgresql_embedded::{PostgreSQL, Result};
4+
use postgresql_embedded::{PostgreSQL, Result, Settings, VersionReq};
55

66
#[tokio::main]
77
async fn main() -> Result<()> {
8-
let mut postgresql = PostgreSQL::default();
8+
let settings = Settings {
9+
version: VersionReq::parse("=16.3.0")?,
10+
..Default::default()
11+
};
12+
let mut postgresql = PostgreSQL::new(settings);
913
postgresql.setup().await?;
1014
postgresql.start().await?;
1115

postgresql_archive/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ tokio = { workspace = true }
4848

4949
[features]
5050
default = [
51-
"rustls-tls",
51+
"native-tls",
5252
"theseus",
5353
]
5454
blocking = ["dep:tokio"]

postgresql_archive/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ The following features are available:
5252
| Name | Description | Default? |
5353
|--------------|----------------------------|----------|
5454
| `blocking` | Enables the blocking API | No |
55-
| `native-tls` | Enables native-tls support | No |
56-
| `rustls-tls` | Enables rustls-tls support | Yes |
55+
| `native-tls` | Enables native-tls support | Yes |
56+
| `rustls-tls` | Enables rustls-tls support | No |
5757

5858
### Configurations
5959

postgresql_archive/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@
5757
//! | Name | Description | Default? |
5858
//! |--------------|----------------------------|----------|
5959
//! | `blocking` | Enables the blocking API | No |
60-
//! | `native-tls` | Enables native-tls support | No |
61-
//! | `rustls-tls` | Enables rustls-tls support | Yes |
60+
//! | `native-tls` | Enables native-tls support | Yes |
61+
//! | `rustls-tls` | Enables rustls-tls support | No |
6262
//!
6363
//! ### Configurations
6464
//!

postgresql_embedded/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ test-log = { workspace = true }
3737
tokio = { workspace = true, features = ["full"] }
3838

3939
[features]
40-
default = ["rustls-tls", "theseus"]
40+
default = [
41+
"native-tls",
42+
"theseus",
43+
]
4144
blocking = ["tokio"]
4245
bundled = []
4346
native-tls = [

postgresql_embedded/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ The following features are available:
9898
|--------------|----------------------------------------------------------|----------|
9999
| `bundled` | Bundles the PostgreSQL archive into the resulting binary | No |
100100
| `blocking` | Enables the blocking API; requires `tokio` | No |
101-
| `native-tls` | Enables native-tls support | No |
102-
| `rustls-tls` | Enables rustls-tls support | Yes |
101+
| `native-tls` | Enables native-tls support | Yes |
102+
| `rustls-tls` | Enables rustls-tls support | No |
103103
| `theseus` | Enables theseus PostgreSQL binaries | Yes |
104104
| `tokio` | Enables using tokio for async | No |
105105
| `zonky` | Enables zonky PostgreSQL binaries | No |

postgresql_embedded/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@
8686
//! |--------------|----------------------------------------------------------|----------|
8787
//! | `bundled` | Bundles the PostgreSQL archive into the resulting binary | No |
8888
//! | `blocking` | Enables the blocking API; requires `tokio` | No |
89-
//! | `native-tls` | Enables native-tls support | No |
90-
//! | `rustls-tls` | Enables rustls-tls support | Yes |
89+
//! | `native-tls` | Enables native-tls support | Yes |
90+
//! | `rustls-tls` | Enables rustls-tls support | No |
9191
//! | `theseus` | Enables theseus PostgreSQL binaries | Yes |
9292
//! | `tokio` | Enables using tokio for async | No |
9393
//! | `zonky` | Enables zonky PostgreSQL binaries | No |

0 commit comments

Comments
 (0)