Skip to content

Commit

Permalink
Remove the vendored feature of openssl-sys
Browse files Browse the repository at this point in the history
  • Loading branch information
stormshield-kg committed Apr 19, 2024
1 parent e04db6c commit 30809b5
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 9 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ jobs:
echo "C:\Program Files\PostgreSQL\12\lib" >> $GITHUB_PATH
echo "PQ_LIB_DIR=C:\Program Files\PostgreSQL\12\lib" >> $GITHUB_ENV
- name: Windows setup (bundled)
if: runner.os == 'Windows' && matrix.features == 'bundled'
shell: bash
Expand Down
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@ All user visible changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/), as described
for Rust libraries in [RFC #1105](https://github.com/rust-lang/rfcs/blob/master/text/1105-api-evolution.md)

## Unreleased

## Changed

* The `bundled` feature of `pq-sys` no longer build a bundled version of `openssl`.
To bundle `openssl` when compiling `libpq` from source, add `openssl-sys` with the `vendored` feature to your crate dependencies:
```toml
[dependencies]
openssl-sys = { version = "0.9.93", features = ["vendored"] }
```

## pq-src [0.1.6] 2024-04-12

## Changed
Expand All @@ -17,7 +28,7 @@ for Rust libraries in [RFC #1105](https://github.com/rust-lang/rfcs/blob/master/

## pq-src [0.1.4] 2024-04-05

## Changed
## Changed

* Readded `strlcat` on linux as well

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ vcpkg = "0.2.6"

[features]
default = []
bundled = ["pq-src"]
bundled = ["pq-src"]
buildtime_bindgen = ["dep:bindgen"]
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ The build script instructs Cargo to link the library statically if the environme
variable `PQ_LIB_STATIC` is set. This can be useful, if targeting for a musl target.
If pkg-config is being used, it's configuration options will apply.

### Features

* `buildtime_bindgen`: Run `bindgen` at build-time to generate bindings using installed headers. Not compatible with the `bundled` feature.
* `bundled`: Build the bundled version of `libpq` from source.
To use a bundled version of `openssl`, add the `openssl-sys` crate with the `vendored` feature to your crate dependencies:
```toml
[dependencies]
openssl-sys = { version = "0.9.93", features = ["vendored"] }
```

## FAQ

### I'm seeing `dyld: Symbol not found __cg_jpeg_resync_to_restart` on macOS
Expand Down
7 changes: 1 addition & 6 deletions pq-src/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,12 @@ keywords = ["bindings", "libpq", "pq-sys", "bundled"]
categories = ["database", "external-ffi-bindings"]
readme = "README.md"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[target.'cfg(not(target_os = "windows"))'.dependencies]
openssl-sys = { version = "0.9.93", features = ["vendored"] }
openssl-sys = "0.9.93"

[build-dependencies]
cc = "1.0.83"

[target.'cfg(not(target_os = "windows"))'.build-dependencies]
openssl-src = "300.0.0"

[features]
default = []
with-asan = []

0 comments on commit 30809b5

Please sign in to comment.