The ROOT software framework is foundational for the HEP ecosystem, providing multiple capabilities such as I/O, a C++ interpreter, GUI, and math libraries. It uses object-oriented concepts and build-time components to layer between them. We believe that a new layering formalism will benefit the ROOT user community.
We present the modularization strategy for ROOT which aims to build upon the existing source components, making available the dependencies and other metadata outside of the build system, and allow post-install additions on top of existing installation as well as in the ROOT runtime environment. Components can be grouped into packages and made available from repositories in order to provide a post-install step of missing packages. This feature implements a mechanism for the more comprehensive software ecosystem and makes it available even from a minimal ROOT installation. As part of this work, we have reduced inter-component dependencies in order to improve maintainability. The modularization effort draws inspiration from similar efforts in the Java, Python, and Swift ecosystems. Keeping aligned with modern C++, this strategy relies on forthcoming features such as C++ modules. We hope formalizing the component layer provides simpler ROOT installs, improves extensibility, and decreases the complexity of embedding ROOT in other ecosystems.