How airbus/a653lib works
a653lib is a Linux ARINC 653 scheduler and APEX runtime for native and WebAssembly partitions. The main workflow is partition applications invoking APEX process and communication services while the scheduler activates partitions; Wasm partitions reach those services through runtime-registered host functions. The README documents native fork and WAMR/Wasmtime execution. The sampled excerpts confirm scheduler-loop, shared-memory, queue, process, and Wasm wrapper behavior; unsampled service wiring is shown only where the README or explicit wrapper calls support it.
Main entry points: a653Lib.h APEX interfaces · a653_i_queuing.c Queuing ports · apex_host_fncs_wasm32.c APEX host functions · main.c Scheduler loop
Components 20
Partition Scheduling
- Scheduler loop
main.c - Partition control
a653_lib/a653_i_partition.c - Native partitions
a653_lib/a653_i_partition.c - Wasm partitions
partition_a.c
APEX Services
- Process services
a653_lib/a653_i_process.c - APEX interfaces
a653_inc/a653Lib.h - Synchronization
a653_lib/a653_i_sync.c - Time services
a653_lib/a653_i_time.c
Interpartition Communication
- Sampling ports
a653_lib/a653_i_sampling.c - Queuing ports
a653_lib/a653_i_queuing.c - Channel configuration
a653_config.h
WebAssembly Execution
- Wasm launcher
a653_lib_wasm32/wasm32_main.c - WAMR runtime
a653_lib_wasm32/a653_wamr.c - Wasmtime runtime
a653_lib_wasm32/a653_wasmtime.c - APEX host functions
a653_lib_wasm32/apex_host_fncs_wasm32.c - Wasm process wrappers
a653_lib_wasm32/arinc653_part1_apex_process_wasm32.c - Wasm queue wrappers
a653_lib_wasm32/arinc653_part1_apex_queuing_port_wasm32.c
Shared Runtime State
- Shared memory
a653_lib/a653_i_shm_if.c
Other components
- Partition apps
partition_a.c - POSIX/Linux
Connections 26
- Partition apps → APEX interfaces: call APEX
- APEX interfaces → Process services: dispatch process calls
- APEX interfaces → Sampling ports: dispatch sampling calls
- APEX interfaces → Queuing ports: dispatch queue calls
- APEX interfaces → Synchronization: dispatch sync calls
- APEX interfaces → Time services: dispatch time calls
- Scheduler loop → Partition control: update partitions
- Scheduler loop → POSIX/Linux: wait on POSIX
- Partition control → Native partitions: activate native
- Native partitions → POSIX/Linux: fork processes
- Sampling ports → Channel configuration: read channel config
- Queuing ports → Channel configuration: read channel config
- Sampling ports → Shared memory: read/write samples
- Queuing ports → Shared memory: read/write queues
- Scheduler loop → Shared memory: initialize state
- Partition control → Wasm launcher: launch Wasm partitions
- Wasm launcher → WAMR runtime: instantiate guest
- Wasm launcher → Wasmtime runtime: instantiate guest
- WAMR runtime → APEX host functions: register imports
- Wasmtime runtime → APEX host functions: register imports
- Wasm partitions → Wasm process wrappers: import APEX calls
- Wasm partitions → Wasm queue wrappers: import APEX calls
- Wasm process wrappers → Process services: invoke process API
- Wasm queue wrappers → Queuing ports: invoke queue API
- APEX host functions → Wasm process wrappers: dispatch imports
- APEX host functions → Wasm queue wrappers: dispatch imports