13. Constraints¶
13.1. Source code related¶
13.1.1. Only use certified subset¶
-
Identifier:
LIBS_CSTR_0010_SUBSET¶
Associated requirement ID: LIBS_AVD_SUBSET_001.
The user shall only use the certified subset of the certified libraries. The certified subset is documented by annotations in the Certified standard library API docs. Compliance must be proven by following Compliance with subset.
13.1.2. Only use stable functions¶
-
Identifier:
LIBS_CSTR_0030_SUBSET_ONLY_STABLE¶
Associated requirement ID: LIBS_AVD_SUBSET_001.
The user shall not use experimental functions in the certified subset of the certified libraries.
13.1.3. Verify macro correctness¶
-
Identifier:
LIBS_CSTR_0060_VERIFY_MACROS¶
Associated requirement ID: LIBS_AVD_MACROS_002.
The user shall verify that all code generated by macros is correct.
13.1.4. Verify architecture specific code¶
-
Identifier:
LIBS_CSTR_0050_VERIFY_ARCH¶
Associated requirement ID: LIBS_AVD_ARCH_003.
Architecture specific code needs to be reasoned about and tested in the context of your application. We only guarantee that the compiler emits the correct instructions that you asked for, not that the instructions make sense in context. This becomes and obligation of the user. Architecture specific functions are:
All functions in the
core::archmodulecore::hint::spin_loop
13.1.5. Verify global allocator correctness¶
-
Identifier:
LIBS_CSTR_0070_GLOBAL_ALLOCATOR¶
The user shall verify that the configured global allocator is implemented as specified by the documentation of the trait and methods of core::alloc::GlobalAlloc (docs).
13.2. Tool related¶
13.2.1. Compile with panic abort¶
-
Identifier:
LIBS_CSTR_0020_PANIC_ABORT¶
Associated requirement ID: LIBS_AVD_SUBSET_001.
The user shall always provide the -C panic=abort option to rustc.
13.2.2. Use matching versions of the certified libraries and rustc¶
-
Identifier:
LIBS_CSTR_0040_MATCHING_VERSION¶
The user shall verify that the versions of the certified libraries and the version of rustc used to compile code match. This is ensured by following the Installation Procedures.
13.2.3. Compile with static linking only¶
-
Identifier:
LIBS_CSTR_0080_LINK_STATIC¶
The user shall always link certified libraries statically into applications.
This can be achieved by providing the -C prefer-dynamic=no option to rustc.