Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,8 @@ build:bl-x86_64-qnx --config=bl_toolchain_common
build:bl-x86_64-qnx --platforms=@score_bazel_platforms//:x86_64-qnx
build:bl-x86_64-qnx --extra_toolchains=@toolchains_qnx_qcc//:qcc_x86_64
test:bl-x86_64-qnx --config=bl_common

build --java_language_version=17
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default build settings won't be hardcoded to one version. If you want to use JAVA 17 please provide proper configuration settings for it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that Bazel requires us to hardcode it like this. We just want to use plantuml in our documentation.

Do you know any better solution?

build --tool_java_language_version=17
build --java_runtime_version=remotejdk_17
build --tool_java_runtime_version=remotejdk_17
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ bazel-*
user.bazelrc
.cache
compile_commands.json
_build
.vscode
4 changes: 4 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************

load("@score_docs_as_code//:docs.bzl", "docs")

docs(source_dir = "docs", data = ["@score_platform//:needs_json", "@score_process//:needs_json"])
18 changes: 18 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,28 @@ bazel_dep(name = "bazel_skylib", version = "1.8.1")

bazel_dep(name = "score_crates", version = "0.0.3")

## Python for score_docs_as_code

bazel_dep(name = "rules_python", version = "1.4.1")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
configure_coverage_tool = False,
is_default = True,
python_version = "3.12",
)
use_repo(python)
# Additional Python rules provided by aspect, e.g. an improved version of
# `py_binary`. But more importantly, it provides `py_venv`.
bazel_dep(name = "aspect_rules_py", version = "1.6.3")

#############################################################
#
# Constraint values for specifying platforms and toolchains
#
#############################################################
bazel_dep(name = "platforms", version = "1.0.0")
bazel_dep(name = "score_bazel_platforms", version = "0.0.2")
bazel_dep(name = "score_tooling", version = "1.0.2")
bazel_dep(name = "score_platform", version = "0.4.1")
bazel_dep(name = "score_process", version = "1.3.1")
bazel_dep(name = "score_docs_as_code", version = "2.0.2")
4,097 changes: 432 additions & 3,665 deletions MODULE.bazel.lock

Large diffs are not rendered by default.

48 changes: 48 additions & 0 deletions docs/baselibs_architecture.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
Architecture
============

Logical Interfaces
------------------

.. logic_arc_int:: Read JSON
:id: logic_arc_int__baselibs__read_json
:security: YES
:safety: ASIL_B
:fulfils: feat_req__baselibs__json_library
:status: invalid

* FromFile

.. logic_arc_int:: Write JSON
:id: logic_arc_int__baselibs__write_json
:security: YES
:safety: ASIL_B
:fulfils: feat_req__baselibs__json_library
:status: invalid

* FromAny
* ToJsonAny

Components
----------

.. comp_arc_sta:: C++ Baselibs
:id: comp_arc_sta__baselibs__cpp_baselibs
:security: YES
:safety: ASIL_B
:fulfils: comp_req__baselibs__cpp_json
:implements:
:status: invalid
:includes: comp_arc_sta__baselibs__cpp_json

C++ Baselibs Module

.. comp_arc_sta:: C++ JSON lib
:id: comp_arc_sta__baselibs__cpp_json
:security: YES
:safety: ASIL_B
:fulfils: comp_req__baselibs__cpp_json
:implements: logic_arc_int__baselibs__read_json, logic_arc_int__baselibs__write_json
:status: invalid

JSON library
24 changes: 24 additions & 0 deletions docs/baselibs_requirements.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Requirements
============

Component requirements for Baselibs.

.. comp_req:: Provide JSON serialization and deserialization
:id: comp_req__baselibs__cpp_json
:reqtype: Functional
:security: YES
:safety: ASIL_B
:status: invalid
:satisfies: feat_req__baselibs__core_utilities

Baselibs shall provide functions to serialize and deserialize data structures to and from JSON format.

.. comp_req:: Provide bit manipulation functions
:id: comp_req__baselibs__cpp_bitmanipulation
:reqtype: Functional
:security: YES
:safety: ASIL_B
:status: invalid
:satisfies: feat_req__baselibs__core_utilities

Baselibs shall provide functions for common bit manipulation operations, such as setting, clearing, and toggling bits in integers.
21 changes: 21 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# *******************************************************************************
# Copyright (c) 2025 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************

# Configuration file for the Sphinx documentation builder.

project = "S-CORE"
project_url = "https://eclipse-score.github.io/score-baselibs"
project_prefix = "S-CORE_"
version = "0.1"

extensions = ["score_sphinx_bundle"]
2 changes: 2 additions & 0 deletions docs/implementation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Implementation
==============
25 changes: 25 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
..
# *******************************************************************************
# Copyright (c) 2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************

S-CORE Baselibs Documentation
=============================

.. toctree::
:maxdepth: 2

baselibs_requirements
baselibs_architecture
safety
implementation
verification
2 changes: 2 additions & 0 deletions docs/safety.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Safety
======
2 changes: 2 additions & 0 deletions docs/verification.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Verification
============
Loading