The April 2022 release of the vcpkg package manager is available. This blog post summarizes changes from March 1st, 2022 to March 30th, 2022 for the microsoft/vcpkg and microsoft/vcpkg-tool GitHub repos.
Some stats for this period:
- 24 new ports were added to the open-source registry. If you are unfamiliar with the term ‘port’, they are packages that are built from source and are typically C/C++ libraries.
- 272 updates were made to existing ports. As always, we validate each change to a port by building all other ports that depend on or are depended by the library that is being updated for our nine main triplets.
- There are now 1,926 total libraries available in the vcpkg public registry. When including all available versions, there are 9,431 versioned ports. Vcpkg continues to maintain the largest C/C++ open-source catalog on the market.
- The April release of the main vcpkg repo includes 281 merged PRs by 83 people.
- The main vcpkg repo has 4.5k forks and 15.5k stars on GitHub.
Notable Changes
vcpkg artifacts merged into Microsoft/vcpkg-tool repo
vcpkg artifacts is our preview experience for acquiring binary packages, intended for developer tools like compilers, platform SDKs, and debuggers. This is a major step towards accepting external contributions for the vcpkg artifacts feature.
vcpkg can use tar.exe from Windows 10
To reduce our external dependency count for better reliability and performance, vcpkg now uses the Windows 10 in-box copy of tar to unzip our core dependencies. This removes the need for msiexec.exe during core operation on Windows 10 (though certain ports may still require it).
Anonymous AWS S3 access added for binary caching experience
This works via a new x-aws-config option in vcpkg.
PR: Microsoft/vcpkg-tool#434 (thank you @AenBleidd!)
Improved port installation error logging in vcpkg CI system
When modifying a port, vcpkg builds not only the port itself, but all other ports depending on it or that are dependencies of the port. This is handled by our CI system, which must successfully complete this operation to accept PRs. We have improved the logging of which ports are being broken by a PR so that port maintainers have an easier time diagnosing what went wrong.
General object storage interface for binary caching
Provides a consistent interface for using binary caching with different cloud providers.
PR: Microsoft/vcpkg-tool#456 (thank you @day253!)
Progress with Visual Studio integration experience
We have not yet finished our improved Visual Studio integration experience for vcpkg, but progress was made this release, including signed PowerShell scripts and a packaging step that was added to the tool.
PRs: Microsoft/vcpkg-tool#451 & Microsoft/vcpkg-tool#399
vcpkg tool no longer depends on ninja
Ninja is no longer a dependency of the vcpkg tool, reducing the overhead of installing 3rd party tools for vcpkg to function. Some individual ports may still require Ninja and it will be acquired in these circumstances as part of their build scripts.
PR: Microsoft/vcpkg-tool#372 (thank you @Neumann-A!)
GIT_ASKPASS support
An environment variable has been added for GIT_ASKPASS. This is used to point git toward a binary that implements git’s credential manager interface and can be used for private repository authentication.
PR: Microsoft/vcpkg-tool/#441 (thank you @horenmar!)
Removed many uses of std::regex in the vcpkg code
We’ve been removing uses of std::regex
throughout the code to improve vcpkg performance.
Instructions for using vcpkg in Arch Linux
Added user instructions for Arch Linux during vcpkg bootstrap.
PR: Microsoft/vcpkg/#23676 (thank you @bwrsandman!).
vcpkg works again with CMake versions <= 3.19
Fixed a bug that was breaking the vcpkg CMake toolchain file for CMake versions 3.19 and earlier.
PR: Microsoft/vcpkg/#23410 (thank you @dg0yt!)
Total Ports Available for Tested Triplets
triplet | ports available |
x86-windows | 1,731 |
x64-windows | 1,776 |
x64-windows-static | 1,667 |
x64-windows-static-md | 1,691 |
x64-uwp | 880 |
arm64-windows | 1,315 |
arm-uwp | 826 |
x64-osx | 1,641 |
x64-linux | 1,713 |
While vcpkg supports a much larger variety of target platforms x architectures, the list above is routinely tested to ensure updated ports don’t break other ports in the catalog.
Fun fact: we have so many x64-windows ports now that it takes over 24 hours to build them as part of our package testing process. We had to increase the timeout on these builds to compensate for the added time.
Documentation
Minor documentation changes were made for several vcpkg functions. We also want to thank our community contributor @zhangfuwen for updating our Android usage documentation as well.
Thank you to our contributors
vcpkg couldn’t be where it is today without contributions from our open-source community. Thank you for your continued support! The following people contributed to the vcpkg and vcpkg-tool repos between March 1 – March 30, 2022:
- autoantwort (22 commits)
- dg0yt (17 commits)
- Thomas1664 (12 commits)
- Neumann-A (11 commits)
- coryan (4 commits)
- horenmar (3 commits)
- Ryan-rsm-McKenzie (3 commits)
- RT222 (3 commits)
- chausner (3 commits)
- Pospelove (2 commits)
- hkaiser (1 commit)
- ZeeWanderer (1 commit)
- cenit (1 commit)
- Hoikas (1 commit)
- mathisloge (1 commit)
- day253 (1 commit)
- xvitaly (1 commit)
- bhardwajs (1 commit)
- AenBleidd (1 commit)
- mprather (1 commit)
Learn More
You can find the full April release notes on GitHub for the main repo. Recent updates to the vcpkg tool can be viewed on the vcpkg-tool Releases page. If you’re new to vcpkg or curious about how a package manager can make your life easier as a C/C++ developer, check out the vcpkg website – vcpkg.io.
If you would like to contribute to vcpkg and its library catalog, or want to give us feedback on anything, check out our GitHub repo. Please report bugs or request updates to ports in our issue tracker, or join more general discussion in our discussion forum. For an overview of our top priorities and backlog, take a look at our roadmap page.
How do you setup the ability to have an extra set of dependencies say for unit testing?
I am trying to build a sample with Visual Studio 2022 that has a standard int main entrypoint for when not under test, and also needs to have a configuration that will pull in Google Test.
I have the following vcpkg.json
<code>
I tried to setup in Visual Studio a "GTest" configuration, and in that configuration I thought I needed to add...
Hello, our team took a look at your question and I am circling back with an answer. Credit to vcpkg engineer Victor Romero who provided much of the suggestion below.
There are some libraries that, when installed, we put into “{vcpkg-root}/installed/{triplet}/lib/manual-link” to avoid issues with the linker. Google Test is an example of this since it defines its own 'main' function. Because of this behavior for libraries like GTest, the auto linking behavior we have...