Let a653lib support APEX-enabled Wasm 'partitions', executing in either Wasmtime or WAMR#11
Merged
Merged
Conversation
df4fe50 to
bf877c4
Compare
50f9627 to
6904674
Compare
b306875 to
1cebfe6
Compare
47e396b to
f21e9c6
Compare
41d241f to
ed50347
Compare
75d6f58 to
9018c58
Compare
f1c8434 to
cbea62f
Compare
6830bc5 to
1a34494
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Contributor
Author
|
@nic FYI |
Contributor
Author
|
All required patches put into PR for DLR-FT/arinc653-wasm: |
Contributor
Author
|
@nbaerair there are still some "nice to haves", however for the moment being I guess it is good enough to get it upstreamed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This code works currently on ArchLinux (and Ubuntu - see CI):
$ yay -S clang lld wasi-libc wasi-compiler-rt libwasmtime iwasmiwasm PKGBUILDmust be patched to not strip the static library. See https://aur.archlinux.org/packages/iwasmContent:
The given code showcases that a Wasmtime and WebAssembly Micro Runtime (WAMR) can support ARINC653 APEX interfaces as host functions. The PoC shall also proof, that it could work on Little Endian as well as Big Endian architectures (such as PowerPC still represented in avionics). There are a few caveats why ARINC653 APEX interfaces can't be 100% compliant to the WebAssembly standard, however the main language C (and C++) is supported and Ada should be supportable:
wit-bindgen. Thus, the APEX interface is exposed as a plain C header, where to-be-Wasm-ised source code can be directly compiled against.CREATE_PROCESS()andCREATE_ERROR_HANDLER()can't comply to the WebAssembly standard, as they pass a function pointerSYSTEM_ADDRESS_TYPE.return .... Meaning, function parameteres are 'just' input. However, the APEX interfaces all use plain pointers as function parameters to return content.Again, as long as C, C++, Ada are the main languages, above points should be no worry.
Open Topics:
Choosing WebAssembly runtime
The compilation will create a
binfolder. Change the symlink fromp_wasmtimetop_wamrif WAMR shall be employed.WebAssembly Specification
https://www.w3.org/TR/wasm-core-2/#concepts%E2%91%A0
https://www.w3.org/TR/wasm-core-2/#function-instances%E2%91%A0
https://www.w3.org/TR/wasm-core-2/#functions%E2%91%A4