Home | Overview | Workflow | Git | GitHub | Cautions | Clone | Maintain | Patch |
Modular Boost Overview
This page gives an overview of how modular Boost is organized.
Overall Organization
Modular Boost consists of the Boost super-project and separate projects for each individual library in Boost. In terms of Git, the Boost super-project treats the individual libraries as submodules.
All public repositories are hosted at GitHub boostorg
.
Releases of individual libraries occur asynchronously from releases of the Boost super-project.
Repositories
- The Boost super-project has its own public repository within
boostorg
. It treats each individual library as a submodule, i.e. a link to a particular release in the library's public GitHub repository. The super-project is maintained by the Boost release managers, and most library developers do not have write access.
- Each individual library has its own public repository within
boostorg
. For example, Boost.Config has a public repository here. The maintainer of a library decides who has write access to the public repository. Release managers and their helpers also have write access for administrative purposes.
- As with any Git project, a library's developers do day-to-day work using private repositories on their local machines. When they push changes from these local private repositories up to the library's public repository is up to them, as is when the library issues releases. As usual with Git, the local repositories may have private branches that are never pushed to the public repository.
- Libraries are required to follow certain naming conventions for branches and directories, so that both humans and automatic test and management tools know where to find commonly referenced components. But beyond those requirements, each library is free to use whatever branch and directory strategies they wish.
Branches
Boost requires all libraries have at least the two branches master
and develop
.
Releases for both the super-project and individual libraries are always on branch master
. master
in the library's boostorg
public repo should be stable at all times, so should only be pushed to the library's public repository when it is stable and ready to ship.
Branch develop
is the main development branch. Whether or not develop
is stable in the library's public boostorg
repository is up to the library maintainer.
Additional branches, if any, are up to the library maintainer. See the discussion of Git Flow, below.
Directory Structure
Your library's directory structure conforms to Boost directory structure conventions, so both users and automatic processes can find header files, test files, build configurations, and the like. Beyond the conventions, your library's directory structure is up to you.
For Modular Boost, header files are placed in a include/boost
directory hierarchy within the library's top-level directory. Here is what a very simple header-only library named simple
would look like:
simple include boost simple twice.hpp test twice_test.cpp Jamfile.v2 index.html
In other words, the directory structure of a library in the library's top level directory for modular Boost is the same as pre-modular Boost, except that it contains another sub-directory hierarchy, include/boost/...
, where ...
represents the library's directories and header files that previously lived in boost-root/boost
. The effect of this change in directory structure is that the library is now entirely self-contained in the top-level directory.
A real library would also have additional sub-directories such as doc
, example
, and src
, as described in the directory conventions, but they are left out of simple
for the sake of brevity.
Git Flow for Workflow
Boost recommends, but does not require, the approach to library workflow that has come to be known as Git Flow. For more about how this applies to Boost libraries, see Getting Started with Modular Boost Library Workflow.