cryptopp icon indicating copy to clipboard operation
cryptopp copied to clipboard

Allow to build only a subset of the library

Open chausner opened this issue 2 years ago • 0 comments

First of all, thanks a lot for building this extensive, high-quality library! It's great to have so many algorithms supported. However, usually only one or a few specific functions/algorithms are needed by a particular application. Of course, one can statically link to Crypto++ and rely on the linker to only include necessary code in the application binary. But still, one has to compile the whole library even if only a small part is needed.

Therefore, I suggest to add optional build flags to customize which algorithms to include. By default, the library could include everything but advanced users could use the build flags to narrow down the set of files needed to build, to speed up the compilation process and also to reduce the binary size when building as a shared library.

Such flags are also well supported by package managers like Conan and vcpkg, and today's packages would become smaller and faster to build if dependent applications could specify which parts of Crypto++ they need.

chausner avatar Jun 18 '22 16:06 chausner