diff --git a/docs/baselibs_rust/containers_rust/architecture/index.rst b/docs/baselibs_rust/containers_rust/architecture/index.rst new file mode 100644 index 00000000..42deb1c0 --- /dev/null +++ b/docs/baselibs_rust/containers_rust/architecture/index.rst @@ -0,0 +1,237 @@ +.. + # ******************************************************************************* + # 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 + # ******************************************************************************* + +Rust Containers Architecture +============================ + +.. document:: Rust Containers Architecture + :id: doc__containers_rust_architecture + :status: draft + :safety: ASIL_B + :security: NO + :realizes: wp__component_arch + :tags: baselibs_rust_containers_rust + + +Overview +-------- + +The implementation of the containers library comprises two main parts: + +- The generic storage abstraction for elements, with two concrete implementations: + heap-allocated and inline storage +- The generic logic for each container type, each of which has two specializations: + one using heap-allocated storage, and one using inline storage + +Static Architecture +------------------- + +.. comp_arc_sta:: Rust Containers + :id: comp_arc_sta__baselibs_rust__containers_rust + :security: YES + :safety: ASIL_B + :status: valid + :tags: baselibs_rust_containers_rust + :implements: logic_arc_int__b_r__fixvec, logic_arc_int__b_r__inlinevec, logic_arc_int__b_r__fixqueue, logic_arc_int__b_r__inlqueue + + .. needarch:: + :scale: 50 + :align: center + + {{ draw_component(need(), needs) }} + + +Interfaces +---------- + +.. logic_arc_int:: Fixed-Capacity Vector + :id: logic_arc_int__b_r__fixvec + :security: YES + :safety: ASIL_B + :status: valid + +.. logic_arc_int_op:: Push + :id: logic_arc_int_op__cont__fixvec_push + :security: YES + :safety: ASIL_B + :status: valid + :included_by: logic_arc_int__b_r__fixvec + +.. logic_arc_int_op:: Pop + :id: logic_arc_int_op__cont__fixvec_pop + :security: YES + :safety: ASIL_B + :status: valid + :included_by: logic_arc_int__b_r__fixvec + +.. logic_arc_int_op:: Clear + :id: logic_arc_int_op__cont__fixvec_clear + :security: YES + :safety: ASIL_B + :status: valid + :included_by: logic_arc_int__b_r__fixvec + +.. logic_arc_int_op:: Index + :id: logic_arc_int_op__cont__fixvec_index + :security: YES + :safety: ASIL_B + :status: valid + :included_by: logic_arc_int__b_r__fixvec + +.. logic_arc_int_op:: Iterate + :id: logic_arc_int_op__cont__fixvec_iterate + :security: YES + :safety: ASIL_B + :status: valid + :included_by: logic_arc_int__b_r__fixvec + + +.. logic_arc_int:: Inline-Storage Vector + :id: logic_arc_int__b_r__inlinevec + :security: YES + :safety: ASIL_B + :status: valid + +.. logic_arc_int_op:: Push + :id: logic_arc_int_op__cont__inlinevec_push + :security: YES + :safety: ASIL_B + :status: valid + :included_by: logic_arc_int__b_r__inlinevec + +.. logic_arc_int_op:: Pop + :id: logic_arc_int_op__cont__inlinevec_pop + :security: YES + :safety: ASIL_B + :status: valid + :included_by: logic_arc_int__b_r__inlinevec + +.. logic_arc_int_op:: Clear + :id: logic_arc_int_op__cont__inlinevec_clear + :security: YES + :safety: ASIL_B + :status: valid + :included_by: logic_arc_int__b_r__inlinevec + +.. logic_arc_int_op:: Index + :id: logic_arc_int_op__cont__inlinevec_index + :security: YES + :safety: ASIL_B + :status: valid + :included_by: logic_arc_int__b_r__inlinevec + +.. logic_arc_int_op:: Iterate + :id: logic_arc_int_op__cont__inlinevec_iterate + :security: YES + :safety: ASIL_B + :status: valid + :included_by: logic_arc_int__b_r__inlinevec + + +.. logic_arc_int:: Fixed-Capacity Queue + :id: logic_arc_int__b_r__fixqueue + :security: YES + :safety: ASIL_B + :status: valid + +.. logic_arc_int_op:: Push Front + :id: logic_arc_int_op__cont__fixqueue_pushfront + :security: YES + :safety: ASIL_B + :status: valid + :included_by: logic_arc_int__b_r__fixqueue + +.. logic_arc_int_op:: Push Back + :id: logic_arc_int_op__cont__fixqueue_pushback + :security: YES + :safety: ASIL_B + :status: valid + :included_by: logic_arc_int__b_r__fixqueue + +.. logic_arc_int_op:: Pop Front + :id: logic_arc_int_op__cont__fixqueue_popfront + :security: YES + :safety: ASIL_B + :status: valid + :included_by: logic_arc_int__b_r__fixqueue + +.. logic_arc_int_op:: Pop Back + :id: logic_arc_int_op__cont__fixqueue_popback + :security: YES + :safety: ASIL_B + :status: valid + :included_by: logic_arc_int__b_r__fixqueue + +.. logic_arc_int_op:: Clear + :id: logic_arc_int_op__cont__fixqueue_clear + :security: YES + :safety: ASIL_B + :status: valid + :included_by: logic_arc_int__b_r__fixqueue + +.. logic_arc_int_op:: Iterate + :id: logic_arc_int_op__cont__fixqueue_iterate + :security: YES + :safety: ASIL_B + :status: valid + :included_by: logic_arc_int__b_r__fixqueue + + +.. logic_arc_int:: Inline-Storage Queue + :id: logic_arc_int__b_r__inlqueue + :security: YES + :safety: ASIL_B + :status: valid + +.. logic_arc_int_op:: Push Front + :id: logic_arc_int_op__cont__inlqueue_pushfront + :security: YES + :safety: ASIL_B + :status: valid + :included_by: logic_arc_int__b_r__inlqueue + +.. logic_arc_int_op:: Push Back + :id: logic_arc_int_op__cont__inlqueue_pushback + :security: YES + :safety: ASIL_B + :status: valid + :included_by: logic_arc_int__b_r__inlqueue + +.. logic_arc_int_op:: Pop Front + :id: logic_arc_int_op__cont__inlqueue_popfront + :security: YES + :safety: ASIL_B + :status: valid + :included_by: logic_arc_int__b_r__inlqueue + +.. logic_arc_int_op:: Pop Back + :id: logic_arc_int_op__cont__inlqueue_popback + :security: YES + :safety: ASIL_B + :status: valid + :included_by: logic_arc_int__b_r__inlqueue + +.. logic_arc_int_op:: Clear + :id: logic_arc_int_op__cont__inlqueue_clear + :security: YES + :safety: ASIL_B + :status: valid + :included_by: logic_arc_int__b_r__inlqueue + +.. logic_arc_int_op:: Iterate + :id: logic_arc_int_op__cont__inlqueue_iterate + :security: YES + :safety: ASIL_B + :status: valid + :included_by: logic_arc_int__b_r__inlqueue diff --git a/docs/baselibs_rust/containers_rust/index.rst b/docs/baselibs_rust/containers_rust/index.rst new file mode 100644 index 00000000..d9dfe4fa --- /dev/null +++ b/docs/baselibs_rust/containers_rust/index.rst @@ -0,0 +1,143 @@ +.. + # ******************************************************************************* + # 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 + # ******************************************************************************* + +.. _component_containers_rust: + +containers_rust +############### + +.. document:: Rust Containers Library + :id: doc__containers_rust + :status: draft + :safety: ASIL_B + :security: NO + :realizes: wp__cmpt_request + :tags: baselibs_rust_containers_rust + + +Abstract +======== + +This component provides a library of Rust containers with fixed capacity. +Each container is available in two variations: one which stores its elements within the data structure itself, and one which allocates memory on the heap. +The inline-storage containers have a stable, well-defined memory layout and can serve as the basis for implementing *ABI-compatible data structures*. +The heap-allocated containers only perform a single allocation when they are created, and reject operations that would exceed their capacity. + + +Motivation +========== + +Software based on the S-CORE platform requires a rich set of data structures, including vectors, maps, and sets. +These data structures should exhibit deterministic behavior; in particular, operations on them should not fail due to memory allocation errors. +One way to achieve this would be to reserve a fixed amount of memory in the form of static variables. +However, this approach requires selecting the maximum capacity already at compile time. +A more flexible solution, which allows defering this decision until runtime, is to allocate memory only during the startup phase of the program, so that any out-of-memory errors occur immediately and not during the main operational phase. +After the creation of such a *fixed-capacity container*, any operation that would exceed the allocated capacity should fail with an explicit error return value, instead of panicking or aborting the program. + +Another use case requiring custom container implementations are *ABI-compatible data structures*. +These data structures guarantee that they can be safely sent to other processes via shared memory. +They have different requirements compared to the aforementioned fixed-capacity containers; +specifically, they need to store their elements *inline*, i.e., within the type instance itself instead of on the heap, and therefore require that their capacity to be chosen at compile-time. +The reason for including these inline-storage containers in this component is that they offer a similar interface to fixed-capacity containers, and share nearly all of their implementation logic. + + +Rationale +========= + +Minimum Capacity on Inline Storage +---------------------------------- + +The inline storage implementation requires a minimum capacity of 1. +The reason for this is that the containers which use this inline storage are intended as the basis for ABI-compatible data structures, and C++ doesn't allow zero-sized types. +Although it would be possible (through template-specialization for the zero-capacity case) to implement C++ data structures which circumvent this restriction, this would make the C++ code more complex. +Since containers with a statically-determined capacity of zero are not very useful, they are forbidden for now; +this constraint may be relaxed in the future. + +Fixed-capacity, heap-allocated containers are not affected by this minimum: +When a capacity of zero is requested, no memory is allocated and the container behaves accordingly. + + +Maximum Capacity +---------------- + +The capacity field in containers is encoded as a 32-bit unsigned integer (``u32``), so the maximum number of elements per instance is 4,294,967,295. +This makes the computation of indices within the container's logic more efficient. +Larger containers are expected to be an extremely rare case in the context of the S-CORE platform: +Even single-byte elements would involve reserving more than 4 GiB of memory, a prohibitively large commitment of resources on typical embedded systems. +In case an application really *does* need a larger container, it can implement a custom data structure according to its demands, or it can distribute the elements over several standard containers. + + +Specification +============= + +[Describe the requirements, architecture of any new component.] or +[Describe the change to requirements, architecture, implementation, documentation of any change request.] + + .. note:: + A CR shall specify the component requirements as part of our platform/project. + Thereby the :need:`rl__project_lead` will approve these requirements as part of accepting the CR (e.g. merging the PR with the CR). + + +Security Impact +=============== + +The implementation of the container data structures requires low-level memory management and `unsafe` operations. +These code sections are thoroughly tested and strictly encapsulated behind a safe interface. +The API provided by the data structures doesn't contain any `unsafe` methods beyond those available through the Rust standard library. +Therefore, no security impact is expected. + + +Safety Impact +============= + +[How could the safety be impacted by the new/modified component?] + + .. note:: + If there are safety concerns in relation to the CR, those concerns should be explicitly written out to make sure reviewers of the CR are aware of them. + +Which safety requirements are affected or has to be changed? +Could the new/modified component be a potential common cause or cascading failure initiator? +If applicable, which additional safety measures must be implemented to mitigate the risk? + + .. note:: + Use Dependency Failure Analysis and/or Safety Software Critically Analysis. + [Methods will be defined later in Process area Safety Analysis] + +For new feature/component contributions: + +[What is the expected ASIL level?] +[What is the expected classification of the contribution?] + + .. note:: + Use the component classification method here to classify your component, if it shall to be used in a safety context: :need:`gd_temp__component_classification`. + + +License Impact +============== + +No license impact expected. + + +How to Teach This +================= + +The container types provide an interface which is very similar to the corresponding containers in the Rust standard library, except that capacity-related operations return ``Result`` or ``Option``. +The API should therefore be quick and easy to learn for any Rust developer. + + +.. toctree:: + :hidden: + + requirements/index.rst + architecture/index.rst diff --git a/docs/baselibs_rust/containers_rust/requirements/index.rst b/docs/baselibs_rust/containers_rust/requirements/index.rst new file mode 100644 index 00000000..80295377 --- /dev/null +++ b/docs/baselibs_rust/containers_rust/requirements/index.rst @@ -0,0 +1,201 @@ +.. + # ******************************************************************************* + # 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 + # ******************************************************************************* + +Requirements +############ + +.. document:: Rust Containers Library Requirements + :id: doc__containers_rust_lib_requirements + :status: draft + :safety: ASIL_B + :realizes: wp__requirements_comp + :tags: requirements, containers_rust_library + +Functional Requirements +======================= + +.. comp_req:: Fixed-Capacity Vector + :id: comp_req__containers_rust__fixed_vector + :reqtype: Functional + :security: NO + :safety: ASIL_B + :satisfies: feat_req__baselibs_rust__containers_rust_lib + :status: valid + + The Rust Containers library shall provide a heap-allocated vector container with construction-time capacity specification. + +.. comp_req:: Inline-Storage Vector + :id: comp_req__containers_rust__inline_vector + :reqtype: Functional + :security: NO + :safety: ASIL_B + :satisfies: feat_req__baselibs_rust__containers_rust_lib, feat_req__baselibs_rust__abi_containers + :status: valid + + The Rust Containers library shall provide a vector container with a capacity determined at compile-time, + which stores the elements within the data structure itself. + This container shall have a stable, precisely defined memory layout, capable of serving as the basis for an ABI-compatible vector. + +.. comp_req:: Fixed-Capacity String + :id: comp_req__containers_rust__fixed_string + :reqtype: Functional + :security: NO + :safety: ASIL_B + :satisfies: feat_req__baselibs_rust__containers_rust_lib + :status: valid + + The Rust Containers library shall provide a heap-allocated, UTF-8 encoded string data type with construction-time capacity specification. + +.. comp_req:: Inline-Storage String + :id: comp_req__containers_rust__inline_string + :reqtype: Functional + :security: NO + :safety: ASIL_B + :satisfies: feat_req__baselibs_rust__containers_rust_lib, feat_req__baselibs_rust__abi_containers + :status: valid + + The Rust Containers library shall provide a UTF-8 encoded string data type with a capacity determined at compile-time, + which stores the codepoints within the data structure itself. + This container shall have a stable, precisely defined memory layout, capable of serving as the basis for an ABI-compatible string. + +.. comp_req:: Fixed-Capacity Queue + :id: comp_req__containers_rust__fixed_queue + :reqtype: Functional + :security: NO + :safety: ASIL_B + :satisfies: feat_req__baselibs_rust__containers_rust_lib + :status: valid + + The Rust Containers library shall provide a heap-allocated double-ended queue container with construction-time capacity specification. + +.. comp_req:: Inline-Storage Queue + :id: comp_req__containers_rust__inline_queue + :reqtype: Functional + :security: NO + :safety: ASIL_B + :satisfies: feat_req__baselibs_rust__containers_rust_lib, feat_req__baselibs_rust__abi_containers + :status: valid + + The Rust Containers library shall provide a queue container with a capacity determined at compile-time, + which stores the elements within the data structure itself. + This container shall have a stable, precisely defined memory layout, capable of serving as the basis for an ABI-compatible queue. + +.. comp_req:: Fixed-Capacity Hashmap + :id: comp_req__containers_rust__fixed_hashmap + :reqtype: Functional + :security: NO + :safety: ASIL_B + :satisfies: feat_req__baselibs_rust__containers_rust_lib + :status: valid + + The Rust Containers library shall provide a heap-allocated hashmap container with construction-time capacity specification. + +.. comp_req:: Inline-Storage Hashmap + :id: comp_req__containers_rust__inline_hashmap + :reqtype: Functional + :security: NO + :safety: ASIL_B + :satisfies: feat_req__baselibs_rust__containers_rust_lib, feat_req__baselibs_rust__abi_containers + :status: valid + + The Rust Containers library shall provide a hashmap container with a capacity determined at compile-time, + which stores the elements within the data structure itself. + This container shall have a stable, precisely defined memory layout, capable of serving as the basis for an ABI-compatible hashmap. + +.. comp_req:: Fixed-Capacity Hashset + :id: comp_req__containers_rust__fixed_hashset + :reqtype: Functional + :security: NO + :safety: ASIL_B + :satisfies: feat_req__baselibs_rust__containers_rust_lib + :status: valid + + The Rust Containers library shall provide a heap-allocated hashset container with construction-time capacity specification. + +.. comp_req:: Inline-Storage Hashset + :id: comp_req__containers_rust__inline_hashset + :reqtype: Functional + :security: NO + :safety: ASIL_B + :satisfies: feat_req__baselibs_rust__containers_rust_lib, feat_req__baselibs_rust__abi_containers + :status: valid + + The Rust Containers library shall provide a hashset container with a capacity determined at compile-time, + which stores the elements within the data structure itself. + This container shall have a stable, precisely defined memory layout, capable of serving as the basis for an ABI-compatible hashset. + +.. comp_req:: Fixed-Capacity B-Tree + :id: comp_req__containers_rust__fixed_btree + :reqtype: Functional + :security: NO + :safety: ASIL_B + :satisfies: feat_req__baselibs_rust__containers_rust_lib + :status: valid + + The Rust Containers library shall provide a heap-allocated B-tree container with construction-time capacity specification. + +.. comp_req:: Inline-Storage B-Tree + :id: comp_req__containers_rust__inline_btree + :reqtype: Functional + :security: NO + :safety: ASIL_B + :satisfies: feat_req__baselibs_rust__containers_rust_lib, feat_req__baselibs_rust__abi_containers + :status: valid + + The Rust Containers library shall provide a B-tree container with a capacity determined at compile-time, + which stores the elements within the data structure itself. + This container shall have a stable, precisely defined memory layout, capable of serving as the basis for an ABI-compatible B-tree. + +.. comp_req:: Type Safety + :id: comp_req__containers_rust__type_safety + :reqtype: Functional + :security: NO + :safety: ASIL_B + :satisfies: feat_req__baselibs_rust__consistent_apis, feat_req__baselibs_rust__safety + :status: valid + + The Rust Containers library shall enforce compile-time type safety for all container operations. + +Non-Functional Requirements +=========================== + +.. comp_req:: Deterministic Behavior + :id: comp_req__containers_rust__det_behavior + :reqtype: Non-Functional + :security: NO + :safety: ASIL_B + :satisfies: feat_req__baselibs_rust__core_utilities, feat_req__baselibs_rust__safety + :status: valid + + The Rust containers library shall provide deterministic behavior. + +.. comp_req:: No Heap Allocation + :id: comp_req__containers_rust__inline_no_heap + :reqtype: Non-Functional + :security: NO + :safety: ASIL_B + :satisfies: feat_req__baselibs_rust__abi_containers + :status: valid + + Inline-storage containers shall never allocate heap memory. + +.. comp_req:: No Reallocation + :id: comp_req__containers_rust__fixed_no_realloc + :reqtype: Non-Functional + :security: NO + :safety: ASIL_B + :satisfies: feat_req__baselibs_rust__result_library + :status: valid + + Fixed-capacity containers shall never allocate or re-allocate memory after their initial construction. diff --git a/docs/module/log/architecture/_assets/interface.puml b/docs/baselibs_rust/log/architecture/_assets/interface.puml similarity index 100% rename from docs/module/log/architecture/_assets/interface.puml rename to docs/baselibs_rust/log/architecture/_assets/interface.puml diff --git a/docs/module/log/architecture/_assets/log_with_global_logger.puml b/docs/baselibs_rust/log/architecture/_assets/log_with_global_logger.puml similarity index 100% rename from docs/module/log/architecture/_assets/log_with_global_logger.puml rename to docs/baselibs_rust/log/architecture/_assets/log_with_global_logger.puml diff --git a/docs/module/log/architecture/_assets/log_with_local_logger.puml b/docs/baselibs_rust/log/architecture/_assets/log_with_local_logger.puml similarity index 100% rename from docs/module/log/architecture/_assets/log_with_local_logger.puml rename to docs/baselibs_rust/log/architecture/_assets/log_with_local_logger.puml diff --git a/docs/module/log/architecture/_assets/register_global_logger.puml b/docs/baselibs_rust/log/architecture/_assets/register_global_logger.puml similarity index 100% rename from docs/module/log/architecture/_assets/register_global_logger.puml rename to docs/baselibs_rust/log/architecture/_assets/register_global_logger.puml diff --git a/docs/module/log/architecture/_assets/static_view.puml b/docs/baselibs_rust/log/architecture/_assets/static_view.puml similarity index 100% rename from docs/module/log/architecture/_assets/static_view.puml rename to docs/baselibs_rust/log/architecture/_assets/static_view.puml diff --git a/docs/module/log/architecture/index.rst b/docs/baselibs_rust/log/architecture/index.rst similarity index 100% rename from docs/module/log/architecture/index.rst rename to docs/baselibs_rust/log/architecture/index.rst diff --git a/docs/module/log/component_classification.rst b/docs/baselibs_rust/log/component_classification.rst similarity index 100% rename from docs/module/log/component_classification.rst rename to docs/baselibs_rust/log/component_classification.rst diff --git a/docs/module/log/detailed_design/_assets/class_diagram.puml b/docs/baselibs_rust/log/detailed_design/_assets/class_diagram.puml similarity index 100% rename from docs/module/log/detailed_design/_assets/class_diagram.puml rename to docs/baselibs_rust/log/detailed_design/_assets/class_diagram.puml diff --git a/docs/module/log/detailed_design/_assets/log_op.puml b/docs/baselibs_rust/log/detailed_design/_assets/log_op.puml similarity index 100% rename from docs/module/log/detailed_design/_assets/log_op.puml rename to docs/baselibs_rust/log/detailed_design/_assets/log_op.puml diff --git a/docs/module/log/detailed_design/_assets/log_to_level.puml b/docs/baselibs_rust/log/detailed_design/_assets/log_to_level.puml similarity index 100% rename from docs/module/log/detailed_design/_assets/log_to_level.puml rename to docs/baselibs_rust/log/detailed_design/_assets/log_to_level.puml diff --git a/docs/module/log/detailed_design/index.rst b/docs/baselibs_rust/log/detailed_design/index.rst similarity index 100% rename from docs/module/log/detailed_design/index.rst rename to docs/baselibs_rust/log/detailed_design/index.rst diff --git a/docs/module/log/index.rst b/docs/baselibs_rust/log/index.rst similarity index 100% rename from docs/module/log/index.rst rename to docs/baselibs_rust/log/index.rst diff --git a/docs/module/log/requirements/index.rst b/docs/baselibs_rust/log/requirements/index.rst similarity index 100% rename from docs/module/log/requirements/index.rst rename to docs/baselibs_rust/log/requirements/index.rst diff --git a/docs/module/log/safety_analysis/dfa.rst b/docs/baselibs_rust/log/safety_analysis/dfa.rst similarity index 100% rename from docs/module/log/safety_analysis/dfa.rst rename to docs/baselibs_rust/log/safety_analysis/dfa.rst diff --git a/docs/module/log/safety_analysis/fmea.rst b/docs/baselibs_rust/log/safety_analysis/fmea.rst similarity index 100% rename from docs/module/log/safety_analysis/fmea.rst rename to docs/baselibs_rust/log/safety_analysis/fmea.rst diff --git a/docs/features/baselibs_rust/requirements/index.rst b/docs/features/baselibs_rust/requirements/index.rst new file mode 100644 index 00000000..47a12272 --- /dev/null +++ b/docs/features/baselibs_rust/requirements/index.rst @@ -0,0 +1,103 @@ +.. + # ******************************************************************************* + # 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 + # ******************************************************************************* + +Requirements +############ + +.. document:: Baselibs_rust Requirements + :id: doc__baselibs_rust_requirements + :status: draft + :safety: ASIL_B + :realizes: wp__requirements_feat + +.. feat_req:: Core Software Utilities + :id: feat_req__baselibs_rust__core_utilities + :reqtype: Functional + :security: NO + :safety: QM + :satisfies: stkh_req__functional_req__base_libraries + :status: valid + + The Rust base libraries shall include core software utilities and common infrastructure components needed by multiple platform modules. + +.. feat_req:: Safety Relevance + :id: feat_req__baselibs_rust__safety + :reqtype: Functional + :security: NO + :safety: ASIL_B + :satisfies: stkh_req__functional_req__base_libraries, stkh_req__dependability__automotive_safety + :status: valid + + The Rust base libraries shall implement functionality necessary to support safety-relevant platform components up to ASIL-B for selected functionalities. + +.. feat_req:: Consistent APIs + :id: feat_req__baselibs_rust__consistent_apis + :reqtype: Functional + :security: NO + :safety: QM + :satisfies: stkh_req__functional_req__base_libraries, stkh_req__dev_experience__prog_languages, stkh_req__overall_goals__reuse_of_app_soft + :status: valid + + The Rust base libraries shall provide consistent APIs while respecting language-specific idioms. + +.. feat_req:: Maintainable Design + :id: feat_req__baselibs_rust__maintainable_design + :reqtype: Non-Functional + :security: NO + :safety: QM + :satisfies: stkh_req__functional_req__base_libraries, stkh_req__overall_goals__reuse_of_app_soft + :status: valid + + The Rust base libraries shall be designed for maintainability and code reuse. + +.. feat_req:: Security Robustness + :id: feat_req__baselibs_rust__security + :reqtype: Non-Functional + :security: YES + :safety: QM + :satisfies: stkh_req__functional_req__base_libraries + :status: valid + + The Rust base libraries shall adhere to secure coding standards to prevent vulnerabilities across platform components. + +.. feat_req:: Panic-Free Development Support + :id: feat_req__baselibs_rust__result_library + :reqtype: Functional + :security: NO + :safety: ASIL_B + :satisfies: stkh_req__functional_req__base_libraries + :status: valid + + The Rust base libraries shall provide error handling mechanisms that enable development without relying on Rust panics. + Where an idiomatic interface requires panics, an additional non-panicking option shall be provided as well. + +.. feat_req:: Rust Container Library + :id: feat_req__baselibs_rust__containers_rust_lib + :reqtype: Functional + :security: NO + :safety: ASIL_B + :satisfies: stkh_req__functional_req__base_libraries + :status: valid + + The Rust base libraries shall provide a library of container types that serve the specific needs of SW-platform components. + +.. feat_req:: ABI-Compatible Containers + :id: feat_req__baselibs_rust__abi_containers + :reqtype: Functional + :security: NO + :safety: ASIL_B + :satisfies: stkh_req__functional_req__base_libraries + :status: valid + + The Rust base libraries shall provide a library of containers that can serve as the basis for ABI-compatible container data structures. diff --git a/docs/index.rst b/docs/index.rst index e80e2ebf..bac599bf 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -20,8 +20,9 @@ Rust Base Libraries :glob: :titlesonly: + features/baselibs_rust/*/index + baselibs_rust/*/index module_docs/index - module/*/index Overview --------