wasm-micro-runtime/core/shared/platform
Gavin Hayes d8ee771e28
Add Cosmopolitan Libc Platform (#2598)
This PR adds the Cosmopolitan Libc platform enabling compatibility with multiple
x86_64 operating systems with the same binary. The platform is similar to the
Linux platform, but for now only x86_64 with interpreter modes are supported.

The only major change to the core is `posix.c/convert_errno()` was rewritten to use
a switch statement. With Cosmopolitan errno values depend on the currently
running operating system, and so they are non-constant and cannot be used in array
designators. However, the `cosmocc` compiler allows non-constant case labels in
switch statements, enabling the new version.

And updated wamr-test-suites script to add `-j <platform>` option. The spec tests
can be ran via `CC=cosmocc ./test_wamr.sh -j cosmopolitan -t classic-interp`
or `CC=cosmocc ./test_wamr.sh -j cosmopolitan -t fast-interp`.
2023-10-04 21:55:37 +08:00
..
alios Add bh_print_proc_mem() to dump memory info of current process (#1734) 2022-11-25 08:33:44 +08:00
android Fix compilation error on Android platform (#2594) 2023-09-26 16:13:12 +08:00
common Add Cosmopolitan Libc Platform (#2598) 2023-10-04 21:55:37 +08:00
cosmopolitan Add Cosmopolitan Libc Platform (#2598) 2023-10-04 21:55:37 +08:00
darwin Fix inverted WASM_DISABLE_WAKEUP_BLOCKING_OP checks (#2571) 2023-09-21 11:56:21 +08:00
ego Make a workaround for EGO when fstat returns NOT_SUPPORT (#1970) 2023-02-21 11:11:27 +08:00
esp-idf Fix typo for IP address buffer (#2532) 2023-09-07 14:29:52 +08:00
freebsd Fix inverted WASM_DISABLE_WAKEUP_BLOCKING_OP checks (#2571) 2023-09-21 11:56:21 +08:00
include Implement async termination of blocking thread (#2516) 2023-09-20 18:11:52 +08:00
linux Fix inverted WASM_DISABLE_WAKEUP_BLOCKING_OP checks (#2571) 2023-09-21 11:56:21 +08:00
linux-sgx Fix typo for IP address buffer (#2532) 2023-09-07 14:29:52 +08:00
nuttx Fix inverted WASM_DISABLE_WAKEUP_BLOCKING_OP checks (#2571) 2023-09-21 11:56:21 +08:00
riot Add bh_print_proc_mem() to dump memory info of current process (#1734) 2022-11-25 08:33:44 +08:00
rt-thread Add bh_print_proc_mem() to dump memory info of current process (#1734) 2022-11-25 08:33:44 +08:00
vxworks Add mutex initializer for wasm-c-api engine operations (#1656) 2022-10-31 11:48:07 +08:00
windows Fix compile warnings on windows platform (#2208) 2023-05-15 13:48:48 +08:00
zephyr Fix zephyr sample build errors (#1757) 2022-11-28 11:23:51 +08:00
README.md re-org platform APIs, simplify porting process (#201) 2020-03-16 16:43:57 +08:00

This folder contains the platform abstract layer for multiple platforms. To support a new platform, you can simply create a new folder here and implement all the APIs defined in include folder.

Refer to port_wamr.md for how to port WAMR to a target platform.