- Required Services
- Extended Services
- Wasm C-ABI
- Wasm Linear Stack Description
- Example of WebAssembly inline assembly
- Example of WebAssembly
.sfiles
- Choice:
<an APEX integer type>->APEX_LONG_INTEGERReason: These placeholders are only used for*_ID_TYPE. All of these IDs are only ever handed out by the OS. By picking the largest possible type available (64-bit integer), we ensure that we are compatible with any possible OS, as we can store any possible ID. For an OS that chooses a 32-bit integer, the upper bits just remain untouched. - Choice: import the linear memory (via
--import-memorylinker flag) Reason: Each partition has multiple processes, which are guaranteed to have a shared address space (ARINC 653 P1-5 chapter 2.3.2). The only way to achieve this is if they have shared linear memory. To cause that, they all need to import the linear memory. - Choice: export the function table (via
--export-tablelinker flag) Reason: In order for theCREATE_PROCESScall to succeed, the host environment needs to be able to call a guest environment function identified via an index into said table. Exporting the table ensures that the funcref table is accessible from the host environment. - Choice: Do not use
__externref_tfor function pointers, e.g. theENTRY_POINTargument in theCREATE_ERROR_HANDLERfunction. Reason:__externref_tis not representable in Linear Memory. Hence, it can not become the field of a struct. However, thePROCESS_ATTRIBUTE_TYPEstruct comprises anENTRY_POINTfield holding a function pointer. As__externref_tcan not be used there, it is necessary to expose the table for function pointers. Therefore, any use of__externref_tshall be avoided, in order to keep all function pointer representations consistent. - Choice: Use
__wasm__preprocessor#defineto conditionally annotate official APEX header functions withimport_module&import_nameattributes. Reason: Clang is the sole compiler, that is capable to compile C to Wasm reasonably. Heaving two headers, one without and one with Wasm specific annotations, is unfavorable.
Copyright © 2025 Deutsches Zentrum für Luft- und Raumfahrt e.V. (DLR).
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.