diff --git a/product-mini/platforms/common/wasm_proposal.c b/product-mini/platforms/common/wasm_proposal.c new file mode 100644 index 0000000000..0e4946f0f7 --- /dev/null +++ b/product-mini/platforms/common/wasm_proposal.c @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2023 Amazon.com Inc. or its affiliates. All rights reserved. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + */ + +#include + +void +wasm_proposal_print_status(void) +{ + printf("Phase4 Wasm Proposals Status:\n"); + printf(" Always-on:\n"); + printf(" - Extended Constant Expressions\n"); + printf(" - Multi-value\n"); + printf(" - Non-trapping float-to-int conversions\n"); + printf(" - Sign-extension operators\n"); + printf(" - WebAssembly C and C++ API\n"); + printf(" Configurable:\n"); + printf(" - Bulk Memory Operation: %u\n", WASM_ENABLE_BULK_MEMORY); + printf(" - Fixed-Width SIMD: %u\n", WASM_ENABLE_SIMD); + printf(" - Garbage Collection: %u\n", WASM_ENABLE_GC); + printf(" - Legacy Exception Handling: %u\n", WASM_ENABLE_EXCE_HANDLING); + printf(" - Memory64: %u\n", WASM_ENABLE_MEMORY64); + printf(" - Multiple Memory: %u\n", WASM_ENABLE_MULTI_MEMORY); + printf(" - Reference Types: %u\n", WASM_ENABLE_REF_TYPES); + printf(" - Reference-Typed Strings: %u\n", WASM_ENABLE_REF_TYPES); + printf(" - Tail Call: %u\n", WASM_ENABLE_TAIL_CALL); + printf(" - Threads: %u\n", WASM_ENABLE_SHARED_MEMORY); + printf(" - Typed Function References: %u\n", WASM_ENABLE_GC); + printf(" Unsupported:\n"); + printf(" - Branch Hinting\n"); + printf(" - Custom Annotation Syntax in the Text Format\n"); + printf(" - Exception handling\n"); + printf(" - Import/Export of Mutable Globals\n"); + printf(" - JS String Builtins\n"); + printf(" - Relaxed SIMD\n"); +} \ No newline at end of file diff --git a/product-mini/platforms/common/wasm_proposal.h b/product-mini/platforms/common/wasm_proposal.h new file mode 100644 index 0000000000..346ec943fb --- /dev/null +++ b/product-mini/platforms/common/wasm_proposal.h @@ -0,0 +1,12 @@ +/* + * Copyright (C) 2023 Amazon.com Inc. or its affiliates. All rights reserved. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + */ + +#ifndef _WASM_PROPOSAL_H_ +#define _WASM_PROPOSAL_H_ + +void +wasm_proposal_print_status(void); + +#endif /* _WASM_PROPOSAL_H_ */ diff --git a/product-mini/platforms/posix/main.c b/product-mini/platforms/posix/main.c index af50223a4f..fa5dcb2c34 100644 --- a/product-mini/platforms/posix/main.c +++ b/product-mini/platforms/posix/main.c @@ -18,6 +18,8 @@ #include "../common/libc_wasi.c" #endif +#include "../common/wasm_proposal.c" + #if BH_HAS_DLFCN #include #endif @@ -798,6 +800,8 @@ main(int argc, char *argv[]) wasm_runtime_get_version(&major, &minor, &patch); printf("iwasm %" PRIu32 ".%" PRIu32 ".%" PRIu32 "\n", major, minor, patch); + printf("\n"); + wasm_proposal_print_status(); return 0; } else {