-
Notifications
You must be signed in to change notification settings - Fork 0
Third party libraries
Example: https://github.com/rene-fonseca/base/blob/master/notebooks/Module.ipynb
Third-party dependencies MUST be registered via MODULE_REGISTER
in <base/Module.h>
to allow automatic runtime detection of such dependencies.
MODULE_REGISTER
will put the module into a linked list for runtime traveral so you can easily see which modules are used. There is no significant overhead/side-effects when using MODULE_REGISTER
.
It is recommended that modules are included by dynamic linking (ie. as shared libraries) so these can be patched independently from BASE for fast response to security issues.
The currently registered modules are available here: https://dev.azure.com/renefonseca/base/_search?action=contents&text=ext%3Acpp%20(MODULE_REGISTER_EXPLICIT%20OR%20MODULE_REGISTER)&type=code&pageSize=25&filters=ProjectFilters%7Bbase%7D&result=DefaultCollection%2Fbase%2Fbase%2FGBmaster%2F
You can get a dump of the modules in use with the included testsuite tool module:
./testsuite/module
The runtime will export the modules in use as a text dump, JSON, XML, and CSV for easy integration with legal review workflows.
===============================================================================
MODULE:
Prefix: "org.xmlsoft"
Name: libxslt
Version: "1.0"
Consumer: "com.azure.dev:renefonseca_base"
Url: http://xmlsoft.org/XSLT/
License: <UNKNOWN>
===============================================================================
MODULE:
Prefix: "org.xmlsoft"
Name: libxml2
Version: "2.9.4"
Consumer: "com.azure.dev:renefonseca_base"
Url: http://www.xmlsoft.org/XMLinfo.html
License: <UNKNOWN>
===============================================================================
MODULE:
Prefix: "se.haxx.curl"
Name: libcurl
Version: "CURLVERSION_NOW" <BAD VERSION>
Consumer: "com.azure.dev:renefonseca_base"
Url: https://curl.haxx.se/libcurl/c/
License: <UNKNOWN>
===============================================================================
MODULE:
Prefix: "net.zlib"
Name: libzlib
Version: "1.2.11"
Consumer: "com.azure.dev:renefonseca_base"
Url: https://zlib.net/
License: <UNKNOWN>
===============================================================================
MODULE:
Prefix: "org.sourceware.bzip2"
Name: libbzip2
Version: <UNKNOWN>
Consumer: "com.azure.dev:renefonseca_base"
Url: https://www.sourceware.org/bzip2/
License: <UNKNOWN>
===============================================================================
MODULE:
Prefix: "org.openssl"
Name: OpenSSL
Version: <UNKNOWN>
Consumer: "com.azure.dev:renefonseca_base"
Url: https://www.openssl.org/
License: <UNKNOWN>
===============================================================================
TOTAL RECALLED: 6/6
You can also send the modules to a REST service for automated integration:
./testsuite/modules --token MYBEARERTOKEN --submit https:://intranet.mydomain.com/thirdparty?project=myproject
echo $?
The submitted JSON includes the platform info: