pkg-config
A library to run the pkg-config system tool at build time in order to be used in Cargo build scripts.
0.3.34
698M downloads/mo
#120 most downloaded on crates.io
rust-lang/pkg-config-rs
What this package is like to depend on
Last release 9 days ago
14 Aug 2026
Ships fairly regularly
a new release about every 5 months
Some releases are documented
notes for 25 of 47 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
47 releases · first in 2014
2 releases in the last 12 months
see the full history below
Release timeline
47 releases · Nov 2014 to Aug 2026Releases
latest 47-
0.3.3414 Aug 2026Release notes
Open source →Changed
-
Update README.md (#190).
-
Update MSRV to 1.63 and remove
lazy_staticdependency (#191). -
Fix various clippy warnings (#193).
Added
-
Allow disabling passing --cflags to pkg-config (#183).
-
Make Library::extract_lib_from_filename public (#192).
-
-
0.3.3312 Apr 2026Release notes
Open source →Changed
- Error output from
pkg-configis included in the message again to help with finding the cause (#187)
- Error output from
-
0.3.3203 Mar 2025Release notes
Open source →Fixed
-
Suggest installing pkgconf via homebrew on macOS instead of pkg-config (#173)
-
Quote failed pkg-config command correctly in error messages to allow for directly copy&pasting it into a shell (#175)
-
-
0.3.3123 Sep 2024 -
0.3.3014 Feb 2024Release notes
Open source →Changed
-
Update documentation for cross-compilation (#161).
-
Update GitHub Action CI (#160).
-
-
0.3.2917 Jan 2024Release notes
Open source →Fixed
-
Detection and usage of Windows static libraries (#154).
-
Passing
-Wl,-uto the linker if specified in the pkg-config file (#154).
-
-
0.3.2820 Dec 2023Release notes
Open source →Fixed
- Pass -l:libfoo.a to linker directly (#149).
Changed
- Improve error message when library not found (#158).
-
0.3.2703 May 2023Release notes
Open source →Added
- Support falling back to
pkgconfifpkg-configis not available (#145).
Changed
-
Simplify running
pkg-config(#144). -
Document MSRV in
Cargo.tomlviarust-version. -
Fix a couple of minor clippy warnings (#147).
- Support falling back to
-
0.3.2626 Oct 2022Release notes
Open source →Added
- Support for handling full paths to libraries in addition to normal
-llinker flags (#134).
- Support for handling full paths to libraries in addition to normal
-
0.3.2531 Mar 2022Release notes
Open source →Added
- Support for parsing
-Wllinker arguments from theLibslines and passing them to the linker as well as making them available viaLibrary::ld_args(#131).
Changed
- Use SPDX license format and remove obsolete badge info (#129).
- Support for parsing
-
0.3.2411 Dec 2021Release notes
Open source →Fixed
- Re-add
target_supported(), which was accidentally removed in 0.3.15 (#128).
- Re-add
-
0.3.2306 Dec 2021Release notes
Open source →Changed
- Improve error messages when a
pkg-configpackage can't be found (#127).
- Improve error messages when a
-
0.3.2224 Oct 2021Release notes
Open source →Fixed
pkg-configcompiles again with Rust 1.30 or newer. 0.3.21 accidentally made use of API only available since 1.40 (#124, #125).
Changed
- Switched from Travis to GitHub Actions for the CI. Travis is dysfunctional since quite some time (#126).
-
0.3.2122 Oct 2021Release notes
Open source →Fixed
- Tests succeed again on macOS (#122).
Changed
- Improve error message in case of missing pkg-config and provide instructions how it can be installed (#121).
-
0.3.2025 Sep 2021Release notes
Open source →Fixed
- Use target-specific pkg-config consistently everywhere (#121, #118).
-
0.3.1913 Oct 2020Release notes
Open source →Added
-
Add
README.mdto be displayed on crates.io (#111). -
Support for
-isystem,-iquoteand-idirafterinclude flags (#115).
Changed
-
Improve documentation for cross-compilation (#113).
-
Allow overriding system root via the
PKG_CONFIG_SYSROOT_DIRorSYSROOTenvironment variable (#82).
-
-
0.3.1811 Jul 2020Release notes
Open source →Fixed
- Use
env::var_os()almost everywhere to handle non-UTF8 paths in environment variables, and also improve error handling around environment variable handling (#106).
Changed
- Default the
env_metadatabuild parameter totrueinstead offalse. Whenever a pkg-config related environment variable changes it would make sense to rebuild crates that use pkg-config, or otherwise changes might not be picked up. As such the previous default didn't make much sense (#105).
- Use
-
0.3.1702 Nov 2019 -
0.3.1609 Sep 2019Release notes
Open source →Changed
- Stop using deprecated functions and require Rust 1.30 (#84)
Fixed
- Fix repository URL in README.md
- Fix various clippy warnings
Added
- Run
cargo fmtas part of the CI (#89) - Derive
CloneforLibraryandDebugfor `Config (#91) - Add support for
PKG_CONFIG_ALLOW_SYSTEM_CFLAGSand enable by default (#93)
-
0.3.1525 Jul 2019Release notes
Open source →Changed
- Changes minimum documented rust version to 1.28 (#76)
Fixed
- Fix Travis CI badge url (#78)
- Fix project name in README.md (#81)
Added
- Support specifying range of versions (#75)
- Allow cross-compilation if pkg-config is customized (#44, #86)
-
0.3.1428 Aug 2018 -
0.3.1306 Aug 2018Release notes
Open source →Fixed
- Fix MSVC support to actually work and consider library paths too (#71)
-
0.3.1218 Jul 2018Release notes
Open source →Added
- Support for MSVC (#70)
- Document and test Rust 1.13 as minimally supported version (#66)
-
0.3.1124 Apr 2018 -
0.3.1023 Apr 2018Release notes
Open source →Added
- Allow static linking of /usr/ on macOS (#42)
- Add support for parsing
-Wl,style framework flags (#48) - Parse defines in
pkg-configoutput (#49) - Rerun on
PKG_CONFIG_PATHchanges (#50) - Introduce target-scoped variables (#58)
- Respect pkg-config escaping rules used with --cflags and --libs (#61)
Changed
- Use
?instead oftry!()in the codebase (#63)
-
0.3.924 Jan 2017Nothing published for this version
-
0.3.808 Mar 2016Nothing published for this version
-
0.3.717 Feb 2016Nothing published for this version
-
0.3.605 Oct 2015Nothing published for this version
-
0.3.516 Jun 2015Nothing published for this version
-
0.3.406 May 2015Nothing published for this version
-
0.3.302 Apr 2015Nothing published for this version
-
0.3.225 Mar 2015Nothing published for this version
-
0.3.111 Mar 2015Nothing published for this version
-
0.3.022 Feb 2015Nothing published for this version
-
0.2.220 Feb 2015Nothing published for this version
-
0.2.112 Feb 2015Nothing published for this version
-
0.2.005 Feb 2015Nothing published for this version
-
0.1.728 Jan 2015Nothing published for this version
-
0.1.623 Jan 2015Nothing published for this version
-
0.1.519 Jan 2015Nothing published for this version
-
0.1.409 Jan 2015Nothing published for this version
-
0.1.303 Jan 2015Nothing published for this version
-
0.1.216 Dec 2014Nothing published for this version
-
0.1.109 Dec 2014Nothing published for this version
-
0.1.027 Nov 2014Nothing published for this version
-
0.0.111 Nov 2014Nothing published for this version