November 12th, 2024

Siemens Healthineers manages C++ libraries with vcpkg in an offline build environment

Augustin Popa
Senior Product Manager

vcpkg is a free and open-source C/C++ package manager maintained by Microsoft and the C++ community that runs on Windows, macOS, and Linux. Over the years we have heard from companies using vcpkg to manage dependencies at enterprise-scale. For this blog post, I spoke to Shrey Chauhan, a Senior DevOps Engineer with Siemens Healthineers.

Siemens Healthineers adopted vcpkg in late 2023 after a successful proof of concept. Their main motivation was to improve their versioning and overall dependency management for C++ libraries in their offline, air-gapped build environment. They also like vcpkg’s integration with the Visual Studio IDE, extensive and evolving library support, and automatic dependency resolution.

About Siemens Healthineers and development team

Shrey: The Ultrasound business area is an integral part of Siemens Healthineers. This advanced medical device features a comprehensive hardware layer and a full-stack windows-based software layer. Ultrasound Software teams handle the development of the entire software stack, while the DevOps team manages CI/CD processes, including building, packaging, deployment, and related tools.

C++ development environment

Siemens Healthineers develops on Windows and targets Windows x64. They use Visual Studio 2022 with MSBuild projects, and their project is a combination of C#, C++/CLI, and C++. They have around 300 developers maintaining over 6 million lines of code. In addition, they use Azure DevOps as their continuous integration system.

How they were managing C++ dependencies before vcpkg

Their team mostly consumes open-source dependencies. They were previously packaging the C++ dependencies in individual .zip packages, which were being downloaded from a JFrog Artifactory repository. This is a tedious process because the path to each .dll or .lib needs to be correct and could vary based on the package.

Q: When did your team move to vcpkg and why did you ultimately choose to move to vcpkg?

Shrey: We moved to vcpkg around September or October 2023 with the main reasoning being improved versioning and dependency management of C++ libraries. We did a proof of concept to determine if it suited our needs with respect to our air-gapped build environment, which was successful after a little help from vcpkg team. Additional features we benefitted from:

  1. vcpkg is well integrated with Visual Studio IDE
  2. Has extensive library support, which is still evolving
  3. Automatic dependency resolution

In Siemens Ultrasound, our builds/CI are on a protected network with restricted access to the Internet. By default, vcpkg downloads packages from source repositories (Internet) which did not work for us because of access restrictions. We were able to work with the vcpkg team to integrate custom Asset Caching (which was later documented under: How to create a x-script Asset Caching source for NuGet | Microsoft Learn) to use our own Azure DevOps NuGet feed as a source to upload & restore packages. This addressed our issue with the air-gapped environment and allowed us to reuse existing cached packages, making the process more efficient.

Q: What is your overall impression of vcpkg?

Shrey: Overall, the feedback has been good so far. vcpkg does a great job of caching the built libraries, making the developers’ workflow efficient. It has also been easily accepted by developers because of its ease of use (i.e. no extra steps or setup was required).

Learn More About vcpkg

If you want to learn more about vcpkg, check out our website at vcpkg.io and read the vcpkg overview in our documentation.

If you have a story you would like to share with us about your experiences with vcpkg, feel free to contact us at [email protected]. You can submit bug reports in our GitHub issue tracker or make feature requests in our discussion forum.

Category
C++Vcpkg
Topics
CPPvcpkg

Author

Augustin Popa
Senior Product Manager

Product manager on the Microsoft C++ team, currently working on vcpkg.

0 comments