All user visible changes to this project will be documented in this file. This project adheres to Semantic Versioning, as described for Rust libraries in RFC #1105
- Fixed a potential compilation error on MacOS
- Include a vendored copy of
explicit_bzero
to the linux build as well as that function only exists on newer glibc versions
- Readded
strlcat
on linux as well
- Include more required headers in the generated include directory
- Fix including
strlcat
on windows only
- Change
#[cfg(target_*)]
attributes in the build script to use cargo set environment variables instead. This enables cross compilingpq-src
to a different target system.
- We updated the bundled libpq version to 16.2 to fix compatibility with openssl 3.2
- We changed the build script to expose the bundled libpq headers by setting
DEP_PQ_SYS_SRC_INCLUDE
so that other *-sys crates can consume that information and reuse the bundled build provided by this crate
- We added a
pq-src
crate and abundled
feature forpq-sys
. This allows to build and link a static version of libpq during the rust build process. This feature currently supports builds targeting Windows, Linux and macOS. It requires a c-compiler toolchain for the target to build libpq from source. - We added a
buildtime_bindgen
feature flag that allows to generate bindings for your locally installed libpq version. This is helpful for cases where the target architecture is significantly different to what the built-in bindings assume.
- We regenerated the bundled bindings to match the libpq version build by the
bundled
feature flag
- Added
wldap
as dependency for the vcpk installation on windows as that's now required there
-
Linking can now be dynamically handled per-target by specifying the
TARGET
environment variable andPQ_LIB_STATIC_$TARGET
environment variable. -
The path to
pg_config
can now be dynamically handled per-target by specifying theTARGET
environment variable andPG_CONFIG_$TARGET
environment variable.
- Linking on the msvc toolchain will no longer attempt to statically link
- Improved linking on Windows, particularly with the msvc toolchain.
- Properly specified the build script
- Bindings are no longer generated at compile time. Requiring clang 3.9 caused
too many issues for too many users, and requiring
syntex_syntax
increased compile time too much.
- Fixed an issue when building on mac against postgres from homebrew
-
Fixed an issue when building on mac against postgres from homebrew
-
Fixed an issue with locating header files on linux
-
Bindings are now generated when the library is built, rather than being vendored ahead of time.
-
libc
is no longer used. Anywhere thatlibc::some_type
was expected,std::os::raw::some_type
is now used instead. -
The build script will no longer attempt to canonicalize symlinks on MacOS.
pkg-config
is disabled by default. It can be enabled by addingfeatures = ["pkg-config"]
to yourCargo.toml
.
- We will attempt to use
pkg-config
to locate libpq before falling back topg_config
.
- No changes. Accidental release on the wrong commit.
pq
will be statically linked if the environment variablePQ_LIB_STATIC
is set.
- On Mac if
pg_config
points to a directory wherelibpq.dylib
is a symlink, we will now attempt to find the canonical directory to link against. This means that for installations using homebrew,/usr/local/Cellar/postgresql/version/lib
will be added toDYLD_LIBRARY_PATH
instead of/usr/local/lib
- The directory containing libpq for linking can now be specified via the
PQ_LIB_DIR
environment variable.