diff --git a/build-scripts/config_common.cmake b/build-scripts/config_common.cmake index 61e2473b16..2779d63a83 100644 --- a/build-scripts/config_common.cmake +++ b/build-scripts/config_common.cmake @@ -727,28 +727,28 @@ endif () message ( "-- About Wasm Proposals:\n" " Always-on:\n" +" \"Import/Export of Mutable Globals\"\n" " \"Multi-value\"\n" -" \"Non-trapping float-to-int conversions\"\n" -" \"Sign-extension operators\"\n" +" \"Non-trapping float-to-int Conversions\"\n" +" \"Sign-extension Operators\"\n" " \"WebAssembly C and C++ API\"\n" " Configurable. 0 is OFF. 1 is ON:\n" " \"Bulk Memory Operation\" via WAMR_BUILD_BULK_MEMORY: ${WAMR_BUILD_BULK_MEMORY}\n" " \"Extended Constant Expressions\" via WAMR_BUILD_EXTENDED_CONST_EXPR: ${WAMR_BUILD_EXTENDED_CONST_EXPR}\n" " \"Fixed-width SIMD\" via WAMR_BUILD_SIMD: ${WAMR_BUILD_SIMD}\n" -" \"Garbage collection\" via WAMR_BUILD_GC: ${WAMR_BUILD_GC}\n" -" \"Legacy Exception handling\" via WAMR_BUILD_EXCE_HANDLING: ${WAMR_BUILD_EXCE_HANDLING}\n" +" \"Garbage Collection\" via WAMR_BUILD_GC: ${WAMR_BUILD_GC}\n" +" \"Legacy Exception Handling\" via WAMR_BUILD_EXCE_HANDLING: ${WAMR_BUILD_EXCE_HANDLING}\n" " \"Memory64\" via WAMR_BUILD_MEMORY64: ${WAMR_BUILD_MEMORY64}\n" -" \"Multiple memories\" via WAMR_BUILD_MULTI_MEMORY: ${WAMR_BUILD_MULTI_MEMORY}\n" +" \"Multiple Memories\" via WAMR_BUILD_MULTI_MEMORY: ${WAMR_BUILD_MULTI_MEMORY}\n" " \"Reference Types\" via WAMR_BUILD_REF_TYPES: ${WAMR_BUILD_REF_TYPES}\n" " \"Reference-Typed Strings\" via WAMR_BUILD_STRINGREF: ${WAMR_BUILD_STRINGREF}\n" -" \"Tail call\" via WAMR_BUILD_TAIL_CALL: ${WAMR_BUILD_TAIL_CALL}\n" +" \"Tail Call\" via WAMR_BUILD_TAIL_CALL: ${WAMR_BUILD_TAIL_CALL}\n" " \"Threads\" via WAMR_BUILD_SHARED_MEMORY: ${WAMR_BUILD_SHARED_MEMORY}\n" " \"Typed Function References\" via WAMR_BUILD_GC: ${WAMR_BUILD_GC}\n" " Unsupported (>= Phase4):\n" " \"Branch Hinting\"\n" " \"Custom Annotation Syntax in the Text Format\"\n" -" \"Exception handling\"\n" -" \"Import/Export of Mutable Globals\"\n" +" \"Exception Handling\"\n" " \"JS String Builtins\"\n" " \"Relaxed SIMD\"\n" ) diff --git a/doc/stability_wasm_proposals.md b/doc/stability_wasm_proposals.md index e2bbe54e84..fe93d31d1d 100644 --- a/doc/stability_wasm_proposals.md +++ b/doc/stability_wasm_proposals.md @@ -14,37 +14,41 @@ Users can turn those features on or off by using compilation options. If a relev | Proposal | >= Phase 4 | Compilation Option | | ------------------------------------- | ---------- | ------------------------ | -| Bulk memory operations | Yes | `WAMR_BUILD_BULK_MEMORY` | +| Bulk Memory Operations | Yes | `WAMR_BUILD_BULK_MEMORY` | | Fixed-width SIMD[^1] | Yes | `WAMR_BUILD_SIMD` | +| Import/Export of Mutable Globals[^2] | Yes | N/A | | Multi-value | Yes | N/A | -| Non-trapping float-to-int conversions | Yes | N/A | +| Non-trapping float-to-int Conversions | Yes | N/A | | Reference Types | Yes | `WAMR_BUILD_REF_TYPES` | -| Sign-extension operators | Yes | N/A | +| Sign-extension Operators | Yes | N/A | | WebAssembly C and C++ API | No | N/A | [^1]: llvm-jit and aot only. +[^2]: in WAMR's implementation, if a mutable global shared by several wasm instances, each instance maintains its own copy of the global rather than sharing it. + ## Off-by-default Wasm Proposals -| Proposal | >= Phase 4 | Compilation Option | -| ----------------------------- | ---------- | -------------------------- | -| Garbage collection | Yes | `WAMR_BUILD_GC` | -| Legacy Exception handling[^2] | No | `WAMR_BUILD_EXCE_HANDLING` | -| Memory64 | Yes | `WAMR_BUILD_MEMORY64` | -| Multiple memories[^3] | Yes | `WAMR_BUILD_MULTI_MEMORY` | -| Reference-Typed Strings | No | `WAMR_BUILD_STRINGREF` | -| Tail call | Yes | `WAMR_BUILD_TAIL_CALL` | -| Threads[^4] | Yes | `WAMR_BUILD_SHARED_MEMORY` | -| Typed Function References | Yes | `WAMR_BUILD_GC` | - -[^2]: +| Proposal | >= Phase 4 | Compilation Option | +| ----------------------------- | ---------- | ---------------------------------| +| Extended Constant Expressions | Yes | `WAMR_BUILD_EXTENDED_CONST_EXPR` | +| Garbage Collection | Yes | `WAMR_BUILD_GC` | +| Legacy Exception Handling[^3] | No | `WAMR_BUILD_EXCE_HANDLING` | +| Memory64 | Yes | `WAMR_BUILD_MEMORY64` | +| Multiple Memories[^4] | Yes | `WAMR_BUILD_MULTI_MEMORY` | +| Reference-Typed Strings | No | `WAMR_BUILD_STRINGREF` | +| Tail Call | Yes | `WAMR_BUILD_TAIL_CALL` | +| Threads[^5] | Yes | `WAMR_BUILD_SHARED_MEMORY` | +| Typed Function References | Yes | `WAMR_BUILD_GC` | + +[^3]: interpreter only. [a legacy version](https://github.com/WebAssembly/exception-handling/blob/main/proposals/exception-handling/legacy/Exceptions.md). This proposal is currently also known as the "legacy proposal" and still supported in the web, but can be deprecated in future and the use of this proposal is discouraged. -[^3]: interpreter only -[^4]: `WAMR_BUILD_LIB_PTHREAD` can also be used to enable +[^4]: interpreter only +[^5]: `WAMR_BUILD_LIB_PTHREAD` can also be used to enable ## Unimplemented Wasm Proposals @@ -52,13 +56,11 @@ Users can turn those features on or off by using compilation options. If a relev | ------------------------------------------- | ---------- | | Branch Hinting | Yes | | Custom Annotation Syntax in the Text Format | Yes | -| Exception handling[^5] | Yes | -| Extended Constant Expressions | Yes | -| Import/Export of Mutable Globals | Yes | +| Exception Handling[^6] | Yes | | JS String Builtins | Yes | | Relaxed SIMD | Yes | -[^5]: [up-to-date version](https://github.com/WebAssembly/exception-handling/blob/main/proposals/exception-handling/Exceptions.md) +[^6]: [up-to-date version](https://github.com/WebAssembly/exception-handling/blob/main/proposals/exception-handling/Exceptions.md) ## On-by-default WASI Proposals diff --git a/product-mini/platforms/common/wasm_proposal.c b/product-mini/platforms/common/wasm_proposal.c index 3c04d46ecf..8a4c3d44f9 100644 --- a/product-mini/platforms/common/wasm_proposal.c +++ b/product-mini/platforms/common/wasm_proposal.c @@ -12,14 +12,15 @@ wasm_proposal_print_status(void) { printf("About Wasm Proposals:\n"); printf(" Always-on:\n"); + printf(" - Import/Export of Mutable Globals\n"); printf(" - Multi-value\n"); - printf(" - Non-trapping float-to-int conversions\n"); - printf(" - Sign-extension operators\n"); + printf(" - Non-trapping float-to-int Conversions\n"); + printf(" - Sign-extension Operators\n"); printf(" - WebAssembly C and C++ API\n"); printf(" Compilation Configurable. 0 is OFF. 1 is ON:\n"); printf(" - Bulk Memory Operation via WASM_ENABLE_BULK_MEMORY: %u\n", WASM_ENABLE_BULK_MEMORY); - printf(" - Fixed-Width SIMD via WASM_ENABLE_SIMD: %u\n", + printf(" - Fixed-width SIMD via WASM_ENABLE_SIMD: %u\n", WASM_ENABLE_SIMD); printf(" - Garbage Collection via WASM_ENABLE_GC: %u\n", WASM_ENABLE_GC); printf( @@ -27,7 +28,7 @@ wasm_proposal_print_status(void) WASM_ENABLE_EXCE_HANDLING); printf(" - Memory64 via WASM_ENABLE_MEMORY64: %u\n", WASM_ENABLE_MEMORY64); - printf(" - Multiple Memory via WASM_ENABLE_MULTI_MEMORY: %u\n", + printf(" - Multiple Memories via WASM_ENABLE_MULTI_MEMORY: %u\n", WASM_ENABLE_MULTI_MEMORY); printf(" - Reference Types via WASM_ENABLE_REF_TYPES: %u\n", WASM_ENABLE_REF_TYPES); @@ -42,9 +43,7 @@ wasm_proposal_print_status(void) printf(" Unsupported (>= Phase4):\n"); printf(" - Branch Hinting\n"); printf(" - Custom Annotation Syntax in the Text Format\n"); - printf(" - Exception handling\n"); - printf(" - Extended Constant Expressions\n"); - printf(" - Import/Export of Mutable Globals\n"); + printf(" - Exception Handling\n"); printf(" - JS String Builtins\n"); printf(" - Relaxed SIMD\n"); }