Persistency Documentation#
This documentation 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.
Module Layout#
The module template includes the following top-level structure:
<module_name>/ # Root folder of the module, subfolder only if more than one module exists in the repository
├── .github/
│ └── workflows/ # CI/CD pipelines
├── docs/ # Global documentation of the module
│ ├── features/ # Feature documentation and architecture
│ │ └── <feature_name>/ # Feature folder parts for each feature which should be in module documentation
│ │ ├── 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]
│ │ └── security_planning/ # Feature security planning artifacts
│ ├── module/ # Module documentation
│ │ ├── manuals/ # Module 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]
│ │ ├── 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
│ └── <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)
│ │ │ └── manuals/ # User documentation (of a single component, e.g., user manual of a library component, optional)
│ │ ├── <pub_interface_files>/ # Public interfaces and implementation files of the component; the optional src/ is omitted
│ │ ├── <lower_level_comp>/ # Lower level component (follows <component_name> structure)
│ │ └── tests/ # Component-level tests (e.g., integration and unit tests)
├── tests/ # Module-level tests (e.g., feature integration tests, system tests) [wp__verification_feat_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
Module / Feature Documentation#
Module / Feature documentation overview#
Title |
ID |
Safety |
Security |
Status |
|---|---|---|---|---|
ABI Compatible Data Types |
ASIL_B |
YES |
valid |
|
ABI Compatible Data Types Architecture |
ASIL_B |
YES |
valid |
|
ABI Compatible Data Types Requirements |
ASIL_B |
YES |
valid |
|
Bit Manipulation Library |
ASIL_B |
YES |
draft |
|
Bit Manipulation Requirements |
ASIL_B |
YES |
draft |
|
bitmanipulation Architecture |
ASIL_B |
YES |
valid |
|
Bitmanipulation Architecture Inspection Checklist |
ASIL_B |
YES |
valid |
|
bitmanipulation DFA |
ASIL_B |
YES |
draft |
|
bitmanipulation FMEA |
ASIL_B |
NO |
valid |
|
Bitmanipulation Implementation Inspection Checklist |
ASIL_B |
YES |
draft |
|
Bitmanipulation Requirements Inspection Checklist |
ASIL_B |
YES |
valid |
|
Concurrency Architecture |
ASIL_B |
YES |
valid |
|
Concurrency Architecture Inspection Checklist |
ASIL_B |
YES |
valid |
|
concurrency DFA |
ASIL_B |
NO |
draft |
|
concurrency FMEA |
ASIL_B |
NO |
draft |
|
Concurrency Implementation Inspection Checklist |
ASIL_B |
YES |
draft |
|
Concurrency Library |
ASIL_B |
YES |
draft |
|
Concurrency Requirements |
ASIL_B |
YES |
draft |
|
Concurrency Requirements Inspection Checklist |
ASIL_B |
YES |
draft |
|
Container Architecture |
ASIL_B |
YES |
valid |
|
Containers Architecture Inspection Checklist |
ASIL_B |
YES |
valid |
|
containers DFA |
ASIL_B |
NO |
draft |
|
containers FMEA |
ASIL_B |
NO |
draft |
|
Containers Implementation Inspection Checklist |
ASIL_B |
YES |
draft |
|
Containers Library |
ASIL_B |
YES |
draft |
|
Containers Library Requirements |
ASIL_B |
YES |
draft |
|
Containers Requirements Inspection Checklist |
ASIL_B |
YES |
draft |
|
Datarouter Component Requirements |
QM |
NO |
valid |
|
Datarouter Detailed Design |
QM |
NO |
draft |
|
Filesystem Architecture |
ASIL_B |
YES |
valid |
|
Filesystem Architecture Inspection Checklist |
ASIL_B |
YES |
valid |
|
filesystem DFA |
ASIL_B |
NO |
draft |
|
filesystem FMEA |
ASIL_B |
NO |
draft |
|
Filesystem Implementation Inspection Checklist |
ASIL_B |
YES |
draft |
|
Filesystem Library |
ASIL_B |
YES |
draft |
|
Filesystem Library Requirements |
ASIL_B |
YES |
draft |
|
Filesystem Requirements Inspection Checklist |
ASIL_B |
YES |
draft |
|
FlatBuffers Requirements |
ASIL_B |
YES |
valid |
|
FlatBuffers-Library |
ASIL_B |
YES |
valid |
|
FutureCPP Library |
ASIL_B |
YES |
draft |
|
Hash Library |
ASIL_B |
NO |
draft |
|
Hash Requirements |
ASIL_B |
NO |
draft |
|
Health Monitor Architecture Inspection Checklist |
ASIL_B |
YES |
draft |
|
Health Monitor DFA |
ASIL_B |
NO |
draft |
|
Health Monitor FMEA |
ASIL_B |
NO |
draft |
|
Health Monitor Implementation Inspection Checklist |
ASIL_B |
YES |
draft |
|
Health Monitor Requirements Inspection Checklist |
ASIL_B |
YES |
draft |
|
HealthMonitor |
ASIL_B |
NO |
draft |
|
HealthMonitor Architecture |
ASIL_B |
NO |
draft |
|
HealthMonitor Detailed Design |
ASIL_B |
NO |
draft |
|
HealthMonitor Requirements |
ASIL_B |
NO |
draft |
|
JSON Architecture |
ASIL_B |
YES |
draft |
|
Json Architecture Inspection Checklist |
ASIL_B |
YES |
draft |
|
JSON Component Classification |
ASIL_B |
NO |
valid |
|
JSON DFA |
ASIL_B |
NO |
draft |
|
JSON FMEA |
ASIL_B |
NO |
draft |
|
Json Implementation Inspection Checklist |
ASIL_B |
YES |
draft |
|
JSON Requirements |
ASIL_B |
YES |
draft |
|
JSON Requirements Inspection Checklist |
ASIL_B |
YES |
draft |
|
JSON Wrapper Requirements |
ASIL_B |
YES |
valid |
|
JSON-Library |
ASIL_B |
YES |
valid |
|
KVS |
ASIL_B |
NO |
valid |
|
KVS Architecture Inspection Checklist |
ASIL_B |
YES |
draft |
|
KVS Detailed Design |
ASIL_B |
NO |
draft |
|
KVS DFA |
ASIL_B |
NO |
valid |
|
KVS FMEA |
ASIL_B |
NO |
valid |
|
KVS Implementation Inspection Checklist |
ASIL_B |
YES |
draft |
|
KVS Module Architecture |
ASIL_B |
NO |
valid |
|
KVS Requirements |
ASIL_B |
NO |
valid |
|
KVS Requirements Inspection Checklist |
ASIL_B |
YES |
valid |
|
Launch Manager Architecture |
ASIL_B |
YES |
draft |
|
Launch Manager Architecture Inspection Checklist |
ASIL_B |
YES |
draft |
|
Launch Manager Component AoU |
ASIL_B |
NO |
draft |
|
Launch Manager Detailed Design |
ASIL_B |
NO |
draft |
|
Launch Manager DFA |
ASIL_B |
NO |
draft |
|
Launch Manager FMEA |
ASIL_B |
NO |
draft |
|
Launch Manager Implementation Inspection Checklist |
ASIL_B |
YES |
draft |
|
Launch Manager Requirements |
ASIL_B |
YES |
valid |
|
Launch Manager Requirements Inspection Checklist |
ASIL_B |
YES |
draft |
|
Log Assumptions of Use |
ASIL_B |
NO |
valid |
|
Log Detailed Design |
ASIL_B |
NO |
draft |
|
Log Frontend Architecture |
ASIL_B |
NO |
draft |
|
Log Frontend Architecture Inspection Checklist |
ASIL_B |
YES |
draft |
|
Log Requirements |
ASIL_B |
NO |
valid |
|
log_frontend DFA |
ASIL_B |
NO |
draft |
|
log_frontend FMEA |
ASIL_B |
NO |
draft |
|
log_frontend Implementation Inspection Checklist |
ASIL_B |
YES |
draft |
|
log_frontend Requirements Inspection Checklist |
ASIL_B |
YES |
draft |
|
Memory Library |
ASIL_B |
YES |
draft |
|
Memory Library Requirements |
ASIL_B |
YES |
draft |
|
mw::log Backend |
ASIL_B |
NO |
draft |
|
mw::log Backend Architecture |
ASIL_B |
NO |
draft |
|
mw::log Backend Component AoU |
ASIL_B |
NO |
draft |
|
mw::log Backend Component Requirements |
ASIL_B |
YES |
valid |
|
mw::log Backend Detailed Design |
ASIL_B |
YES |
draft |
|
mw::log Backend DFA |
ASIL_B |
NO |
draft |
|
mw::log Backend FMEA |
ASIL_B |
NO |
draft |
|
mw::log Backend Implementation Inspection Checklist |
ASIL_B |
YES |
draft |
|
mw::log Backend Requirements Inspection Checklist |
ASIL_B |
YES |
draft |
|
OS Architecture |
ASIL_B |
YES |
valid |
|
OS Architecture Inspection Checklist |
ASIL_B |
YES |
valid |
|
os DFA |
ASIL_B |
NO |
draft |
|
os FMEA |
ASIL_B |
NO |
draft |
|
OS Implementation Inspection Checklist |
ASIL_B |
YES |
draft |
|
OS Library |
ASIL_B |
YES |
draft |
|
OS Library Requirements |
ASIL_B |
YES |
draft |
|
OS Requirements Inspection Checklist |
ASIL_B |
YES |
draft |
|
Persistency JSON |
ASIL_B |
NO |
valid |
|
Result Architecture |
ASIL_B |
YES |
valid |
|
result DFA |
ASIL_B |
NO |
draft |
|
result FMEA |
ASIL_B |
NO |
valid |
|
Result Lib Implementation Inspection Checklist |
ASIL_B |
YES |
draft |
|
Result Library |
ASIL_B |
YES |
draft |
|
Result Library Architecture Inspection Checklist |
ASIL_B |
YES |
valid |
|
Result Library Requirements |
ASIL_B |
YES |
draft |
|
Result Library Requirements Inspection Checklist |
ASIL_B |
YES |
valid |
|
Rust Containers Architecture |
ASIL_B |
NO |
draft |
|
Rust Containers Library |
ASIL_B |
NO |
draft |
|
Rust Containers Library Requirements |
ASIL_B |
NO |
draft |
|
Safecpp Architecture |
ASIL_B |
YES |
valid |
|
Safecpp Architecture Inspection Checklist |
ASIL_B |
YES |
valid |
|
SafeCpp DFA |
ASIL_B |
NO |
draft |
|
SafeCpp FMEA |
ASIL_B |
NO |
draft |
|
Safecpp Implementation Inspection Checklist |
ASIL_B |
YES |
draft |
|
Safecpp Library |
ASIL_B |
YES |
draft |
|
Safecpp Requirements |
ASIL_B |
NO |
draft |
|
Safecpp Requirements Inspection Checklist |
ASIL_B |
YES |
draft |
|
Static Reflection Architecture Inspection Checklist |
ASIL_B |
YES |
draft |
|
Static Reflection DFA |
ASIL_B |
NO |
draft |
|
Static Reflection FMEA |
ASIL_B |
NO |
draft |
|
Static Reflection Implementation Inspection Checklist |
ASIL_B |
YES |
draft |
|
Static Reflection Requirements Inspection Checklist |
ASIL_B |
YES |
draft |
|
Static Reflection With Serialization Library |
ASIL_B |
YES |
draft |
|
Static Reflection with Serialization Library Requirements |
ASIL_B |
YES |
draft |
|
static_reflection_with_serialization Architecture |
ASIL_B |
YES |
valid |
|
Utils Architecture |
ASIL_B |
YES |
valid |
|
Utils Architecture Inspection Checklist |
ASIL_B |
YES |
valid |
|
utils DFA |
ASIL_B |
NO |
draft |
|
utils FMEA |
ASIL_B |
NO |
draft |
|
Utils Implementation Inspection Checklist |
ASIL_B |
YES |
draft |
|
Utils Library |
ASIL_B |
YES |
draft |
|
Utils Library Requirements |
ASIL_B |
YES |
draft |
|
Utils Requirements Inspection Checklist |
ASIL_B |
YES |
valid |
|
vajson |
ASIL_B |
NO |
valid |
|
VaJson Architecture |
ASIL_B |
YES |
draft |
|
VaJson Requirements |
ASIL_B |
YES |
draft |
Component documentation#
See Component documentation for details.
Examples#
No examples yet.
Quick Start#
To build the module:
bazel build --config=per-x86_64-linux -- //score/...
Building without an explicit --config (e.g. per-x86_64-linux, per-x86_64-qnx, per-arm64-qnx) is not supported.
To run all tests:
bazel test //...
To run Unit Tests:
bazel test //:unit_tests
To run Component / Feature Integration Tests:
bazel test //:cit_tests
Module Configuration#
The project_config.bzl file defines metadata used by Bazel macros.
Example:
PROJECT_CONFIG = {
"asil_level": "QM",
"source_code": ["cpp", "rust"]
}
This enables conditional behavior (e.g., choosing clang-tidy for C++ or clippy for Rust).