Template Information#

This information describes the structure, usage and configuration of the Bazel-based C++/Rust module template according to the SCORE module folder structure and the SCORE building blocks concept.

Overview#

This repository provides a standardized setup for projects using C++ or Rust and Bazel as a build system. It integrates best practices for build, test, CI/CD and documentation. It also provides an example for the documentation of an module with all necessary artifacts for safety and security management, verification and release management. It also provides an example of modeling architecture in Sphinx Needs in Example model of architectural design. It also provides the component architecture template snippets in [Component Name] Component Architecture Documentation. It also provides an example of documenting detailed design in [Component Name] Detailed Design.

Module Folder Structure#

Note

When only a single feature is implemented in the module, the additional feature-name nesting under docs/features/ can be omitted. If multiple features are to be references, then structure them under docs/features/<feature_name>/.

<module_name>/                      # Root folder of the module, subfolder only if more than one module exists in the repository
├── .github/                        # GitHub configuration
│   └── workflows/                  # CI/CD pipelines
├── docs/                           # Global documentation of the module
│   ├── features/                   # Feature documentation and architecture
│   │   └── <feature_name>/         # Folder for each feature parts which should be in module documentation. Omit in single feature case.
│   │       ├── architecture/       # Feature architecture [wp__feature_arch]
|   |       |                       #   and of architecture review [wp__sw_arch_verification]
│   │       ├── safety_analysis/    # Feature safety analysis artifacts
|   |       |                       #   ([wp__feature_fmea], [wp__feature_dfa], [wp__requirements_feat_aou])
│   │       ├── safety_planning/    # Feature safety planning artifacts
│   │       ├── security_analysis/  # Feature security analysis artifacts
|   |       |                       #   ([wp__feature_security_analysis], [wp__requirements_feat_aou])
│   │       └── security_planning/  # Feature security planning artifacts
│   ├── module/                     # Module documentation
│   |   ├── manuals/                # User manual, integration manual, table of assumptions of use
│   │   |   |                       #   safety manual [wp__module_safety_manual],
│   │   |   |                       #   needs table of [wp__requirements_feat_aou]
│   │   |   |                       #   security manual [wp__module_security_manual]
│   │   |   │                       # Additional optional user centric documentation (e.g. configuration guide,
│   │   |   │                       #   examples user guide, APIs & usage, performance analysis)
│   │   |   ├── config/             # Configuration guide (optional)
│   │   |   ├── examples/           # Examples user guide (optional)
│   │   |   ├── api_description/    # API detail description (optional)
│   │   |   └── performance/        # Performance analysis (optional)
│   |   ├── release/                # Module release note [wp__module_sw_release_note]
│   |   ├── safety_mgt/             # Module safety plan [wp__module_safety_plan],
│   |   │                           #   module safety package [wp__module_safety_package],
│   |   │                           #   formal document and safety analysis reviews [wp__fdr_reports]
│   |   └── security_mgt/           # Module security plan [wp__module_security_plan],
│   |                               #   module security package [wp__module_security_package],
│   |                               #   formal document reviews [wp__fdr_reports_security],
│   |                               #   module SW bill of material [wp__sw_module_sbom]
│   └── verification_report/        # Module verification report,
│                                   #   module verifications [wp__verification_module_ver_report],
├── examples/                       # Usage examples for the module / features
├── score/                          # Components of the module
│   ├── tests/                      # Module-level tests (i.e., feature integration tests) [wp__verification_feat_int_test]
│   └── <component_name>/           # Component folder for each component of the module
│       ├── docs/                   # Documentation of the component
│       │   ├── architecture/       # Component architecture [wp__component_arch]
│       │   │                       #   (only if lower level components exist)
|       |   |                       #   architecture review [wp__sw_arch_verification],
│       │   ├── detailed_design/    # Detailed design [wp__sw_implementation]
│       │   │                       #   code inspection [wp__sw_implementation_inspection]
│       │   ├── requirements/       # Component requirements [wp__requirements_comp], [wp__requirements_inspect]
│       │   ├── safety_analysis/    # Safety analysis [wp__sw_component_fmea], [wp__sw_component_dfa], [wp__requirements_comp_aou]
│       │   │                       # Component classification [wp__sw_component_class] for pre-existing software
|       |   |                       #   (only if component architecture exists)
│       │   ├── security_analysis/  # Security analysis [wp__sw_component_security_analysis]
|       |   |                       #   (only if component architecture exists)
│       │   │                       #   component AoU requirements [wp__requirements_comp_aou]
│       │   └── manuals/            # User documentation (of a single component, e.g., user manual of a library component, optional)
│       ├── src/                    # Source files, include files, unit tests [wp__verification_sw_unit_test],
│       │   └── <lower_level_comp>/ # Lower level component (follows <component_name> structure)
│       └── tests/                  # Component-level tests (e.g., integration or complex unit tests) [wp__verification_comp_int_test]
├── MODULE.bazel                    # Bazel module definition
├── BUILD                           # Root build rules
├── project_config.bzl              # Project metadata used by Bazel macros
└── README.md                       # Entry point of the repository

Attention

This page is describing the module template and shall be deleted in the module’s documentation.