{"id":30565,"date":"2022-05-17T00:00:51","date_gmt":"2022-05-17T00:00:51","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cppblog\/?p=30565"},"modified":"2024-04-01T17:53:11","modified_gmt":"2024-04-01T17:53:11","slug":"vcpkg-may-2022-release-is-now-available","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/vcpkg-may-2022-release-is-now-available\/","title":{"rendered":"vcpkg May 2022 Release: artifacts using JSON, COS and SPDX support, and more"},"content":{"rendered":"<p>The <a href=\"https:\/\/github.com\/microsoft\/vcpkg\/releases\/tag\/2022.05.10\">May 2022 release of the vcpkg package manager is available<\/a>. This blog post summarizes changes from March 31<sup>st<\/sup>, 2022 to May 10<sup>th<\/sup>, 2022 for the <a href=\"https:\/\/github.com\/microsoft\/vcpkg\/\">Microsoft\/vcpkg<\/a> and <a href=\"https:\/\/github.com\/microsoft\/vcpkg-tool\/\">Microsoft\/vcpkg-tool<\/a> GitHub repos.<\/p>\n<p>Some stats for this period:<\/p>\n<ul>\n<li><strong>10 new ports<\/strong> were added to the open-source registry. If you are unfamiliar with the term \u2018port\u2019, they are packages that are built from source and are typically C\/C++ libraries.<\/li>\n<li><strong>422 updates<\/strong> 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.<\/li>\n<li>There are now <strong>1,936 total libraries<\/strong> available in the vcpkg public registry.<\/li>\n<li>The <a href=\"https:\/\/github.com\/microsoft\/vcpkg\/releases\/tag\/2022.05.10\">May release of the main vcpkg repo<\/a> includes <strong>238 commits<\/strong> by <strong>63 people<\/strong>.<\/li>\n<li>The main vcpkg repo has <strong>4.5k forks<\/strong> and <strong>15.7k stars<\/strong> on GitHub.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3>Notable Changes<\/h3>\n<h4>vcpkg Artifacts update<\/h4>\n<p>This is our first significant update to vcpkg artifacts since we introduced them in December. The changes and additions are all on the artifact metadata used in populating catalogs of available artifacts. As such this section is mainly of interest to people working on preparing their own catalogs of artifacts.<\/p>\n<p>The experience is still in preview and retains a focus on embedded developers, but will expand to C++ scenarios targeting Linux, macOS, and Windows soon.<\/p>\n<h5>Metadata format changes<\/h5>\n<p>Based on our experiences in expanding the available artifacts in registries we encountered the need to describe more in the registry metadata and realized some of the existing capabilities could be better named.<\/p>\n<p>You will observe all the examples below are in json. When first released, vcpkg artifact catalogs could be created as either yaml or json and our examples were in yaml. Going forward we are normalizing to use json only.<\/p>\n<p>The current \u201csettings\u201d has been renamed \u201cexports\u201d as that is functionally what it is doing. Similarly, the \u201cvariables\u201d block has been renamed \u201cenvironment\u201d as it is setting environment variables.<\/p>\n<p>There are a few additions as well, all to the exports block:<\/p>\n<ul>\n<li>contents: categorized files\/contents, documentation, etc.<\/li>\n<li>aliases: named commands for use by the consumer or Visual Studio \/ Visual Studio Code integration<\/li>\n<\/ul>\n<p>We also found the need to be able to support value expansion within demand blocks based on activation.<\/p>\n<p>The examples in the sections below are snippets, see the default <a href=\"https:\/\/github.com\/microsoft\/vcpkg-ce-catalog\">vcpkg artifact registry<\/a> for complete entries.<\/p>\n<h5>Settings to exports<\/h5>\n<p>We had a \u201csettings\u201d block that was part of the \u201cdemands\u201d block. This block is now named \u201cexports\u201d as it better describes what this block does as it is exporting the configuration into the environment.<\/p>\n<pre class=\"prettyprint\">\"demands\": {\r\n\u00a0 \u00a0 \"exports\": {\r\n\u00a0 \u00a0 \u00a0 \u00a0 \"tools\": {\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"cmake\": \"bin\/cmake\",\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"cmake_gui\": \"bin\/cmake-gui\",\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"ctest\": \"bin\/ctest\"\r\n\u00a0 \u00a0 \u00a0 \u00a0 },\r\n\u00a0 \u00a0 \u00a0 \u00a0 \"paths\": {\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"path\": \"bin\"\r\n\u00a0 \u00a0 \u00a0 \u00a0 }\r\n\u00a0 \u00a0 }\r\n}<\/pre>\n<h5>Variables to environment<\/h5>\n<p>There was a variables block used to store the environment variables that are exported from the artifact. \u201cVariables\u201d is not as clear as it could be, as such the name has been changed to \u201cenvironment\u201d to better convey what this section does. The environment block is part of the exports block.<\/p>\n<pre class=\"prettyprint\">\"exports\": {\r\n\u00a0 \"environment\": {\r\n\u00a0 \u00a0 \u00a0 \"CLFAGS\": \"-Wall -Wextra -Werror\"\r\n\u00a0 }\r\n}<\/pre>\n<p>PR: <a href=\"https:\/\/github.com\/microsoft\/vcpkg-tool\/pull\/473\">Microsoft\/vcpkg-tool#473<\/a><\/p>\n<p>&nbsp;<\/p>\n<h4>Added Cloud Object Storage support for binary caching<\/h4>\n<p>Cloud Object Storage (COS) is a distributed storage service from Tencent Cloud accessible via HTTP\/HTTPS. A recent community PR enables vcpkg users to use COS for binary caching. <a href=\"https:\/\/vcpkg.io\/en\/docs\/users\/binarycaching.html\">Binary caching<\/a> saves copies of library binaries in a shared location that can be accessed by vcpkg for future fast installs, potentially across multiple development environments locally and in CI.<\/p>\n<p>PRs: <a href=\"https:\/\/github.com\/microsoft\/vcpkg\/pull\/23538\">Microsoft\/vcpkg#23538<\/a>, <a href=\"https:\/\/github.com\/microsoft\/vcpkg-tool\/pull\/476\">Microsoft\/vcpkg-tool#476<\/a> (thank you <a href=\"https:\/\/github.com\/day253\">@day253<\/a>!)<\/p>\n<p>&nbsp;<\/p>\n<h4>Added Software Package Data Exchange (SPDX) v2.2.1 support<\/h4>\n<p>Software Package Data Exchange (SPDX) establishes a standard for software bill of materials (SBOM). It allows the expression of components, licenses, copyrights, security references and other metadata relating to software (<a href=\"https:\/\/en.wikipedia.org\/wiki\/Software_Package_Data_Exchange\">Source: Wikipedia<\/a>). In this release, <em>experimental<\/em> support was added for the latest SPDX standard to vcpkg which makes it possible to easily track all dependencies that vcpkg installs on your system. This is very important for organizations with security compliance needs, including US-based organizations selling software to the United States government. While vcpkg needs to support SPDX for our own internal compliance needs, this can also be leveraged by vcpkg users shipping their own software. We are still working on this experience, but the prototype is in this tool release.<\/p>\n<p>PR: <a href=\"https:\/\/github.com\/microsoft\/vcpkg-tool\/pull\/296\">Microsoft\/vcpkg-tool#296<\/a><\/p>\n<p>&nbsp;<\/p>\n<h4>Warn on classic mode build failure if version constraints weren\u2019t met<\/h4>\n<p>Tracking has been added for version constraints in vcpkg classic mode. Classic mode is when you specify ports to install in the command line via vcpkg install &lt;PORT&gt;, rather than installing via a manifest. The version constraints are displayed to the user in case of a build failure. While it is by design that classic mode does not force users to rebuild dependencies that are out-of-date, knowing the version constraints is a big help for debugging. This display appears for install commands only.<\/p>\n<p>PR: <a href=\"https:\/\/github.com\/microsoft\/vcpkg-tool\/pull\/494\">Microsoft\/vcpkg-tool#494<\/a><\/p>\n<p>&nbsp;<\/p>\n<h4>Improved console output for port operations<\/h4>\n<p>Cleaned up console output when vcpkg is installing, modifying, or removing ports. New behavior also publishes additional test results to improve diagnostics. We\u2019ve gotten a lot of user feedback that vcpkg is more verbose than people feel is productive \u2013 this is just one step toward a more concise vcpkg!<\/p>\n<p>PR: <a href=\"https:\/\/github.com\/microsoft\/vcpkg-tool\/pull\/437\">Microsoft\/vcpkg-tool#437<\/a><\/p>\n<p>&nbsp;<\/p>\n<h4>Secrets are stripped from curl errors before printing them<\/h4>\n<p>For security reasons, secrets listed in curl errors (e.g. x-azblob SAS) are no longer displayed when the errors are printed in vcpkg output in the console window.<\/p>\n<p>PR: <a href=\"https:\/\/github.com\/microsoft\/vcpkg-tool\/pull\/499\">Microsoft\/vcpkg-tool#499<\/a><\/p>\n<p>&nbsp;<\/p>\n<h3>Total Ports Available for Tested Triplets<\/h3>\n<table>\n<tbody>\n<tr>\n<td><strong>triplet<\/strong><\/td>\n<td><strong>ports available<\/strong><\/td>\n<\/tr>\n<tr>\n<td>x86-windows<\/td>\n<td>1,744<\/td>\n<\/tr>\n<tr>\n<td>x64-windows<\/td>\n<td>1,793<\/td>\n<\/tr>\n<tr>\n<td>x64-windows-static<\/td>\n<td>1,689<\/td>\n<\/tr>\n<tr>\n<td>x64-windows-static-md<\/td>\n<td>1,705<\/td>\n<\/tr>\n<tr>\n<td>x64-uwp<\/td>\n<td>925<\/td>\n<\/tr>\n<tr>\n<td>arm64-windows<\/td>\n<td>1,327<\/td>\n<\/tr>\n<tr>\n<td>arm-uwp<\/td>\n<td>874<\/td>\n<\/tr>\n<tr>\n<td>x64-osx<\/td>\n<td>1,649<\/td>\n<\/tr>\n<tr>\n<td>x64-linux<\/td>\n<td>1,724<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>While vcpkg supports a much larger variety of target platforms x architectures, the list above is routinely tested to ensure updated ports don\u2019t break other ports in the catalog.<\/p>\n<p>&nbsp;<\/p>\n<h3>Thank you to our contributors<\/h3>\n<p>vcpkg couldn\u2019t 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 31 \u2013 May 10, 2022:<\/p>\n<ul>\n<li>Thomas1664 (36 commits)<\/li>\n<li>chausner (33 commits)<\/li>\n<li>autoantwort (23 commits)<\/li>\n<li>dg0yt (18 commits)<\/li>\n<li>Neumann-A (11 commits)<\/li>\n<li>RT222 (7 commits)<\/li>\n<li>daschuer (4 commits)<\/li>\n<li>Pospelove (4 commits)<\/li>\n<li>coryan (3 commits)<\/li>\n<li>ZeeWanderer (2 commits)<\/li>\n<li>mathisloge (2 commits)<\/li>\n<li>cenit (2 commits)<\/li>\n<li>AenBleidd (2 commits)<\/li>\n<li>day253 (2 commits)<\/li>\n<li>Ryan-rsm-McKenzie (1 commit)<\/li>\n<li>evpobr (1 commit)<\/li>\n<li>yurybura (1 commit)<\/li>\n<li>luncliff (1 commit)<\/li>\n<li>wrobelda (1 commit)<\/li>\n<li>wravery (1 commit)<\/li>\n<li>horenmar (1 commit)<\/li>\n<li>podsvirov (1 commit)<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3>Learn More<\/h3>\n<p>You can find the <a href=\"https:\/\/github.com\/microsoft\/vcpkg\/releases\/tag\/2022.05.10\">full May release notes on GitHub<\/a> for the main repo. Recent updates to the vcpkg tool can be viewed on the <a href=\"https:\/\/github.com\/microsoft\/vcpkg-tool\/releases\">vcpkg-tool Releases page<\/a>. If you\u2019re new to vcpkg or curious about how a package manager can make your life easier as a C\/C++ developer, check out the <a href=\"https:\/\/vcpkg.io\/en\/index.html\">vcpkg website \u2013 vcpkg.io<\/a>.<\/p>\n<p>If you would like to contribute to vcpkg and its library catalog, or want to give us feedback on anything, check out our <a href=\"https:\/\/github.com\/microsoft\/vcpkg\/\">GitHub repo<\/a>. Please report bugs or request updates to ports in our <a href=\"https:\/\/github.com\/microsoft\/vcpkg\/issues\">issue tracker<\/a>, or join more general discussion in our <a href=\"https:\/\/github.com\/microsoft\/vcpkg\/discussions\">discussion forum<\/a>. For an overview of our top priorities and backlog, take a look at our <a href=\"https:\/\/github.com\/microsoft\/vcpkg\/wiki\/Roadmap\">roadmap page<\/a>.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The May 2022 release of the vcpkg package manager is available. This blog post summarizes changes from March 31st, 2022 to May 10th, 2022 for the Microsoft\/vcpkg and Microsoft\/vcpkg-tool GitHub repos. Some stats for this period: 10 new ports were added to the open-source registry. If you are unfamiliar with the term \u2018port\u2019, they are [&hellip;]<\/p>\n","protected":false},"author":1063,"featured_media":28096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,272],"tags":[273],"class_list":["post-30565","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cplusplus","category-vcpkg","tag-vcpkg"],"acf":[],"blog_post_summary":"<p>The May 2022 release of the vcpkg package manager is available. This blog post summarizes changes from March 31st, 2022 to May 10th, 2022 for the Microsoft\/vcpkg and Microsoft\/vcpkg-tool GitHub repos. Some stats for this period: 10 new ports were added to the open-source registry. If you are unfamiliar with the term \u2018port\u2019, they are [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/30565","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/users\/1063"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/comments?post=30565"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/30565\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media\/28096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media?parent=30565"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=30565"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=30565"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}