diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ef88e65..5376204 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fccead..292e373 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 @@ -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 diff --git a/Cargo.toml b/Cargo.toml index beddda7..d403948 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,5 +25,5 @@ vcpkg = "0.2.6" [features] default = [] -bundled = ["pq-src"] +bundled = ["pq-src"] buildtime_bindgen = ["dep:bindgen"] diff --git a/README.md b/README.md index 291196f..b7fe38f 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/pq-src/Cargo.toml b/pq-src/Cargo.toml index c8df749..1562826 100644 --- a/pq-src/Cargo.toml +++ b/pq-src/Cargo.toml @@ -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 = []