소스 검색

Merge branch 'main' into godjan/iterate_callstack

Georgii Rylov 11 달 전
부모
커밋
267379c2e8
39개의 변경된 파일460개의 추가작업 그리고 105개의 파일을 삭제
  1. 29 0
      .github/workflows/check_version_h.yml
  2. 3 3
      .github/workflows/codeql.yml
  3. 8 2
      .github/workflows/compilation_on_android_ubuntu.yml
  4. 1 1
      .github/workflows/supply_chain.yml
  5. 3 0
      CMakeLists.txt
  6. 113 47
      build-scripts/config_common.cmake
  7. 28 0
      build-scripts/version.cmake
  8. 4 0
      core/config.h
  9. 10 3
      core/iwasm/aot/aot_loader.c
  10. 0 2
      core/iwasm/aot/aot_perf_map.c
  11. 2 2
      core/iwasm/aot/aot_runtime.c
  12. 45 0
      core/iwasm/aot/aot_validator.c
  13. 15 0
      core/iwasm/aot/aot_validator.h
  14. 13 1
      core/iwasm/aot/iwasm_aot.cmake
  15. 9 9
      core/iwasm/libraries/wasi-nn/test/Dockerfile.wasi-nn-smoke
  16. 5 5
      core/iwasm/libraries/wasi-nn/test/run_smoke_test.py
  17. 13 0
      core/version.h
  18. 24 0
      core/version.h.in
  19. 5 5
      doc/build_wasm_app.md
  20. 0 21
      doc/semantic_version.md
  21. 33 0
      doc/stability_release.md
  22. 1 1
      doc/stability_wasm_proposals.md
  23. 3 0
      product-mini/platforms/android/CMakeLists.txt
  24. 48 0
      product-mini/platforms/common/wasm_proposal.c
  25. 5 0
      product-mini/platforms/cosmopolitan/CMakeLists.txt
  26. 5 0
      product-mini/platforms/darwin/CMakeLists.txt
  27. 5 0
      product-mini/platforms/freebsd/CMakeLists.txt
  28. 1 0
      product-mini/platforms/ios/CMakeLists.txt
  29. 1 0
      product-mini/platforms/linux-sgx/CMakeLists.txt
  30. 1 0
      product-mini/platforms/linux-sgx/CMakeLists_minimal.txt
  31. 5 0
      product-mini/platforms/linux/CMakeLists.txt
  32. 4 0
      product-mini/platforms/posix/main.c
  33. 2 0
      product-mini/platforms/riot/CMakeLists.txt
  34. 5 0
      product-mini/platforms/vxworks/CMakeLists.txt
  35. 5 0
      product-mini/platforms/windows/CMakeLists.txt
  36. 1 1
      samples/debug-tools/CMakeLists.txt
  37. 1 1
      test-tools/wamr-ide/VSCode-Extension/resource/test/build.sh
  38. 1 1
      test-tools/wamr-ide/VSCode-Extension/src/test/suite/utils.ts
  39. 3 0
      wamr-compiler/CMakeLists.txt

+ 29 - 0
.github/workflows/check_version_h.yml

@@ -0,0 +1,29 @@
+# Copyright (C) 2019 Intel Corporation.  All rights reserved.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+name: confirm version.h stay in sync
+
+on:
+  workflow_call:
+
+permissions:
+  contents: read
+
+jobs:
+  confirm_version:
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: checkout
+        uses: actions/checkout@v4
+
+      - name: cmake execute to generate version.h
+        run: cmake -B build_version -S .
+
+      - name: confirm version.h
+        run: |
+          if [ -z "$(git status --porcelain | grep version.h)" ]; then
+            echo "version.h is in sync"
+          else
+            echo "version.h is not in sync"
+            exit 1
+          fi

+ 3 - 3
.github/workflows/codeql.yml

@@ -53,7 +53,7 @@ jobs:
 
 
     # Initializes the CodeQL tools for scanning.
     # Initializes the CodeQL tools for scanning.
     - name: Initialize CodeQL
     - name: Initialize CodeQL
-      uses: github/codeql-action/init@v3.28.1
+      uses: github/codeql-action/init@v3.28.8
       with:
       with:
         languages: ${{ matrix.language }}
         languages: ${{ matrix.language }}
 
 
@@ -70,7 +70,7 @@ jobs:
     - run: |
     - run: |
         ./.github/scripts/codeql_buildscript.sh
         ./.github/scripts/codeql_buildscript.sh
     - name: Perform CodeQL Analysis
     - name: Perform CodeQL Analysis
-      uses: github/codeql-action/analyze@v3.28.1
+      uses: github/codeql-action/analyze@v3.28.8
       with:
       with:
         category: "/language:${{matrix.language}}"
         category: "/language:${{matrix.language}}"
         upload: false
         upload: false
@@ -99,7 +99,7 @@ jobs:
         output: ${{ steps.step1.outputs.sarif-output }}/cpp.sarif
         output: ${{ steps.step1.outputs.sarif-output }}/cpp.sarif
 
 
     - name: Upload CodeQL results to code scanning
     - name: Upload CodeQL results to code scanning
-      uses: github/codeql-action/upload-sarif@v3.28.1
+      uses: github/codeql-action/upload-sarif@v3.28.8
       with:
       with:
         sarif_file: ${{ steps.step1.outputs.sarif-output }}
         sarif_file: ${{ steps.step1.outputs.sarif-output }}
         category: "/language:${{matrix.language}}"
         category: "/language:${{matrix.language}}"

+ 8 - 2
.github/workflows/compilation_on_android_ubuntu.yml

@@ -74,6 +74,12 @@ permissions:
   contents: read
   contents: read
 
 
 jobs:
 jobs:
+  check_version_h:
+    permissions:
+      contents: read
+      actions: write
+    uses: ./.github/workflows/check_version_h.yml
+
   build_llvm_libraries_on_ubuntu_2204:
   build_llvm_libraries_on_ubuntu_2204:
     permissions:
     permissions:
       contents: read
       contents: read
@@ -675,7 +681,7 @@ jobs:
             test_option: $MEMORY64_TEST_OPTIONS
             test_option: $MEMORY64_TEST_OPTIONS
           - running_mode: "multi-tier-jit"
           - running_mode: "multi-tier-jit"
             test_option: $MEMORY64_TEST_OPTIONS
             test_option: $MEMORY64_TEST_OPTIONS
-          # aot, fast-interp, fast-jit, llvm-jit, multi-tier-jit don't support Multi Memory 
+          # aot, fast-interp, fast-jit, llvm-jit, multi-tier-jit don't support Multi Memory
           - running_mode: "aot"
           - running_mode: "aot"
             test_option: $MULTI_MEMORY_TEST_OPTIONS
             test_option: $MULTI_MEMORY_TEST_OPTIONS
           - running_mode: "fast-interp"
           - running_mode: "fast-interp"
@@ -817,7 +823,7 @@ jobs:
 
 
       - name: install dependencies
       - name: install dependencies
         run: |
         run: |
-          rustup target add wasm32-wasi
+          rustup target add wasm32-wasip1
           sudo apt update && sudo apt-get install -y lld ninja-build
           sudo apt update && sudo apt-get install -y lld ninja-build
           npm install
           npm install
         working-directory: test-tools/wamr-ide/VSCode-Extension
         working-directory: test-tools/wamr-ide/VSCode-Extension

+ 1 - 1
.github/workflows/supply_chain.yml

@@ -60,6 +60,6 @@ jobs:
 
 
       # Upload the results to GitHub's code scanning dashboard.
       # Upload the results to GitHub's code scanning dashboard.
       - name: "Upload to code-scanning"
       - name: "Upload to code-scanning"
-        uses: github/codeql-action/upload-sarif@db7177a1c66bea89f5e7ce32d0ea48bea4a0d460 # v2.2.4
+        uses: github/codeql-action/upload-sarif@0701025a8b1600e416be4f3bb5a830b1aa6af01e # v2.2.4
         with:
         with:
           sarif_file: results.sarif
           sarif_file: results.sarif

+ 3 - 0
CMakeLists.txt

@@ -174,6 +174,7 @@ if (WAMR_BUILD_STATIC)
       target_link_libraries(iwasm_static PRIVATE ntdll)
       target_link_libraries(iwasm_static PRIVATE ntdll)
     endif()
     endif()
 
 
+    set_version_info (iwasm_static)
     install (TARGETS iwasm_static ARCHIVE DESTINATION lib)
     install (TARGETS iwasm_static ARCHIVE DESTINATION lib)
 endif ()
 endif ()
 
 
@@ -196,6 +197,7 @@ if (WAMR_BUILD_SHARED)
       target_link_libraries(iwasm_shared PRIVATE ntdll)
       target_link_libraries(iwasm_shared PRIVATE ntdll)
     endif()
     endif()
 
 
+    set_version_info (iwasm_shared)
     install (TARGETS iwasm_shared LIBRARY DESTINATION lib)
     install (TARGETS iwasm_shared LIBRARY DESTINATION lib)
 endif ()
 endif ()
 
 
@@ -204,4 +206,5 @@ install (FILES
     ${WAMR_ROOT_DIR}/core/iwasm/include/wasm_c_api.h
     ${WAMR_ROOT_DIR}/core/iwasm/include/wasm_c_api.h
     ${WAMR_ROOT_DIR}/core/iwasm/include/wasm_export.h
     ${WAMR_ROOT_DIR}/core/iwasm/include/wasm_export.h
     ${WAMR_ROOT_DIR}/core/iwasm/include/lib_export.h
     ${WAMR_ROOT_DIR}/core/iwasm/include/lib_export.h
+    ${WAMR_ROOT_DIR}/core/version.h
     DESTINATION include)
     DESTINATION include)

+ 113 - 47
build-scripts/config_common.cmake

@@ -131,6 +131,9 @@ else ()
   unset (LLVM_AVAILABLE_LIBS)
   unset (LLVM_AVAILABLE_LIBS)
 endif ()
 endif ()
 
 
+# Version
+include (${WAMR_ROOT_DIR}/build-scripts/version.cmake)
+
 # Sanitizers
 # Sanitizers
 
 
 if (NOT DEFINED WAMR_BUILD_SANITIZER)
 if (NOT DEFINED WAMR_BUILD_SANITIZER)
@@ -167,16 +170,61 @@ if (NOT DEFINED WAMR_BUILD_SHRUNK_MEMORY)
   set (WAMR_BUILD_SHRUNK_MEMORY 1)
   set (WAMR_BUILD_SHRUNK_MEMORY 1)
 endif ()
 endif ()
 
 
+########################################
+# Default values
+########################################
+if (NOT DEFINED WAMR_BUILD_BULK_MEMORY)
+  set (WAMR_BUILD_BULK_MEMORY 1)
+endif ()
+
+if (NOT DEFINED WAMR_BUILD_EXCE_HANDLING)
+  set (WAMR_BUILD_EXCE_HANDLING 0)
+endif ()
+
+if (NOT DEFINED WAMR_BUILD_GC)
+  set (WAMR_BUILD_GC 0)
+endif ()
+
+if (NOT DEFINED WAMR_BUILD_MEMORY64)
+  set (WAMR_BUILD_MEMORY64 0)
+endif ()
+
+if (NOT DEFINED WAMR_BUILD_MULTI_MEMORY)
+  set (WAMR_BUILD_MULTI_MEMORY 0)
+endif ()
+
+if (NOT DEFINED WAMR_BUILD_SHARED_MEMORY)
+  set(WAMR_BUILD_SHARED_MEMORY 0)
+endif ()
+
+if (NOT DEFINED WAMR_BUILD_STRINGREF)
+  set(WAMR_BUILD_STRINGREF 0)
+endif ()
+
+if (NOT DEFINED WAMR_BUILD_TAIL_CALL)
+  set (WAMR_BUILD_TAIL_CALL 0)
+endif ()
+
+########################################
+# Compilation options to marco
 ########################################
 ########################################
 
 
 message ("-- Build Configurations:")
 message ("-- Build Configurations:")
 message ("     Build as target ${WAMR_BUILD_TARGET}")
 message ("     Build as target ${WAMR_BUILD_TARGET}")
 message ("     CMAKE_BUILD_TYPE " ${CMAKE_BUILD_TYPE})
 message ("     CMAKE_BUILD_TYPE " ${CMAKE_BUILD_TYPE})
+################## running mode ##################
 if (WAMR_BUILD_INTERP EQUAL 1)
 if (WAMR_BUILD_INTERP EQUAL 1)
   message ("     WAMR Interpreter enabled")
   message ("     WAMR Interpreter enabled")
 else ()
 else ()
   message ("     WAMR Interpreter disabled")
   message ("     WAMR Interpreter disabled")
 endif ()
 endif ()
+if ((WAMR_BUILD_FAST_INTERP EQUAL 1) AND (WAMR_BUILD_INTERP EQUAL 1))
+  add_definitions (-DWASM_ENABLE_FAST_INTERP=1)
+  message ("     Fast interpreter enabled")
+else ()
+  add_definitions (-DWASM_ENABLE_FAST_INTERP=0)
+  message ("     Fast interpreter disabled")
+endif ()
 if (WAMR_BUILD_AOT EQUAL 1)
 if (WAMR_BUILD_AOT EQUAL 1)
   message ("     WAMR AOT enabled")
   message ("     WAMR AOT enabled")
 else ()
 else ()
@@ -207,6 +255,16 @@ if (WAMR_BUILD_FAST_JIT EQUAL 1 AND WAMR_BUILD_JIT EQUAL 1
     AND WAMR_BUILD_LAZY_JIT EQUAL 1)
     AND WAMR_BUILD_LAZY_JIT EQUAL 1)
   message ("     Multi-tier JIT enabled")
   message ("     Multi-tier JIT enabled")
 endif ()
 endif ()
+################## test modes ##################
+if (WAMR_BUILD_SPEC_TEST EQUAL 1)
+  add_definitions (-DWASM_ENABLE_SPEC_TEST=1)
+  message ("     spec test compatible mode is on")
+endif ()
+if (WAMR_BUILD_WASI_TEST EQUAL 1)
+  add_definitions (-DWASM_ENABLE_WASI_TEST=1)
+  message ("     wasi test compatible mode is on")
+endif ()
+################## native ##################
 if (WAMR_BUILD_LIBC_BUILTIN EQUAL 1)
 if (WAMR_BUILD_LIBC_BUILTIN EQUAL 1)
   message ("     Libc builtin enabled")
   message ("     Libc builtin enabled")
 else ()
 else ()
@@ -219,13 +277,25 @@ elseif (WAMR_BUILD_LIBC_WASI EQUAL 1)
 else ()
 else ()
   message ("     Libc WASI disabled")
   message ("     Libc WASI disabled")
 endif ()
 endif ()
-if ((WAMR_BUILD_FAST_INTERP EQUAL 1) AND (WAMR_BUILD_INTERP EQUAL 1))
-  add_definitions (-DWASM_ENABLE_FAST_INTERP=1)
-  message ("     Fast interpreter enabled")
-else ()
-  add_definitions (-DWASM_ENABLE_FAST_INTERP=0)
-  message ("     Fast interpreter disabled")
+if (WAMR_BUILD_THREAD_MGR EQUAL 1)
+  message ("     Thread manager enabled")
+endif ()
+if (WAMR_BUILD_LIB_PTHREAD EQUAL 1)
+  message ("     Lib pthread enabled")
 endif ()
 endif ()
+if (WAMR_BUILD_LIB_PTHREAD_SEMAPHORE EQUAL 1)
+  message ("     Lib pthread semaphore enabled")
+endif ()
+if (WAMR_BUILD_LIB_WASI_THREADS EQUAL 1)
+  message ("     Lib wasi-threads enabled")
+endif ()
+if (WAMR_BUILD_LIBC_EMCC EQUAL 1)
+  message ("     Libc emcc enabled")
+endif ()
+if (WAMR_BUILD_LIB_RATS EQUAL 1)
+  message ("     Lib rats enabled")
+endif()
+################## WAMR features ##################
 if (WAMR_BUILD_MULTI_MODULE EQUAL 1)
 if (WAMR_BUILD_MULTI_MODULE EQUAL 1)
   add_definitions (-DWASM_ENABLE_MULTI_MODULE=1)
   add_definitions (-DWASM_ENABLE_MULTI_MODULE=1)
   message ("     Multiple modules enabled")
   message ("     Multiple modules enabled")
@@ -233,24 +303,10 @@ else ()
   add_definitions (-DWASM_ENABLE_MULTI_MODULE=0)
   add_definitions (-DWASM_ENABLE_MULTI_MODULE=0)
   message ("     Multiple modules disabled")
   message ("     Multiple modules disabled")
 endif ()
 endif ()
-if (WAMR_BUILD_SPEC_TEST EQUAL 1)
-  add_definitions (-DWASM_ENABLE_SPEC_TEST=1)
-  message ("     spec test compatible mode is on")
-endif ()
-if (WAMR_BUILD_WASI_TEST EQUAL 1)
-  add_definitions (-DWASM_ENABLE_WASI_TEST=1)
-  message ("     wasi test compatible mode is on")
-endif ()
-if (NOT DEFINED WAMR_BUILD_BULK_MEMORY)
-  # Enable bulk memory by default
-  set (WAMR_BUILD_BULK_MEMORY 1)
-endif ()
 if (WAMR_BUILD_BULK_MEMORY EQUAL 1)
 if (WAMR_BUILD_BULK_MEMORY EQUAL 1)
   add_definitions (-DWASM_ENABLE_BULK_MEMORY=1)
   add_definitions (-DWASM_ENABLE_BULK_MEMORY=1)
-  message ("     Bulk memory feature enabled")
 else ()
 else ()
   add_definitions (-DWASM_ENABLE_BULK_MEMORY=0)
   add_definitions (-DWASM_ENABLE_BULK_MEMORY=0)
-  message ("     Bulk memory feature disabled")
 endif ()
 endif ()
 if (WAMR_BUILD_SHARED_MEMORY EQUAL 1)
 if (WAMR_BUILD_SHARED_MEMORY EQUAL 1)
   add_definitions (-DWASM_ENABLE_SHARED_MEMORY=1)
   add_definitions (-DWASM_ENABLE_SHARED_MEMORY=1)
@@ -270,31 +326,11 @@ if (WAMR_BUILD_MEMORY64 EQUAL 1)
   endif()
   endif()
   add_definitions (-DWASM_ENABLE_MEMORY64=1)
   add_definitions (-DWASM_ENABLE_MEMORY64=1)
   set (WAMR_DISABLE_HW_BOUND_CHECK 1)
   set (WAMR_DISABLE_HW_BOUND_CHECK 1)
-  message ("     Memory64 memory enabled")
 endif ()
 endif ()
 if (WAMR_BUILD_MULTI_MEMORY EQUAL 1)
 if (WAMR_BUILD_MULTI_MEMORY EQUAL 1)
   add_definitions (-DWASM_ENABLE_MULTI_MEMORY=1)
   add_definitions (-DWASM_ENABLE_MULTI_MEMORY=1)
-  message ("     Multi memory enabled")
   set (WAMR_BUILD_DEBUG_INTERP 0)
   set (WAMR_BUILD_DEBUG_INTERP 0)
 endif ()
 endif ()
-if (WAMR_BUILD_THREAD_MGR EQUAL 1)
-  message ("     Thread manager enabled")
-endif ()
-if (WAMR_BUILD_LIB_PTHREAD EQUAL 1)
-  message ("     Lib pthread enabled")
-endif ()
-if (WAMR_BUILD_LIB_PTHREAD_SEMAPHORE EQUAL 1)
-  message ("     Lib pthread semaphore enabled")
-endif ()
-if (WAMR_BUILD_LIB_WASI_THREADS EQUAL 1)
-  message ("     Lib wasi-threads enabled")
-endif ()
-if (WAMR_BUILD_LIBC_EMCC EQUAL 1)
-  message ("     Libc emcc enabled")
-endif ()
-if (WAMR_BUILD_LIB_RATS EQUAL 1)
-  message ("     Lib rats enabled")
-endif()
 if (WAMR_BUILD_MINI_LOADER EQUAL 1)
 if (WAMR_BUILD_MINI_LOADER EQUAL 1)
   add_definitions (-DWASM_ENABLE_MINI_LOADER=1)
   add_definitions (-DWASM_ENABLE_MINI_LOADER=1)
   message ("     WASM mini loader enabled")
   message ("     WASM mini loader enabled")
@@ -324,7 +360,6 @@ endif ()
 if (WAMR_BUILD_SIMD EQUAL 1)
 if (WAMR_BUILD_SIMD EQUAL 1)
   if (NOT WAMR_BUILD_TARGET MATCHES "RISCV64.*")
   if (NOT WAMR_BUILD_TARGET MATCHES "RISCV64.*")
     add_definitions (-DWASM_ENABLE_SIMD=1)
     add_definitions (-DWASM_ENABLE_SIMD=1)
-    message ("     SIMD enabled")
   else ()
   else ()
     message ("     SIMD disabled due to not supported on target RISCV64")
     message ("     SIMD disabled due to not supported on target RISCV64")
   endif ()
   endif ()
@@ -354,16 +389,11 @@ if (WAMR_BUILD_DUMP_CALL_STACK EQUAL 1)
 endif ()
 endif ()
 if (WAMR_BUILD_TAIL_CALL EQUAL 1)
 if (WAMR_BUILD_TAIL_CALL EQUAL 1)
   add_definitions (-DWASM_ENABLE_TAIL_CALL=1)
   add_definitions (-DWASM_ENABLE_TAIL_CALL=1)
-  message ("     Tail call enabled")
 endif ()
 endif ()
 if (WAMR_BUILD_REF_TYPES EQUAL 1)
 if (WAMR_BUILD_REF_TYPES EQUAL 1)
   add_definitions (-DWASM_ENABLE_REF_TYPES=1)
   add_definitions (-DWASM_ENABLE_REF_TYPES=1)
-  message ("     Reference types enabled")
-else ()
-  message ("     Reference types disabled")
 endif ()
 endif ()
 if (WAMR_BUILD_GC EQUAL 1)
 if (WAMR_BUILD_GC EQUAL 1)
-  message ("     GC enabled")
   if (WAMR_TEST_GC EQUAL 1)
   if (WAMR_TEST_GC EQUAL 1)
     message("      GC testing enabled")
     message("      GC testing enabled")
   endif()
   endif()
@@ -375,7 +405,6 @@ else ()
   message ("     GC performance profiling disabled")
   message ("     GC performance profiling disabled")
 endif ()
 endif ()
 if (WAMR_BUILD_STRINGREF EQUAL 1)
 if (WAMR_BUILD_STRINGREF EQUAL 1)
-  message ("     Stringref enabled")
   if (NOT DEFINED WAMR_STRINGREF_IMPL_SOURCE)
   if (NOT DEFINED WAMR_STRINGREF_IMPL_SOURCE)
     message ("       Using WAMR builtin implementation for stringref")
     message ("       Using WAMR builtin implementation for stringref")
   else ()
   else ()
@@ -610,4 +639,41 @@ if (WAMR_BUILD_SHRUNK_MEMORY EQUAL 1)
 else ()
 else ()
   add_definitions (-DWASM_ENABLE_SHRUNK_MEMORY=0)
   add_definitions (-DWASM_ENABLE_SHRUNK_MEMORY=0)
   message ("     Shrunk memory disabled")
   message ("     Shrunk memory disabled")
+endif()
+if (WAMR_BUILD_AOT_VALIDATOR EQUAL 1)
+  message ("     AOT validator enabled")
+  add_definitions (-DWASM_ENABLE_AOT_VALIDATOR=1)
 endif ()
 endif ()
+
+########################################
+# Show Phase4 Wasm proposals status.
+########################################
+
+message (
+"-- About Wasm Proposals:\n"
+"     Always-on:\n"
+"       \"Extended Constant Expressions\"\n"
+"       \"Multi-value\"\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"
+"       \"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"
+"       \"Memory64\" via WAMR_BUILD_MEMORY64: ${WAMR_BUILD_MEMORY64}\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"
+"       \"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"
+"       \"JS String Builtins\"\n"
+"       \"Relaxed SIMD\"\n"
+)

+ 28 - 0
build-scripts/version.cmake

@@ -0,0 +1,28 @@
+# Copyright (C) 2019 Intel Corporation.  All rights reserved.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+
+if(NOT WAMR_ROOT_DIR)
+  # if from wamr-compiler
+  set(WAMR_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..)
+endif()
+
+set(WAMR_VERSION_MAJOR 2)
+set(WAMR_VERSION_MINOR 2)
+set(WAMR_VERSION_PATCH 0)
+
+message("-- WAMR version: ${WAMR_VERSION_MAJOR}.${WAMR_VERSION_MINOR}.${WAMR_VERSION_PATCH}")
+
+# Configure the version header file
+configure_file(
+  ${WAMR_ROOT_DIR}/core/version.h.in
+  ${WAMR_ROOT_DIR}/core/version.h
+)
+
+# Set the library version and SOVERSION
+function(set_version_info target)
+  set_target_properties(${target}
+    PROPERTIES
+      VERSION ${WAMR_VERSION_MAJOR}.${WAMR_VERSION_MINOR}.${WAMR_VERSION_PATCH}
+      SOVERSION ${WAMR_VERSION_MAJOR}
+)
+endfunction()

+ 4 - 0
core/config.h

@@ -702,4 +702,8 @@
 #define WASM_ENABLE_SHRUNK_MEMORY 1
 #define WASM_ENABLE_SHRUNK_MEMORY 1
 #endif
 #endif
 
 
+#ifndef WASM_ENABLE_AOT_VALIDATOR
+#define WASM_ENABLE_AOT_VALIDATOR 0
+#endif
+
 #endif /* end of _CONFIG_H_ */
 #endif /* end of _CONFIG_H_ */

+ 10 - 3
core/iwasm/aot/aot_loader.c

@@ -10,6 +10,9 @@
 #include "../common/wasm_native.h"
 #include "../common/wasm_native.h"
 #include "../common/wasm_loader_common.h"
 #include "../common/wasm_loader_common.h"
 #include "../compilation/aot.h"
 #include "../compilation/aot.h"
+#if WASM_ENABLE_AOT_VALIDATOR != 0
+#include "aot_validator.h"
+#endif
 
 
 #if WASM_ENABLE_DEBUG_AOT != 0
 #if WASM_ENABLE_DEBUG_AOT != 0
 #include "debug/elf_parser.h"
 #include "debug/elf_parser.h"
@@ -1106,9 +1109,6 @@ load_memory_info(const uint8 **p_buf, const uint8 *buf_end, AOTModule *module,
     const uint8 *buf = *p_buf;
     const uint8 *buf = *p_buf;
 
 
     read_uint32(buf, buf_end, module->import_memory_count);
     read_uint32(buf, buf_end, module->import_memory_count);
-    /* We don't support import_memory_count > 0 currently */
-    if (module->import_memory_count > 0)
-        return false;
 
 
     read_uint32(buf, buf_end, module->memory_count);
     read_uint32(buf, buf_end, module->memory_count);
     total_size = sizeof(AOTMemory) * (uint64)module->memory_count;
     total_size = sizeof(AOTMemory) * (uint64)module->memory_count;
@@ -4403,6 +4403,13 @@ aot_load_from_aot_file(const uint8 *buf, uint32 size, const LoadArgs *args,
     os_thread_jit_write_protect_np(true); /* Make memory executable */
     os_thread_jit_write_protect_np(true); /* Make memory executable */
     os_icache_flush(module->code, module->code_size);
     os_icache_flush(module->code, module->code_size);
 
 
+#if WASM_ENABLE_AOT_VALIDATOR != 0
+    if (!aot_module_validate(module, error_buf, error_buf_size)) {
+        aot_unload(module);
+        return NULL;
+    }
+#endif /* WASM_ENABLE_AOT_VALIDATOR != 0 */
+
     LOG_VERBOSE("Load module success.\n");
     LOG_VERBOSE("Load module success.\n");
     return module;
     return module;
 }
 }

+ 0 - 2
core/iwasm/aot/aot_perf_map.c

@@ -7,7 +7,6 @@
 #include "bh_log.h"
 #include "bh_log.h"
 #include "bh_platform.h"
 #include "bh_platform.h"
 
 
-#if WASM_ENABLE_LINUX_PERF != 0
 struct func_info {
 struct func_info {
     uint32 idx;
     uint32 idx;
     void *ptr;
     void *ptr;
@@ -117,4 +116,3 @@ quit:
 
 
     return ret;
     return ret;
 }
 }
-#endif /* WASM_ENABLE_LINUX_PERF != 0 */

+ 2 - 2
core/iwasm/aot/aot_runtime.c

@@ -2630,7 +2630,7 @@ aot_call_function(WASMExecEnv *exec_env, AOTFunctionInstance *function,
         ret = invoke_native_internal(exec_env, func_ptr, func_type, NULL,
         ret = invoke_native_internal(exec_env, func_ptr, func_type, NULL,
                                      attachment, argv, argc, argv);
                                      attachment, argv, argc, argv);
 
 
-        if (aot_copy_exception(module_inst, NULL)) {
+        if (!ret) {
 #ifdef AOT_STACK_FRAME_DEBUG
 #ifdef AOT_STACK_FRAME_DEBUG
             if (aot_stack_frame_callback) {
             if (aot_stack_frame_callback) {
                 aot_stack_frame_callback(exec_env);
                 aot_stack_frame_callback(exec_env);
@@ -2651,7 +2651,7 @@ aot_call_function(WASMExecEnv *exec_env, AOTFunctionInstance *function,
             aot_free_frame(exec_env);
             aot_free_frame(exec_env);
 #endif
 #endif
 
 
-        return ret && !aot_copy_exception(module_inst, NULL) ? true : false;
+        return ret;
     }
     }
 }
 }
 
 

+ 45 - 0
core/iwasm/aot/aot_validator.c

@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2025 Intel Corporation. All rights reserved.
+ * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+ */
+
+#include "aot_validator.h"
+
+static void
+set_error_buf(char *error_buf, uint32 error_buf_size, const char *string)
+{
+    if (error_buf != NULL) {
+        snprintf(error_buf, error_buf_size,
+                 "AOT module load failed: from validator. %s", string);
+    }
+}
+
+static bool
+aot_memory_info_validate(const AOTModule *module, char *error_buf,
+                         uint32 error_buf_size)
+{
+    if (module->import_memory_count > 0) {
+        set_error_buf(error_buf, error_buf_size,
+                      "import memory is not supported");
+        return false;
+    }
+
+    if (module->memory_count < 1) {
+        set_error_buf(error_buf, error_buf_size,
+                      "there should be >=1 memory in one aot module");
+        return false;
+    }
+
+    return true;
+}
+
+bool
+aot_module_validate(const AOTModule *module, char *error_buf,
+                    uint32 error_buf_size)
+{
+    if (!aot_memory_info_validate(module, error_buf, error_buf_size)) {
+        return false;
+    }
+
+    return true;
+}

+ 15 - 0
core/iwasm/aot/aot_validator.h

@@ -0,0 +1,15 @@
+/*
+ * Copyright (C) 2025 Intel Corporation. All rights reserved.
+ * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+ */
+
+#ifndef _AOT_VALIDATOR_H_
+#define _AOT_VALIDATOR_H_
+
+#include "aot_runtime.h"
+
+bool
+aot_module_validate(const AOTModule *module, char *error_buf,
+                    uint32 error_buf_size);
+
+#endif /* _AOT_VALIDATOR_H_ */

+ 13 - 1
core/iwasm/aot/iwasm_aot.cmake

@@ -7,7 +7,19 @@ add_definitions (-DWASM_ENABLE_AOT=1)
 
 
 include_directories (${IWASM_AOT_DIR})
 include_directories (${IWASM_AOT_DIR})
 
 
-file (GLOB c_source_all ${IWASM_AOT_DIR}/*.c)
+list (APPEND c_source_all
+  ${IWASM_AOT_DIR}/aot_intrinsic.c
+  ${IWASM_AOT_DIR}/aot_loader.c
+  ${IWASM_AOT_DIR}/aot_runtime.c
+)
+
+if (WAMR_BUILD_LINUX_PERF EQUAL 1)
+  list (APPEND c_source_all ${IWASM_AOT_DIR}/aot_perf_map.c)
+endif ()
+
+if (WAMR_BUILD_AOT_VALIDATOR EQUAL 1)
+  list (APPEND c_source_all ${IWASM_AOT_DIR}/aot_validator.c)
+endif ()
 
 
 if (WAMR_BUILD_TARGET STREQUAL "X86_64" OR WAMR_BUILD_TARGET STREQUAL "AMD_64")
 if (WAMR_BUILD_TARGET STREQUAL "X86_64" OR WAMR_BUILD_TARGET STREQUAL "AMD_64")
   set (arch_source ${IWASM_AOT_DIR}/arch/aot_reloc_x86_64.c)
   set (arch_source ${IWASM_AOT_DIR}/arch/aot_reloc_x86_64.c)

+ 9 - 9
core/iwasm/libraries/wasi-nn/test/Dockerfile.wasi-nn-smoke

@@ -13,7 +13,7 @@ RUN apt-get update \
   && apt-get upgrade -y \
   && apt-get upgrade -y \
   && apt-get install -y --no-install-recommends cmake
   && apt-get install -y --no-install-recommends cmake
 
 
-RUN rustup target add wasm32-wasi
+RUN rustup target add wasm32-wasip1
 
 
 #
 #
 # Openvino
 # Openvino
@@ -37,10 +37,10 @@ WORKDIR /workspaces/wasi-nn
 RUN git clone --depth 1 https://github.com/bytecodealliance/wasi-nn.git .
 RUN git clone --depth 1 https://github.com/bytecodealliance/wasi-nn.git .
 
 
 WORKDIR /workspaces/wasi-nn/rust/examples/classification-example/
 WORKDIR /workspaces/wasi-nn/rust/examples/classification-example/
-RUN cargo build --target=wasm32-wasi
+RUN cargo build --target=wasm32-wasip1
 
 
 WORKDIR /workspaces/wasi-nn/rust/examples/classification-example/build
 WORKDIR /workspaces/wasi-nn/rust/examples/classification-example/build
-RUN cp ../target/wasm32-wasi/debug/wasi-nn-example.wasm . \
+RUN cp ../target/wasm32-wasip1/debug/wasi-nn-example.wasm . \
   && wget -q --no-clobber https://github.com/intel/openvino-rs/raw/main/crates/openvino/tests/fixtures/mobilenet/mobilenet.xml \
   && wget -q --no-clobber https://github.com/intel/openvino-rs/raw/main/crates/openvino/tests/fixtures/mobilenet/mobilenet.xml \
   && wget -q --no-clobber https://github.com/intel/openvino-rs/raw/main/crates/openvino/tests/fixtures/mobilenet/mobilenet.bin
   && wget -q --no-clobber https://github.com/intel/openvino-rs/raw/main/crates/openvino/tests/fixtures/mobilenet/mobilenet.bin
 # There are model files(mobilenet*) and wasm files(wasi-nn-example.wasm) in the directory,
 # There are model files(mobilenet*) and wasm files(wasi-nn-example.wasm) in the directory,
@@ -67,30 +67,30 @@ RUN git apply ./bump_wasi_nn_to_0_6_0.patch
 # recompile with wasi-nn 0.6.0
 # recompile with wasi-nn 0.6.0
 WORKDIR /workspaces/wasmedge-wasinn-examples/openvino-mobilenet-image/
 WORKDIR /workspaces/wasmedge-wasinn-examples/openvino-mobilenet-image/
 RUN pushd rust \
 RUN pushd rust \
-  && cargo build --target=wasm32-wasi \
+  && cargo build --target=wasm32-wasip1 \
   && popd \
   && popd \
   && ./download_mobilenet.sh . \
   && ./download_mobilenet.sh . \
   && ls -l mobilenet.xml mobilenet.bin
   && ls -l mobilenet.xml mobilenet.bin
 
 
 WORKDIR /workspaces/wasmedge-wasinn-examples/openvino-mobilenet-raw/
 WORKDIR /workspaces/wasmedge-wasinn-examples/openvino-mobilenet-raw/
 RUN pushd rust \
 RUN pushd rust \
-  && cargo build --target=wasm32-wasi \
+  && cargo build --target=wasm32-wasip1 \
   && popd \
   && popd \
   && ./download_mobilenet.sh . \
   && ./download_mobilenet.sh . \
   && ls -l mobilenet.xml mobilenet.bin tensor-1x224x224x3-f32.bgr
   && ls -l mobilenet.xml mobilenet.bin tensor-1x224x224x3-f32.bgr
 
 
 WORKDIR /workspaces/wasmedge-wasinn-examples/openvino-road-segmentation-adas/
 WORKDIR /workspaces/wasmedge-wasinn-examples/openvino-road-segmentation-adas/
 RUN pushd openvino-road-seg-adas \
 RUN pushd openvino-road-seg-adas \
-  && cargo build --target=wasm32-wasi
+  && cargo build --target=wasm32-wasip1
 
 
 WORKDIR /workspaces/wasmedge-wasinn-examples/tflite-birds_v1-image/
 WORKDIR /workspaces/wasmedge-wasinn-examples/tflite-birds_v1-image/
 RUN pushd rust \
 RUN pushd rust \
-  && cargo build --target=wasm32-wasi
+  && cargo build --target=wasm32-wasip1
 
 
 # mount models when running
 # mount models when running
 WORKDIR /workspaces/wasmedge-wasinn-examples/wasmedge-ggml/qwen
 WORKDIR /workspaces/wasmedge-wasinn-examples/wasmedge-ggml/qwen
 RUN wget --progress=dot:giga https://www.modelscope.cn/models/qwen/Qwen1.5-0.5B-Chat-GGUF/resolve/master/qwen1_5-0_5b-chat-q2_k.gguf
 RUN wget --progress=dot:giga https://www.modelscope.cn/models/qwen/Qwen1.5-0.5B-Chat-GGUF/resolve/master/qwen1_5-0_5b-chat-q2_k.gguf
-RUN cargo build --target=wasm32-wasi
+RUN cargo build --target=wasm32-wasip1
 
 
 #
 #
 # iwasm. build from source
 # iwasm. build from source
@@ -107,7 +107,7 @@ RUN OpenVINO_DIR=/usr/lib/openvino-2023.2.0 \
     -DWAMR_BUILD_WASI_NN_LLAMACPP=1 \
     -DWAMR_BUILD_WASI_NN_LLAMACPP=1 \
   && cmake --build build \
   && cmake --build build \
   && cmake --install build
   && cmake --install build
- 
+
 ENV LD_LIBRARY_PATH=/usr/local/lib
 ENV LD_LIBRARY_PATH=/usr/local/lib
 
 
 # add smoke test script
 # add smoke test script

+ 5 - 5
core/iwasm/libraries/wasi-nn/test/run_smoke_test.py

@@ -53,7 +53,7 @@ def execute_openvino_road_segmentation_adas_once(
     """
     """
 
 
     wasm_file = (
     wasm_file = (
-        "./openvino-road-seg-adas/target/wasm32-wasi/debug/openvino-road-seg-adas.wasm"
+        "./openvino-road-seg-adas/target/wasm32-wasip1/debug/openvino-road-seg-adas.wasm"
     )
     )
     wasm_args = [
     wasm_args = [
         "./model/road-segmentation-adas-0001.xml",
         "./model/road-segmentation-adas-0001.xml",
@@ -70,7 +70,7 @@ def execute_openvino_mobilenet_raw_once(
     execute openvino-mobilenet-image with iwasm and wasmedge
     execute openvino-mobilenet-image with iwasm and wasmedge
     """
     """
 
 
-    wasm_file = "./rust/target/wasm32-wasi/debug/wasmedge-wasinn-example-mobilenet.wasm"
+    wasm_file = "./rust/target/wasm32-wasip1/debug/wasmedge-wasinn-example-mobilenet.wasm"
     wasm_args = [
     wasm_args = [
         "mobilenet.xml",
         "mobilenet.xml",
         "mobilenet.bin",
         "mobilenet.bin",
@@ -87,7 +87,7 @@ def execute_openvino_mobilenet_image_once(
     """
     """
 
 
     wasm_file = (
     wasm_file = (
-        "./rust/target/wasm32-wasi/debug/wasmedge-wasinn-example-mobilenet-image.wasm"
+        "./rust/target/wasm32-wasip1/debug/wasmedge-wasinn-example-mobilenet-image.wasm"
     )
     )
     wasm_args = [
     wasm_args = [
         "mobilenet.xml",
         "mobilenet.xml",
@@ -105,7 +105,7 @@ def execute_tflite_birds_v1_image_once(
     """
     """
 
 
     wasm_file = (
     wasm_file = (
-        "rust/target/wasm32-wasi/debug/wasmedge-wasinn-example-tflite-bird-image.wasm"
+        "rust/target/wasm32-wasip1/debug/wasmedge-wasinn-example-tflite-bird-image.wasm"
     )
     )
     wasm_args = ["lite-model_aiy_vision_classifier_birds_V1_3.tflite", "bird.jpg"]
     wasm_args = ["lite-model_aiy_vision_classifier_birds_V1_3.tflite", "bird.jpg"]
     return execute_once(runtime_bin, runtime_args, wasm_file, wasm_args, cwd)
     return execute_once(runtime_bin, runtime_args, wasm_file, wasm_args, cwd)
@@ -262,7 +262,7 @@ def execute_openvino_road_segmentation_adas(
 
 
 def execute_wasmedge_ggml_qwen(iwasm_bin: str, wasmedge_bin: str, cwd: Path):
 def execute_wasmedge_ggml_qwen(iwasm_bin: str, wasmedge_bin: str, cwd: Path):
     iwasm_args = ["--dir=."]
     iwasm_args = ["--dir=."]
-    wasm_file = ["./target/wasm32-wasi/debug/wasmedge-ggml-qwen.wasm"]
+    wasm_file = ["./target/wasm32-wasip1/debug/wasmedge-ggml-qwen.wasm"]
     wasm_args = ["./qwen1_5-0_5b-chat-q2_k.gguf"]
     wasm_args = ["./qwen1_5-0_5b-chat-q2_k.gguf"]
 
 
     cmd = [iwasm_bin]
     cmd = [iwasm_bin]

+ 13 - 0
core/version.h

@@ -3,9 +3,22 @@
  * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  */
  */
 
 
+/*
+ * version.h.in is a template file.  version.h is a generated file.
+ * Please do not edit both files directly.
+ *
+ * Any changes to the version should be done in build-scripts/version.cmake.
+ *
+ * Continue to maintain the version.h for certain embedded platforms.
+ */
+
 #ifndef _WAMR_VERSION_H_
 #ifndef _WAMR_VERSION_H_
 #define _WAMR_VERSION_H_
 #define _WAMR_VERSION_H_
+
+/* clang-format off */
 #define WAMR_VERSION_MAJOR 2
 #define WAMR_VERSION_MAJOR 2
 #define WAMR_VERSION_MINOR 2
 #define WAMR_VERSION_MINOR 2
 #define WAMR_VERSION_PATCH 0
 #define WAMR_VERSION_PATCH 0
+/* clang-format on */
+
 #endif
 #endif

+ 24 - 0
core/version.h.in

@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2019 Intel Corporation.  All rights reserved.
+ * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+ */
+
+/*
+ * version.h.in is a template file.  version.h is a generated file.
+ * Please do not edit both files directly.
+ *
+ * Any changes to the version should be done in build-scripts/version.cmake.
+ *
+ * Continue to maintain the version.h for certain embedded platforms.
+ */
+
+#ifndef _WAMR_VERSION_H_
+#define _WAMR_VERSION_H_
+
+/* clang-format off */
+#define WAMR_VERSION_MAJOR @WAMR_VERSION_MAJOR@
+#define WAMR_VERSION_MINOR @WAMR_VERSION_MINOR@
+#define WAMR_VERSION_PATCH @WAMR_VERSION_PATCH@
+/* clang-format on */
+
+#endif

+ 5 - 5
doc/build_wasm_app.md

@@ -16,24 +16,24 @@ For [AssemblyScript](https://github.com/AssemblyScript/assemblyscript), please r
 
 
 For Rust, please refer to [Install Rust and Cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html) to install *cargo*, *rustc* and *rustup*. By default they are under ~/.cargo/bin.
 For Rust, please refer to [Install Rust and Cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html) to install *cargo*, *rustc* and *rustup*. By default they are under ~/.cargo/bin.
 
 
-And then run such a command to install `wasm32-wasi` target.
+And then run such a command to install `wasm32-wasip1` target.
 
 
 ``` bash
 ``` bash
-$ rustup target add wasm32-wasi
+$ rustup target add wasm32-wasip1
 ```
 ```
 
 
 To build WASM applications, run
 To build WASM applications, run
 
 
 ``` bash
 ``` bash
-$ cargo build --target wasm32-wasi
+$ cargo build --target wasm32-wasip1
 ```
 ```
 
 
-The output files are under `target/wasm32-wasi`.
+The output files are under `target/wasm32-wasip1`.
 
 
 To build a release version
 To build a release version
 
 
 ``` bash
 ``` bash
-$ cargo build --release --target wasm32-wasi
+$ cargo build --release --target wasm32-wasip1
 ```
 ```
 
 
 
 

+ 0 - 21
doc/semantic_version.md

@@ -1,21 +0,0 @@
-# WAMR uses semantic versioning
-
-WAMR uses the _semantic versioning_ to replace the current _date versioning_ system.
-
-There are three parts in the new version string:
-
-- _major_. Any incompatible modification, on both ABI and APIs, will lead an increment
-  in the value of _major_. APIs includes: `wasm_export.h`, `wasm_c_api.h`,
-  _sections in AOT files_, and so on.
-- _minor_. It represents new features. It includes not just MVP or POST-MVP features
-  but also WASI features and WAMR private ones.
-- _patch_. It represents patches.
-
-## Legacy versions
-
-All legacy versions(tags) will keep their current status. No existing release names
-and links will be changed.
-
-## Reference
-
-- [Semantic Versioning 2.0.0](https://semver.org/)

+ 33 - 0
doc/stability_release.md

@@ -0,0 +1,33 @@
+# Semantic Versioning
+
+WAMR has adopted [semantic versioning](https://semver.org/) to replace the former *date versioning system*.  The new version string consists of three parts:
+
+- *major*: Any change that is not compatible with previous versions, affecting either the ABI or APIs, will result in an increase in the major version number. APIs include: wasm_export.h, wasm_c_api.h, sections in AOT files, among others.
+- *minor*: This number increases with the addition of new features. This encompasses not only MVP (Minimum Viable Product) or POST-MVP features but also WebAssembly System Interface (WASI) features and WAMR-specific features.
+- *patch*: This number is incremented for patches.
+
+## Legacy releases
+
+All previous versions (tags) will retain their current status. There will be no changes to existing release names and links.
+
+# Release Process
+
+WAMR has been deployed across various devices. A frequent release cycle would strain customers' testing resources and add extra deployment work. Two factors can trigger a new WAMR release:
+
+- Community requests, particularly following the integration of significant and new features.
+- Security vulnerabilities and critical bug fixes that ensure correctness.
+
+Patch releases will be made only to address security vulnerabilities and critical issues related to default behavior in prior releases.
+
+Once a release decision has been made:
+
+- Create a PR that:
+  1. Modifies *build-scripts/version.cmake*.
+  2. Executes cmake configuration to update the version.
+  3. Updates *RELEASE_NOTES.md*.
+- A checklist of the PR includes
+  - [ ] *build-scripts/version.cmake*
+  - [ ] *core/version.h*
+  - [ ] *RELEASE_NOTES.md*
+- Once the PR is merged, create a new tag.
+- Initiate the release process by triggering *the binary release processes* in *Actions*.

+ 1 - 1
doc/stability_wasm_proposals.md

@@ -35,7 +35,7 @@ Users can turn those features on or off by using compilation options. If a relev
 | Multiple memories[^3]         | Yes        | `WAMR_BUILD_MULTI_MEMORY`  |
 | Multiple memories[^3]         | Yes        | `WAMR_BUILD_MULTI_MEMORY`  |
 | Reference-Typed Strings       | No         | `WAMR_BUILD_STRINGREF`     |
 | Reference-Typed Strings       | No         | `WAMR_BUILD_STRINGREF`     |
 | Tail call                     | Yes        | `WAMR_BUILD_TAIL_CALL`     |
 | Tail call                     | Yes        | `WAMR_BUILD_TAIL_CALL`     |
-| Thread[^4]                    | Yes        | `WAMR_BUILD_SHARED_MEMORY` |
+| Threads[^4]                   | Yes        | `WAMR_BUILD_SHARED_MEMORY` |
 | Typed Function References     | Yes        | `WAMR_BUILD_GC`            |
 | Typed Function References     | Yes        | `WAMR_BUILD_GC`            |
 
 
 [^2]:
 [^2]:

+ 3 - 0
product-mini/platforms/android/CMakeLists.txt

@@ -107,6 +107,8 @@ include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)
 
 
 add_library(vmlib ${WAMR_RUNTIME_LIB_SOURCE})
 add_library(vmlib ${WAMR_RUNTIME_LIB_SOURCE})
 
 
+set_version_info (vmlib)
+
 set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections -pie -fPIE")
 set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections -pie -fPIE")
 
 
 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wformat -Wformat-security")
 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wformat -Wformat-security")
@@ -135,6 +137,7 @@ endif()
 
 
 set (distribution_DIR ${CMAKE_BINARY_DIR}/distribution)
 set (distribution_DIR ${CMAKE_BINARY_DIR}/distribution)
 set_target_properties (iwasm PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${distribution_DIR}/wasm/lib")
 set_target_properties (iwasm PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${distribution_DIR}/wasm/lib")
+set_version_info (iwasm)
 
 
 add_custom_command (TARGET iwasm POST_BUILD
 add_custom_command (TARGET iwasm POST_BUILD
         COMMAND "${CMAKE_COMMAND}" -E copy_directory "${WAMR_ROOT_DIR}/core/iwasm/include" "${distribution_DIR}/wasm/include/"
         COMMAND "${CMAKE_COMMAND}" -E copy_directory "${WAMR_ROOT_DIR}/core/iwasm/include" "${distribution_DIR}/wasm/include/"

+ 48 - 0
product-mini/platforms/common/wasm_proposal.c

@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2023 Amazon.com Inc. or its affiliates. All rights reserved.
+ * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+ */
+
+#include <stdio.h>
+
+void
+wasm_proposal_print_status(void)
+{
+    printf("About Wasm Proposals:\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("  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",
+           WASM_ENABLE_SIMD);
+    printf("    - Garbage Collection via WASM_ENABLE_GC: %u\n", WASM_ENABLE_GC);
+    printf(
+        "    - Legacy Exception Handling via WASM_ENABLE_EXCE_HANDLING: %u\n",
+        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",
+           WASM_ENABLE_MULTI_MEMORY);
+    printf("    - Reference Types via WASM_ENABLE_REF_TYPES: %u\n",
+           WASM_ENABLE_REF_TYPES);
+    printf("    - Reference-Typed Strings via WASM_ENABLE_REF_TYPES: %u\n",
+           WASM_ENABLE_REF_TYPES);
+    printf("    - Tail Call via WASM_ENABLE_TAIL_CALL: %u\n",
+           WASM_ENABLE_TAIL_CALL);
+    printf("    - Threads via WASM_ENABLE_SHARED_MEMORY: %u\n",
+           WASM_ENABLE_SHARED_MEMORY);
+    printf("    - Typed Function References via WASM_ENABLE_GC: %u\n",
+           WASM_ENABLE_GC);
+    printf("  Unsupported (>= Phase4):\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");
+}

+ 5 - 0
product-mini/platforms/cosmopolitan/CMakeLists.txt

@@ -132,6 +132,7 @@ include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)
 check_pie_supported()
 check_pie_supported()
 add_library(vmlib ${WAMR_RUNTIME_LIB_SOURCE})
 add_library(vmlib ${WAMR_RUNTIME_LIB_SOURCE})
 set_target_properties (vmlib PROPERTIES POSITION_INDEPENDENT_CODE ON)
 set_target_properties (vmlib PROPERTIES POSITION_INDEPENDENT_CODE ON)
+set_version_info (vmlib)
 
 
 set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections")
 set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections")
 
 
@@ -160,6 +161,8 @@ include (${SHARED_DIR}/utils/uncommon/shared_uncommon.cmake)
 
 
 add_executable (iwasm main.c ${UNCOMMON_SHARED_SOURCE})
 add_executable (iwasm main.c ${UNCOMMON_SHARED_SOURCE})
 
 
+set_version_info (iwasm)
+
 set_target_properties (iwasm PROPERTIES POSITION_INDEPENDENT_CODE ON)
 set_target_properties (iwasm PROPERTIES POSITION_INDEPENDENT_CODE ON)
 
 
 install (TARGETS iwasm DESTINATION bin)
 install (TARGETS iwasm DESTINATION bin)
@@ -168,6 +171,8 @@ target_link_libraries (iwasm vmlib ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS} ${WASI_NN
 
 
 add_library (libiwasm STATIC ${WAMR_RUNTIME_LIB_SOURCE})
 add_library (libiwasm STATIC ${WAMR_RUNTIME_LIB_SOURCE})
 
 
+set_version_info (libiwasm)
+
 install (TARGETS libiwasm DESTINATION lib)
 install (TARGETS libiwasm DESTINATION lib)
 
 
 set_target_properties (libiwasm PROPERTIES OUTPUT_NAME iwasm)
 set_target_properties (libiwasm PROPERTIES OUTPUT_NAME iwasm)

+ 5 - 0
product-mini/platforms/darwin/CMakeLists.txt

@@ -116,11 +116,14 @@ set (WAMR_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../..)
 
 
 include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)
 include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)
 add_library(vmlib ${WAMR_RUNTIME_LIB_SOURCE})
 add_library(vmlib ${WAMR_RUNTIME_LIB_SOURCE})
+set_version_info (vmlib)
 
 
 include (${SHARED_DIR}/utils/uncommon/shared_uncommon.cmake)
 include (${SHARED_DIR}/utils/uncommon/shared_uncommon.cmake)
 
 
 add_executable (iwasm main.c ${UNCOMMON_SHARED_SOURCE})
 add_executable (iwasm main.c ${UNCOMMON_SHARED_SOURCE})
 
 
+set_version_info (iwasm)
+
 install (TARGETS iwasm DESTINATION bin)
 install (TARGETS iwasm DESTINATION bin)
 
 
 target_link_libraries (iwasm vmlib ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS} -lm -ldl -lpthread)
 target_link_libraries (iwasm vmlib ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS} -lm -ldl -lpthread)
@@ -131,5 +134,7 @@ install (TARGETS libiwasm DESTINATION lib)
 
 
 set_target_properties (libiwasm PROPERTIES OUTPUT_NAME iwasm)
 set_target_properties (libiwasm PROPERTIES OUTPUT_NAME iwasm)
 
 
+set_version_info (libiwasm)
+
 target_link_libraries (libiwasm ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS} -lm -ldl -lpthread)
 target_link_libraries (libiwasm ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS} -lm -ldl -lpthread)
 
 

+ 5 - 0
product-mini/platforms/freebsd/CMakeLists.txt

@@ -113,17 +113,22 @@ set (WAMR_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../..)
 
 
 include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)
 include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)
 add_library(vmlib ${WAMR_RUNTIME_LIB_SOURCE})
 add_library(vmlib ${WAMR_RUNTIME_LIB_SOURCE})
+set_version_info (vmlib)
 
 
 include (${SHARED_DIR}/utils/uncommon/shared_uncommon.cmake)
 include (${SHARED_DIR}/utils/uncommon/shared_uncommon.cmake)
 
 
 add_executable (iwasm main.c ${UNCOMMON_SHARED_SOURCE})
 add_executable (iwasm main.c ${UNCOMMON_SHARED_SOURCE})
 
 
+set_version_info (iwasm)
+
 install (TARGETS iwasm DESTINATION bin)
 install (TARGETS iwasm DESTINATION bin)
 
 
 target_link_libraries (iwasm vmlib ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS} -lm -ldl -lpthread)
 target_link_libraries (iwasm vmlib ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS} -lm -ldl -lpthread)
 
 
 add_library (libiwasm SHARED ${WAMR_RUNTIME_LIB_SOURCE})
 add_library (libiwasm SHARED ${WAMR_RUNTIME_LIB_SOURCE})
 
 
+set_version_info (libiwasm)
+
 install (TARGETS libiwasm DESTINATION lib)
 install (TARGETS libiwasm DESTINATION lib)
 
 
 set_target_properties (libiwasm PROPERTIES OUTPUT_NAME iwasm)
 set_target_properties (libiwasm PROPERTIES OUTPUT_NAME iwasm)

+ 1 - 0
product-mini/platforms/ios/CMakeLists.txt

@@ -139,6 +139,7 @@ endif()
 
 
 set (distribution_DIR ${CMAKE_BINARY_DIR}/distribution)
 set (distribution_DIR ${CMAKE_BINARY_DIR}/distribution)
 set_target_properties (iwasm PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${distribution_DIR}/wasm/lib")
 set_target_properties (iwasm PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${distribution_DIR}/wasm/lib")
+set_version_info (iwasm)
 
 
 add_custom_command (TARGET iwasm POST_BUILD
 add_custom_command (TARGET iwasm POST_BUILD
         COMMAND "${CMAKE_COMMAND}" -E copy_directory "${WAMR_ROOT_DIR}/core/iwasm/include" "${distribution_DIR}/wasm/include/"
         COMMAND "${CMAKE_COMMAND}" -E copy_directory "${WAMR_ROOT_DIR}/core/iwasm/include" "${distribution_DIR}/wasm/include/"

+ 1 - 0
product-mini/platforms/linux-sgx/CMakeLists.txt

@@ -107,6 +107,7 @@ set (WAMR_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../..)
 
 
 include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)
 include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)
 add_library(vmlib ${WAMR_RUNTIME_LIB_SOURCE})
 add_library(vmlib ${WAMR_RUNTIME_LIB_SOURCE})
+set_version_info (vmlib)
 
 
 add_custom_command (
 add_custom_command (
              OUTPUT libvmlib_untrusted.a
              OUTPUT libvmlib_untrusted.a

+ 1 - 0
product-mini/platforms/linux-sgx/CMakeLists_minimal.txt

@@ -78,6 +78,7 @@ set (WAMR_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../..)
 
 
 include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)
 include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)
 add_library(vmlib ${WAMR_RUNTIME_LIB_SOURCE})
 add_library(vmlib ${WAMR_RUNTIME_LIB_SOURCE})
+set_version_info (vmlib)
 
 
 add_custom_command (
 add_custom_command (
              OUTPUT libvmlib_untrusted.a
              OUTPUT libvmlib_untrusted.a

+ 5 - 0
product-mini/platforms/linux/CMakeLists.txt

@@ -142,6 +142,7 @@ include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)
 check_pie_supported()
 check_pie_supported()
 add_library(vmlib ${WAMR_RUNTIME_LIB_SOURCE})
 add_library(vmlib ${WAMR_RUNTIME_LIB_SOURCE})
 set_target_properties (vmlib PROPERTIES POSITION_INDEPENDENT_CODE ON)
 set_target_properties (vmlib PROPERTIES POSITION_INDEPENDENT_CODE ON)
+set_version_info (vmlib)
 
 
 set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections")
 set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections")
 
 
@@ -170,6 +171,8 @@ include (${SHARED_DIR}/utils/uncommon/shared_uncommon.cmake)
 
 
 add_executable (iwasm main.c ${UNCOMMON_SHARED_SOURCE})
 add_executable (iwasm main.c ${UNCOMMON_SHARED_SOURCE})
 
 
+set_version_info (iwasm)
+
 set_target_properties (iwasm PROPERTIES POSITION_INDEPENDENT_CODE ON)
 set_target_properties (iwasm PROPERTIES POSITION_INDEPENDENT_CODE ON)
 
 
 target_link_libraries(iwasm
 target_link_libraries(iwasm
@@ -185,6 +188,8 @@ install (TARGETS iwasm DESTINATION bin)
 
 
 add_library (libiwasm SHARED ${WAMR_RUNTIME_LIB_SOURCE})
 add_library (libiwasm SHARED ${WAMR_RUNTIME_LIB_SOURCE})
 
 
+set_version_info (libiwasm)
+
 install (TARGETS libiwasm DESTINATION lib)
 install (TARGETS libiwasm DESTINATION lib)
 
 
 set_target_properties (libiwasm PROPERTIES OUTPUT_NAME iwasm)
 set_target_properties (libiwasm PROPERTIES OUTPUT_NAME iwasm)

+ 4 - 0
product-mini/platforms/posix/main.c

@@ -18,6 +18,8 @@
 #include "../common/libc_wasi.c"
 #include "../common/libc_wasi.c"
 #endif
 #endif
 
 
+#include "../common/wasm_proposal.c"
+
 #if BH_HAS_DLFCN
 #if BH_HAS_DLFCN
 #include <dlfcn.h>
 #include <dlfcn.h>
 #endif
 #endif
@@ -798,6 +800,8 @@ main(int argc, char *argv[])
             wasm_runtime_get_version(&major, &minor, &patch);
             wasm_runtime_get_version(&major, &minor, &patch);
             printf("iwasm %" PRIu32 ".%" PRIu32 ".%" PRIu32 "\n", major, minor,
             printf("iwasm %" PRIu32 ".%" PRIu32 ".%" PRIu32 "\n", major, minor,
                    patch);
                    patch);
+            printf("\n");
+            wasm_proposal_print_status();
             return 0;
             return 0;
         }
         }
         else {
         else {

+ 2 - 0
product-mini/platforms/riot/CMakeLists.txt

@@ -62,3 +62,5 @@ include_directories(SYSTEM ${RIOT_INCLUDES_LIST})
 # executable linking is done by RIOT build system
 # executable linking is done by RIOT build system
 
 
 add_library( wamr ${WAMR_RUNTIME_LIB_SOURCE})
 add_library( wamr ${WAMR_RUNTIME_LIB_SOURCE})
+
+set_version_info (wamr)

+ 5 - 0
product-mini/platforms/vxworks/CMakeLists.txt

@@ -78,17 +78,22 @@ set (WAMR_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../..)
 
 
 include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)
 include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)
 add_library(vmlib ${WAMR_RUNTIME_LIB_SOURCE})
 add_library(vmlib ${WAMR_RUNTIME_LIB_SOURCE})
+set_version_info (vmlib)
 
 
 include (${SHARED_DIR}/utils/uncommon/shared_uncommon.cmake)
 include (${SHARED_DIR}/utils/uncommon/shared_uncommon.cmake)
 
 
 add_executable (iwasm main.c ${UNCOMMON_SHARED_SOURCE})
 add_executable (iwasm main.c ${UNCOMMON_SHARED_SOURCE})
 
 
+set_version_info (iwasm)
+
 install (TARGETS iwasm DESTINATION bin)
 install (TARGETS iwasm DESTINATION bin)
 
 
 target_link_libraries (iwasm vmlib ${LLVM_AVAILABLE_LIBS} -lm -ldl -lunix)
 target_link_libraries (iwasm vmlib ${LLVM_AVAILABLE_LIBS} -lm -ldl -lunix)
 
 
 add_library (libiwasm SHARED ${WAMR_RUNTIME_LIB_SOURCE})
 add_library (libiwasm SHARED ${WAMR_RUNTIME_LIB_SOURCE})
 
 
+set_version_info (libiwasm)
+
 install (TARGETS libiwasm DESTINATION lib)
 install (TARGETS libiwasm DESTINATION lib)
 
 
 set_target_properties (libiwasm PROPERTIES OUTPUT_NAME iwasm)
 set_target_properties (libiwasm PROPERTIES OUTPUT_NAME iwasm)

+ 5 - 0
product-mini/platforms/windows/CMakeLists.txt

@@ -106,6 +106,7 @@ set (WAMR_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../..)
 
 
 include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)
 include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)
 add_library(vmlib ${WAMR_RUNTIME_LIB_SOURCE})
 add_library(vmlib ${WAMR_RUNTIME_LIB_SOURCE})
+set_version_info(vmlib)
 
 
 #set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWIN32_LEAN_AND_MEAN")
 #set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWIN32_LEAN_AND_MEAN")
 if (NOT MINGW)
 if (NOT MINGW)
@@ -134,6 +135,8 @@ include (${SHARED_DIR}/utils/uncommon/shared_uncommon.cmake)
 
 
 add_executable (iwasm main.c ${UNCOMMON_SHARED_SOURCE})
 add_executable (iwasm main.c ${UNCOMMON_SHARED_SOURCE})
 
 
+set_version_info (iwasm)
+
 install (TARGETS iwasm DESTINATION bin)
 install (TARGETS iwasm DESTINATION bin)
 
 
 target_link_libraries (iwasm vmlib ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS})
 target_link_libraries (iwasm vmlib ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS})
@@ -144,6 +147,8 @@ endif ()
 
 
 add_library (libiwasm SHARED ${WAMR_RUNTIME_LIB_SOURCE})
 add_library (libiwasm SHARED ${WAMR_RUNTIME_LIB_SOURCE})
 
 
+set_version_info (libiwasm)
+
 install (TARGETS libiwasm DESTINATION lib)
 install (TARGETS libiwasm DESTINATION lib)
 
 
 set_target_properties (libiwasm PROPERTIES OUTPUT_NAME libiwasm)
 set_target_properties (libiwasm PROPERTIES OUTPUT_NAME libiwasm)

+ 1 - 1
samples/debug-tools/CMakeLists.txt

@@ -72,7 +72,7 @@ add_library(vmlib ${WAMR_RUNTIME_LIB_SOURCE})
 include(ExternalProject)
 include(ExternalProject)
 
 
 # wasm32-wasi
 # wasm32-wasi
-ExternalProject_Add(wasm33-wasi
+ExternalProject_Add(wasm32-wasi
   SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/wasm-apps"
   SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/wasm-apps"
   CONFIGURE_COMMAND ${CMAKE_COMMAND} -S ${CMAKE_CURRENT_SOURCE_DIR}/wasm-apps -B build
   CONFIGURE_COMMAND ${CMAKE_COMMAND} -S ${CMAKE_CURRENT_SOURCE_DIR}/wasm-apps -B build
                       -DWASI_SDK_PREFIX=${WASISDK_HOME}
                       -DWASI_SDK_PREFIX=${WASISDK_HOME}

+ 1 - 1
test-tools/wamr-ide/VSCode-Extension/resource/test/build.sh

@@ -1,2 +1,2 @@
 # compile with debug symbols and no optimization
 # compile with debug symbols and no optimization
-rustc --target wasm32-wasi ./test.rs -g -C opt-level=0
+rustc --target wasm32-wasip1 ./test.rs -g -C opt-level=0

+ 1 - 1
test-tools/wamr-ide/VSCode-Extension/src/test/suite/utils.ts

@@ -39,7 +39,7 @@ export function setBpAtMarker(file: string, bpMarker: string): void {
 export function compileRustToWasm(): void {
 export function compileRustToWasm(): void {
     const testResourceFolder = `${EXTENSION_PATH}/resource/test`;
     const testResourceFolder = `${EXTENSION_PATH}/resource/test`;
     // compile with debug symbols and no optimization
     // compile with debug symbols and no optimization
-    const cmd = `rustc --target wasm32-wasi ${testResourceFolder}/test.rs -g -C opt-level=0 -o ${testResourceFolder}/test.wasm`;
+    const cmd = `rustc --target wasm32-wasip1 ${testResourceFolder}/test.rs -g -C opt-level=0 -o ${testResourceFolder}/test.wasm`;
 
 
     try {
     try {
         cp.execSync(cmd, { stdio: [null, null, process.stderr] });
         cp.execSync(cmd, { stdio: [null, null, process.stderr] });

+ 3 - 0
wamr-compiler/CMakeLists.txt

@@ -58,6 +58,7 @@ if (WAMR_BUILD_LLVM_LEGACY_PM EQUAL 1)
 endif ()
 endif ()
 
 
 if (LINUX)
 if (LINUX)
+  set(WAMR_BUILD_LINUX_PERF 1)
   add_definitions(-DWASM_ENABLE_LINUX_PERF=1)
   add_definitions(-DWASM_ENABLE_LINUX_PERF=1)
 endif ()
 endif ()
 
 
@@ -284,6 +285,7 @@ include (${IWASM_DIR}/common/gc/iwasm_gc.cmake)
 include (${IWASM_DIR}/interpreter/iwasm_interp.cmake)
 include (${IWASM_DIR}/interpreter/iwasm_interp.cmake)
 include (${IWASM_DIR}/aot/iwasm_aot.cmake)
 include (${IWASM_DIR}/aot/iwasm_aot.cmake)
 include (${IWASM_DIR}/compilation/iwasm_compl.cmake)
 include (${IWASM_DIR}/compilation/iwasm_compl.cmake)
+include (${PROJECT_SOURCE_DIR}/../build-scripts/version.cmake)
 
 
 if (WAMR_BUILD_LIBC_BUILTIN EQUAL 1)
 if (WAMR_BUILD_LIBC_BUILTIN EQUAL 1)
   include (${IWASM_DIR}/libraries/libc-builtin/libc_builtin.cmake)
   include (${IWASM_DIR}/libraries/libc-builtin/libc_builtin.cmake)
@@ -375,6 +377,7 @@ add_library (aotclib ${IWASM_COMPL_SOURCE})
 add_executable (wamrc main.c)
 add_executable (wamrc main.c)
 check_pie_supported()
 check_pie_supported()
 set_target_properties (wamrc PROPERTIES POSITION_INDEPENDENT_CODE ON)
 set_target_properties (wamrc PROPERTIES POSITION_INDEPENDENT_CODE ON)
+set_version_info (wamrc)
 
 
 if (LLVM_LINK_LLVM_DYLIB)
 if (LLVM_LINK_LLVM_DYLIB)
   set(WAMRC_LINK_LLVM_LIBS LLVM)
   set(WAMRC_LINK_LLVM_LIBS LLVM)