A common case with Conan is to have a CI server like Jenkins re-compile libraries after each GIT commits and push the compiled binaries to a shared Conan repository. Since it’s a fairly unique feature of the platform, it’s worth defining what it means in the context of native software development.Ĭonan captures compiled binaries into it’s packages so that multiple developers don’t have to redundantly compile the same binaries on each of their machines. There are binary package managers for operating systems such as Yum, Apt, Homebrew, and Chocolatey, but those are a different category altogether. Conan is unique among “package managers for native languages” in providing this functionality as a first-class part of the platform. Managing binaries for libraries is a related-but-separate feature set from managing sources. Since many of the new C and C++ package managers borrow numerous features from these ecosystems, it’s easy to understand why they stop with source package management as well. Package managers for the languages of Rust and Go operate exclusively in this mode and have little-to-no support for binary packages. Of note, one reason that a number of other package managers have been springing up around C and C++ with this functionality, is that because it’s the first and easiest thing to implement in the problem domain of package management. There are a variety of valid reasons and use cases for doing this which we won’t go into, but the key point here is that it’s a well supported workflow with Conan. However, its important to point out that many developers do not use the “Binary” features for a variety of reasons, and instead build all project and dependencies from sources locally. ![]() This robust management and building of sources for projects and their dependencies is a central function to Conan, and the “Binary Package Management” feature which we will discuss next is built on top of it. Furthermore, this includes the ability to recursively perform this process for the complete chain of transitive dependencies. With the operative word of “Source” meaning “Source Code”, Conan shares this functionality with a number of other “package managers for native languages.” Package recipes contain the sources (or mechanism to obtain the sources) for a project and the ability to invoke the build system on the local machine. Hopefully this high-level functionality is familiar and obvious to everyone based on experience with other ecosystems, because the features will likely become decreasingly familiar as we get into more detail. This involves the complex challenges of transitive dependencies, versioning, licensing, and so forth. Thus, this article aims to shed light on Conan’s lesser-known capabilities and potential roles and enable potential users to better decide whether or not it might be of value to them.Ĭonan enables users to encapsulate C/C++ project dependencies, distribute them, and consume them in other projects. Indeed that’s its primary function and probably the best short description we have, but it fails to capture several of Conan’s most powerful aspects. Conan is typically described as a “package manager for C and C++”. ![]() Whether you know about Conan or not, this post might help advance your perspective a bit.
0 Comments
Leave a Reply. |