diff --git a/.clang-tidy b/.clang-tidy index 67cd167fc4..b5f3da69d5 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,16 +1,49 @@ # refer to https://clang.llvm.org/extra/clang-tidy/checks/list.html +# +# Configure clang-tidy for this project. + +# Here is an explanation for why some of the checks are disabled: +# + +Checks: > + -*, + bugprone-*, + cert-*, + clang-analyzer-*, + concurrency-*, + misc-*, + modernize-*, + performance-*, + portability-*, + readability-*, + -bugprone-easily-swappable-parameters, + -bugprone-macro-parentheses, + -misc-no-recursion, + -misc-unused-parameters, + -readability-braces-around-statements, + -readability-else-after-return, + -readability-function-cognitive-complexity, + -readability-identifier-length, + -readability-isolate-declaration, + -readability-magic-numbers, + -readability-named-parameter, + -readability-non-const-parameter, + -readability-redundant-preprocessor, + -readability-suspicious-call-argument, + -readability-uppercase-literal-suffix + + +# Turn all the warnings from the checks above into errors. +WarningsAsErrors: "*" + +# headers in the following directories will be checked: +# - core/iwasm/ +# - core/shared/ +HeaderFilterRegex: '(core/iwasm/|core/shared/).*\\.h$' + +# goto .clang-format at root directory to see the format style +FormatStyle: file -Checks: '-*, readability-identifier-naming, clang-analyzer-core.*,' -WarningsAsErrors: '-*' -HeaderFilterRegex: '' -FormatStyle: file -InheritParentConfig: false -AnalyzeTemporaryDtors: false -User: wamr CheckOptions: - - key: readability-identifier-naming.VariableCase - value: lower_case - - key: readability-identifier-naming.ParameterCase - value: lower_case - - key: readability-identifier-naming.MacroDefinitionCase - value: UPPER_CASE + - { key: readability-identifier-naming.NamespaceCase, value: lower_case } + - { key: readability-function-cognitive-complexity.Threshold, value: 100 } diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 1587a7ddc7..b81561a56f 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,150 +1,42 @@ # Copyright (C) 2019 Intel Corporation. All rights reserved. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/cpp/.devcontainer/base.Dockerfile -# [Choice] Debian / Ubuntu version (use Debian 12/11/9, Ubuntu 18.04/21.04 on local arm64/Apple Silicon): debian-12, debian-11, debian-10, debian-9, ubuntu-21.04, ubuntu-20.04, ubuntu-18.04 +# hadolint global ignore=DL3008,DL3009 + ARG VARIANT=debian-12 -FROM mcr.microsoft.com/vscode/devcontainers/cpp:${VARIANT} +FROM mcr.microsoft.com/devcontainers/cpp:${VARIANT} ARG DEBIAN_FRONTEND=noninteractive -ENV TZ=Asian/Shanghai +ENV TZ=Asia/Shanghai -# hadolint ignore=DL3008 RUN apt-get update \ - && apt-get upgrade -y \ - && apt-get install -y apt-transport-https apt-utils build-essential \ - ca-certificates ccache cmake curl g++-multilib git gnupg \ - libgcc-12-dev lib32gcc-12-dev lsb-release \ - ninja-build ocaml ocamlbuild \ - software-properties-common tree tzdata \ - unzip valgrind vim wget zip --no-install-recommends \ - && apt-get clean -y \ - && rm -rf /var/lib/apt/lists/* - -# -# binaryen -ARG BINARYEN_VER=114 -WORKDIR /opt -RUN wget -c --progress=dot:giga https://github.com/WebAssembly/binaryen/releases/download/version_${BINARYEN_VER}/binaryen-version_${BINARYEN_VER}-x86_64-linux.tar.gz \ - && tar xf binaryen-version_${BINARYEN_VER}-x86_64-linux.tar.gz \ - && ln -sf /opt/binaryen-version_${BINARYEN_VER} /opt/binaryen \ - && rm binaryen-version_${BINARYEN_VER}-x86_64-linux.tar.gz - -# -# CMAKE (https://apt.kitware.com/) -SHELL ["/bin/bash", "-o", "pipefail", "-c"] -# hadolint ignore=DL3008 -ARG CMAKE_VER=3.27.0 -RUN wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VER}/cmake-${CMAKE_VER}-Linux-x86_64.sh \ - -q -O /tmp/cmake-install.sh \ - && chmod u+x /tmp/cmake-install.sh \ - && mkdir /opt/cmake-${CMAKE_VER} \ - && /tmp/cmake-install.sh --skip-license --prefix=/opt/cmake-${CMAKE_VER} \ - && rm /tmp/cmake-install.sh \ - && ln -s /opt/cmake-${CMAKE_VER}/bin/* /usr/local/bin - -# -# install emsdk -WORKDIR /opt -RUN git clone https://github.com/emscripten-core/emsdk.git - -ARG EMSDK_VER=3.1.43 -WORKDIR /opt/emsdk -RUN git pull \ - && ./emsdk install ${EMSDK_VER} \ - && ./emsdk activate ${EMSDK_VER} \ - && echo "source /opt/emsdk/emsdk_env.sh" >> /root/.bashrc - -# -# install wasi-sdk -ARG WASI_SDK_VER=20 -RUN wget -c --progress=dot:giga https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VER}/wasi-sdk-${WASI_SDK_VER}.0-linux.tar.gz -P /opt \ - && tar xf /opt/wasi-sdk-${WASI_SDK_VER}.0-linux.tar.gz -C /opt \ - && ln -sf /opt/wasi-sdk-${WASI_SDK_VER}.0 /opt/wasi-sdk \ - && rm /opt/wasi-sdk-${WASI_SDK_VER}.0-linux.tar.gz - -# -#install wabt -ARG WABT_VER=1.0.33 -RUN wget -c --progress=dot:giga https://github.com/WebAssembly/wabt/releases/download/${WABT_VER}/wabt-${WABT_VER}-ubuntu.tar.gz -P /opt \ - && tar xf /opt/wabt-${WABT_VER}-ubuntu.tar.gz -C /opt \ - && ln -sf /opt/wabt-${WABT_VER} /opt/wabt \ - && rm /opt/wabt-${WABT_VER}-ubuntu.tar.gz + && apt-get upgrade -y -# -# install bazelisk -ARG BAZELISK_VER=1.17.0 -RUN mkdir /opt/bazelisk \ - && wget -c --progress=dot:giga https://github.com/bazelbuild/bazelisk/releases/download/v${BAZELISK_VER}/bazelisk-linux-amd64 -P /opt/bazelisk \ - && chmod a+x /opt/bazelisk/bazelisk-linux-amd64 \ - && ln -fs /opt/bazelisk/bazelisk-linux-amd64 /opt/bazelisk/bazel - -# -# install clang+llvm -ARG LLVM_VER=16 -RUN apt-get purge -y clang-14 llvm-14 && apt-get autoremove -y -WORKDIR /etc/apt/apt.conf.d -RUN touch 99verfiy-peer.conf \ - && echo "Acquire { https::Verify-Peer false }" > 99verfiy-peer.conf - -WORKDIR /tmp -#RUN wget --progress=dot:giga https://apt.llvm.org/llvm.sh \ -# && chmod a+x ./llvm.sh \ -# && ./llvm.sh ${LLVM_VER} all - -# Workaround due to https://github.com/llvm/llvm-project/issues/62475 -# hadolint ignore=DL3008 -RUN set -ex \ - && echo "deb http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-${LLVM_VER} main" > /etc/apt/sources.list.d/apt.llvm.org.list \ - && wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc \ - && apt-get update \ - && apt-get install -y \ - clang-${LLVM_VER} lldb-${LLVM_VER} lld-${LLVM_VER} clangd-${LLVM_VER} clang-tidy-${LLVM_VER} clang-format-${LLVM_VER} clang-tools-${LLVM_VER} \ - llvm-${LLVM_VER}-dev lld-${LLVM_VER} lldb-${LLVM_VER} llvm-${LLVM_VER}-tools libomp-${LLVM_VER}-dev libc++-${LLVM_VER}-dev libc++abi-${LLVM_VER}-dev \ - libclang-common-${LLVM_VER}-dev libclang-${LLVM_VER}-dev libclang-cpp${LLVM_VER}-dev libunwind-${LLVM_VER}-dev \ - libclang-rt-${LLVM_VER}-dev libpolly-${LLVM_VER}-dev --no-install-recommends \ - && apt-get clean -y \ - && rm -rf /var/lib/apt/lists/* - -# -# [Optional] - -# -# Install pip -# hadolint ignore=DL3008 RUN apt-get update \ - && apt-get install -y --reinstall python3-venv python3-pip --no-install-recommends \ - && apt-get clean -y \ - && rm -rf /var/lib/apt/lists/* + && apt-get install -y apt-transport-https apt-utils build-essential \ + ca-certificates ccache clang-format-14 curl file g++-multilib git gnupg \ + libgcc-12-dev lib32gcc-12-dev libzstd-dev lsb-release \ + ninja-build ocaml ocamlbuild opam \ + python3-venv python3-pip \ + software-properties-common tree tzdata \ + unzip valgrind vim wget zip --no-install-recommends -# -# Install required python packages -# hadolint ignore=DL3013 -RUN python3 -m pip install --no-cache-dir --break-system-packages --upgrade pip \ - && pip3 install --no-cache-dir --break-system-packages black nose pycparser pylint +WORKDIR /opt -# -# Install github-cli. It doens't work as a feature of devcontainer.json -ARG GH_CLI_VER=2.32.0 -WORKDIR /tmp -RUN wget -q https://github.com/cli/cli/releases/download/v${GH_CLI_VER}/gh_${GH_CLI_VER}_linux_amd64.deb \ - && dpkg -i gh_${GH_CLI_VER}_linux_amd64.deb +ARG WASI_SDK_VER=25 +RUN wget -c --progress=dot:giga https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VER}/wasi-sdk-${WASI_SDK_VER}.0-x86_64-linux.tar.gz -P /tmp \ + && tar xf /tmp/wasi-sdk-${WASI_SDK_VER}.0-x86_64-linux.tar.gz -C /opt \ + && ln -sf /opt/wasi-sdk-${WASI_SDK_VER}.0-x86_64-linux /opt/wasi-sdk -# -# Install NodeJS -RUN wget -qO- https://deb.nodesource.com/setup_20.x | bash - -# hadolint ignore=DL3008 -RUN apt-get install -y nodejs --no-install-recommends +ARG WABT_VER=1.0.37 +RUN wget -c --progress=dot:giga https://github.com/WebAssembly/wabt/releases/download/${WABT_VER}/wabt-${WABT_VER}-ubuntu-20.04.tar.gz -P /tmp \ + && tar xf /tmp/wabt-${WABT_VER}-ubuntu-20.04.tar.gz -C /opt \ + && ln -sf /opt/wabt-${WABT_VER} /opt/wabt # set path -ENV PATH="/opt/bazelisk:/usr/lib/llvm-${LLVM_VER}/bin:${PATH}" -ENV CC=/usr/lib/llvm-${LLVM_VER}/bin/clang CXX=/usr/lib/llvm-${LLVM_VER}/bin/clang++ -RUN printf "%s\n" "PS1='\n[ \u@wamr-dev-docker \W ]\n$ '" >> /root/.bashrc \ - && apt-get autoremove -y \ + +# clean up +RUN apt-get autoremove -y \ && apt-get clean -y \ && rm -rf /var/lib/apt/lists/* \ && rm -rf /tmp/* - -# set workdir when container run -VOLUME /workspaces -WORKDIR /workspaces diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 5feb175640..b36c063091 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,23 +1,11 @@ -// Copyright (C) 2019 Intel Corporation. All rights reserved. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at: -// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/cpp { "name": "WAMR-Dev", "build": { "dockerfile": "Dockerfile", - // Update 'VARIANT' to pick an Debian / Ubuntu OS version: debian-12, debian-11, debian-10, debian-9, ubuntu-21.04, ubuntu-20.04, ubuntu-18.04 - // Use Debian 12, Debian 11, Debian 9, Ubuntu 18.04 or Ubuntu 21.04 on local arm64/Apple Silicon "args": { - "BINARYEN_VER": "114", - "BAZELISK_VER": "1.17.0", - "CMAKE_VER": "3.27.0", - "EMSDK_VER": "3.1.43", - "GH_CLI_VER": "2.32.0", - "LLVM_VER": "16", "VARIANT": "debian-12", - "WASI_SDK_VER": "20", - "WABT_VER": "1.0.33" + "WASI_SDK_VER": "25", + "WABT_VER": "1.0.37" } }, "runArgs": [ @@ -25,26 +13,17 @@ "--security-opt", "seccomp=unconfined" ], - // Configure tool-specific properties. "customizations": { - // Configure properties specific to VS Code. "vscode": { - // Set *default* container specific settings.json values on container create. "settings": {}, - // Add the IDs of extensions you want installed when the container is created. "extensions": [ "dtsvet.vscode-wasm", - "llvm-vs-code-extensions.vscode-clangd", "ms-python.python", "ms-python.vscode-pylance", "ms-vscode.cmake-tools" ] } }, - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "curl https://sh.rustup.rs -sSf | bash -s -- -y", - // Comment out this line to run as root instead. + "postCreateCommand": "bash .devcontainer/finalize.sh", "remoteUser": "vscode" } \ No newline at end of file diff --git a/.devcontainer/finalize.sh b/.devcontainer/finalize.sh new file mode 100644 index 0000000000..a7d877b82e --- /dev/null +++ b/.devcontainer/finalize.sh @@ -0,0 +1,18 @@ +echo "Running finalize script..." + +# +# Python Package Installation +# +echo "--- Installing Python Dependencies\n" + +# Upgrade pip first +python3 -m pip install --no-cache-dir --break-system-packages --upgrade pip +# Install required packages +pip3 install --no-cache-dir --break-system-packages -r .devcontainer/requirements.txt + +echo "--- Installing Ocaml stuff\n" +opam init --yes --shell-setup +eval $(opam env --switch=default) +opam install --yes dune menhir + +echo "Finalize script completed. ✅" diff --git a/.devcontainer/requirements.txt b/.devcontainer/requirements.txt new file mode 100644 index 0000000000..a8ed4b65d6 --- /dev/null +++ b/.devcontainer/requirements.txt @@ -0,0 +1,5 @@ +black +nose +pycparser +pylint +requests diff --git a/.github/actions/install-wasi-sdk-wabt/action.yml b/.github/actions/install-wasi-sdk-wabt/action.yml index 6b79087c26..31d22c18d5 100644 --- a/.github/actions/install-wasi-sdk-wabt/action.yml +++ b/.github/actions/install-wasi-sdk-wabt/action.yml @@ -50,18 +50,18 @@ runs: echo "::notice::wasi-sdk-25 and wabt-1.0.37 installed on ubuntu" working-directory: /opt - - name: Set up wasi-sdk and wabt on macOS-13 (intel) - if: ${{ inputs.os == 'macos-13' }} + - name: Set up wasi-sdk and wabt on macOS on Intel + if: ${{ inputs.os == 'macos-15-intel' }} shell: bash run: | - echo "Downloading wasi-sdk for macOS-13..." + echo "Downloading wasi-sdk for macOS on Intel..." sudo wget -O wasi-sdk.tar.gz --progress=dot:giga https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-25/wasi-sdk-25.0-x86_64-macos.tar.gz echo "Extracting wasi-sdk..." sudo tar -xf wasi-sdk.tar.gz sudo ln -sf wasi-sdk-25.0-x86_64-macos wasi-sdk - echo "Downloading wabt for macOS-13..." + echo "Downloading wabt for macOS on Intel..." sudo wget -O wabt.tar.gz --progress=dot:giga https://github.com/WebAssembly/wabt/releases/download/1.0.36/wabt-1.0.36-macos-12.tar.gz echo "Extracting wabt..." @@ -71,21 +71,21 @@ runs: /opt/wasi-sdk/bin/clang --version /opt/wabt/bin/wasm-interp --version - echo "::notice::wasi-sdk-25 and wabt-1.0.36 installed on macos-13" + echo "::notice::wasi-sdk-25 and wabt-1.0.36 installed on ${{ inputs.os }}" working-directory: /opt - - name: Set up wasi-sdk and wabt on macOS-14 (arm64) - if: ${{ inputs.os == 'macos-14' }} + - name: Set up wasi-sdk and wabt on macOS on ARM + if: ${{ inputs.os == 'macos-15' }} shell: bash run: | - echo "Downloading wasi-sdk for macOS-14..." + echo "Downloading wasi-sdk for macOS on ARM..." sudo wget -O wasi-sdk.tar.gz --progress=dot:giga https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-25/wasi-sdk-25.0-arm64-macos.tar.gz echo "Extracting wasi-sdk..." sudo tar -xf wasi-sdk.tar.gz sudo ln -sf wasi-sdk-25.0-arm64-macos wasi-sdk - echo "Downloading wabt for macOS-14..." + echo "Downloading wabt for macOS on ARM..." sudo wget -O wabt.tar.gz --progress=dot:giga https://github.com/WebAssembly/wabt/releases/download/1.0.37/wabt-1.0.37-macos-14.tar.gz echo "Extracting wabt..." @@ -95,7 +95,7 @@ runs: /opt/wasi-sdk/bin/clang --version /opt/wabt/bin/wasm-interp --version - echo "::notice::wasi-sdk-25 and wabt-1.0.37 installed on macos-14" + echo "::notice::wasi-sdk-25 and wabt-1.0.37 installed on ${{ inputs.os }}" working-directory: /opt - name: Set up wasi-sdk and wabt on Windows diff --git a/.github/scripts/codeql_buildscript.sh b/.github/scripts/codeql_buildscript.sh index 706ff5b787..99060af8f4 100755 --- a/.github/scripts/codeql_buildscript.sh +++ b/.github/scripts/codeql_buildscript.sh @@ -78,26 +78,30 @@ iwasm_options_list=( #default "" # +classic interp - "-DWAMR_BUILD_FAST_INTERP=0" - # +llvm jit + fast jit - "-DWAMR_BUILD_JIT=1 -DWAMR_BUILD_FAST_JIT=1 -DWAMR_BUILD_FAST_JIT_DUMP=1" + "-DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_SIMD=0" + # fast jit + "-DWAMR_BUILD_FAST_JIT=1 -DWAMR_BUILD_FAST_JIT_DUMP=1 -DWAMR_BUILD_SIMD=0" + # +llvm jit + "-DWAMR_BUILD_JIT=1" # "-DWAMR_BUILD_TARGET=X86_32" # # libraries "-DWAMR_BUILD_LIBC_BUILTIN=0 -DWAMR_BUILD_LIBC_UVWASI=1 -DWAMR_BUILD_LIBC_EMCC=1" - "-DWAMR_BUILD_THREAD_MGR=1 -DWAMR_BUILD_LIB_PTHREAD=1 -DWAMR_BUILD_SHARED_MEMORY=1 -DWAMR_BUILD_LIB_PTHREAD_SEMAPHORE=1" - "-DWAMR_BUILD_THREAD_MGR=1 -DWAMR_BUILD_LIB_WASI_THREADS=1 -DWAMR_BUILD_SHARED_MEMORY=1 -DWAMR_BUILD_LIB_PTHREAD_SEMAPHORE=1" + "-DWAMR_BUILD_THREAD_MGR=1 -DWAMR_BUILD_LIB_PTHREAD=1 -DWAMR_BUILD_LIB_PTHREAD_SEMAPHORE=1" + "-DWAMR_BUILD_THREAD_MGR=1 -DWAMR_BUILD_LIB_WASI_THREADS=1 -DWAMR_BUILD_LIB_PTHREAD_SEMAPHORE=1" "-DWAMR_BUILD_WASI_NN=1 -DWAMR_BUILD_WASI_NN_LLAMACPP=1" # # Wasm specs - "-DWAMR_BUILD_GC=1 -DWAMR_BUILD_EXCE_HANDLING=1 -DWAMR_BUILD_STRINGREF=1 -DWAMR_STRINGREF_IMPL_SOURCE=STUB" - "-DWAMR_BUILD_MEMORY64=1 -DWAMR_BUILD_MULTI_MEMORY=1" + "-DWAMR_BUILD_GC=1 -DWAMR_BUILD_STRINGREF=1 -DWAMR_STRINGREF_IMPL_SOURCE=STUB" + "-DWAMR_BUILD_EXCE_HANDLING=1 -DWAMR_BUILD_AOT=0 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_SIMD=0" + "-DWAMR_BUILD_MEMORY64=1 -DWAMR_BUILD_MULTI_MEMORY=1 -DWAMR_BUILD_SHARED_MEMORY=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_SIMD=0 -DWAMR_BUILD_AOT=0" # # WARM features "-DWAMR_BUILD_MULTI_MODULE=1 -DWAMR_BUILD_MINI_LOADER=1 -DWAMR_BUILD_SHARED_HEAP=1" "-DWAMR_DISABLE_HW_BOUND_CHECK=1" "-DWAMR_CONFIGURABLE_BOUNDS_CHECKS=1" + "-DWAMR_BUILD_EXTENDED_CONST_EXPR=1" # - Debug "-DWAMR_BUILD_DEBUG_INTERP=1 -DWAMR_BUILD_DEBUG_AOT=1 -DWAMR_BUILD_DYNAMIC_AOT_DEBUG=1" # - developer options diff --git a/.github/workflows/build_docker_images.yml b/.github/workflows/build_docker_images.yml index fed9d4b3eb..9c4371b4e7 100644 --- a/.github/workflows/build_docker_images.yml +++ b/.github/workflows/build_docker_images.yml @@ -26,7 +26,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 - name: Build and save Docker image(wasm-debug-server:${{ inputs.ver_num }}) to tar file run: | diff --git a/.github/workflows/build_iwasm_release.yml b/.github/workflows/build_iwasm_release.yml index 0ecd48bf1c..ab84c4f43f 100644 --- a/.github/workflows/build_iwasm_release.yml +++ b/.github/workflows/build_iwasm_release.yml @@ -104,11 +104,11 @@ jobs: contents: write # for uploading release artifacts steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6.0.2 - name: get cached LLVM libraries id: retrieve_llvm_libs - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | ./core/deps/llvm/build/bin diff --git a/.github/workflows/build_llvm_libraries.yml b/.github/workflows/build_llvm_libraries.yml index 54f8781a44..b661131f2c 100644 --- a/.github/workflows/build_llvm_libraries.yml +++ b/.github/workflows/build_llvm_libraries.yml @@ -45,16 +45,16 @@ jobs: steps: - name: checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 - - name: install dependencies for non macos-14 - if: inputs.os != 'macos-14' + - name: install dependencies for non macos + if: ${{ !startsWith(inputs.os, 'macos') }} shell: bash run: /usr/bin/env python3 -m pip install -r requirements.txt working-directory: build-scripts - - name: install dependencies for macos-14 - if: inputs.os == 'macos-14' + - name: install dependencies for macos + if: startsWith(inputs.os, 'macos') run: /usr/bin/env python3 -m pip install -r requirements.txt --break-system-packages working-directory: build-scripts @@ -79,7 +79,7 @@ jobs: - name: Cache LLVM libraries id: retrieve_llvm_libs - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | ./core/deps/llvm/build/bin @@ -89,7 +89,7 @@ jobs: ./core/deps/llvm/build/share key: ${{ steps.create_lib_cache_key.outputs.key}} - - uses: actions/cache@v4 + - uses: actions/cache@v5 with: path: ~/.cache/ccache key: 0-ccache-${{ inputs.os }}-${{ steps.get_last_commit.outputs.last_commit }} @@ -101,7 +101,7 @@ jobs: - run: sudo apt install -y ccache ninja-build if: steps.retrieve_llvm_libs.outputs.cache-hit != 'true' && startsWith(inputs.os, 'ubuntu') && inputs.container_image == '' - - uses: actions/cache@v4 + - uses: actions/cache@v5 with: path: ~/Library/Caches/ccache key: 0-ccache-${{ inputs.os }}-${{ steps.get_last_commit.outputs.last_commit }} @@ -112,7 +112,7 @@ jobs: - run: brew install ccache ninja if: steps.retrieve_llvm_libs.outputs.cache-hit != 'true' && startsWith(inputs.os, 'macos') - - uses: actions/cache@v4 + - uses: actions/cache@v5 with: path: ~/.cache/ccache key: 0-ccache-${{ inputs.os }}-${{ steps.get_last_commit.outputs.last_commit }} diff --git a/.github/workflows/build_wamr_lldb.yml b/.github/workflows/build_wamr_lldb.yml index 8c259d3009..98a15e653b 100644 --- a/.github/workflows/build_wamr_lldb.yml +++ b/.github/workflows/build_wamr_lldb.yml @@ -55,7 +55,7 @@ jobs: contents: write # for uploading release artifacts steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6.0.2 - name: download and install wasi-sdk run: | @@ -68,7 +68,7 @@ jobs: - name: Cache build id: lldb_build_cache - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | ./core/deps/llvm-project/build/bin diff --git a/.github/workflows/build_wamr_sdk.yml b/.github/workflows/build_wamr_sdk.yml index c3faeaa6d0..df1f26c748 100644 --- a/.github/workflows/build_wamr_sdk.yml +++ b/.github/workflows/build_wamr_sdk.yml @@ -45,7 +45,7 @@ jobs: contents: write # for uploading release artifacts steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6.0.2 - name: download wamr-app-framework run: | diff --git a/.github/workflows/build_wamr_vscode_ext.yml b/.github/workflows/build_wamr_vscode_ext.yml index 1b4f3fc5d8..7410fd0955 100644 --- a/.github/workflows/build_wamr_vscode_ext.yml +++ b/.github/workflows/build_wamr_vscode_ext.yml @@ -24,7 +24,7 @@ jobs: contents: write # for uploading release artifacts steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6.0.2 - name: Use Node.js 18.x uses: actions/setup-node@v6 diff --git a/.github/workflows/build_wamr_wasi_extensions.yml b/.github/workflows/build_wamr_wasi_extensions.yml index 82b611e39e..21a07a1cc1 100644 --- a/.github/workflows/build_wamr_wasi_extensions.yml +++ b/.github/workflows/build_wamr_wasi_extensions.yml @@ -28,7 +28,7 @@ jobs: os: [ubuntu-22.04] steps: - name: checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 - name: install-wasi-sdk-wabt uses: ./.github/actions/install-wasi-sdk-wabt diff --git a/.github/workflows/build_wamrc.yml b/.github/workflows/build_wamrc.yml index d74805c3cd..9fbe38c0a0 100644 --- a/.github/workflows/build_wamrc.yml +++ b/.github/workflows/build_wamrc.yml @@ -41,11 +41,11 @@ jobs: contents: write # for uploading release artifacts steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6.0.2 - name: get cached LLVM libraries id: retrieve_llvm_libs - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | ./core/deps/llvm/build/bin diff --git a/.github/workflows/check_version_h.yml b/.github/workflows/check_version_h.yml index 98d89f814b..4ea4c1105e 100644 --- a/.github/workflows/check_version_h.yml +++ b/.github/workflows/check_version_h.yml @@ -14,7 +14,7 @@ jobs: steps: - name: checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 - name: cmake execute to generate version.h run: cmake -B build_version -S . diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 292123aa31..6f466c8233 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -43,13 +43,13 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v6.0.2 with: submodules: recursive # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v4.31.2 + uses: github/codeql-action/init@v4.32.6 with: languages: ${{ matrix.language }} # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs @@ -58,10 +58,10 @@ jobs: config-file: ./.github/codeql/codeql_config.yml - run: | - ./.github/scripts/codeql_buildscript.sh + ./.github/scripts/codeql_buildscript.sh || exit 1 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3.29.1 + uses: github/codeql-action/analyze@v4.32.6 with: category: "/language:${{matrix.language}}" upload: false @@ -102,7 +102,7 @@ jobs: -**:cpp/unused-local-variable -**:cpp/unused-static-function -**:cpp/unused-static-variable - -**:cpp/use-of-goto + -**:cpp/use-of-goto ## Exclude rules 2. Related to special usage of APIs -**:cpp/alloca-in-loop -**:cpp/command-line-injection @@ -114,14 +114,13 @@ jobs: output: ${{ steps.step1.outputs.sarif-output }}/cpp.sarif - name: Upload CodeQL results to code scanning - uses: github/codeql-action/upload-sarif@v4.31.2 + uses: github/codeql-action/upload-sarif@v4.32.6 with: sarif_file: ${{ steps.step1.outputs.sarif-output }} category: "/language:${{matrix.language}}" - name: Upload CodeQL results as an artifact - if: success() || failure() - uses: actions/upload-artifact@v4.6.2 + uses: actions/upload-artifact@v7.0.0 with: name: codeql-results path: ${{ steps.step1.outputs.sarif-output }} diff --git a/.github/workflows/coding_guidelines.yml b/.github/workflows/coding_guidelines.yml index 4feaf33957..402c455d86 100644 --- a/.github/workflows/coding_guidelines.yml +++ b/.github/workflows/coding_guidelines.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 with: fetch-depth: 0 diff --git a/.github/workflows/compilation_on_android_ubuntu.yml b/.github/workflows/compilation_on_android_ubuntu.yml index 3d888d4aa3..1ac9bd5b47 100644 --- a/.github/workflows/compilation_on_android_ubuntu.yml +++ b/.github/workflows/compilation_on_android_ubuntu.yml @@ -91,8 +91,7 @@ jobs: arch: "X86" build_wamrc: - needs: - [build_llvm_libraries_on_ubuntu_2204] + needs: [build_llvm_libraries_on_ubuntu_2204] runs-on: ${{ matrix.os }} strategy: matrix: @@ -101,13 +100,13 @@ jobs: llvm_cache_key: ${{ needs.build_llvm_libraries_on_ubuntu_2204.outputs.cache_key }} steps: - name: checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 # since jobs.id can't contain the dot character # it is hard to use `format` to assemble the cache key - name: Get LLVM libraries id: retrieve_llvm_libs - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | ./core/deps/llvm/build/bin @@ -129,8 +128,7 @@ jobs: working-directory: wamr-compiler build_iwasm: - needs: - [build_llvm_libraries_on_ubuntu_2204] + needs: [build_llvm_libraries_on_ubuntu_2204] runs-on: ${{ matrix.os }} strategy: matrix: @@ -157,8 +155,6 @@ jobs: "-DWAMR_BUILD_MEMORY_PROFILING=1", "-DWAMR_BUILD_MULTI_MODULE=1", "-DWAMR_BUILD_PERF_PROFILING=1", - "-DWAMR_BUILD_REF_TYPES=1", - "-DWAMR_BUILD_SIMD=1", "-DWAMR_BUILD_LIB_SIMDE=1", "-DWAMR_BUILD_TAIL_CALL=1", "-DWAMR_DISABLE_HW_BOUND_CHECK=1", @@ -171,8 +167,7 @@ jobs: os: [ubuntu-22.04] platform: [android, linux] exclude: - # incompatible feature and platform - # incompatible mode and feature + # incompatible feature and platform and mode # MULTI_MODULE only on INTERP mode and AOT mode - make_options_run_mode: $FAST_JIT_BUILD_OPTIONS make_options_feature: "-DWAMR_BUILD_MULTI_MODULE=1" @@ -182,9 +177,6 @@ jobs: make_options_feature: "-DWAMR_BUILD_MULTI_MODULE=1" - make_options_run_mode: $MULTI_TIER_JIT_BUILD_OPTIONS make_options_feature: "-DWAMR_BUILD_MULTI_MODULE=1" - # SIMD only on JIT/AOT/fast interpreter mode - - make_options_run_mode: $CLASSIC_INTERP_BUILD_OPTIONS - make_options_feature: "-DWAMR_BUILD_SIMD=1" # DEBUG_INTERP only on CLASSIC INTERP mode - make_options_run_mode: $AOT_BUILD_OPTIONS make_options_feature: "-DWAMR_BUILD_DEBUG_INTERP=1" @@ -268,15 +260,24 @@ jobs: include: - os: ubuntu-22.04 llvm_cache_key: ${{ needs.build_llvm_libraries_on_ubuntu_2204.outputs.cache_key }} + # classic interp doesn't support SIMD + - make_options_run_mode: $CLASSIC_INTERP_BUILD_OPTIONS + extra_options: "-DWAMR_BUILD_SIMD=0" + # fast jit doesn't support SIMD + - make_options_run_mode: $FAST_JIT_BUILD_OPTIONS + extra_options: "-DWAMR_BUILD_SIMD=0" + # multi-tier jit doesn't support SIMD + - make_options_run_mode: $MULTI_TIER_JIT_BUILD_OPTIONS + extra_options: "-DWAMR_BUILD_SIMD=0" steps: - name: checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 # only download llvm cache when needed - name: Get LLVM libraries id: retrieve_llvm_libs if: endsWith(matrix.make_options_run_mode, '_JIT_BUILD_OPTIONS') - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | ./core/deps/llvm/build/bin @@ -294,7 +295,7 @@ jobs: if: matrix.platform == 'linux' run: | mkdir build && cd build - cmake .. -DCMAKE_C_FLAGS="-Werror" ${{ matrix.make_options_run_mode }} ${{ matrix.make_options_feature }} + cmake .. -DCMAKE_C_FLAGS="-Werror" ${{ matrix.make_options_run_mode }} ${{ matrix.make_options_feature }} ${{ matrix.extra_options}} cmake --build . --config Release --parallel 4 working-directory: product-mini/platforms/${{ matrix.platform }} @@ -308,31 +309,24 @@ jobs: working-directory: product-mini/platforms/${{ matrix.platform }} build_unit_tests: - needs: - [ - build_llvm_libraries_on_ubuntu_2204, - build_wamrc - ] + needs: [build_llvm_libraries_on_ubuntu_2204, build_wamrc] runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: [ubuntu-22.04] - build_target: [ - "X86_64", - "X86_32", - ] + build_target: ["X86_64", "X86_32"] include: - os: ubuntu-22.04 llvm_cache_key: ${{ needs.build_llvm_libraries_on_ubuntu_2204.outputs.cache_key }} steps: - name: checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 - name: Get LLVM libraries id: retrieve_llvm_libs - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | ./core/deps/llvm/build/bin @@ -350,7 +344,7 @@ jobs: uses: ./.github/actions/install-wasi-sdk-wabt with: os: ${{ matrix.os }} - + - name: Build wamrc run: | mkdir build && cd build @@ -374,8 +368,7 @@ jobs: working-directory: tests/unit build_regression_tests: - needs: - [build_llvm_libraries_on_ubuntu_2204] + needs: [build_llvm_libraries_on_ubuntu_2204] runs-on: ${{ matrix.os }} strategy: matrix: @@ -383,14 +376,14 @@ jobs: include: - os: ubuntu-22.04 llvm_cache_key: ${{ needs.build_llvm_libraries_on_ubuntu_2204.outputs.cache_key }} - + steps: - name: checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 - name: Get LLVM libraries id: retrieve_llvm_libs - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | ./core/deps/llvm/build/bin @@ -403,24 +396,19 @@ jobs: - name: Quit if cache miss if: (steps.retrieve_llvm_libs.outputs.cache-hit != 'true') run: echo "::error::can not get prebuilt llvm libraries" && exit 1 - + - name: Build wamrc and iwasm run: | ./build_wamr.sh working-directory: tests/regression/ba-issues - + - name: Run regression tests run: | python run.py working-directory: tests/regression/ba-issues build_samples_wasm_c_api: - needs: - [ - build_iwasm, - build_llvm_libraries_on_ubuntu_2204, - build_wamrc, - ] + needs: [build_iwasm, build_llvm_libraries_on_ubuntu_2204, build_wamrc] runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -439,15 +427,29 @@ jobs: include: - os: ubuntu-22.04 llvm_cache_key: ${{ needs.build_llvm_libraries_on_ubuntu_2204.outputs.cache_key }} + # classic interp doesn't support SIMD + - make_options: $CLASSIC_INTERP_BUILD_OPTIONS + extra_options: "-DWAMR_BUILD_SIMD=0" + # fast jit doesn't support Multi-module and SIMD + - make_options: $FAST_JIT_BUILD_OPTIONS + extra_options: "-DWAMR_BUILD_SIMD=0 -DWAMR_BUILD_MULTI_MODULE=0" + # multi-tier jit doesn't support Multi-module and SIMD + - make_options: $MULTI_TIER_JIT_BUILD_OPTIONS + extra_options: "-DWAMR_BUILD_SIMD=0 -DWAMR_BUILD_MULTI_MODULE=0" + # LLVM JIT doesn't support Multi-module + - make_options: $LLVM_LAZY_JIT_BUILD_OPTIONS + extra_options: "-DWAMR_BUILD_MULTI_MODULE=0" + - make_options: $LLVM_EAGER_JIT_BUILD_OPTIONS + extra_options: "-DWAMR_BUILD_MULTI_MODULE=0" steps: - name: checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 - name: Get LLVM libraries id: retrieve_llvm_libs if: (!endsWith(matrix.make_options, '_INTERP_BUILD_OPTIONS')) - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | ./core/deps/llvm/build/bin @@ -477,7 +479,7 @@ jobs: - name: Build Sample [wasm-c-api] run: | VERBOSE=1 - cmake -S . -B build ${{ matrix.make_options }} + cmake -S . -B build ${{ matrix.make_options }} ${{ matrix.extra_options }} cmake --build build --config Debug --parallel 4 ctest --test-dir build --output-on-failure working-directory: samples/wasm-c-api @@ -488,12 +490,7 @@ jobs: working-directory: samples/printversion build_samples_others: - needs: - [ - build_iwasm, - build_llvm_libraries_on_ubuntu_2204, - build_wamrc, - ] + needs: [build_iwasm, build_llvm_libraries_on_ubuntu_2204, build_wamrc] runs-on: ${{ matrix.os }} strategy: matrix: @@ -504,11 +501,11 @@ jobs: steps: - name: checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 - name: Get LLVM libraries id: retrieve_llvm_libs - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | ./core/deps/llvm/build/bin @@ -632,12 +629,7 @@ jobs: ./import-func-callback test: - needs: - [ - build_iwasm, - build_llvm_libraries_on_ubuntu_2204, - build_wamrc, - ] + needs: [build_iwasm, build_llvm_libraries_on_ubuntu_2204, build_wamrc] runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -675,7 +667,7 @@ jobs: steps: - name: checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 - name: Set-up OCaml uses: ocaml/setup-ocaml@v3 @@ -709,7 +701,7 @@ jobs: - name: Get LLVM libraries if: env.USE_LLVM == 'true' id: retrieve_llvm_libs - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | ./core/deps/llvm/build/bin diff --git a/.github/workflows/compilation_on_macos.yml b/.github/workflows/compilation_on_macos.yml index 912bf7dea7..643caa80ee 100644 --- a/.github/workflows/compilation_on_macos.yml +++ b/.github/workflows/compilation_on_macos.yml @@ -65,7 +65,7 @@ jobs: actions: write uses: ./.github/workflows/build_llvm_libraries.yml with: - os: "macos-13" + os: "macos-15-intel" arch: "X86" build_llvm_libraries_on_arm_macos: permissions: @@ -73,24 +73,27 @@ jobs: actions: write uses: ./.github/workflows/build_llvm_libraries.yml with: - os: "macos-14" + os: "macos-15" arch: "AArch64 ARM" build_wamrc: - needs: [build_llvm_libraries_on_intel_macos] + needs: [build_llvm_libraries_on_intel_macos, build_llvm_libraries_on_arm_macos] runs-on: ${{ matrix.os }} strategy: matrix: + os: [macos-15, macos-15-intel] include: - - os: macos-13 + - os: macos-15-intel llvm_cache_key: ${{ needs.build_llvm_libraries_on_intel_macos.outputs.cache_key }} + - os: macos-15 + llvm_cache_key: ${{ needs.build_llvm_libraries_on_arm_macos.outputs.cache_key }} steps: - name: checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 - name: Get LLVM libraries id: retrieve_llvm_libs - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | ./core/deps/llvm/build/bin @@ -112,7 +115,7 @@ jobs: working-directory: wamr-compiler build_iwasm: - needs: [build_llvm_libraries_on_intel_macos] + needs: [build_llvm_libraries_on_intel_macos, build_llvm_libraries_on_arm_macos] runs-on: ${{ matrix.os }} strategy: matrix: @@ -138,13 +141,11 @@ jobs: "-DWAMR_BUILD_MEMORY_PROFILING=1", "-DWAMR_BUILD_MULTI_MODULE=1", "-DWAMR_BUILD_PERF_PROFILING=1", - "-DWAMR_BUILD_REF_TYPES=1", - "-DWAMR_BUILD_SIMD=1", "-DWAMR_BUILD_TAIL_CALL=1", "-DWAMR_DISABLE_HW_BOUND_CHECK=1", "-DWAMR_BUILD_EXTENDED_CONST_EXPR=1", ] - os: [macos-13] + os: [macos-15, macos-15-intel] platform: [darwin] exclude: # incompatible feature and platform @@ -154,11 +155,6 @@ jobs: make_options_feature: "-DWAMR_BUILD_MULTI_MODULE=1" - make_options_run_mode: $LLVM_EAGER_JIT_BUILD_OPTIONS make_options_feature: "-DWAMR_BUILD_MULTI_MODULE=1" - # SIMD only on JIT/AOT mode - - make_options_run_mode: $CLASSIC_INTERP_BUILD_OPTIONS - make_options_feature: "-DWAMR_BUILD_SIMD=1" - - make_options_run_mode: $FAST_INTERP_BUILD_OPTIONS - make_options_feature: "-DWAMR_BUILD_SIMD=1" # DEBUG_INTERP only on CLASSIC INTERP mode - make_options_run_mode: $AOT_BUILD_OPTIONS make_options_feature: "-DWAMR_BUILD_DEBUG_INTERP=1" @@ -186,17 +182,22 @@ jobs: - make_options_run_mode: $LLVM_EAGER_JIT_BUILD_OPTIONS make_options_feature: "-DWAMR_BUILD_MINI_LOADER=1" include: - - os: macos-13 + - os: macos-15 + llvm_cache_key: ${{ needs.build_llvm_libraries_on_arm_macos.outputs.cache_key }} + - os: macos-15-intel llvm_cache_key: ${{ needs.build_llvm_libraries_on_intel_macos.outputs.cache_key }} + # classic interp doesn't support SIMD + - make_options_run_mode: $CLASSIC_INTERP_BUILD_OPTIONS + extra_options: "-DWAMR_BUILD_SIMD=0" steps: - name: checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 # only download llvm cache when needed - name: Get LLVM libraries id: retrieve_llvm_libs if: endsWith(matrix.make_options_run_mode, '_JIT_BUILD_OPTIONS') - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | ./core/deps/llvm/build/bin @@ -213,7 +214,7 @@ jobs: - name: Build iwasm run: | mkdir build && cd build - cmake .. -DCMAKE_C_FLAGS="-Werror" ${{ matrix.make_options_run_mode }} ${{ matrix.make_options_feature }} + cmake .. -DCMAKE_C_FLAGS="-Werror" ${{ matrix.make_options_run_mode }} ${{ matrix.make_options_feature }} ${{ matrix.extra_options }} cmake --build . --config Release --parallel 4 working-directory: product-mini/platforms/${{ matrix.platform }} @@ -222,6 +223,7 @@ jobs: [ build_iwasm, build_llvm_libraries_on_intel_macos, + build_llvm_libraries_on_arm_macos, build_wamrc, ] runs-on: ${{ matrix.os }} @@ -231,24 +233,32 @@ jobs: $AOT_BUILD_OPTIONS, $CLASSIC_INTERP_BUILD_OPTIONS, $FAST_INTERP_BUILD_OPTIONS, - $FAST_JIT_BUILD_OPTIONS, $LLVM_LAZY_JIT_BUILD_OPTIONS, $LLVM_EAGER_JIT_BUILD_OPTIONS, - $MULTI_TIER_JIT_BUILD_OPTIONS, ] - os: [macos-13] + os: [macos-15, macos-15-intel] include: - - os: macos-13 + - os: macos-15 + llvm_cache_key: ${{ needs.build_llvm_libraries_on_arm_macos.outputs.cache_key }} + - os: macos-15-intel llvm_cache_key: ${{ needs.build_llvm_libraries_on_intel_macos.outputs.cache_key }} + # classic interp doesn't support SIMD + - make_options: $CLASSIC_INTERP_BUILD_OPTIONS + extra_options: "-DWAMR_BUILD_SIMD=0" + # LLVM JIT doesn't support Multi-module + - make_options: $LLVM_LAZY_JIT_BUILD_OPTIONS + extra_options: "-DWAMR_BUILD_MULTI_MODULE=0" + - make_options: $LLVM_EAGER_JIT_BUILD_OPTIONS + extra_options: "-DWAMR_BUILD_MULTI_MODULE=0" steps: - name: checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 - name: Get LLVM libraries id: retrieve_llvm_libs if: (!endsWith(matrix.make_options, '_INTERP_BUILD_OPTIONS')) - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | ./core/deps/llvm/build/bin @@ -278,7 +288,7 @@ jobs: - name: Build Sample [wasm-c-api] run: | VERBOSE=1 - cmake -S . -B build ${{ matrix.make_options }} + cmake -S . -B build ${{ matrix.make_options }} ${{ matrix.extra_options }} cmake --build build --config Debug --parallel 4 ctest --test-dir build --output-on-failure working-directory: samples/wasm-c-api @@ -293,15 +303,15 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-13, macos-14] + os: [macos-15-intel, macos-15] include: - - os: macos-13 + - os: macos-15-intel llvm_cache_key: ${{ needs.build_llvm_libraries_on_intel_macos.outputs.cache_key }} - - os: macos-14 + - os: macos-15 llvm_cache_key: ${{ needs.build_llvm_libraries_on_arm_macos.outputs.cache_key }} steps: - name: checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 - name: install-wasi-sdk-wabt uses: ./.github/actions/install-wasi-sdk-wabt @@ -356,7 +366,7 @@ jobs: - name: Get LLVM libraries id: retrieve_llvm_libs - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | ./core/deps/llvm/build/bin @@ -430,3 +440,13 @@ jobs: cmake .. cmake --build . --config Release --parallel 4 ./import-func-callback + + - name: Test x18 register reservation (macOS ARM64 only) + if: matrix.os == 'macos-15' + run: | + cd product-mini/platforms/darwin + mkdir -p build && cd build + cmake .. -DWAMR_BUILD_AOT=1 + cmake --build . --config Release --parallel 4 + cd ../../../../tests/standalone/test-aot-x18-reserve + ./run.sh --aot diff --git a/.github/workflows/compilation_on_nuttx.yml b/.github/workflows/compilation_on_nuttx.yml index 4e164fc82b..1ad28f3bb8 100644 --- a/.github/workflows/compilation_on_nuttx.yml +++ b/.github/workflows/compilation_on_nuttx.yml @@ -64,6 +64,8 @@ jobs: "boards/arm/rp2040/raspberrypi-pico/configs/nsh", # cortex-m7 "boards/arm/stm32h7/nucleo-h743zi/configs/nsh", + # cortex-m33 + "boards/arm/rp23xx/raspberrypi-pico-2/configs/nsh", # riscv32gc "boards/risc-v/qemu-rv/rv-virt/configs/nsh", # riscv64gc @@ -85,21 +87,21 @@ jobs: steps: - name: Checkout NuttX - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 with: repository: apache/nuttx - ref: releases/12.9 + ref: 09a71ec7c16c43398d5acbdcbeee7b08736c3170 path: nuttx - name: Checkout NuttX Apps - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 with: repository: apache/nuttx-apps - ref: releases/12.9 + ref: 6bd593459c4af3cef325c3d22bccd5537a8ed755 path: apps - name: Checkout WAMR - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 with: repository: ${{ github.repository }} path: apps/interpreters/wamr/wamr @@ -108,6 +110,8 @@ jobs: working-directory: nuttx run: | tools/configure.sh ${{ matrix.nuttx_board_config }} + kconfig-tweak --disable CONFIG_RP2040_UF2_BINARY + kconfig-tweak --disable CONFIG_RP23XX_UF2_BINARY kconfig-tweak --enable CONFIG_PSEUDOFS_SOFTLINKS kconfig-tweak --enable CONFIG_INTERPRETERS_WAMR kconfig-tweak --enable CONFIG_INTERPRETERS_IWASM_TASK @@ -122,7 +126,7 @@ jobs: run: make -j$(nproc) EXTRAFLAGS=-Werror - name: Checkout Bloaty - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 with: repository: google/bloaty submodules: recursive diff --git a/.github/workflows/compilation_on_sgx.yml b/.github/workflows/compilation_on_sgx.yml index aa95f94699..6791d31aaf 100644 --- a/.github/workflows/compilation_on_sgx.yml +++ b/.github/workflows/compilation_on_sgx.yml @@ -114,9 +114,16 @@ jobs: # MINI_LOADER only on INTERP mode - make_options_run_mode: $AOT_BUILD_OPTIONS make_options_feature: "-DWAMR_BUILD_MINI_LOADER=1" + # FAST_JIT doesn't support MULTI_MODULE + - make_options_run_mode: $FAST_JIT_BUILD_OPTIONS + make_options_feature: "-DWAMR_BUILD_MULTI_MODULE=1" + include: + # classic interp mode doesn't support SIMD + - make_options_run_mode: $CLASSIC_INTERP_BUILD_OPTIONS + make_options_feature: "-DWAMR_BUILD_SIMD=0" steps: - name: checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 - name: install SGX SDK and necessary libraries uses: ./.github/actions/install-linux-sgx @@ -159,7 +166,7 @@ jobs: steps: - name: checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 - name: install-wasi-sdk-wabt uses: ./.github/actions/install-wasi-sdk-wabt @@ -183,7 +190,7 @@ jobs: - name: Get LLVM libraries if: matrix.iwasm_make_options_run_mode == '$AOT_BUILD_OPTIONS' id: retrieve_llvm_libs - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | ./core/deps/llvm/build/bin @@ -255,12 +262,12 @@ jobs: steps: - name: checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 - name: Get LLVM libraries if: matrix.running_mode == 'aot' id: retrieve_llvm_libs - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | ./core/deps/llvm/build/bin diff --git a/.github/workflows/compilation_on_windows.yml b/.github/workflows/compilation_on_windows.yml index 003a6ba988..56adbe7ef6 100644 --- a/.github/workflows/compilation_on_windows.yml +++ b/.github/workflows/compilation_on_windows.yml @@ -78,14 +78,13 @@ jobs: "-DWAMR_BUILD_CUSTOM_NAME_SECTION=1", "-DWAMR_DISABLE_HW_BOUND_CHECK=1", "-DWAMR_BUILD_REF_TYPES=1", - "-DWAMR_BUILD_SIMD=1", "-DWAMR_BUILD_DEBUG_INTERP=1", "-DWAMR_BUILD_LIB_PTHREAD=1", "-DWAMR_BUILD_LIB_WASI_THREADS=1", "-DWAMR_BUILD_LIBC_UVWASI=0 -DWAMR_BUILD_LIBC_WASI=1", ] steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6.0.2 - name: clone uvwasi library if: ${{ !contains(matrix.build_options, '-DWAMR_BUILD_LIBC_UVWASI=0') }} @@ -109,13 +108,13 @@ jobs: llvm_cache_key: ${{ needs.build_llvm_libraries_on_windows.outputs.cache_key }} steps: - name: checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 # since jobs.id can't contain the dot character # it is hard to use `format` to assemble the cache key - name: Get LLVM libraries id: retrieve_llvm_libs - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | ./core/deps/llvm/build/bin @@ -151,7 +150,7 @@ jobs: ] steps: - name: checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 - name: download and install wasi-sdk if: matrix.test_option == '$WASI_TEST_OPTIONS' diff --git a/.github/workflows/compilation_on_zephyr.yml b/.github/workflows/compilation_on_zephyr.yml index 06ff334f1e..ad712deb84 100644 --- a/.github/workflows/compilation_on_zephyr.yml +++ b/.github/workflows/compilation_on_zephyr.yml @@ -10,8 +10,7 @@ on: - opened - synchronize paths: - - ".github/**" - - "!.github/ISSUE_TEMPLATE/**" + - ".github/workflows/compilation_on_zephyr.yml" - "build-scripts/**" - "core/**" - "!core/deps/**" @@ -27,8 +26,7 @@ on: - main - "dev/**" paths: - - ".github/**" - - "!.github/ISSUE_TEMPLATE/**" + - ".github/workflows/compilation_on_zephyr.yml" - "build-scripts/**" - "core/**" - "!core/deps/**" @@ -80,7 +78,7 @@ jobs: # └─── application/ --> DUMMY. keep west_lite.yml here - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 with: path: modules/wasm-micro-runtime diff --git a/.github/workflows/create_tag.yml b/.github/workflows/create_tag.yml index dcb2937495..2ca4e8283a 100644 --- a/.github/workflows/create_tag.yml +++ b/.github/workflows/create_tag.yml @@ -29,7 +29,7 @@ jobs: contents: write # create and push tags steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6.0.2 # Full git history is needed to get a proper list of commits and tags with: fetch-depth: 0 diff --git a/.github/workflows/hadolint_dockerfiles.yml b/.github/workflows/hadolint_dockerfiles.yml index e43cd10372..8f4051f86b 100644 --- a/.github/workflows/hadolint_dockerfiles.yml +++ b/.github/workflows/hadolint_dockerfiles.yml @@ -37,7 +37,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 # on default, hadolint will fail on warnings and errors - name: Run hadolint on dockerfiles diff --git a/.github/workflows/nightly_run.yml b/.github/workflows/nightly_run.yml index 58532aac85..6bc090afd9 100644 --- a/.github/workflows/nightly_run.yml +++ b/.github/workflows/nightly_run.yml @@ -67,13 +67,13 @@ jobs: llvm_cache_key: ${{ needs.build_llvm_libraries_on_ubuntu.outputs.cache_key }} steps: - name: checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 # since jobs.id can't contain the dot character # it is hard to use `format` to assemble the cache key - name: Get LLVM libraries id: retrieve_llvm_libs - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | ./core/deps/llvm/build/bin @@ -122,8 +122,6 @@ jobs: "-DWAMR_BUILD_MEMORY_PROFILING=1", "-DWAMR_BUILD_MULTI_MODULE=1", "-DWAMR_BUILD_PERF_PROFILING=1", - "-DWAMR_BUILD_REF_TYPES=1", - "-DWAMR_BUILD_SIMD=1", "-DWAMR_BUILD_TAIL_CALL=1", "-DWAMR_DISABLE_HW_BOUND_CHECK=1", "-DWAMR_BUILD_MEMORY64=1", @@ -145,11 +143,6 @@ jobs: make_options_feature: "-DWAMR_BUILD_MULTI_MODULE=1" - make_options_run_mode: $MULTI_TIER_JIT_BUILD_OPTIONS make_options_feature: "-DWAMR_BUILD_MULTI_MODULE=1" - # SIMD only on JIT/AOT mode - - make_options_run_mode: $CLASSIC_INTERP_BUILD_OPTIONS - make_options_feature: "-DWAMR_BUILD_SIMD=1" - - make_options_run_mode: $FAST_INTERP_BUILD_OPTIONS - make_options_feature: "-DWAMR_BUILD_SIMD=1" # DEBUG_INTERP only on CLASSIC INTERP mode - make_options_run_mode: $AOT_BUILD_OPTIONS make_options_feature: "-DWAMR_BUILD_DEBUG_INTERP=1" @@ -230,16 +223,25 @@ jobs: include: - os: ubuntu-22.04 llvm_cache_key: ${{ needs.build_llvm_libraries_on_ubuntu.outputs.cache_key }} + # classic interp doesn't support SIMD + - make_options_run_mode: $CLASSIC_INTERP_BUILD_OPTIONS + extra_options: "-DWAMR_BUILD_SIMD=0" + # fast jit doesn't support SIMD + - make_options_run_mode: $FAST_JIT_BUILD_OPTIONS + extra_options: "-DWAMR_BUILD_SIMD=0" + # multi-tier jit doesn't support SIMD + - make_options_run_mode: $MULTI_TIER_JIT_BUILD_OPTIONS + extra_options: "-DWAMR_BUILD_SIMD=0" steps: - name: checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 # only download llvm cache when needed - name: Get LLVM libraries id: retrieve_llvm_libs if: endsWith(matrix.make_options_run_mode, '_JIT_BUILD_OPTIONS') - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | ./core/deps/llvm/build/bin @@ -257,7 +259,7 @@ jobs: if: matrix.platform == 'linux' run: | mkdir build && cd build - cmake .. ${{ matrix.make_options_run_mode }} ${{ matrix.make_options_feature }} + cmake .. ${{ matrix.make_options_run_mode }} ${{ matrix.make_options_feature }} ${{ matrix.extra_options }} cmake --build . --config Release --parallel 4 working-directory: product-mini/platforms/${{ matrix.platform }} @@ -265,7 +267,7 @@ jobs: if: matrix.platform == 'android' run: | mkdir build && cd build - cmake .. ${{ matrix.make_options_run_mode }} ${{ matrix.make_options_feature }} \ + cmake .. ${{ matrix.make_options_run_mode }} ${{ matrix.make_options_feature }} ${{ matrix.extra_options }} \ -DWAMR_BUILD_TARGET=X86_64 cmake --build . --config Release --parallel 4 working-directory: product-mini/platforms/${{ matrix.platform }} @@ -295,8 +297,6 @@ jobs: "-DWAMR_BUILD_MEMORY_PROFILING=1", "-DWAMR_BUILD_MULTI_MODULE=1", "-DWAMR_BUILD_PERF_PROFILING=1", - "-DWAMR_BUILD_REF_TYPES=1", - "-DWAMR_BUILD_SIMD=1", "-DWAMR_BUILD_TAIL_CALL=1", "-DWAMR_DISABLE_HW_BOUND_CHECK=1", "-DWAMR_BUILD_MEMORY64=1", @@ -339,6 +339,13 @@ jobs: make_options_feature: "-DWAMR_BUILD_MULTI_MEMORY=1" - make_options_run_mode: $FAST_JIT_BUILD_OPTIONS make_options_feature: "-DWAMR_BUILD_MULTI_MEMORY=1" + include: + # classic interp doesn't support SIMD + - make_options_run_mode: $CLASSIC_INTERP_BUILD_OPTIONS + extra_options: "-DWAMR_BUILD_SIMD=0" + # fast jit doesn't support SIMD + - make_options_run_mode: $FAST_JIT_BUILD_OPTIONS + extra_options: "-DWAMR_BUILD_SIMD=0" steps: - name: Install dependencies run: | @@ -357,7 +364,7 @@ jobs: - name: Build iwasm run: | mkdir build && cd build - cmake .. ${{ matrix.make_options_run_mode }} ${{ matrix.make_options_feature }} -DCMAKE_C_COMPILER=gcc-4.8 -DCMAKE_CXX_COMPILER=g++-4.8 + cmake .. ${{ matrix.make_options_run_mode }} ${{ matrix.make_options_feature }} ${{ matrix.extra_options }} -DCMAKE_C_COMPILER=gcc-4.8 -DCMAKE_CXX_COMPILER=g++-4.8 cmake --build . --config Release --parallel 4 working-directory: wamr/product-mini/platforms/linux @@ -382,17 +389,32 @@ jobs: include: - os: ubuntu-22.04 llvm_cache_key: ${{ needs.build_llvm_libraries_on_ubuntu.outputs.cache_key }} + # classic interp doesn't support SIMD + - make_options: $CLASSIC_INTERP_BUILD_OPTIONS + extra_options: "-DWAMR_BUILD_SIMD=0" + # fast jit doesn't support Multi-module and SIMD + - make_options: $FAST_JIT_BUILD_OPTIONS + extra_options: "-DWAMR_BUILD_SIMD=0 -DWAMR_BUILD_MULTI_MODULE=0" + # multi-tier jit doesn't support Multi-module and SIMD + - make_options: $MULTI_TIER_JIT_BUILD_OPTIONS + extra_options: "-DWAMR_BUILD_SIMD=0 -DWAMR_BUILD_MULTI_MODULE=0" + # LLVM JIT doesn't support Multi-module + - make_options: $LLVM_LAZY_JIT_BUILD_OPTIONS + extra_options: "-DWAMR_BUILD_MULTI_MODULE=0" + - make_options: $LLVM_EAGER_JIT_BUILD_OPTIONS + extra_options: "-DWAMR_BUILD_MULTI_MODULE=0" exclude: - make_options: $MULTI_TIER_JIT_BUILD_OPTIONS sanitizer: asan + steps: - name: checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 - name: Get LLVM libraries id: retrieve_llvm_libs if: (!endsWith(matrix.make_options, '_INTERP_BUILD_OPTIONS')) - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | ./core/deps/llvm/build/bin @@ -422,7 +444,7 @@ jobs: - name: Build Sample [wasm-c-api] run: | VERBOSE=1 - cmake -S . -B build ${{ matrix.make_options }} \ + cmake -S . -B build ${{ matrix.make_options }} ${{ matrix.extra_options }} \ -D WAMR_BUILD_SANITIZER="${{matrix.sanitizer}}" \ -D WAMR_BUILD_QUICK_AOT_ENTRY=0 cmake --build build --config Release --parallel 4 @@ -440,7 +462,7 @@ jobs: llvm_cache_key: ${{ needs.build_llvm_libraries_on_ubuntu.outputs.cache_key }} steps: - name: checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 - name: install-wasi-sdk-wabt uses: ./.github/actions/install-wasi-sdk-wabt @@ -449,7 +471,7 @@ jobs: - name: Get LLVM libraries id: retrieve_llvm_libs - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | ./core/deps/llvm/build/bin @@ -634,7 +656,7 @@ jobs: sanitizer: ubsan steps: - name: checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 - name: install-wasi-sdk-wabt if: matrix.test_option == '$WASI_TEST_OPTIONS' @@ -663,7 +685,7 @@ jobs: - name: Get LLVM libraries if: env.USE_LLVM == 'true' id: retrieve_llvm_libs - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | ./core/deps/llvm/build/bin diff --git a/.github/workflows/release_process.yml b/.github/workflows/release_process.yml index 621f8c2f89..b7eebd1c52 100644 --- a/.github/workflows/release_process.yml +++ b/.github/workflows/release_process.yml @@ -55,7 +55,7 @@ jobs: outputs: upload_url: ${{ steps.create_release.outputs.upload_url }} steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6.0.2 - name: prepare the release note run: | @@ -88,6 +88,7 @@ jobs: os: "ubuntu-22.04" arch: "AArch64 ARM Mips RISCV X86" + #CLARIFY: Require to build LLVM libraries on ARM macOS? build_llvm_libraries_on_macos: permissions: contents: read @@ -95,7 +96,7 @@ jobs: needs: [create_tag, create_release] uses: ./.github/workflows/build_llvm_libraries.yml with: - os: "macos-13" + os: "macos-15-intel" arch: "AArch64 ARM Mips RISCV X86" build_llvm_libraries_on_windows: @@ -122,6 +123,7 @@ jobs: upload_url: ${{ needs.create_release.outputs.upload_url }} ver_num: ${{ needs.create_tag.outputs.new_ver }} + #CLARIFY: Require to release wamrc on ARM macOS? release_wamrc_on_ubuntu_macos: permissions: contents: write # upload release artifact @@ -130,7 +132,7 @@ jobs: with: llvm_cache_key: ${{ needs.build_llvm_libraries_on_macos.outputs.cache_key }} release: true - runner: macos-13 + runner: macos-15-intel upload_url: ${{ needs.create_release.outputs.upload_url }} ver_num: ${{ needs.create_tag.outputs.new_ver }} @@ -160,6 +162,7 @@ jobs: upload_url: ${{ needs.create_release.outputs.upload_url }} ver_num: ${{ needs.create_tag.outputs.new_ver}} + #CLARIFY: Require to release iwasm on ARM macOS? release_iwasm_on_macos: permissions: contents: write # upload release artifact @@ -168,7 +171,7 @@ jobs: with: cwd: product-mini/platforms/darwin llvm_cache_key: ${{ needs.build_llvm_libraries_on_macos.outputs.cache_key }} - runner: macos-13 + runner: macos-15-intel upload_url: ${{ needs.create_release.outputs.upload_url }} ver_num: ${{ needs.create_tag.outputs.new_ver}} @@ -200,6 +203,7 @@ jobs: wasi_sdk_url: https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-19/wasi-sdk-19.0-linux.tar.gz wamr_app_framework_url: https://github.com/bytecodealliance/wamr-app-framework.git + #CLARIFY: Require to release WAMR SDK on ARM macOS? release_wamr_sdk_on_macos: permissions: contents: write # upload release artifact @@ -208,7 +212,7 @@ jobs: uses: ./.github/workflows/build_wamr_sdk.yml with: config_file: wamr_config_macos_release.cmake - runner: macos-13 + runner: macos-15-intel upload_url: ${{ needs.create_release.outputs.upload_url }} ver_num: ${{ needs.create_tag.outputs.new_ver}} wasi_sdk_url: https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-19/wasi-sdk-19.0-macos.tar.gz @@ -251,6 +255,7 @@ jobs: upload_url: ${{ needs.create_release.outputs.upload_url }} ver_num: ${{ needs.create_tag.outputs.new_ver}} + #CLARIFY: Require to release WAMR LLDB on ARM macOS? release_wamr_lldb_on_macos_universal: permissions: contents: write # upload release artifact @@ -258,7 +263,7 @@ jobs: if: ${{ inputs.release_wamr_lldb }} uses: ./.github/workflows/build_wamr_lldb.yml with: - runner: macos-13 + runner: macos-15-intel arch: universal upload_url: ${{ needs.create_release.outputs.upload_url }} ver_num: ${{ needs.create_tag.outputs.new_ver}} diff --git a/.github/workflows/reuse_latest_release_binaries.yml b/.github/workflows/reuse_latest_release_binaries.yml index 7c34cb6183..3bbd4ac9bf 100644 --- a/.github/workflows/reuse_latest_release_binaries.yml +++ b/.github/workflows/reuse_latest_release_binaries.yml @@ -34,7 +34,7 @@ jobs: contents: write # for creating realease and uploading release artifacts steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6.0.2 # Full git history is needed to get a proper list of commits and tags with: fetch-depth: 0 diff --git a/.github/workflows/spec_test_on_nuttx.yml b/.github/workflows/spec_test_on_nuttx.yml index 9cf34d2ac3..f93bb71ee2 100644 --- a/.github/workflows/spec_test_on_nuttx.yml +++ b/.github/workflows/spec_test_on_nuttx.yml @@ -143,21 +143,21 @@ jobs: # Note: we use an unreleased version nuttx for xtensa because # 12.4 doesn't contain necessary esp32s3 changes. - name: Checkout NuttX - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 with: repository: apache/nuttx - ref: ${{ matrix.target_config.target == 'xtensa' && '985d395b025cf2012b22f6bb4461959fa6d87645' || 'releases/12.9' }} + ref: ${{ matrix.target_config.target == 'xtensa' && '985d395b025cf2012b22f6bb4461959fa6d87645' || '09a71ec7c16c43398d5acbdcbeee7b08736c3170' }} path: nuttx - name: Checkout NuttX Apps - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 with: repository: apache/nuttx-apps - ref: ${{ matrix.target_config.target == 'xtensa' && '2ef3eb25c0cec944b13792185f7e5d5a05990d5f' || 'releases/12.9' }} + ref: ${{ matrix.target_config.target == 'xtensa' && '2ef3eb25c0cec944b13792185f7e5d5a05990d5f' || '6bd593459c4af3cef325c3d22bccd5537a8ed755' }} path: apps - name: Checkout WAMR - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 with: repository: ${{ github.repository }} path: apps/interpreters/wamr/wamr @@ -165,7 +165,7 @@ jobs: - name: Get LLVM libraries if: contains(matrix.wamr_test_option.mode, 'aot') id: retrieve_llvm_libs - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | ./core/deps/llvm/build/bin @@ -329,7 +329,7 @@ jobs: - name: upload the log if: always() - uses: actions/upload-artifact@v5 + uses: actions/upload-artifact@v7.0.0 with: name: spec-test-log-${{ github.run_id }}-${{ strategy.job-index }}-${{ matrix.target_config.target }} path: log diff --git a/.github/workflows/supply_chain.yml b/.github/workflows/supply_chain.yml index eea85cdf3e..fb4c8456c0 100644 --- a/.github/workflows/supply_chain.yml +++ b/.github/workflows/supply_chain.yml @@ -34,7 +34,7 @@ jobs: steps: - name: "Checkout code" - uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v3.1.0 + uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98 # v3.1.0 with: persist-credentials: false @@ -52,7 +52,7 @@ jobs: # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF # format to the repository Actions tab. - name: "Upload artifact" - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v3.1.0 + uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v3.1.0 with: name: SARIF file path: results.sarif @@ -60,6 +60,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@338146ca93283a2901a142d408241096146019b5 + uses: github/codeql-action/upload-sarif@d1a65275e8dac7b2cc72bb121bf58f0ee7b0f92d with: sarif_file: results.sarif diff --git a/.github/workflows/wamr_wasi_extensions.yml b/.github/workflows/wamr_wasi_extensions.yml index 4c8c2b737f..dd52730dc8 100644 --- a/.github/workflows/wamr_wasi_extensions.yml +++ b/.github/workflows/wamr_wasi_extensions.yml @@ -27,10 +27,10 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-22.04, macos-13, macos-14] + os: [ubuntu-22.04, macos-15-intel, macos-15] steps: - name: checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6.0.2 - name: install-wasi-sdk-wabt uses: ./.github/actions/install-wasi-sdk-wabt @@ -48,9 +48,10 @@ jobs: ./build_samples.sh $(pwd)/dist/wamr-wasi-extensions working-directory: wamr-wasi-extensions + #CLARIFY: Require to upload artifact on ARM macOS? - name: Upload artifacts - if: matrix.os == 'macos-14' - uses: actions/upload-artifact@v5 + if: matrix.os == 'macos-15' + uses: actions/upload-artifact@v7.0.0 with: name: wamr-wasi-extensions path: wamr-wasi-extensions/dist diff --git a/.gitignore b/.gitignore index baf11c8916..1d14dff9aa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ + .cache .clangd .vs @@ -21,9 +22,9 @@ core/iwasm/libraries/lib-wasi-threads/test/*.wasm core/iwasm/libraries/lib-socket/test/*.wasm product-mini/app-samples/hello-world/test.wasm -product-mini/platforms/linux-sgx/enclave-sample/App/ -product-mini/platforms/linux-sgx/enclave-sample/Enclave/ -product-mini/platforms/linux-sgx/enclave-sample/iwasm +product-mini/platforms/linux-sgx/enclave-sample/ +!product-mini/platforms/linux-sgx/enclave-sample/App/App.* +!product-mini/platforms/linux-sgx/enclave-sample/Enclave/Enclave.* build_out tests/wamr-test-suites/workspace @@ -40,3 +41,6 @@ samples/workload/include/** !samples/workload/include/.gitkeep # core/iwasm/libraries/wasi-threads + +tests/unit/runtime-common/wasm-apps/main.aot +tests/unit/aot-stack-frame/wasm-apps/test_aot.h diff --git a/CMakeLists.txt b/CMakeLists.txt index c33b211e61..3872b2c9c7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -131,12 +131,6 @@ if (NOT WIN32) string (REGEX REPLACE " *" " " CMAKE_C_FLAGS ${CMAKE_C_FLAGS}) endif() -if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64") - if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mindirect-branch-register") - endif () -endif () - # The following flags are to enhance security, but it may impact performance, # we disable them by default. #if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64") diff --git a/CODEOWNERS b/CODEOWNERS index 990dcfce2c..b5103711ca 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -22,8 +22,21 @@ # If none of the later patterns match, assign to anyone. This team is the # parent of all the other teams and automatically includes everyone on those # teams. -* @loganek @lum1n0us @no1wudi @TianlongLiang @wenyongh @xujuntwt95329 @yamt +* @lum1n0us @TianlongLiang @yamt # Some parts of the project require more specialized knowledge. In those areas # we designate smaller groups who are more likely to be aware of who's working # in specific areas. + +/core/iwasm/core @loganek @lum1n0us @no1wudi @TianlongLiang @yamt +/core/iwasm/interpreter @loganek @lum1n0us @no1wudi @TianlongLiang @yamt +/core/iwasm/libraries/lib-socket @loganek @srberard +/core/iwasm/libraries/wasi-nn @lum1n0us @yamt +/core/iwasm @lum1n0us @no1wudi @TianlongLiang @yamt + +/docs/ @loganek @lum1n0us @no1wudi @TianlongLiang @yamt + +/product-mini/platforms/darwin/ @yamt +/product-mini/platforms/nuttx/ @no1wudi +/product-mini/platforms/windows/ @loganek +/product-mini/platforms/zephyr/ @srberard diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a8ab964273..4382257321 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -18,8 +18,12 @@ Code changes =================== We Use Github Flow, So All Code Changes Happen Through Pull Requests. Pull requests are the best way to propose changes to the codebase. We actively welcome your pull requests: -- If you've added code that should be tested, add tests. Ensure the test suite passes. -- Avoid use macros for different platforms. Use separate folder of source files to host different platform logic. + - If you've added / modified code: + - Please provide tests to the test suite to validate the operation of your code, or point to existing test cases which do the same. + - Ensure that your new tests pass. This way we ensure that your contribution continues to work as you expected as future contributions are made by other contributors. + - Ensure all the existing tests in the test suite pass. This way we can verify that your contribution doesn’t accidentally impact other contributions. + - If your contribution is minor and you feel it does not need an additional test case, i.e. updating comments, formatting, simple refactoring, etc. then provide an explanation in your PR comment, i.e. “this is a minor change *explain the change*, and as such [ “is covered by” *list existing test cases* | “is except from addition test contribution”]. +- Avoid using macros for different platforms. Use separate folders for source files to collect together different host platform logic. - Put macro definitions inside share_lib/include/config.h if you have to use macro. - Make sure your code lints and compliant to our coding style. - Extend the application library is highly welcome. diff --git a/build-scripts/build_llvm.py b/build-scripts/build_llvm.py index 3d241355b4..68ef640e39 100755 --- a/build-scripts/build_llvm.py +++ b/build-scripts/build_llvm.py @@ -304,7 +304,7 @@ def main(): "default": { "repo": "https://github.com/llvm/llvm-project.git", "repo_ssh": "git@github.com:llvm/llvm-project.git", - "branch": "release/18.x", + "branch": "llvmorg-18.1.8", }, } diff --git a/build-scripts/config_common.cmake b/build-scripts/config_common.cmake index c087a0e673..234578d306 100644 --- a/build-scripts/config_common.cmake +++ b/build-scripts/config_common.cmake @@ -79,8 +79,14 @@ if (WAMR_BUILD_TARGET MATCHES "ARM.*") elseif (WAMR_BUILD_TARGET MATCHES "THUMB.*") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mthumb") set (CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wa,-mthumb") +elseif (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64") + if (CMAKE_C_COMPILER_ID MATCHES ".*GNU") + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mindirect-branch-register") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mindirect-branch-register") + endif () endif () + include (${CMAKE_CURRENT_LIST_DIR}/warnings.cmake) if (NOT WAMR_BUILD_INTERP EQUAL 1) @@ -190,7 +196,11 @@ if (NOT WAMR_BUILD_SANITIZER STREQUAL "") message(FATAL_ERROR "Unsupported sanitizers: ${INVALID_SANITIZERS}") endif() # common flags for all sanitizers - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fno-omit-frame-pointer -fno-sanitize-recover=all") + # clang: warning: the object size sanitizer has no effect at -O0, but is explicitly enabled ... [-Winvalid-command-line-argument] + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O1 -fno-omit-frame-pointer -fno-sanitize-recover=all -fno-sanitize=alignment") + if(CMAKE_C_COMPILER_ID MATCHES ".*Clang") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-sanitize=unsigned-integer-overflow") + endif() if(SANITIZER_FLAGS) string(REPLACE ";" "," SANITIZER_FLAGS_STR "${SANITIZER_FLAGS}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=${SANITIZER_FLAGS_STR}") @@ -282,6 +292,8 @@ if (WAMR_BUILD_REF_TYPES EQUAL 1) set (WAMR_BUILD_CALL_INDIRECT_OVERLONG 1) endif () +include(${CMAKE_CURRENT_LIST_DIR}/unsupported_combination.cmake) + message ("-- Build Configurations:") message (" Build as target ${WAMR_BUILD_TARGET}") message (" Build for platform ${WAMR_BUILD_PLATFORM}") diff --git a/build-scripts/unsupported_combination.cmake b/build-scripts/unsupported_combination.cmake new file mode 100644 index 0000000000..4284be32bf --- /dev/null +++ b/build-scripts/unsupported_combination.cmake @@ -0,0 +1,101 @@ +# Copyright (C) 2019 Intel Corporation. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +include(CMakePrintHelpers) + +# Define a function to check for unsupported combinations +function(check_aot_mode_error error_message) + if(WAMR_BUILD_AOT EQUAL 1) + message(FATAL_ERROR "${error_message}") + endif() +endfunction() + +# Define a function to check for unsupported combinations with CLASSIC_INTERP +function(check_classic_interp_error error_message) + # Usually, Enable INTERP to enable wasm loader for JIT + # WAMR_BUILD_JIT might be undefined, so check it first + if(WAMR_BUILD_JIT EQUAL 1) + return() + endif() + + if(WAMR_BUILD_FAST_JIT EQUAL 1) + return() + endif() + + if(WAMR_BUILD_INTERP EQUAL 1 AND WAMR_BUILD_FAST_INTERP EQUAL 0) + message(FATAL_ERROR "${error_message}") + endif() +endfunction() + +# Define a function to check for unsupported combinations with FAST_INTERP +function(check_fast_interp_error error_message) + # Usually, Enable INTERP to enable wasm loader for JIT + # WAMR_BUILD_JIT might be undefined, so check it first + if(WAMR_BUILD_JIT EQUAL 1) + return() + endif() + + if(WAMR_BUILD_FAST_JIT EQUAL 1) + return() + endif() + + if(WAMR_BUILD_INTERP EQUAL 1 AND WAMR_BUILD_FAST_INTERP EQUAL 1) + message(FATAL_ERROR "${error_message}") + endif() +endfunction() + +# Define a function to check for unsupported combinations with FAST_JIT +function(check_fast_jit_error error_message) + if(WAMR_BUILD_FAST_JIT EQUAL 1) + message(FATAL_ERROR "${error_message}") + endif() +endfunction() + +# Define a function to check for unsupported combinations with LLVM_JIT +function(check_llvm_jit_error error_message) + if(WAMR_BUILD_JIT EQUAL 1) + message(FATAL_ERROR "${error_message}") + endif() +endfunction() + +# Below are the unsupported combinations checks +# Please keep this list in sync with tests/unit/unsupported-features/CMakeLists.txt +# and tests/wamr-test-suites/test_wamr.sh + +if(WAMR_BUILD_EXCE_HANDLING EQUAL 1) + check_aot_mode_error("Unsupported build configuration: EXCE_HANDLING + AOT") + check_fast_interp_error("Unsupported build configuration: EXCE_HANDLING + FAST_INTERP") + check_fast_jit_error("Unsupported build configuration: EXCE_HANDLING + FAST_JIT") + check_llvm_jit_error("Unsupported build configuration: EXCE_HANDLING + JIT") +endif() + +if(WAMR_BUILD_GC EQUAL 1) + check_fast_jit_error("Unsupported build configuration: GC + FAST_JIT") +endif() + +if(WAMR_BUILD_MEMORY64 EQUAL 1) + check_fast_interp_error("Unsupported build configuration: MEMORY64 + FAST_INTERP") + check_fast_jit_error("Unsupported build configuration: MEMORY64 + FAST_JIT") + check_llvm_jit_error("Unsupported build configuration: MEMORY64 + JIT") +endif() + +if(WAMR_BUILD_MULTI_MEMORY EQUAL 1) + check_aot_mode_error("Unsupported build configuration: MULTI_MEMORY + AOT") + check_fast_interp_error("Unsupported build configuration: MULTI_MEMORY + FAST_INTERP") + check_fast_jit_error("Unsupported build configuration: MULTI_MEMORY + FAST_JIT") + check_llvm_jit_error("Unsupported build configuration: MULTI_MEMORY + JIT") +endif() + +if(WAMR_BUILD_MULTI_MODULE EQUAL 1) + check_fast_jit_error("Unsupported build configuration: MULTI_MODULE + FAST_JIT") + check_llvm_jit_error("Unsupported build configuration: MULTI_MODULE + JIT") +endif() + +if(WAMR_BUILD_SHARED_HEAP EQUAL 1) + check_fast_jit_error("Unsupported build configuration: SHARED_HEAP + FAST_JIT") +endif() + +if(WAMR_BUILD_SIMD EQUAL 1) + check_classic_interp_error("Unsupported build configuration: SIMD + CLASSIC_INTERP") + check_fast_jit_error("Unsupported build configuration: SIMD + FAST_JIT") +endif() diff --git a/ci/coding_guidelines_check.py b/ci/coding_guidelines_check.py index 131bca5b61..be1002c00f 100644 --- a/ci/coding_guidelines_check.py +++ b/ci/coding_guidelines_check.py @@ -159,7 +159,7 @@ def run_clang_format_diff(root: Path, commits: str) -> bool: found = True else: return not found - except subprocess.subprocess.CalledProcessError: + except subprocess.CalledProcessError: return False @@ -183,12 +183,14 @@ def check_file_name(path: Path) -> bool: - docker-compose - package-lock - vite-env.d + - .clang-tidy (standard config file for Clang-Tidy) """ if path.stem in [ "docker-compose", "package-lock", "vite-env.d", "osv-scanner", + ".clang-tidy", ]: return True diff --git a/ci/install_sgx_for_applicaiton_developer.sh b/ci/install_sgx_for_applicaiton_developer.sh new file mode 100755 index 0000000000..f119f0438c --- /dev/null +++ b/ci/install_sgx_for_applicaiton_developer.sh @@ -0,0 +1,400 @@ +#!/bin/bash + +# Reference: +# https://cc-enabling.trustedservices.intel.com/intel-sgx-sw-installation-guide-linux/02/installation_instructions/#intel-sgx-application-developer + +#TODO: +# report error when curl fails to download files, e.g. due to network issues or incorrect URLs + +set -euo pipefail +if [ "${DEBUG:-0}" -eq 1 ]; then + set -o xtrace +fi + +# Error trap handler - logs failure details and calls cleanup before exit +error_handler() { + local exit_code=$? + local line_number=${1:-$LINENO} + local bash_lineno=${2:-$BASH_LINENO} + local last_command=${3:-$BASH_COMMAND} + local function_stack=${4:-${FUNCNAME[*]}} + + # Log error context to file + { + echo "=== ERROR OCCURRED ===" + echo "Exit Code: $exit_code" + echo "Line Number: $line_number" + echo "Bash Line: $bash_lineno" + echo "Failed Command: $last_command" + echo "Function Stack: $function_stack" + echo "Timestamp: $(date '+%Y-%m-%d %H:%M:%S')" + echo "======================" + } >> "${LOG_FILE:-/tmp/install_sgx.log}" 2>/dev/null || true + + # Print concise error to stderr + echo "ERROR: Script failed at line $line_number with exit code $exit_code" >&2 + echo "Failed command: $last_command" >&2 + echo "Check log file: ${LOG_FILE:-/tmp/install_sgx.log}" >&2 + + # Call cleanup function if it exists + if type cleanup >/dev/null 2>&1; then + cleanup || true + fi + + exit $exit_code +} + +# Set up error trap +trap 'error_handler $LINENO $BASH_LINENO "$BASH_COMMAND" "${FUNCNAME[*]}"' ERR + +# Platform will be detected dynamically by platform_detect() function +# Supported platforms: Debian12, Debian11, Ubuntu22.04-server, Ubuntu20.04-server +PLATFORM="" + +# Logging infrastructure +LOG_FILE="/tmp/install_sgx.log" + +# Initialize log file with timestamp +init_log() { + echo "=== Intel SGX Installation Log - $(date) ===" > "${LOG_FILE}" + echo "Platform: ${PLATFORM}" >> "${LOG_FILE}" + echo "Script: $0" >> "${LOG_FILE}" + echo "Started at: $(date '+%Y-%m-%d %H:%M:%S')" >> "${LOG_FILE}" + echo "" >> "${LOG_FILE}" +} + +# Log message with timestamp +log_info() { + echo "[$(date '+%Y-%m-%d %H:%M:%S')] $*" >> "${LOG_FILE}" +} + +# Execute command with output redirected to log +log_exec() { + log_info "Executing: $*" + "$@" >>"$LOG_FILE" 2>&1 +} + +# Print environment sourcing instructions +print_env_instructions() { + log_info "Printing environment setup instructions" + + echo "========================================================================" + echo " IMPORTANT: Before building or running SGX applications, you must run:" + echo " source /opt/intel/sgxsdk/environment" + echo " in your current shell to activate SGX SDK environment variables." + echo "========================================================================" + + log_info "Environment setup instructions displayed to user" +} + +check_sgx_packages() { + log_info "Checking for existing SGX packages..." + + local packages=("libsgx-quote-ex" "libsgx-dcap-ql" "libsgx-enclave-common-dev" "libsgx-dcap-ql-dev" "libsgx-dcap-default-qpl-dev" "tee-appraisal-tool") + local missing_packages=() + + for package in "${packages[@]}"; do + if ! dpkg -l "$package" >> "${LOG_FILE}" 2>&1; then + missing_packages+=("$package") + log_info "Package $package not installed" + else + log_info "Package $package already installed" + fi + done + + if [ ${#missing_packages[@]} -eq 0 ]; then + log_info "All SGX packages are already installed" + return 0 + else + log_info "Missing SGX packages: ${missing_packages[*]}" + return 1 + fi +} + +check_sgx_sdk() { + log_info "Checking for existing SGX SDK..." + + if [ -d "/opt/intel/sgxsdk" ] && [ -f "/opt/intel/sgxsdk/environment" ]; then + log_info "SGX SDK already installed at /opt/intel/sgxsdk" + + # Validate SDK installation by checking key components + if [ -f "/opt/intel/sgxsdk/bin/sgx-gdb" ] && [ -d "/opt/intel/sgxsdk/include" ]; then + log_info "SGX SDK installation appears complete" + return 0 + else + log_info "SGX SDK installation incomplete - missing key components" + return 1 + fi + else + log_info "SGX SDK not found" + return 1 + fi +} + +check_sgx_repo() { + log_info "Checking for existing SGX local repository..." + + if [ -d "/opt/intel/sgx_debian_local_repo" ] && [ -f "/etc/apt/sources.list.d/sgx_debian_local_repo.list" ]; then + log_info "SGX local repository already configured" + return 0 + else + log_info "SGX local repository not configured" + return 1 + fi +} + +# Modular installation functions + +# Platform detection and configuration +platform_detect() { + log_info "Entering platform_detect() function" + + if [ ! -f "/etc/os-release" ]; then + log_info "ERROR: /etc/os-release not found - cannot detect OS" + echo "ERROR: Cannot detect operating system. /etc/os-release not found." >&2 + log_info "Exiting platform_detect() function" + return 1 + fi + + # Parse OS information from /etc/os-release + local os_id=$(grep '^ID=' /etc/os-release | cut -d'=' -f2 | tr -d '"') + local version_id=$(grep '^VERSION_ID=' /etc/os-release | cut -d'=' -f2 | tr -d '"') + + log_info "Raw OS detection: ID=${os_id}, VERSION_ID=${version_id}" + + # Determine platform string based on OS and version + case "${os_id}" in + "ubuntu") + case "${version_id}" in + "20.04") + PLATFORM="Ubuntu20.04-server" + ;; + "22.04") + PLATFORM="Ubuntu22.04-server" + ;; + *) + log_info "ERROR: Unsupported Ubuntu version ${version_id}. Supported: 20.04, 22.04" + echo "ERROR: Unsupported Ubuntu version ${version_id}. This script supports Ubuntu 20.04 and 22.04 only." >&2 + log_info "Exiting platform_detect() function" + return 1 + ;; + esac + ;; + "debian") + case "${version_id}" in + "11") + PLATFORM="Debian11" + ;; + "12") + PLATFORM="Debian12" + ;; + *) + log_info "ERROR: Unsupported Debian version ${version_id}. Supported: 11, 12" + echo "ERROR: Unsupported Debian version ${version_id}. This script supports Debian 11 and 12 only." >&2 + log_info "Exiting platform_detect() function" + return 1 + ;; + esac + ;; + *) + log_info "ERROR: Unsupported OS ${os_id}. Supported: ubuntu, debian" + echo "ERROR: Unsupported operating system '${os_id}'. This script supports Ubuntu and Debian only." >&2 + log_info "Exiting platform_detect() function" + return 1 + ;; + esac + + log_info "Successfully detected platform: ${PLATFORM}" + echo "Detected platform: ${PLATFORM}" + + log_info "Exiting platform_detect() function" + return 0 +} + +# Install SGX packages and SDK +install_packages() { + log_info "Entering install_packages() function" + + # Skip repo setup if already configured + if ! check_sgx_repo; then + log_info "Setting up SGX local repository..." + + pushd /tmp >> "${LOG_FILE}" 2>&1 + log_exec curl -fsSLO \ + https://download.01.org/intel-sgx/latest/linux-latest/distro/${PLATFORM}/sgx_debian_local_repo.tgz + + local_sum=$(sha256sum sgx_debian_local_repo.tgz | awk '{print $1}') + remote_sum=$(curl -s https://download.01.org/intel-sgx/latest/dcap-latest/linux/SHA256SUM_dcap_1.24.cfg | grep "distro/${PLATFORM}/sgx_debian_local_repo.tgz" | awk '{print $1}') + if [[ "$local_sum" == "$remote_sum" ]]; then + log_info "Checksum matches" + else + log_info "Checksum mismatch!" + fi + + log_exec sudo mkdir -p /opt/intel + log_exec sudo tar xzf sgx_debian_local_repo.tgz -C /opt/intel + + echo 'deb [signed-by=/etc/apt/keyrings/intel-sgx-keyring.asc arch=amd64] file:///opt/intel/sgx_debian_local_repo bookworm main' \ + | sudo tee /etc/apt/sources.list.d/sgx_debian_local_repo.list | tee -a "${LOG_FILE}" > /dev/null + + log_exec sudo cp /opt/intel/sgx_debian_local_repo/keys/intel-sgx.key /etc/apt/keyrings/intel-sgx-keyring.asc + popd >> "${LOG_FILE}" 2>&1 + else + log_info "SGX repository already configured, skipping setup" + fi + + # Install SGX packages only if missing + if ! check_sgx_packages; then + log_info "Installing missing SGX packages..." + log_exec sudo apt-get update + log_exec sudo apt-get install -y libsgx-quote-ex libsgx-dcap-ql + else + log_info "SGX packages already installed, skipping" + fi + + # Install build dependencies + log_exec sudo apt-get update --quiet + log_exec sudo apt-get install --quiet -y build-essential python3 + log_exec sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1 + + # Install Intel SGX SDK only if missing + if ! check_sgx_sdk; then + log_info "Installing Intel SGX SDK for Application Developer..." + + pushd /opt/intel >> "${LOG_FILE}" 2>&1 + log_exec sudo curl -fsSLo sgx_linux_x64_sdk.bin \ + https://download.01.org/intel-sgx/latest/linux-latest/distro/${PLATFORM}/sgx_linux_x64_sdk_2.27.100.1.bin + log_exec sudo chmod +x sgx_linux_x64_sdk.bin + log_exec sudo ./sgx_linux_x64_sdk.bin --prefix /opt/intel + + # Log environment setup instructions for user + log_info "SGX SDK installation completed successfully." + log_info "IMPORTANT: To use the SGX SDK in your development session:" + log_info " 1. Run: source /opt/intel/sgxsdk/environment" + log_info " 2. This must be done in each shell session where you use SGX" + log_info " 3. Environment variables are session-specific and cannot be exported by this script" + log_info " 4. Consider adding 'source /opt/intel/sgxsdk/environment' to your ~/.bashrc for automatic setup" + popd >> "${LOG_FILE}" 2>&1 + else + log_info "SGX SDK already installed, skipping" + fi + + # Install Developer packages for Intel SGX only if missing + if ! check_sgx_packages; then + log_info "Installing Intel SGX Developer packages..." + + log_exec sudo apt-get install -y libsgx-enclave-common-dev \ + libsgx-dcap-ql-dev \ + libsgx-dcap-default-qpl-dev \ + tee-appraisal-tool + else + log_info "SGX Developer packages already installed, skipping" + fi + + log_info "Exiting install_packages() function" + return 0 +} + +# Validate the installation was successful +validate_installation() { + log_info "Entering validate_installation() function" + + local validation_failed=0 + + # Re-check all components after installation + if ! check_sgx_packages; then + log_info "VALIDATION FAILED: SGX packages not properly installed" + validation_failed=1 + fi + + if ! check_sgx_sdk; then + log_info "VALIDATION FAILED: SGX SDK not properly installed" + validation_failed=1 + fi + + if ! check_sgx_repo; then + log_info "VALIDATION FAILED: SGX repository not properly configured" + validation_failed=1 + fi + + if [ $validation_failed -eq 0 ]; then + log_info "VALIDATION SUCCESS: All SGX components properly installed" + else + log_info "VALIDATION FAILED: Some SGX components failed installation" + log_info "Exiting validate_installation() function" + return 1 + fi + + log_info "Exiting validate_installation() function" + return 0 +} + +# Clean up temporary files +cleanup() { + log_info "Entering cleanup() function" + + # Clean up any temporary files in /tmp related to SGX installation + if [ -f "/tmp/sgx_debian_local_repo.tgz" ]; then + log_info "Removing temporary SGX repository archive" + rm -f /tmp/sgx_debian_local_repo.tgz + fi + + # Additional cleanup can be added here as needed + log_info "Temporary file cleanup completed" + + log_info "Exiting cleanup() function" + return 0 +} + +# Initialize logging +init_log + +log_info "Starting idempotency checks..." + +# Check if everything is already installed +if check_sgx_packages && check_sgx_sdk && check_sgx_repo; then + log_info "Complete SGX installation detected - no action needed" + echo "Intel SGX for Application Developer is already installed and configured." + print_env_instructions + exit 0 +fi + +log_info "Partial or missing SGX installation detected - proceeding with installation" + +# Main installation flow using modular functions + +log_info "Starting Intel SGX for Application Developer installation..." + +# Execute installation steps in modular fashion +platform_detect +if [ $? -ne 0 ]; then + log_info "Platform detection failed" + exit 1 +fi + +install_packages +if [ $? -ne 0 ]; then + log_info "Package installation failed" + exit 1 +fi + +validate_installation +if [ $? -ne 0 ]; then + log_info "Installation validation failed" + exit 1 +fi + +cleanup +if [ $? -ne 0 ]; then + log_info "Cleanup failed" + exit 1 +fi + +cleanup +if [ $? -ne 0 ]; then + log_info "Cleanup failed" + exit 1 +fi + +echo "Intel SGX for Application Developer installation completed." +print_env_instructions diff --git a/core/config.h b/core/config.h index cb5db1d0cf..31404deb95 100644 --- a/core/config.h +++ b/core/config.h @@ -84,7 +84,7 @@ #endif #define AOT_MAGIC_NUMBER 0x746f6100 -#define AOT_CURRENT_VERSION 5 +#define AOT_CURRENT_VERSION 6 #ifndef WASM_ENABLE_JIT #define WASM_ENABLE_JIT 0 diff --git a/core/iwasm/aot/aot_loader.c b/core/iwasm/aot/aot_loader.c index 2f7e6c9f25..19985444d5 100644 --- a/core/iwasm/aot/aot_loader.c +++ b/core/iwasm/aot/aot_loader.c @@ -307,7 +307,8 @@ loader_mmap(uint32 size, bool prot_exec, char *error_buf, uint32 error_buf_size) #if defined(BUILD_TARGET_X86_64) || defined(BUILD_TARGET_AMD_64) \ || defined(BUILD_TARGET_RISCV64_LP64D) \ || defined(BUILD_TARGET_RISCV64_LP64) -#if !defined(__APPLE__) && !defined(BH_PLATFORM_LINUX_SGX) +#if !defined(__APPLE__) && !defined(BH_PLATFORM_LINUX_SGX) \ + && !defined(BH_PLATFORM_NUTTX) /* The mmapped AOT data and code in 64-bit targets had better be in range 0 to 2G, or aot loader may fail to apply some relocations, e.g., R_X86_64_32/R_X86_64_32S/R_X86_64_PC32/R_RISCV_32. @@ -981,7 +982,7 @@ destroy_init_expr(InitializerExpression *expr) #endif #if WASM_ENABLE_EXTENDED_CONST_EXPR != 0 - // free left expr and right expr for binary oprand + /* free left expr and right expr for binary operand */ if (!is_expr_binary_op(expr->init_expr_type)) { return; } @@ -3227,7 +3228,7 @@ do_text_relocation(AOTModule *module, AOTRelocationGroup *group, if (!strncmp(symbol, AOT_FUNC_PREFIX, strlen(AOT_FUNC_PREFIX))) { p = symbol + strlen(AOT_FUNC_PREFIX); if (*p == '\0' - || (func_index = (uint32)atoi(p)) > module->func_count) { + || (func_index = (uint32)atoi(p)) >= module->func_count) { set_error_buf_v(error_buf, error_buf_size, "invalid import symbol %s", symbol); goto check_symbol_fail; @@ -3261,7 +3262,7 @@ do_text_relocation(AOTModule *module, AOTRelocationGroup *group, strlen("_" AOT_FUNC_PREFIX))) { p = symbol + strlen("_" AOT_FUNC_PREFIX); if (*p == '\0' - || (func_index = (uint32)atoi(p)) > module->func_count) { + || (func_index = (uint32)atoi(p)) >= module->func_count) { set_error_buf_v(error_buf, error_buf_size, "invalid symbol %s", symbol); goto check_symbol_fail; @@ -3272,7 +3273,7 @@ do_text_relocation(AOTModule *module, AOTRelocationGroup *group, strlen("_" AOT_FUNC_INTERNAL_PREFIX))) { p = symbol + strlen("_" AOT_FUNC_INTERNAL_PREFIX); if (*p == '\0' - || (func_index = (uint32)atoi(p)) > module->func_count) { + || (func_index = (uint32)atoi(p)) >= module->func_count) { set_error_buf_v(error_buf, error_buf_size, "invalid symbol %s", symbol); goto check_symbol_fail; @@ -3462,7 +3463,7 @@ do_data_relocation(AOTModule *module, AOTRelocationGroup *group, char *p = symbol + strlen(AOT_FUNC_PREFIX); uint32 func_index; if (*p == '\0' - || (func_index = (uint32)atoi(p)) > module->func_count) { + || (func_index = (uint32)atoi(p)) >= module->func_count) { set_error_buf_v(error_buf, error_buf_size, "invalid relocation symbol %s", symbol); return false; @@ -3871,7 +3872,7 @@ load_relocation_section(const uint8 *buf, const uint8 *buf_end, read_uint32(buf, buf_end, offset32); relocation->relocation_offset = (uint64)offset32; read_uint32(buf, buf_end, addend32); - relocation->relocation_addend = (uint64)addend32; + relocation->relocation_addend = (int64)(int32)addend32; } read_uint32(buf, buf_end, relocation->relocation_type); read_uint32(buf, buf_end, symbol_index); diff --git a/core/iwasm/aot/aot_runtime.c b/core/iwasm/aot/aot_runtime.c index 55c962f4a6..fa3212dfa9 100644 --- a/core/iwasm/aot/aot_runtime.c +++ b/core/iwasm/aot/aot_runtime.c @@ -1963,6 +1963,12 @@ aot_instantiate(AOTModule *module, AOTModuleInstance *parent, module_inst->e = (WASMModuleInstanceExtra *)((uint8 *)module_inst + extra_info_offset); extra = (AOTModuleInstanceExtra *)module_inst->e; +#if WASM_ENABLE_THREAD_MGR != 0 + if (os_mutex_init(&extra->common.exception_lock) != 0) { + wasm_runtime_free(module_inst); + return NULL; + } +#endif #if WASM_ENABLE_GC != 0 /* Initialize gc heap first since it may be used when initializing @@ -2081,17 +2087,25 @@ aot_instantiate(AOTModule *module, AOTModuleInstance *parent, #if WASM_ENABLE_LIBC_WASI != 0 if (!is_sub_inst) { + const WASIArguments *wasi_args = &args->wasi; + if (module->wasi_args.set_by_user) { + if (wasi_args->set_by_user) { + set_error_buf(error_buf, error_buf_size, + "WASI configuration was given via both of module " + "and InstantiationArgs2"); + goto fail; + } + wasi_args = &module->wasi_args; + } if (!wasm_runtime_init_wasi( - (WASMModuleInstanceCommon *)module_inst, - module->wasi_args.dir_list, module->wasi_args.dir_count, - module->wasi_args.map_dir_list, module->wasi_args.map_dir_count, - module->wasi_args.env, module->wasi_args.env_count, - module->wasi_args.addr_pool, module->wasi_args.addr_count, - module->wasi_args.ns_lookup_pool, - module->wasi_args.ns_lookup_count, module->wasi_args.argv, - module->wasi_args.argc, module->wasi_args.stdio[0], - module->wasi_args.stdio[1], module->wasi_args.stdio[2], - error_buf, error_buf_size)) + (WASMModuleInstanceCommon *)module_inst, wasi_args->dir_list, + wasi_args->dir_count, wasi_args->map_dir_list, + wasi_args->map_dir_count, wasi_args->env, wasi_args->env_count, + wasi_args->addr_pool, wasi_args->addr_count, + wasi_args->ns_lookup_pool, wasi_args->ns_lookup_count, + wasi_args->argv, wasi_args->argc, wasi_args->stdio[0], + wasi_args->stdio[1], wasi_args->stdio[2], error_buf, + error_buf_size)) goto fail; } #endif @@ -2345,6 +2359,10 @@ aot_deinstantiate(AOTModuleInstance *module_inst, bool is_sub_inst) wasm_exec_env_destroy((WASMExecEnv *)module_inst->exec_env_singleton); } +#if WASM_ENABLE_THREAD_MGR != 0 + os_mutex_destroy(&extra->common.exception_lock); +#endif + #if WASM_ENABLE_PERF_PROFILING != 0 if (module_inst->func_perf_profilings) wasm_runtime_free(module_inst->func_perf_profilings); @@ -2477,6 +2495,7 @@ invoke_native_with_hw_bound_check(WASMExecEnv *exec_env, void *func_ptr, native stack to run the following codes before actually calling the aot function in invokeNative function. */ if (!wasm_runtime_detect_native_stack_overflow(exec_env)) { + wasm_runtime_set_exec_env_tls(NULL); return false; } @@ -4167,7 +4186,8 @@ aot_alloc_tiny_frame(WASMExecEnv *exec_env, uint32 func_index) { AOTTinyFrame *new_frame = (AOTTinyFrame *)exec_env->wasm_stack.top; - if ((uint8 *)new_frame > exec_env->wasm_stack.top_boundary) { + if ((uint8 *)new_frame + sizeof(AOTTinyFrame) + > exec_env->wasm_stack.top_boundary) { aot_set_exception((WASMModuleInstance *)exec_env->module_inst, "wasm operand stack overflow"); return false; @@ -4323,6 +4343,7 @@ aot_copy_callstack_tiny_frame(WASMExecEnv *exec_env, WASMCApiFrame *buffer, AOTTinyFrame *frame = (AOTTinyFrame *)(top - sizeof(AOTTinyFrame)); WASMCApiFrame record_frame; + memset(&record_frame, 0, sizeof(WASMCApiFrame)); while (frame && (uint8_t *)frame >= bottom && count < (skip_n + length)) { if (count < skip_n) { ++count; @@ -4365,6 +4386,7 @@ aot_copy_callstack_standard_frame(WASMExecEnv *exec_env, WASMCApiFrame *buffer, uint32 frame_size = (uint32)offsetof(AOTFrame, lp); WASMCApiFrame record_frame; + memset(&record_frame, 0, sizeof(WASMCApiFrame)); while (cur_frame && (uint8_t *)cur_frame >= bottom && (uint8_t *)cur_frame + frame_size <= top_boundary && count < (skip_n + length)) { @@ -4690,7 +4712,7 @@ static bool cmpxchg_ptr(void **ptr, void *old_val, void *new_val) { #if defined(os_atomic_cmpxchg) - return os_atomic_cmpxchg(ptr, &old_val, new_val); + return os_atomic_cmpxchg((_Atomic(void *) *)ptr, &old_val, new_val); #else /* TODO: add lock when thread-manager is enabled */ void *read = *ptr; diff --git a/core/iwasm/aot/arch/aot_reloc_thumb.c b/core/iwasm/aot/arch/aot_reloc_thumb.c index c0957a42a9..263dac587b 100644 --- a/core/iwasm/aot/arch/aot_reloc_thumb.c +++ b/core/iwasm/aot/arch/aot_reloc_thumb.c @@ -52,6 +52,10 @@ void __aeabi_idivmod(void); void __aeabi_l2d(void); void __aeabi_l2f(void); void __aeabi_ldivmod(void); +void __aeabi_memclr(void); +void __aeabi_memcpy(void); +void __aeabi_memmove(void); +void __aeabi_memset(void); void __aeabi_llsl(void); void __aeabi_llsr(void); void __aeabi_lmul(void); @@ -171,6 +175,10 @@ static SymbolMap target_sym_map[] = { REG_SYM(__aeabi_l2d), REG_SYM(__aeabi_l2f), REG_SYM(__aeabi_ldivmod), + REG_SYM(__aeabi_memclr), + REG_SYM(__aeabi_memcpy), + REG_SYM(__aeabi_memmove), + REG_SYM(__aeabi_memset), REG_SYM(__aeabi_llsl), REG_SYM(__aeabi_llsr), REG_SYM(__aeabi_lmul), diff --git a/core/iwasm/common/arch/invokeNative_thumb.s b/core/iwasm/common/arch/invokeNative_thumb.s index 8087c63b8e..9a3f651b40 100644 --- a/core/iwasm/common/arch/invokeNative_thumb.s +++ b/core/iwasm/common/arch/invokeNative_thumb.s @@ -12,7 +12,7 @@ invokeNative: .globl _invokeNative _invokeNative: #endif /* end of BH_PLATFORM_DARWIN */ - + .cfi_startproc /* * Arguments passed in: * @@ -24,34 +24,40 @@ _invokeNative: push {r4, r5, r6, r7} push {lr} sub sp, sp, #4 /* make sp 8 byte aligned */ + .cfi_def_cfa_offset 24 + .cfi_offset lr, -20 + .cfi_offset r4, -16 + .cfi_offset r5, -12 + .cfi_offset r6, -8 + .cfi_offset r7, -4 mov ip, r0 /* ip = function ptr */ mov r4, r1 /* r4 = argv */ mov r5, r2 /* r5 = argc */ cmp r5, #1 /* at least one argument required: exec_env */ - blt return + blt .Lreturn mov r6, #0 /* increased stack size */ ldr r0, [r4] /* r0 = argv[0] = exec_env */ add r4, r4, #4 /* r4 += 4 */ cmp r5, #1 - beq call_func + beq .Lcall_func ldr r1, [r4] /* r1 = argv[1] */ add r4, r4, #4 cmp r5, #2 - beq call_func + beq .Lcall_func ldr r2, [r4] /* r2 = argv[2] */ add r4, r4, #4 cmp r5, #3 - beq call_func + beq .Lcall_func ldr r3, [r4] /* r3 = argv[3] */ add r4, r4, #4 cmp r5, #4 - beq call_func + beq .Lcall_func sub r5, r5, #4 /* argc -= 4, now we have r0 ~ r3 */ @@ -66,29 +72,31 @@ _invokeNative: mov sp, r7 mov lr, r2 /* save r2 */ -loop_args: /* copy left arguments to stack */ + +.Lloop_args: /* copy left arguments to stack */ cmp r5, #0 - beq call_func1 + beq .Lcall_func1 ldr r2, [r4] add r4, r4, #4 str r2, [r7] add r7, r7, #4 sub r5, r5, #1 - b loop_args + b .Lloop_args -call_func1: +.Lcall_func1: mov r2, lr /* restore r2 */ -call_func: +.Lcall_func: blx ip add sp, sp, r6 /* restore sp */ -return: +.Lreturn: add sp, sp, #4 /* make sp 8 byte aligned */ pop {r3} pop {r4, r5, r6, r7} mov lr, r3 bx lr + .cfi_endproc #if defined(__linux__) && defined(__ELF__) .section .note.GNU-stack,"",%progbits #endif diff --git a/core/iwasm/common/arch/invokeNative_thumb_vfp.s b/core/iwasm/common/arch/invokeNative_thumb_vfp.s index 1bad1a6a88..6277c0012b 100644 --- a/core/iwasm/common/arch/invokeNative_thumb_vfp.s +++ b/core/iwasm/common/arch/invokeNative_thumb_vfp.s @@ -12,7 +12,7 @@ invokeNative: .globl _invokeNative _invokeNative: #endif /* end of BH_PLATFORM_DARWIN */ - + .cfi_startproc /* * Arguments passed in: * @@ -24,10 +24,17 @@ _invokeNative: push {r4, r5, r6, r7} push {lr} sub sp, sp, #4 /* make sp 8 byte aligned */ + .cfi_def_cfa_offset 24 + .cfi_offset lr, -20 + .cfi_offset r4, -16 + .cfi_offset r5, -12 + .cfi_offset r6, -8 + .cfi_offset r7, -4 mov ip, r0 /* ip = function ptr */ mov r4, r1 /* r4 = argv */ mov r5, r2 /* r5 = nstacks */ mov r7, sp + .cfi_def_cfa r7, 24 /* Fill all int args */ ldr r0, [r4, #0] /* r0 = *(int*)&argv[0] = exec_env */ @@ -57,7 +64,7 @@ _invokeNative: vldr s15, [r4, #60] /* Directly call the function if no args in stack */ cmp r5, #0 - beq call_func + beq .Lcall_func mov lr, r2 /* save r2 */ @@ -73,30 +80,31 @@ _invokeNative: mov r7, sp mov sp, r6 -loop_stack_args: /* copy stack arguments to stack */ +.Lloop_stack_args: /* copy stack arguments to stack */ cmp r5, #0 - beq call_func1 + beq .Lcall_func1 ldr r2, [r4] /* Note: caller should insure int64 and */ add r4, r4, #4 /* double are placed in 8 bytes aligned address */ str r2, [r6] add r6, r6, #4 sub r5, r5, #1 - b loop_stack_args + b .Lloop_stack_args -call_func1: +.Lcall_func1: mov r2, lr /* restore r2 */ -call_func: +.Lcall_func: blx ip mov sp, r7 /* restore sp */ -return: +.Lreturn: add sp, sp, #4 /* make sp 8 byte aligned */ pop {r3} pop {r4, r5, r6, r7} mov lr, r3 bx lr + .cfi_endproc #if defined(__linux__) && defined(__ELF__) .section .note.GNU-stack,"",%progbits diff --git a/core/iwasm/common/gc/gc_common.c b/core/iwasm/common/gc/gc_common.c index 5cc869a654..7c2c154337 100644 --- a/core/iwasm/common/gc/gc_common.c +++ b/core/iwasm/common/gc/gc_common.c @@ -352,7 +352,15 @@ wasm_ref_type_set_heap_type(wasm_ref_type_t *ref_type, bool nullable, { bool ret; - bh_assert(heap_type <= HEAP_TYPE_FUNC && heap_type >= HEAP_TYPE_NONE); + bh_assert((heap_type >= HEAP_TYPE_ARRAY && heap_type <= HEAP_TYPE_NOFUNC) +#if WASM_ENABLE_STRINGREF != 0 + || heap_type == HEAP_TYPE_STRINGREF + || heap_type == HEAP_TYPE_STRINGVIEWWTF8 + || heap_type == HEAP_TYPE_STRINGVIEWWTF16 + || heap_type == HEAP_TYPE_STRINGVIEWITER +#endif + ); + ref_type->value_type = nullable ? VALUE_TYPE_HT_NULLABLE_REF : VALUE_TYPE_HT_NON_NULLABLE_REF; ref_type->nullable = nullable; diff --git a/core/iwasm/common/gc/gc_type.h b/core/iwasm/common/gc/gc_type.h index 919c8e5017..29b171e5a0 100644 --- a/core/iwasm/common/gc/gc_type.h +++ b/core/iwasm/common/gc/gc_type.h @@ -269,18 +269,20 @@ wasm_is_refheaptype_typeidx(const RefHeapType_Common *ref_heap_type) return ref_heap_type->heap_type >= 0 ? true : false; } -/* Whether a ref heap type is a common type: func/any/eq/i31/data, - not (type i) or (rtt n i) or (rtt i) */ +/* Whether a ref heap type is a common type: + func/any/eq/i31/data/nofunc/noextern, not (type i) or (rtt n i) or (rtt i) */ inline static bool wasm_is_refheaptype_common(const RefHeapType_Common *ref_heap_type) { return ((ref_heap_type->heap_type >= (int32)HEAP_TYPE_ARRAY - && ref_heap_type->heap_type <= (int32)HEAP_TYPE_NONE) + && ref_heap_type->heap_type <= (int32)HEAP_TYPE_NOFUNC) #if WASM_ENABLE_STRINGREF != 0 - || (ref_heap_type->heap_type >= (int32)HEAP_TYPE_STRINGVIEWITER - && ref_heap_type->heap_type <= (int32)HEAP_TYPE_I31) + || ref_heap_type->heap_type == (int32)HEAP_TYPE_STRINGREF + || ref_heap_type->heap_type == (int32)HEAP_TYPE_STRINGVIEWWTF8 + || ref_heap_type->heap_type == (int32)HEAP_TYPE_STRINGVIEWWTF16 + || ref_heap_type->heap_type == (int32)HEAP_TYPE_STRINGVIEWITER #endif - ) + ) ? true : false; } diff --git a/core/iwasm/common/wasm_c_api.c b/core/iwasm/common/wasm_c_api.c index 269ec5776f..f44b967b17 100644 --- a/core/iwasm/common/wasm_c_api.c +++ b/core/iwasm/common/wasm_c_api.c @@ -3459,9 +3459,16 @@ wasm_func_call(const wasm_func_t *func, const wasm_val_vec_t *params, wasm_runtime_free(argv); #if WASM_ENABLE_DUMP_CALL_STACK != 0 && WASM_ENABLE_THREAD_MGR != 0 - WASMCluster *cluster = wasm_exec_env_get_cluster(exec_env); - cluster_frames = &cluster->exception_frames; - wasm_cluster_traverse_lock(exec_env); + WASMCluster *cluster = NULL; + if (exec_env) { + cluster = wasm_exec_env_get_cluster(exec_env); + } + if (cluster) { + cluster_frames = &cluster->exception_frames; + } + if (cluster_frames) { + wasm_cluster_traverse_lock(exec_env); + } #endif wasm_trap_t *trap = wasm_trap_new_internal( @@ -3469,7 +3476,9 @@ wasm_func_call(const wasm_func_t *func, const wasm_val_vec_t *params, wasm_runtime_get_exception(func->inst_comm_rt), cluster_frames); #if WASM_ENABLE_DUMP_CALL_STACK != 0 && WASM_ENABLE_THREAD_MGR != 0 - wasm_cluster_traverse_unlock(exec_env); + if (cluster_frames) { + wasm_cluster_traverse_unlock(exec_env); + } #endif return trap; } diff --git a/core/iwasm/common/wasm_memory.c b/core/iwasm/common/wasm_memory.c index 10c651bc94..628a032370 100644 --- a/core/iwasm/common/wasm_memory.c +++ b/core/iwasm/common/wasm_memory.c @@ -162,10 +162,73 @@ runtime_malloc(uint64 size) return mem; } +static void +destroy_runtime_managed_shared_heap(WASMSharedHeap *heap) +{ + uint64 map_size; + + mem_allocator_destroy(heap->heap_handle); + wasm_runtime_free(heap->heap_handle); + heap->heap_handle = NULL; + +#ifndef OS_ENABLE_HW_BOUND_CHECK + map_size = heap->size; +#else + map_size = 8 * (uint64)BH_GB; +#endif + wasm_munmap_linear_memory(heap->base_addr, heap->size, map_size); + heap->base_addr = NULL; +} + +static bool +create_runtime_managed_shared_heap(WASMSharedHeap *heap, + uint64 heap_struct_size) +{ + uint64 map_size; + + heap->heap_handle = runtime_malloc(mem_allocator_get_heap_struct_size()); + if (!heap->heap_handle) { + heap->base_addr = NULL; + return false; + } + +#ifndef OS_ENABLE_HW_BOUND_CHECK + map_size = heap->size; +#else + /* Totally 8G is mapped, the opcode load/store address range is 0 to 8G: + * ea = i + memarg.offset + * both i and memarg.offset are u32 in range 0 to 4G + * so the range of ea is 0 to 8G + */ + map_size = 8 * (uint64)BH_GB; +#endif + + if (!(heap->base_addr = wasm_mmap_linear_memory(map_size, heap->size))) { + goto fail1; + } + if (!mem_allocator_create_with_struct_and_pool( + heap->heap_handle, heap_struct_size, heap->base_addr, heap->size)) { + LOG_WARNING("init share heap failed"); + goto fail2; + } + + LOG_VERBOSE("Create runtime managed shared heap %p with size %u", + heap->base_addr, (uint32)heap->size); + return true; + +fail2: + wasm_munmap_linear_memory(heap->base_addr, heap->size, map_size); +fail1: + wasm_runtime_free(heap->heap_handle); + heap->heap_handle = NULL; + heap->base_addr = NULL; + return false; +} + WASMSharedHeap * wasm_runtime_create_shared_heap(SharedHeapInitArgs *init_args) { - uint64 heap_struct_size = sizeof(WASMSharedHeap), map_size; + uint64 heap_struct_size = sizeof(WASMSharedHeap); uint32 size = init_args->size; WASMSharedHeap *heap; @@ -178,6 +241,11 @@ wasm_runtime_create_shared_heap(SharedHeapInitArgs *init_args) } size = align_uint(size, os_getpagesize()); + if (size != init_args->size) { + LOG_WARNING("Shared heap size aligned from %u to %u", init_args->size, + size); + } + if (size > APP_HEAP_SIZE_MAX || size < APP_HEAP_SIZE_MIN) { LOG_WARNING("Invalid size of shared heap"); goto fail2; @@ -203,32 +271,9 @@ wasm_runtime_create_shared_heap(SharedHeapInitArgs *init_args) heap->base_addr, size); } else { - if (!(heap->heap_handle = - runtime_malloc(mem_allocator_get_heap_struct_size()))) { + if (!create_runtime_managed_shared_heap(heap, heap_struct_size)) { goto fail2; } - -#ifndef OS_ENABLE_HW_BOUND_CHECK - map_size = size; -#else - /* Totally 8G is mapped, the opcode load/store address range is 0 to 8G: - * ea = i + memarg.offset - * both i and memarg.offset are u32 in range 0 to 4G - * so the range of ea is 0 to 8G - */ - map_size = 8 * (uint64)BH_GB; -#endif - - if (!(heap->base_addr = wasm_mmap_linear_memory(map_size, size))) { - goto fail3; - } - if (!mem_allocator_create_with_struct_and_pool( - heap->heap_handle, heap_struct_size, heap->base_addr, size)) { - LOG_WARNING("init share heap failed"); - goto fail4; - } - LOG_VERBOSE("Create pool shared heap %p with size %u", heap->base_addr, - size); } os_mutex_lock(&shared_heap_list_lock); @@ -242,10 +287,6 @@ wasm_runtime_create_shared_heap(SharedHeapInitArgs *init_args) os_mutex_unlock(&shared_heap_list_lock); return heap; -fail4: - wasm_munmap_linear_memory(heap->base_addr, size, map_size); -fail3: - wasm_runtime_free(heap->heap_handle); fail2: wasm_runtime_free(heap); fail1: @@ -339,6 +380,40 @@ wasm_runtime_unchain_shared_heaps(WASMSharedHeap *head, bool entire_chain) return cur; } +bool +wasm_runtime_reset_shared_heap_chain(WASMSharedHeap *shared_heap) +{ + uint64 heap_struct_size = sizeof(WASMSharedHeap); + WASMSharedHeap *cur; + + if (!shared_heap) { + return false; + } + + os_mutex_lock(&shared_heap_list_lock); + if (shared_heap->attached_count != 0) { + os_mutex_unlock(&shared_heap_list_lock); + return false; + } + + for (cur = shared_heap; cur; cur = cur->chain_next) { + if (cur->heap_handle) { + destroy_runtime_managed_shared_heap(cur); + + if (!create_runtime_managed_shared_heap(cur, heap_struct_size)) { + os_mutex_unlock(&shared_heap_list_lock); + return false; + } + } + else { + memset(cur->base_addr, 0, (size_t)cur->size); + } + } + + os_mutex_unlock(&shared_heap_list_lock); + return true; +} + static uint8 * get_last_used_shared_heap_base_addr_adj(WASMModuleInstanceCommon *module_inst) { @@ -726,10 +801,9 @@ wasm_runtime_shared_heap_malloc(WASMModuleInstanceCommon *module_inst, *p_native_addr = native_addr; } - return memory->is_memory64 - ? shared_heap->start_off_mem64 - : shared_heap->start_off_mem32 - + ((uint8 *)native_addr - shared_heap->base_addr); + return (memory->is_memory64 ? shared_heap->start_off_mem64 + : shared_heap->start_off_mem32) + + (uintptr_t)((uint8 *)native_addr - shared_heap->base_addr); } void @@ -830,14 +904,7 @@ destroy_shared_heaps() cur = heap; heap = heap->next; if (cur->heap_handle) { - mem_allocator_destroy(cur->heap_handle); - wasm_runtime_free(cur->heap_handle); -#ifndef OS_ENABLE_HW_BOUND_CHECK - map_size = cur->size; -#else - map_size = 8 * (uint64)BH_GB; -#endif - wasm_munmap_linear_memory(cur->base_addr, cur->size, map_size); + destroy_runtime_managed_shared_heap(cur); } wasm_runtime_free(cur); } diff --git a/core/iwasm/common/wasm_memory.h b/core/iwasm/common/wasm_memory.h index b79ed4a6cb..a96e250400 100644 --- a/core/iwasm/common/wasm_memory.h +++ b/core/iwasm/common/wasm_memory.h @@ -95,6 +95,9 @@ wasm_runtime_chain_shared_heaps(WASMSharedHeap *head, WASMSharedHeap *body); WASMSharedHeap * wasm_runtime_unchain_shared_heaps(WASMSharedHeap *head, bool entire_chain); +bool +wasm_runtime_reset_shared_heap_chain(WASMSharedHeap *shared_heap); + bool wasm_runtime_attach_shared_heap(WASMModuleInstanceCommon *module_inst, WASMSharedHeap *shared_heap); diff --git a/core/iwasm/common/wasm_native.c b/core/iwasm/common/wasm_native.c index 42aa55db28..ef482284cc 100644 --- a/core/iwasm/common/wasm_native.c +++ b/core/iwasm/common/wasm_native.c @@ -663,39 +663,44 @@ wasm_native_destroy() #if WASM_ENABLE_QUICK_AOT_ENTRY != 0 static void -invoke_no_args_v(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_no_args_v(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { void (*native_code)(WASMExecEnv *) = func_ptr; native_code(exec_env); + (void)argv; + (void)argv_ret; } static void -invoke_no_args_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_no_args_i(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int32 (*native_code)(WASMExecEnv *) = func_ptr; - argv_ret[0] = native_code(exec_env); + argv_ret[0] = (uint32)native_code(exec_env); + (void)argv; } static void -invoke_no_args_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_no_args_I(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int64 (*native_code)(WASMExecEnv *) = func_ptr; int64 ret = native_code(exec_env); PUT_I64_TO_ADDR(argv_ret, ret); + (void)argv; } static void -invoke_i_v(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_i_v(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { void (*native_code)(WASMExecEnv *, int32) = func_ptr; native_code(exec_env, argv[0]); + (void)argv_ret; } static void -invoke_i_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_i_i(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int32 (*native_code)(WASMExecEnv *, int32) = func_ptr; argv_ret[0] = native_code(exec_env, argv[0]); } static void -invoke_i_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_i_I(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int64 (*native_code)(WASMExecEnv *, int32) = func_ptr; int64 ret = native_code(exec_env, argv[0]); @@ -703,19 +708,20 @@ invoke_i_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) } static void -invoke_I_v(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_I_v(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { void (*native_code)(WASMExecEnv *, int64) = func_ptr; native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv)); + (void)argv_ret; } static void -invoke_I_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_I_i(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int32 (*native_code)(WASMExecEnv *, int64) = func_ptr; argv_ret[0] = native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv)); } static void -invoke_I_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_I_I(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int64 (*native_code)(WASMExecEnv *, int64) = func_ptr; int64 ret = native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv)); @@ -723,19 +729,20 @@ invoke_I_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) } static void -invoke_ii_v(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_ii_v(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { void (*native_code)(WASMExecEnv *, int32, int32) = func_ptr; native_code(exec_env, argv[0], argv[1]); + (void)argv_ret; } static void -invoke_ii_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_ii_i(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int32 (*native_code)(WASMExecEnv *, int32, int32) = func_ptr; argv_ret[0] = native_code(exec_env, argv[0], argv[1]); } static void -invoke_ii_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_ii_I(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int64 (*native_code)(WASMExecEnv *, int32, int32) = func_ptr; int64 ret = native_code(exec_env, argv[0], argv[1]); @@ -743,20 +750,21 @@ invoke_ii_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) } static void -invoke_iI_v(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iI_v(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { void (*native_code)(WASMExecEnv *, int32, int64) = func_ptr; native_code(exec_env, argv[0], GET_I64_FROM_ADDR((uint32 *)argv + 1)); + (void)argv_ret; } static void -invoke_iI_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iI_i(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int32 (*native_code)(WASMExecEnv *, int32, int64) = func_ptr; argv_ret[0] = native_code(exec_env, argv[0], GET_I64_FROM_ADDR((uint32 *)argv + 1)); } static void -invoke_iI_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iI_I(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int64 (*native_code)(WASMExecEnv *, int32, int64) = func_ptr; int64 ret = @@ -765,20 +773,21 @@ invoke_iI_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) } static void -invoke_Ii_v(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_Ii_v(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { void (*native_code)(WASMExecEnv *, int64, int32) = func_ptr; native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), argv[2]); + (void)argv_ret; } static void -invoke_Ii_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_Ii_i(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int32 (*native_code)(WASMExecEnv *, int64, int32) = func_ptr; argv_ret[0] = native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), argv[2]); } static void -invoke_Ii_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_Ii_I(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int64 (*native_code)(WASMExecEnv *, int64, int32) = func_ptr; int64 ret = @@ -787,21 +796,22 @@ invoke_Ii_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) } static void -invoke_II_v(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_II_v(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { void (*native_code)(WASMExecEnv *, int64, int64) = func_ptr; native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), GET_I64_FROM_ADDR((uint32 *)argv + 2)); + (void)argv_ret; } static void -invoke_II_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_II_i(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int32 (*native_code)(WASMExecEnv *, int64, int64) = func_ptr; argv_ret[0] = native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), GET_I64_FROM_ADDR((uint32 *)argv + 2)); } static void -invoke_II_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_II_I(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int64 (*native_code)(WASMExecEnv *, int64, int64) = func_ptr; int64 ret = native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), @@ -810,19 +820,20 @@ invoke_II_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) } static void -invoke_iii_v(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iii_v(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { void (*native_code)(WASMExecEnv *, int32, int32, int32) = func_ptr; native_code(exec_env, argv[0], argv[1], argv[2]); + (void)argv_ret; } static void -invoke_iii_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iii_i(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int32 (*native_code)(WASMExecEnv *, int32, int32, int32) = func_ptr; argv_ret[0] = native_code(exec_env, argv[0], argv[1], argv[2]); } static void -invoke_iii_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iii_I(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int64 (*native_code)(WASMExecEnv *, int32, int32, int32) = func_ptr; int64 ret = native_code(exec_env, argv[0], argv[1], argv[2]); @@ -830,21 +841,22 @@ invoke_iii_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) } static void -invoke_iiI_v(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iiI_v(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { void (*native_code)(WASMExecEnv *, int32, int32, int64) = func_ptr; native_code(exec_env, argv[0], argv[1], GET_I64_FROM_ADDR((uint32 *)argv + 2)); + (void)argv_ret; } static void -invoke_iiI_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iiI_i(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int32 (*native_code)(WASMExecEnv *, int32, int32, int64) = func_ptr; argv_ret[0] = native_code(exec_env, argv[0], argv[1], GET_I64_FROM_ADDR((uint32 *)argv + 2)); } static void -invoke_iiI_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iiI_I(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int64 (*native_code)(WASMExecEnv *, int32, int32, int64) = func_ptr; int64 ret = native_code(exec_env, argv[0], argv[1], @@ -853,21 +865,22 @@ invoke_iiI_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) } static void -invoke_iIi_v(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iIi_v(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { void (*native_code)(WASMExecEnv *, int32, int64, int32) = func_ptr; native_code(exec_env, argv[0], GET_I64_FROM_ADDR((uint32 *)argv + 1), argv[3]); + (void)argv_ret; } static void -invoke_iIi_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iIi_i(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int32 (*native_code)(WASMExecEnv *, int32, int64, int32) = func_ptr; argv_ret[0] = native_code(exec_env, argv[0], GET_I64_FROM_ADDR((uint32 *)argv + 1), argv[3]); } static void -invoke_iIi_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iIi_I(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int64 (*native_code)(WASMExecEnv *, int32, int64, int32) = func_ptr; int64 ret = native_code(exec_env, argv[0], @@ -876,14 +889,15 @@ invoke_iIi_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) } static void -invoke_iII_v(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iII_v(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { void (*native_code)(WASMExecEnv *, int32, int64, int64) = func_ptr; native_code(exec_env, argv[0], GET_I64_FROM_ADDR((uint32 *)argv + 1), GET_I64_FROM_ADDR((uint32 *)argv + 3)); + (void)argv_ret; } static void -invoke_iII_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iII_i(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int32 (*native_code)(WASMExecEnv *, int32, int64, int64) = func_ptr; argv_ret[0] = @@ -891,7 +905,7 @@ invoke_iII_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) GET_I64_FROM_ADDR((uint32 *)argv + 3)); } static void -invoke_iII_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iII_I(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int64 (*native_code)(WASMExecEnv *, int32, int64, int64) = func_ptr; int64 ret = @@ -901,20 +915,21 @@ invoke_iII_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) } static void -invoke_Iii_v(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_Iii_v(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { void (*native_code)(WASMExecEnv *, int64, int32, int32) = func_ptr; native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), argv[2], argv[3]); + (void)argv_ret; } static void -invoke_Iii_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_Iii_i(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int32 (*native_code)(WASMExecEnv *, int64, int32, int32) = func_ptr; argv_ret[0] = native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), argv[2], argv[3]); } static void -invoke_Iii_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_Iii_I(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int64 (*native_code)(WASMExecEnv *, int64, int32, int32) = func_ptr; int64 ret = native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), @@ -923,21 +938,22 @@ invoke_Iii_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) } static void -invoke_IiI_v(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_IiI_v(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { void (*native_code)(WASMExecEnv *, int64, int32, int64) = func_ptr; native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), argv[2], GET_I64_FROM_ADDR((uint32 *)argv + 3)); + (void)argv_ret; } static void -invoke_IiI_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_IiI_i(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int32 (*native_code)(WASMExecEnv *, int64, int32, int64) = func_ptr; argv_ret[0] = native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), argv[2], GET_I64_FROM_ADDR((uint32 *)argv + 3)); } static void -invoke_IiI_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_IiI_I(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int64 (*native_code)(WASMExecEnv *, int64, int32, int64) = func_ptr; int64 ret = native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), @@ -946,21 +962,22 @@ invoke_IiI_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) } static void -invoke_IIi_v(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_IIi_v(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { void (*native_code)(WASMExecEnv *, int64, int64, int32) = func_ptr; native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), GET_I64_FROM_ADDR((uint32 *)argv + 2), argv[4]); + (void)argv_ret; } static void -invoke_IIi_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_IIi_i(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int32 (*native_code)(WASMExecEnv *, int64, int64, int32) = func_ptr; argv_ret[0] = native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), GET_I64_FROM_ADDR((uint32 *)argv + 2), argv[4]); } static void -invoke_IIi_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_IIi_I(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int64 (*native_code)(WASMExecEnv *, int64, int64, int32) = func_ptr; int64 ret = native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), @@ -969,15 +986,16 @@ invoke_IIi_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) } static void -invoke_III_v(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_III_v(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { void (*native_code)(WASMExecEnv *, int64, int64, int64) = func_ptr; native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), GET_I64_FROM_ADDR((uint32 *)argv + 2), GET_I64_FROM_ADDR((uint32 *)argv + 4)); + (void)argv_ret; } static void -invoke_III_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_III_i(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int32 (*native_code)(WASMExecEnv *, int64, int64, int64) = func_ptr; argv_ret[0] = native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), @@ -985,7 +1003,7 @@ invoke_III_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) GET_I64_FROM_ADDR((uint32 *)argv + 4)); } static void -invoke_III_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_III_I(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int64 (*native_code)(WASMExecEnv *, int64, int64, int64) = func_ptr; int64 ret = native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), @@ -995,19 +1013,20 @@ invoke_III_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) } static void -invoke_iiii_v(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iiii_v(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { void (*native_code)(WASMExecEnv *, int32, int32, int32, int32) = func_ptr; native_code(exec_env, argv[0], argv[1], argv[2], argv[3]); + (void)argv_ret; } static void -invoke_iiii_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iiii_i(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int32 (*native_code)(WASMExecEnv *, int32, int32, int32, int32) = func_ptr; argv_ret[0] = native_code(exec_env, argv[0], argv[1], argv[2], argv[3]); } static void -invoke_iiii_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iiii_I(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int64 (*native_code)(WASMExecEnv *, int32, int32, int32, int32) = func_ptr; int64 ret = native_code(exec_env, argv[0], argv[1], argv[2], argv[3]); @@ -1015,21 +1034,22 @@ invoke_iiii_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) } static void -invoke_iiiI_v(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iiiI_v(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { void (*native_code)(WASMExecEnv *, int32, int32, int32, int64) = func_ptr; native_code(exec_env, argv[0], argv[1], argv[2], GET_I64_FROM_ADDR((uint32 *)argv + 3)); + (void)argv_ret; } static void -invoke_iiiI_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iiiI_i(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int32 (*native_code)(WASMExecEnv *, int32, int32, int32, int64) = func_ptr; argv_ret[0] = native_code(exec_env, argv[0], argv[1], argv[2], GET_I64_FROM_ADDR((uint32 *)argv + 3)); } static void -invoke_iiiI_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iiiI_I(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int64 (*native_code)(WASMExecEnv *, int32, int32, int32, int64) = func_ptr; int64 ret = native_code(exec_env, argv[0], argv[1], argv[2], @@ -1038,21 +1058,22 @@ invoke_iiiI_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) } static void -invoke_iiIi_v(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iiIi_v(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { void (*native_code)(WASMExecEnv *, int32, int32, int64, int32) = func_ptr; native_code(exec_env, argv[0], argv[1], GET_I64_FROM_ADDR((uint32 *)argv + 2), argv[4]); + (void)argv_ret; } static void -invoke_iiIi_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iiIi_i(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int32 (*native_code)(WASMExecEnv *, int32, int32, int64, int32) = func_ptr; argv_ret[0] = native_code(exec_env, argv[0], argv[1], GET_I64_FROM_ADDR((uint32 *)argv + 2), argv[4]); } static void -invoke_iiIi_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iiIi_I(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int64 (*native_code)(WASMExecEnv *, int32, int32, int64, int32) = func_ptr; int64 ret = native_code(exec_env, argv[0], argv[1], @@ -1061,15 +1082,16 @@ invoke_iiIi_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) } static void -invoke_iiII_v(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iiII_v(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { void (*native_code)(WASMExecEnv *, int32, int32, int64, int64) = func_ptr; native_code(exec_env, argv[0], argv[1], GET_I64_FROM_ADDR((uint32 *)argv + 2), GET_I64_FROM_ADDR((uint32 *)argv + 4)); + (void)argv_ret; } static void -invoke_iiII_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iiII_i(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int32 (*native_code)(WASMExecEnv *, int32, int32, int64, int64) = func_ptr; argv_ret[0] = native_code(exec_env, argv[0], argv[1], @@ -1077,7 +1099,7 @@ invoke_iiII_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) GET_I64_FROM_ADDR((uint32 *)argv + 4)); } static void -invoke_iiII_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iiII_I(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int64 (*native_code)(WASMExecEnv *, int32, int32, int64, int64) = func_ptr; int64 ret = native_code(exec_env, argv[0], argv[1], @@ -1087,14 +1109,15 @@ invoke_iiII_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) } static void -invoke_iIii_v(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iIii_v(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { void (*native_code)(WASMExecEnv *, int32, int64, int32, int32) = func_ptr; native_code(exec_env, argv[0], GET_I64_FROM_ADDR((uint32 *)argv + 1), argv[3], argv[4]); + (void)argv_ret; } static void -invoke_iIii_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iIii_i(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int32 (*native_code)(WASMExecEnv *, int32, int64, int32, int32) = func_ptr; argv_ret[0] = @@ -1102,7 +1125,7 @@ invoke_iIii_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) argv[3], argv[4]); } static void -invoke_iIii_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iIii_I(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int64 (*native_code)(WASMExecEnv *, int32, int64, int32, int32) = func_ptr; int64 ret = @@ -1112,14 +1135,15 @@ invoke_iIii_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) } static void -invoke_iIiI_v(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iIiI_v(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { void (*native_code)(WASMExecEnv *, int32, int64, int32, int64) = func_ptr; native_code(exec_env, argv[0], GET_I64_FROM_ADDR((uint32 *)argv + 1), argv[3], GET_I64_FROM_ADDR((uint32 *)argv + 4)); + (void)argv_ret; } static void -invoke_iIiI_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iIiI_i(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int32 (*native_code)(WASMExecEnv *, int32, int64, int32, int64) = func_ptr; argv_ret[0] = @@ -1127,7 +1151,7 @@ invoke_iIiI_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) argv[3], GET_I64_FROM_ADDR((uint32 *)argv + 4)); } static void -invoke_iIiI_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iIiI_I(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int64 (*native_code)(WASMExecEnv *, int32, int64, int32, int64) = func_ptr; int64 ret = @@ -1137,14 +1161,15 @@ invoke_iIiI_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) } static void -invoke_iIIi_v(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iIIi_v(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { void (*native_code)(WASMExecEnv *, int32, int64, int64, int32) = func_ptr; native_code(exec_env, argv[0], GET_I64_FROM_ADDR((uint32 *)argv + 1), GET_I64_FROM_ADDR((uint32 *)argv + 3), argv[5]); + (void)argv_ret; } static void -invoke_iIIi_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iIIi_i(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int32 (*native_code)(WASMExecEnv *, int32, int64, int64, int32) = func_ptr; argv_ret[0] = @@ -1152,7 +1177,7 @@ invoke_iIIi_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) GET_I64_FROM_ADDR((uint32 *)argv + 3), argv[5]); } static void -invoke_iIIi_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iIIi_I(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int64 (*native_code)(WASMExecEnv *, int32, int64, int64, int32) = func_ptr; int64 ret = @@ -1162,15 +1187,16 @@ invoke_iIIi_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) } static void -invoke_iIII_v(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iIII_v(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { void (*native_code)(WASMExecEnv *, int32, int64, int64, int64) = func_ptr; native_code(exec_env, argv[0], GET_I64_FROM_ADDR((uint32 *)argv + 1), GET_I64_FROM_ADDR((uint32 *)argv + 3), GET_I64_FROM_ADDR((uint32 *)argv + 5)); + (void)argv_ret; } static void -invoke_iIII_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iIII_i(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int32 (*native_code)(WASMExecEnv *, int32, int64, int64, int64) = func_ptr; argv_ret[0] = @@ -1179,7 +1205,7 @@ invoke_iIII_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) GET_I64_FROM_ADDR((uint32 *)argv + 5)); } static void -invoke_iIII_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iIII_I(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int64 (*native_code)(WASMExecEnv *, int32, int64, int64, int64) = func_ptr; int64 ret = @@ -1190,21 +1216,22 @@ invoke_iIII_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) } static void -invoke_Iiii_v(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_Iiii_v(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { void (*native_code)(WASMExecEnv *, int64, int32, int32, int32) = func_ptr; native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), argv[2], argv[3], argv[4]); + (void)argv_ret; } static void -invoke_Iiii_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_Iiii_i(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int32 (*native_code)(WASMExecEnv *, int64, int32, int32, int32) = func_ptr; argv_ret[0] = native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), argv[2], argv[3], argv[4]); } static void -invoke_Iiii_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_Iiii_I(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int64 (*native_code)(WASMExecEnv *, int64, int32, int32, int32) = func_ptr; int64 ret = native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), @@ -1213,15 +1240,16 @@ invoke_Iiii_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) } static void -invoke_IiiI_v(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_IiiI_v(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { void (*native_code)(WASMExecEnv *, int64, int32, int32, int64) = func_ptr; native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), argv[2], argv[3], GET_I64_FROM_ADDR((uint32 *)argv + 4)); + (void)argv_ret; } static void -invoke_IiiI_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_IiiI_i(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int32 (*native_code)(WASMExecEnv *, int64, int32, int32, int64) = func_ptr; argv_ret[0] = @@ -1230,7 +1258,7 @@ invoke_IiiI_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) } static void -invoke_IiiI_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_IiiI_I(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int64 (*native_code)(WASMExecEnv *, int64, int32, int32, int64) = func_ptr; int64 ret = @@ -1240,14 +1268,15 @@ invoke_IiiI_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) } static void -invoke_IiIi_v(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_IiIi_v(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { void (*native_code)(WASMExecEnv *, int64, int32, int64, int32) = func_ptr; native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), argv[2], GET_I64_FROM_ADDR((uint32 *)argv + 3), argv[5]); + (void)argv_ret; } static void -invoke_IiIi_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_IiIi_i(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int32 (*native_code)(WASMExecEnv *, int64, int32, int64, int32) = func_ptr; argv_ret[0] = @@ -1255,7 +1284,7 @@ invoke_IiIi_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) GET_I64_FROM_ADDR((uint32 *)argv + 3), argv[5]); } static void -invoke_IiIi_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_IiIi_I(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int64 (*native_code)(WASMExecEnv *, int64, int32, int64, int32) = func_ptr; int64 ret = @@ -1265,15 +1294,16 @@ invoke_IiIi_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) } static void -invoke_IiII_v(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_IiII_v(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { void (*native_code)(WASMExecEnv *, int64, int32, int64, int64) = func_ptr; native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), argv[2], GET_I64_FROM_ADDR((uint32 *)argv + 3), GET_I64_FROM_ADDR((uint32 *)argv + 5)); + (void)argv_ret; } static void -invoke_IiII_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_IiII_i(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int32 (*native_code)(WASMExecEnv *, int64, int32, int64, int64) = func_ptr; argv_ret[0] = native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), @@ -1281,7 +1311,7 @@ invoke_IiII_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) GET_I64_FROM_ADDR((uint32 *)argv + 5)); } static void -invoke_IiII_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_IiII_I(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int64 (*native_code)(WASMExecEnv *, int64, int32, int64, int64) = func_ptr; int64 ret = native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), @@ -1291,14 +1321,15 @@ invoke_IiII_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) } static void -invoke_IIii_v(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_IIii_v(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { void (*native_code)(WASMExecEnv *, int64, int64, int32, int32) = func_ptr; native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), GET_I64_FROM_ADDR((uint32 *)argv + 2), argv[4], argv[5]); + (void)argv_ret; } static void -invoke_IIii_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_IIii_i(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int32 (*native_code)(WASMExecEnv *, int64, int64, int32, int32) = func_ptr; argv_ret[0] = @@ -1306,7 +1337,7 @@ invoke_IIii_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) GET_I64_FROM_ADDR((uint32 *)argv + 2), argv[4], argv[5]); } static void -invoke_IIii_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_IIii_I(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int64 (*native_code)(WASMExecEnv *, int64, int64, int32, int32) = func_ptr; int64 ret = @@ -1316,15 +1347,16 @@ invoke_IIii_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) } static void -invoke_IIiI_v(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_IIiI_v(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { void (*native_code)(WASMExecEnv *, int64, int64, int32, int64) = func_ptr; native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), GET_I64_FROM_ADDR((uint32 *)argv + 2), argv[4], GET_I64_FROM_ADDR((uint32 *)argv + 5)); + (void)argv_ret; } static void -invoke_IIiI_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_IIiI_i(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int32 (*native_code)(WASMExecEnv *, int64, int64, int32, int64) = func_ptr; argv_ret[0] = native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), @@ -1332,7 +1364,7 @@ invoke_IIiI_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) GET_I64_FROM_ADDR((uint32 *)argv + 5)); } static void -invoke_IIiI_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_IIiI_I(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int64 (*native_code)(WASMExecEnv *, int64, int64, int32, int64) = func_ptr; int64 ret = native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), @@ -1342,15 +1374,16 @@ invoke_IIiI_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) } static void -invoke_IIIi_v(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_IIIi_v(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { void (*native_code)(WASMExecEnv *, int64, int64, int64, int32) = func_ptr; native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), GET_I64_FROM_ADDR((uint32 *)argv + 2), GET_I64_FROM_ADDR((uint32 *)argv + 4), argv[6]); + (void)argv_ret; } static void -invoke_IIIi_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_IIIi_i(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int32 (*native_code)(WASMExecEnv *, int64, int64, int64, int32) = func_ptr; argv_ret[0] = native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), @@ -1358,7 +1391,7 @@ invoke_IIIi_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) GET_I64_FROM_ADDR((uint32 *)argv + 4), argv[6]); } static void -invoke_IIIi_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_IIIi_I(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int64 (*native_code)(WASMExecEnv *, int64, int64, int64, int32) = func_ptr; int64 ret = native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), @@ -1368,16 +1401,17 @@ invoke_IIIi_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) } static void -invoke_IIII_v(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_IIII_v(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { void (*native_code)(WASMExecEnv *, int64, int64, int64, int64) = func_ptr; native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), GET_I64_FROM_ADDR((uint32 *)argv + 2), GET_I64_FROM_ADDR((uint32 *)argv + 4), GET_I64_FROM_ADDR((uint32 *)argv + 6)); + (void)argv_ret; } static void -invoke_IIII_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_IIII_i(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int32 (*native_code)(WASMExecEnv *, int64, int64, int64, int64) = func_ptr; argv_ret[0] = native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), @@ -1386,7 +1420,7 @@ invoke_IIII_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) GET_I64_FROM_ADDR((uint32 *)argv + 6)); } static void -invoke_IIII_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_IIII_I(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int64 (*native_code)(WASMExecEnv *, int64, int64, int64, int64) = func_ptr; int64 ret = native_code(exec_env, GET_I64_FROM_ADDR((uint32 *)argv), @@ -1397,14 +1431,15 @@ invoke_IIII_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) } static void -invoke_iiiii_v(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iiiii_v(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { void (*native_code)(WASMExecEnv *, int32, int32, int32, int32, int32) = func_ptr; native_code(exec_env, argv[0], argv[1], argv[2], argv[3], argv[4]); + (void)argv_ret; } static void -invoke_iiiii_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iiiii_i(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int32 (*native_code)(WASMExecEnv *, int32, int32, int32, int32, int32) = func_ptr; @@ -1412,7 +1447,7 @@ invoke_iiiii_i(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) native_code(exec_env, argv[0], argv[1], argv[2], argv[3], argv[4]); } static void -invoke_iiiii_I(void *func_ptr, void *exec_env, int32 *argv, int32 *argv_ret) +invoke_iiiii_I(void *func_ptr, void *exec_env, uint32 *argv, uint32 *argv_ret) { int64 (*native_code)(WASMExecEnv *, int32, int32, int32, int32, int32) = func_ptr; diff --git a/core/iwasm/common/wasm_runtime_common.c b/core/iwasm/common/wasm_runtime_common.c index e6bde73637..98686c3f42 100644 --- a/core/iwasm/common/wasm_runtime_common.c +++ b/core/iwasm/common/wasm_runtime_common.c @@ -415,19 +415,39 @@ runtime_exception_handler(EXCEPTION_POINTERS *exce_info) } #endif /* end of BH_PLATFORM_WINDOWS */ +#ifdef BH_PLATFORM_WINDOWS +static PVOID runtime_exception_handler_handle = NULL; +static int32 runtime_exception_handler_ref_count = 0; +static korp_mutex runtime_exception_handler_lock = NULL; +#endif + static bool runtime_signal_init() { #ifndef BH_PLATFORM_WINDOWS return os_thread_signal_init(runtime_signal_handler) == 0 ? true : false; #else - if (os_thread_signal_init() != 0) + os_mutex_lock(&runtime_exception_handler_lock); + + if (os_thread_signal_init() != 0) { + os_mutex_unlock(&runtime_exception_handler_lock); return false; + } - if (!AddVectoredExceptionHandler(1, runtime_exception_handler)) { + if (runtime_exception_handler_ref_count == 0) { + runtime_exception_handler_handle = + AddVectoredExceptionHandler(1, runtime_exception_handler); + } + + if (!runtime_exception_handler_handle) { os_thread_signal_destroy(); + os_mutex_unlock(&runtime_exception_handler_lock); return false; } + + runtime_exception_handler_ref_count++; + + os_mutex_unlock(&runtime_exception_handler_lock); #endif return true; } @@ -436,7 +456,25 @@ static void runtime_signal_destroy() { #ifdef BH_PLATFORM_WINDOWS - RemoveVectoredExceptionHandler(runtime_exception_handler); + os_mutex_lock(&runtime_exception_handler_lock); + + if (runtime_exception_handler_ref_count > 0) { + runtime_exception_handler_ref_count--; + } + + if (runtime_exception_handler_ref_count == 0 + && runtime_exception_handler_handle) { + if (RemoveVectoredExceptionHandler(runtime_exception_handler_handle)) { + runtime_exception_handler_handle = NULL; + } + else { + /* Keep the handle so future init/destroy cycles can retry remove. + * Clearing it here may leave a live callback registered forever. */ + runtime_exception_handler_ref_count = 1; + } + } + + os_mutex_unlock(&runtime_exception_handler_lock); #endif os_thread_signal_destroy(); } @@ -1648,6 +1686,9 @@ void wasm_runtime_instantiation_args_set_defaults(struct InstantiationArgs2 *args) { memset(args, 0, sizeof(*args)); +#if WASM_ENABLE_LIBC_WASI != 0 + wasi_args_set_defaults(&args->wasi); +#endif } WASMModuleInstanceCommon * @@ -1714,6 +1755,84 @@ wasm_runtime_instantiation_args_set_max_memory_pages( p->v1.max_memory_pages = v; } +#if WASM_ENABLE_LIBC_WASI != 0 +void +wasm_runtime_instantiation_args_set_wasi_arg(struct InstantiationArgs2 *p, + char *argv[], int argc) +{ + WASIArguments *wasi_args = &p->wasi; + + wasi_args->argv = argv; + wasi_args->argc = (uint32)argc; + wasi_args->set_by_user = true; +} + +void +wasm_runtime_instantiation_args_set_wasi_env(struct InstantiationArgs2 *p, + const char *env[], + uint32 env_count) +{ + WASIArguments *wasi_args = &p->wasi; + + wasi_args->env = env; + wasi_args->env_count = env_count; + wasi_args->set_by_user = true; +} + +void +wasm_runtime_instantiation_args_set_wasi_dir(struct InstantiationArgs2 *p, + const char *dir_list[], + uint32 dir_count, + const char *map_dir_list[], + uint32 map_dir_count) +{ + WASIArguments *wasi_args = &p->wasi; + + wasi_args->dir_list = dir_list; + wasi_args->dir_count = dir_count; + wasi_args->map_dir_list = map_dir_list; + wasi_args->map_dir_count = map_dir_count; + wasi_args->set_by_user = true; +} + +void +wasm_runtime_instantiation_args_set_wasi_stdio(struct InstantiationArgs2 *p, + int64 stdinfd, int64 stdoutfd, + int64 stderrfd) +{ + WASIArguments *wasi_args = &p->wasi; + + wasi_args->stdio[0] = (os_raw_file_handle)stdinfd; + wasi_args->stdio[1] = (os_raw_file_handle)stdoutfd; + wasi_args->stdio[2] = (os_raw_file_handle)stderrfd; + wasi_args->set_by_user = true; +} + +void +wasm_runtime_instantiation_args_set_wasi_addr_pool(struct InstantiationArgs2 *p, + const char *addr_pool[], + uint32 addr_pool_size) +{ + WASIArguments *wasi_args = &p->wasi; + + wasi_args->addr_pool = addr_pool; + wasi_args->addr_count = addr_pool_size; + wasi_args->set_by_user = true; +} + +void +wasm_runtime_instantiation_args_set_wasi_ns_lookup_pool( + struct InstantiationArgs2 *p, const char *ns_lookup_pool[], + uint32 ns_lookup_pool_size) +{ + WASIArguments *wasi_args = &p->wasi; + + wasi_args->ns_lookup_pool = ns_lookup_pool; + wasi_args->ns_lookup_count = ns_lookup_pool_size; + wasi_args->set_by_user = true; +} +#endif /* WASM_ENABLE_LIBC_WASI != 0 */ + WASMModuleInstanceCommon * wasm_runtime_instantiate_ex2(WASMModuleCommon *module, const struct InstantiationArgs2 *args, @@ -3494,6 +3613,7 @@ wasm_runtime_set_wasi_args_ex(WASMModuleCommon *module, const char *dir_list[], wasi_args->stdio[0] = (os_raw_file_handle)stdinfd; wasi_args->stdio[1] = (os_raw_file_handle)stdoutfd; wasi_args->stdio[2] = (os_raw_file_handle)stderrfd; + wasi_args->set_by_user = true; #if WASM_ENABLE_MULTI_MODULE != 0 #if WASM_ENABLE_INTERP != 0 @@ -3524,6 +3644,7 @@ wasm_runtime_set_wasi_addr_pool(wasm_module_t module, const char *addr_pool[], if (wasi_args) { wasi_args->addr_pool = addr_pool; wasi_args->addr_count = addr_pool_size; + wasi_args->set_by_user = true; } } @@ -3537,6 +3658,7 @@ wasm_runtime_set_wasi_ns_lookup_pool(wasm_module_t module, if (wasi_args) { wasi_args->ns_lookup_pool = ns_lookup_pool; wasi_args->ns_lookup_count = ns_lookup_pool_size; + wasi_args->set_by_user = true; } } @@ -3814,7 +3936,8 @@ wasm_runtime_init_wasi(WASMModuleInstanceCommon *module_inst, /* addr_pool(textual) -> apool */ for (i = 0; i < addr_pool_size; i++) { - char *cp, *address, *mask; + char *cp, *address, *mask, *nextptr, *endptr; + long mask_val; bool ret = false; cp = bh_strdup(addr_pool[i]); @@ -3824,18 +3947,35 @@ wasm_runtime_init_wasi(WASMModuleInstanceCommon *module_inst, goto fail; } - address = strtok(cp, "/"); - mask = strtok(NULL, "/"); + address = bh_strtok_r(cp, "/", &nextptr); + mask = bh_strtok_r(NULL, "/", &nextptr); if (!mask) { snprintf(error_buf, error_buf_size, "Invalid address pool entry: %s, must be in the format of " "ADDRESS/MASK", addr_pool[i]); + wasm_runtime_free(cp); + goto fail; + } + + errno = 0; + mask_val = strtol(mask, &endptr, 10); + + if (mask == endptr || *endptr != '\0') { + snprintf(error_buf, error_buf_size, + "Invalid address pool entry: mask must be a number"); + wasm_runtime_free(cp); + goto fail; + } + if (errno != 0 || mask_val < 0) { + snprintf(error_buf, error_buf_size, + "Init wasi environment failed: invalid mask number"); + wasm_runtime_free(cp); goto fail; } - ret = addr_pool_insert(apool, address, (uint8)atoi(mask)); + ret = addr_pool_insert(apool, address, (uint8)mask_val); wasm_runtime_free(cp); if (!ret) { set_error_buf(error_buf, error_buf_size, @@ -7996,3 +8136,18 @@ wasm_runtime_check_and_update_last_used_shared_heap( return false; } #endif + +WASMModuleInstanceExtraCommon * +GetModuleInstanceExtraCommon(WASMModuleInstance *module_inst) +{ +#if WASM_ENABLE_AOT != 0 + if (module_inst->module_type == Wasm_Module_AoT) { + return &((AOTModuleInstanceExtra *)module_inst->e)->common; + } + else { + return &module_inst->e->common; + } +#else + return &module_inst->e->common; +#endif +} diff --git a/core/iwasm/common/wasm_runtime_common.h b/core/iwasm/common/wasm_runtime_common.h index 88af687447..0477387ed0 100644 --- a/core/iwasm/common/wasm_runtime_common.h +++ b/core/iwasm/common/wasm_runtime_common.h @@ -614,6 +614,9 @@ wasm_runtime_get_exec_env_tls(void); struct InstantiationArgs2 { InstantiationArgs v1; +#if WASM_ENABLE_LIBC_WASI != 0 + WASIArguments wasi; +#endif }; void @@ -735,6 +738,43 @@ void wasm_runtime_instantiation_args_set_max_memory_pages( struct InstantiationArgs2 *p, uint32 v); +/* See wasm_export.h for description */ +WASM_RUNTIME_API_EXTERN void +wasm_runtime_instantiation_args_set_wasi_arg(struct InstantiationArgs2 *p, + char *argv[], int argc); + +/* See wasm_export.h for description */ +WASM_RUNTIME_API_EXTERN void +wasm_runtime_instantiation_args_set_wasi_env(struct InstantiationArgs2 *p, + const char *env[], + uint32 env_count); + +/* See wasm_export.h for description */ +WASM_RUNTIME_API_EXTERN void +wasm_runtime_instantiation_args_set_wasi_dir(struct InstantiationArgs2 *p, + const char *dir_list[], + uint32 dir_count, + const char *map_dir_list[], + uint32 map_dir_count); + +/* See wasm_export.h for description */ +WASM_RUNTIME_API_EXTERN void +wasm_runtime_instantiation_args_set_wasi_stdio(struct InstantiationArgs2 *p, + int64 stdinfd, int64 stdoutfd, + int64 stderrfd); + +/* See wasm_export.h for description */ +WASM_RUNTIME_API_EXTERN void +wasm_runtime_instantiation_args_set_wasi_addr_pool(struct InstantiationArgs2 *p, + const char *addr_pool[], + uint32 addr_pool_size); + +/* See wasm_export.h for description */ +WASM_RUNTIME_API_EXTERN void +wasm_runtime_instantiation_args_set_wasi_ns_lookup_pool( + struct InstantiationArgs2 *p, const char *ns_lookup_pool[], + uint32 ns_lookup_pool_size); + /* See wasm_export.h for description */ WASM_RUNTIME_API_EXTERN WASMModuleInstanceCommon * wasm_runtime_instantiate_ex2(WASMModuleCommon *module, @@ -1387,6 +1427,9 @@ wasm_runtime_check_and_update_last_used_shared_heap( uint8 **shared_heap_base_addr_adj_p, bool is_memory64); #endif +struct WASMModuleInstanceExtraCommon * +GetModuleInstanceExtraCommon(struct WASMModuleInstance *module_inst); + #ifdef __cplusplus } #endif diff --git a/core/iwasm/compilation/aot_emit_memory.c b/core/iwasm/compilation/aot_emit_memory.c index f5bd859df1..420096c64b 100644 --- a/core/iwasm/compilation/aot_emit_memory.c +++ b/core/iwasm/compilation/aot_emit_memory.c @@ -676,7 +676,7 @@ aot_check_memory_overflow(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx, *alignp = max_align; } else { - unsigned int align = 1 << (shift - 1); + unsigned int align = 1U << (shift - 1); if (align > max_align) { align = max_align; } diff --git a/core/iwasm/compilation/aot_llvm.c b/core/iwasm/compilation/aot_llvm.c index ab351e6d44..4e8fd2cf59 100644 --- a/core/iwasm/compilation/aot_llvm.c +++ b/core/iwasm/compilation/aot_llvm.c @@ -3005,6 +3005,10 @@ aot_create_comp_context(const AOTCompData *comp_data, aot_comp_option_t option) else vendor_sys = "-pc-windows-"; } + else if (!strcmp(abi, "darwin") || !strcmp(abi, "macho")) { + /* macOS/Darwin: x18 is reserved by Apple */ + vendor_sys = "-apple-"; + } else { if (is_baremetal_target(arch, cpu, abi)) vendor_sys = "-unknown-none-"; @@ -3050,6 +3054,14 @@ aot_create_comp_context(const AOTCompData *comp_data, aot_comp_option_t option) if (!abi) abi = "gnu"; } + else if (strstr(default_triple, "darwin") + || strstr(default_triple, "apple")) { + /* macOS/Darwin: x18 is reserved by Apple, must use correct + * triple to prevent LLVM from using it */ + vendor_sys = "-apple-darwin"; + if (!abi) + abi = ""; + } else { vendor_sys = "-pc-linux-"; if (!abi) @@ -3139,6 +3151,30 @@ aot_create_comp_context(const AOTCompData *comp_data, aot_comp_option_t option) if (!features) features = ""; +#if (defined(__APPLE__) || defined(__MACH__)) && defined(BUILD_TARGET_AARCH64) + /* On macOS ARM64, x18 is reserved by Apple for TLS. Even though we're + * generating ELF (Linux-style) AOT files, we must tell LLVM to not + * use x18, otherwise the AOT code will crash when running on macOS. */ + { + bool is_aarch64 = false; + if (arch && !strncmp(arch, "aarch64", 7)) + is_aarch64 = true; + else if (triple_norm && strstr(triple_norm, "aarch64")) + is_aarch64 = true; + + if (is_aarch64) { + if (features[0] != '\0') { + snprintf(features_buf, sizeof(features_buf), + "%s,+reserve-x18", features); + features = features_buf; + } + else { + features = "+reserve-x18"; + } + } + } +#endif + /* Get target with triple, note that LLVMGetTargetFromTriple() return 0 when success, but not true. */ if (LLVMGetTargetFromTriple(triple_norm, &target, &err) != 0) { diff --git a/core/iwasm/compilation/aot_orc_extra2.cpp b/core/iwasm/compilation/aot_orc_extra2.cpp index 180e540501..6bcfb786b3 100644 --- a/core/iwasm/compilation/aot_orc_extra2.cpp +++ b/core/iwasm/compilation/aot_orc_extra2.cpp @@ -85,6 +85,7 @@ MyPassManager::add(llvm::Pass *P) // a hack to avoid having a copy of the whole addPassesToEmitMC. // we want to add PrintStackSizes before FreeMachineFunctionPass. if (P->getPassName() == "Free MachineFunction") { + delete P; return; } llvm::legacy::PassManager::add(P); diff --git a/core/iwasm/include/gc_export.h b/core/iwasm/include/gc_export.h index f7426f41d9..bf2c36d604 100644 --- a/core/iwasm/include/gc_export.h +++ b/core/iwasm/include/gc_export.h @@ -51,16 +51,21 @@ typedef enum wasm_value_type_enum { typedef int32_t wasm_heap_type_t; typedef enum wasm_heap_type_enum { + HEAP_TYPE_NOFUNC = -0x0D, + HEAP_TYPE_NOEXTERN = -0x0E, + HEAP_TYPE_NONE = -0x0F, HEAP_TYPE_FUNC = -0x10, HEAP_TYPE_EXTERN = -0x11, HEAP_TYPE_ANY = -0x12, HEAP_TYPE_EQ = -0x13, - HEAP_TYPE_I31 = -0x16, - HEAP_TYPE_NOFUNC = -0x17, - HEAP_TYPE_NOEXTERN = -0x18, - HEAP_TYPE_STRUCT = -0x19, - HEAP_TYPE_ARRAY = -0x1A, - HEAP_TYPE_NONE = -0x1B + HEAP_TYPE_I31 = -0x14, + HEAP_TYPE_STRUCT = -0x15, + HEAP_TYPE_ARRAY = -0x16, + /* Stringref Types */ + HEAP_TYPE_STRINGREF = -0x19, + HEAP_TYPE_STRINGVIEWWTF8 = -0x1A, + HEAP_TYPE_STRINGVIEWWTF16 = -0x1E, + HEAP_TYPE_STRINGVIEWITER = -0x1F } wasm_heap_type_enum; struct WASMObject; diff --git a/core/iwasm/include/wasm_c_api.h b/core/iwasm/include/wasm_c_api.h index 241a0eec8a..00920adcb7 100644 --- a/core/iwasm/include/wasm_c_api.h +++ b/core/iwasm/include/wasm_c_api.h @@ -22,6 +22,8 @@ #else #define WASM_API_EXTERN __declspec(dllimport) #endif +#elif defined(__GNUC__) || defined(__clang__) +#define WASM_API_EXTERN __attribute__((visibility("default"))) #else #define WASM_API_EXTERN #endif diff --git a/core/iwasm/include/wasm_export.h b/core/iwasm/include/wasm_export.h index fc46825c80..86f7c22b17 100644 --- a/core/iwasm/include/wasm_export.h +++ b/core/iwasm/include/wasm_export.h @@ -764,6 +764,38 @@ WASM_RUNTIME_API_EXTERN void wasm_runtime_instantiation_args_set_max_memory_pages( struct InstantiationArgs2 *p, uint32_t v); +WASM_RUNTIME_API_EXTERN void +wasm_runtime_instantiation_args_set_wasi_arg(struct InstantiationArgs2 *p, + char *argv[], int argc); + +WASM_RUNTIME_API_EXTERN void +wasm_runtime_instantiation_args_set_wasi_env(struct InstantiationArgs2 *p, + const char *env[], + uint32_t env_count); + +WASM_RUNTIME_API_EXTERN void +wasm_runtime_instantiation_args_set_wasi_dir(struct InstantiationArgs2 *p, + const char *dir_list[], + uint32_t dir_count, + const char *map_dir_list[], + uint32_t map_dir_count); + +WASM_RUNTIME_API_EXTERN void +wasm_runtime_instantiation_args_set_wasi_stdio(struct InstantiationArgs2 *p, + int64_t stdinfd, + int64_t stdoutfd, + int64_t stderrfd); + +WASM_RUNTIME_API_EXTERN void +wasm_runtime_instantiation_args_set_wasi_addr_pool(struct InstantiationArgs2 *p, + const char *addr_pool[], + uint32_t addr_pool_size); + +WASM_RUNTIME_API_EXTERN void +wasm_runtime_instantiation_args_set_wasi_ns_lookup_pool( + struct InstantiationArgs2 *p, const char *ns_lookup_pool[], + uint32_t ns_lookup_pool_size); + /** * Instantiate a WASM module, with specified instantiation arguments * @@ -2405,6 +2437,17 @@ wasm_runtime_chain_shared_heaps(wasm_shared_heap_t head, wasm_shared_heap_t wasm_runtime_unchain_shared_heaps(wasm_shared_heap_t head, bool entire_chain); +/** + * Reset shared heap chain. For each shared heap in the chain, if it is a + * pre-allocated shared heap, its memory region will be zeroed. For a + * WAMR-managed shared heap, it will be destroyed and reinitialized. + * + * @param shared_heap The head of the shared heap chain. + * @return true if success, false otherwise. + */ +WASM_RUNTIME_API_EXTERN bool +wasm_runtime_reset_shared_heap_chain(wasm_shared_heap_t shared_heap); + /** * Attach a shared heap, it can be the head of shared heap chain, in that case, * attach the shared heap chain, to a module instance diff --git a/core/iwasm/interpreter/wasm.h b/core/iwasm/interpreter/wasm.h index 87552455e6..c60349d10f 100644 --- a/core/iwasm/interpreter/wasm.h +++ b/core/iwasm/interpreter/wasm.h @@ -848,6 +848,7 @@ typedef struct WASIArguments { char **argv; uint32 argc; os_raw_file_handle stdio[3]; + bool set_by_user; } WASIArguments; #endif diff --git a/core/iwasm/interpreter/wasm_interp_classic.c b/core/iwasm/interpreter/wasm_interp_classic.c index 0603a00b41..abde189ebc 100644 --- a/core/iwasm/interpreter/wasm_interp_classic.c +++ b/core/iwasm/interpreter/wasm_interp_classic.c @@ -1715,11 +1715,24 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module, exception_tag_index = *((uint32 *)tgtframe_sp); tgtframe_sp++; - /* get tag type */ - uint8 tag_type_index = - module->module->tags[exception_tag_index]->type; - uint32 cell_num_to_copy = - wasm_types[tag_type_index]->param_cell_num; + uint32 cell_num_to_copy = 0; + + if (IS_INVALID_TAGINDEX(exception_tag_index)) { + /* + * Cross-module exception with unknown tag. + * No parameters to copy - just re-throw with + * the invalid tag index so find_a_catch_handler + * routes it to CATCH_ALL. + */ + cell_num_to_copy = 0; + } + else { + /* get tag type */ + uint8 tag_type_index = + module->module->tags[exception_tag_index]->type; + cell_num_to_copy = + wasm_types[tag_type_index]->param_cell_num; + } /* move exception parameters (if there are any) onto top * of stack */ @@ -6580,12 +6593,10 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module, HANDLE_OP(WASM_OP_CATCH_ALL) HANDLE_OP(EXT_OP_TRY) #endif -#if WASM_ENABLE_JIT != 0 && WASM_ENABLE_SIMD != 0 /* SIMD isn't supported by interpreter, but when JIT is enabled, `iwasm --interp ` may be run to trigger the SIMD opcode in interpreter */ HANDLE_OP(WASM_OP_SIMD_PREFIX) -#endif HANDLE_OP(WASM_OP_UNUSED_0x16) HANDLE_OP(WASM_OP_UNUSED_0x17) HANDLE_OP(WASM_OP_UNUSED_0x27) diff --git a/core/iwasm/interpreter/wasm_interp_fast.c b/core/iwasm/interpreter/wasm_interp_fast.c index 8e634ecb7f..1368cf0387 100644 --- a/core/iwasm/interpreter/wasm_interp_fast.c +++ b/core/iwasm/interpreter/wasm_interp_fast.c @@ -442,7 +442,7 @@ wasm_interp_get_frame_ref(WASMInterpFrame *frame) opnd_off = *(int16 *)(frame_ip + off); \ addr_tmp = frame_lp + opnd_off; \ PUT_REF_TO_ADDR(addr_tmp, value); \ - SET_FRAME_REF(ond_off); \ + SET_FRAME_REF(opnd_off); \ } while (0) #define SET_OPERAND(op_type, off, value) SET_OPERAND_##op_type(off, value) @@ -999,9 +999,9 @@ copy_stack_values(WASMModuleInstance *module, uint32 *frame_lp, uint32 arity, } \ } \ else if (cells[0] == 2) { \ - PUT_I64_TO_ADDR( \ - frame_lp + dst_offsets[0], \ - GET_I64_FROM_ADDR(frame_lp + src_offsets[0])); \ + int64 tmp_i64 = \ + GET_I64_FROM_ADDR(frame_lp + src_offsets[0]); \ + PUT_I64_TO_ADDR(frame_lp + dst_offsets[0], tmp_i64); \ /* Ignore constants because they are not reference */ \ if (src_offsets[0] >= 0) { \ CLEAR_FRAME_REF((unsigned)src_offsets[0]); \ @@ -1011,9 +1011,9 @@ copy_stack_values(WASMModuleInstance *module, uint32 *frame_lp, uint32 arity, } \ } \ else if (cells[0] == 4) { \ - PUT_V128_TO_ADDR( \ - frame_lp + dst_offsets[0], \ - GET_V128_FROM_ADDR(frame_lp + src_offsets[0])); \ + V128 tmp_v128 = \ + GET_V128_FROM_ADDR(frame_lp + src_offsets[0]); \ + PUT_V128_TO_ADDR(frame_lp + dst_offsets[0], tmp_v128); \ /* Ignore constants because they are not reference */ \ if (src_offsets[0] >= 0) { \ CLEAR_FRAME_REF((unsigned)src_offsets[0]); \ @@ -1062,14 +1062,14 @@ copy_stack_values(WASMModuleInstance *module, uint32 *frame_lp, uint32 arity, if (cells[0] == 1) \ frame_lp[dst_offsets[0]] = frame_lp[src_offsets[0]]; \ else if (cells[0] == 2) { \ - PUT_I64_TO_ADDR( \ - frame_lp + dst_offsets[0], \ - GET_I64_FROM_ADDR(frame_lp + src_offsets[0])); \ + int64 tmp_i64 = \ + GET_I64_FROM_ADDR(frame_lp + src_offsets[0]); \ + PUT_I64_TO_ADDR(frame_lp + dst_offsets[0], tmp_i64); \ } \ else if (cells[0] == 4) { \ - PUT_V128_TO_ADDR( \ - frame_lp + dst_offsets[0], \ - GET_V128_FROM_ADDR(frame_lp + src_offsets[0])); \ + V128 tmp_v128 = \ + GET_V128_FROM_ADDR(frame_lp + src_offsets[0]); \ + PUT_V128_TO_ADDR(frame_lp + dst_offsets[0], tmp_v128); \ } \ } \ else { \ @@ -7534,6 +7534,9 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module, HANDLE_OP(EXT_OP_LOOP) HANDLE_OP(EXT_OP_IF) HANDLE_OP(EXT_OP_BR_TABLE_CACHE) +#if WASM_ENABLE_SIMDE == 0 + HANDLE_OP(WASM_OP_SIMD_PREFIX) +#endif { wasm_set_exception(module, "unsupported opcode"); goto got_exception; diff --git a/core/iwasm/interpreter/wasm_loader.c b/core/iwasm/interpreter/wasm_loader.c index 1453f1bfae..f35e57851a 100644 --- a/core/iwasm/interpreter/wasm_loader.c +++ b/core/iwasm/interpreter/wasm_loader.c @@ -701,7 +701,7 @@ destroy_init_expr(WASMModule *module, InitializerExpression *expr) #endif #if WASM_ENABLE_EXTENDED_CONST_EXPR != 0 - // free left expr and right exprs for binary oprand + /* free left expr and right exprs for binary operand */ if (!is_expr_binary_op(expr->init_expr_type)) { return; } @@ -1920,6 +1920,11 @@ resolve_struct_type(const uint8 **p_buf, const uint8 *buf_end, if (need_ref_type_map) ref_type_map_count++; + if (wasm_is_reftype_anyref(ref_type.ref_type)) { + LOG_ERROR("Not support using anyref in struct fields"); + return false; + } + if (wasm_is_type_reftype(ref_type.ref_type)) ref_field_count++; @@ -2039,6 +2044,11 @@ resolve_array_type(const uint8 **p_buf, const uint8 *buf_end, return false; } + if (wasm_is_reftype_anyref(ref_type.ref_type)) { + LOG_ERROR("Not support using anyref in array element type"); + return false; + } + CHECK_BUF(p, p_end, 1); mutable = read_uint8(p); if (!check_mutability(mutable, error_buf, error_buf_size)) { @@ -8545,8 +8555,7 @@ check_offset_pop(WASMLoaderContext *ctx, uint32 cells) static bool check_dynamic_offset_pop(WASMLoaderContext *ctx, uint32 cells) { - if (ctx->dynamic_offset < 0 - || (ctx->dynamic_offset > 0 && (uint32)ctx->dynamic_offset < cells)) + if (ctx->dynamic_offset < 0 || (uint32)ctx->dynamic_offset < cells) return false; return true; } @@ -9720,6 +9729,16 @@ preserve_local_for_block(WASMLoaderContext *loader_ctx, uint8 opcode, /* preserve locals before blocks to ensure that "tee/set_local" inside blocks will not influence the value of these locals */ + uint32 frame_offset_cell = + (uint32)(loader_ctx->frame_offset - loader_ctx->frame_offset_bottom); + uint32 frame_ref_cell = + (uint32)(loader_ctx->frame_ref - loader_ctx->frame_ref_bottom); + if (frame_offset_cell < loader_ctx->stack_cell_num + || frame_ref_cell < loader_ctx->stack_cell_num) { + set_error_buf(error_buf, error_buf_size, "stack cell num error"); + return false; + } + while (i < loader_ctx->stack_cell_num) { int16 cur_offset = loader_ctx->frame_offset_bottom[i]; uint8 cur_type = loader_ctx->frame_ref_bottom[i]; @@ -12106,13 +12125,19 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func, } #endif + uint8 *frame_ref_before_pop = loader_ctx->frame_ref; POP_TYPE( wasm_type->types[wasm_type->param_count - i - 1]); #if WASM_ENABLE_FAST_INTERP != 0 /* decrease the frame_offset pointer accordingly to keep - * consistent with frame_ref stack */ - cell_num = wasm_value_type_cell_num( - wasm_type->types[wasm_type->param_count - i - 1]); + * consistent with frame_ref stack. Use the actual + * popped cell count instead of + * wasm_value_type_cell_num() because when the stack top + * is VALUE_TYPE_ANY, wasm_loader_pop_frame_ref always + * pops exactly 1 cell regardless of the expected type + */ + cell_num = (uint32)(frame_ref_before_pop + - loader_ctx->frame_ref); loader_ctx->frame_offset -= cell_num; if (loader_ctx->frame_offset diff --git a/core/iwasm/interpreter/wasm_mini_loader.c b/core/iwasm/interpreter/wasm_mini_loader.c index ec1e25cdb1..1e2aa08c62 100644 --- a/core/iwasm/interpreter/wasm_mini_loader.c +++ b/core/iwasm/interpreter/wasm_mini_loader.c @@ -375,8 +375,8 @@ destroy_const_expr_stack(ConstExprContext *ctx, bool free_exprs) static void destroy_init_expr(InitializerExpression *expr) { - // free left expr and right exprs for binary oprand - if (is_expr_binary_op(expr->init_expr_type)) { + /* free left expr and right exprs for binary operand */ + if (!is_expr_binary_op(expr->init_expr_type)) { return; } if (expr->u.binary.l_expr) { @@ -4345,8 +4345,7 @@ check_offset_pop(WASMLoaderContext *ctx, uint32 cells) static bool check_dynamic_offset_pop(WASMLoaderContext *ctx, uint32 cells) { - if (ctx->dynamic_offset < 0 - || (ctx->dynamic_offset > 0 && (uint32)ctx->dynamic_offset < cells)) + if (ctx->dynamic_offset < 0 || (uint32)ctx->dynamic_offset < cells) return false; return true; } diff --git a/core/iwasm/interpreter/wasm_opcode.h b/core/iwasm/interpreter/wasm_opcode.h index b049e0a3af..1147384131 100644 --- a/core/iwasm/interpreter/wasm_opcode.h +++ b/core/iwasm/interpreter/wasm_opcode.h @@ -790,13 +790,6 @@ typedef enum WASMAtomicEXTOpcode { #endif #define SET_GOTO_TABLE_ELEM(opcode) [opcode] = HANDLE_OPCODE(opcode) -#if WASM_ENABLE_SIMDE != 0 -#define SET_GOTO_TABLE_SIMD_PREFIX_ELEM() \ - SET_GOTO_TABLE_ELEM(WASM_OP_SIMD_PREFIX), -#else -#define SET_GOTO_TABLE_SIMD_PREFIX_ELEM() -#endif - #if WASM_ENABLE_SIMDE != 0 #define DEF_EXT_V128_HANDLE() \ SET_GOTO_TABLE_ELEM(EXT_OP_SET_LOCAL_FAST_V128), /* 0xdd */ \ @@ -1038,7 +1031,7 @@ typedef enum WASMAtomicEXTOpcode { HANDLE_OPCODE(EXT_OP_TRY), /* 0xdb */ \ SET_GOTO_TABLE_ELEM(WASM_OP_GC_PREFIX), /* 0xfb */ \ SET_GOTO_TABLE_ELEM(WASM_OP_MISC_PREFIX), /* 0xfc */ \ - SET_GOTO_TABLE_SIMD_PREFIX_ELEM() /* 0xfd */ \ + SET_GOTO_TABLE_ELEM(WASM_OP_SIMD_PREFIX), /* 0xfd */ \ SET_GOTO_TABLE_ELEM(WASM_OP_ATOMIC_PREFIX), /* 0xfe */ \ DEF_DEBUG_BREAK_HANDLE() DEF_EXT_V128_HANDLE() \ }; diff --git a/core/iwasm/interpreter/wasm_runtime.c b/core/iwasm/interpreter/wasm_runtime.c index e81bbf6e01..e41cb4d8e8 100644 --- a/core/iwasm/interpreter/wasm_runtime.c +++ b/core/iwasm/interpreter/wasm_runtime.c @@ -2512,6 +2512,12 @@ wasm_instantiate(WASMModule *module, WASMModuleInstance *parent, module_inst->module = module; module_inst->e = (WASMModuleInstanceExtra *)((uint8 *)module_inst + extra_info_offset); +#if WASM_ENABLE_THREAD_MGR != 0 + if (os_mutex_init(&module_inst->e->common.exception_lock) != 0) { + wasm_runtime_free(module_inst); + return NULL; + } +#endif #if WASM_ENABLE_MULTI_MODULE != 0 module_inst->e->sub_module_inst_list = @@ -3276,17 +3282,25 @@ wasm_instantiate(WASMModule *module, WASMModuleInstance *parent, #if WASM_ENABLE_LIBC_WASI != 0 /* The sub-instance will get the wasi_ctx from main-instance */ if (!is_sub_inst) { + const WASIArguments *wasi_args = &args->wasi; + if (module->wasi_args.set_by_user) { + if (wasi_args->set_by_user) { + set_error_buf(error_buf, error_buf_size, + "WASI configuration was given via both of module " + "and InstantiationArgs2"); + goto fail; + } + wasi_args = &module->wasi_args; + } if (!wasm_runtime_init_wasi( - (WASMModuleInstanceCommon *)module_inst, - module->wasi_args.dir_list, module->wasi_args.dir_count, - module->wasi_args.map_dir_list, module->wasi_args.map_dir_count, - module->wasi_args.env, module->wasi_args.env_count, - module->wasi_args.addr_pool, module->wasi_args.addr_count, - module->wasi_args.ns_lookup_pool, - module->wasi_args.ns_lookup_count, module->wasi_args.argv, - module->wasi_args.argc, module->wasi_args.stdio[0], - module->wasi_args.stdio[1], module->wasi_args.stdio[2], - error_buf, error_buf_size)) { + (WASMModuleInstanceCommon *)module_inst, wasi_args->dir_list, + wasi_args->dir_count, wasi_args->map_dir_list, + wasi_args->map_dir_count, wasi_args->env, wasi_args->env_count, + wasi_args->addr_pool, wasi_args->addr_count, + wasi_args->ns_lookup_pool, wasi_args->ns_lookup_count, + wasi_args->argv, wasi_args->argc, wasi_args->stdio[0], + wasi_args->stdio[1], wasi_args->stdio[2], error_buf, + error_buf_size)) { goto fail; } } @@ -3493,6 +3507,9 @@ wasm_deinstantiate(WASMModuleInstance *module_inst, bool is_sub_inst) bh_bitmap_delete(module_inst->e->common.elem_dropped); #endif +#if WASM_ENABLE_THREAD_MGR != 0 + os_mutex_destroy(&module_inst->e->common.exception_lock); +#endif wasm_runtime_free(module_inst); } @@ -3610,6 +3627,7 @@ call_wasm_with_hw_bound_check(WASMModuleInstance *module_inst, native stack to run the following codes before actually calling the aot function in invokeNative function. */ if (!wasm_runtime_detect_native_stack_overflow(exec_env)) { + wasm_runtime_set_exec_env_tls(NULL); return; } diff --git a/core/iwasm/interpreter/wasm_runtime.h b/core/iwasm/interpreter/wasm_runtime.h index 0ba2049af9..98913e9fee 100644 --- a/core/iwasm/interpreter/wasm_runtime.h +++ b/core/iwasm/interpreter/wasm_runtime.h @@ -334,6 +334,9 @@ typedef struct WASMModuleInstanceExtraCommon { /* The gc heap created */ void *gc_heap_handle; #endif +#if WASM_ENABLE_THREAD_MGR != 0 + korp_mutex exception_lock; +#endif } WASMModuleInstanceExtraCommon; /* Extra info of WASM module instance for interpreter/jit mode */ diff --git a/core/iwasm/libraries/lib-wasi-threads/tid_allocator.c b/core/iwasm/libraries/lib-wasi-threads/tid_allocator.c index dc2d4f1bca..d7f6c74548 100644 --- a/core/iwasm/libraries/lib-wasi-threads/tid_allocator.c +++ b/core/iwasm/libraries/lib-wasi-threads/tid_allocator.c @@ -8,7 +8,10 @@ #include "bh_log.h" bh_static_assert(TID_MIN <= TID_MAX); +/* Some platforms, like Zephyr, have already defined MIN at this point */ +#ifndef MIN #define MIN(a, b) (((a) < (b)) ? (a) : (b)) +#endif bool tid_allocator_init(TidAllocator *tid_allocator) diff --git a/core/iwasm/libraries/libc-builtin/libc_builtin_wrapper.c b/core/iwasm/libraries/libc-builtin/libc_builtin_wrapper.c index a68c074941..6c89b85370 100644 --- a/core/iwasm/libraries/libc-builtin/libc_builtin_wrapper.c +++ b/core/iwasm/libraries/libc-builtin/libc_builtin_wrapper.c @@ -1014,7 +1014,8 @@ print_i64_wrapper(wasm_exec_env_t exec_env, int64 i64) static void print_i32_f32_wrapper(wasm_exec_env_t exec_env, int32 i32, float f32) { - os_printf("in specttest.print_i32_f32(%" PRId32 ", %f)\n", i32, f32); + os_printf("in specttest.print_i32_f32(%" PRId32 ", %f)\n", i32, + (double)f32); } static void @@ -1026,7 +1027,7 @@ print_f64_f64_wrapper(wasm_exec_env_t exec_env, double f64_1, double f64_2) static void print_f32_wrapper(wasm_exec_env_t exec_env, float f32) { - os_printf("in specttest.print_f32(%f)\n", f32); + os_printf("in specttest.print_f32(%f)\n", (double)f32); } static void diff --git a/core/iwasm/libraries/libc-emcc/libc_emcc_wrapper.c b/core/iwasm/libraries/libc-emcc/libc_emcc_wrapper.c index 3bb6bc6b76..89ffeaaa4f 100644 --- a/core/iwasm/libraries/libc-emcc/libc_emcc_wrapper.c +++ b/core/iwasm/libraries/libc-emcc/libc_emcc_wrapper.c @@ -245,14 +245,21 @@ mmap_wrapper(wasm_exec_env_t exec_env, void *addr, int length, int prot, if (buf_offset == 0) return -1; - if (fd <= 0) + if (fd <= 0) { + module_free((uint64)buf_offset); return -1; + } - if (lseek(fd, offset, SEEK_SET) == -1) + if (lseek(fd, offset, SEEK_SET) == -1) { + module_free((uint64)buf_offset); return -1; + } size_read = read(fd, buf, length); - (void)size_read; + if (size_read < 0) { + module_free((uint64)buf_offset); + return -1; + } return buf_offset; } diff --git a/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c b/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c index 3d90811bca..14686b88f8 100644 --- a/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c +++ b/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c @@ -430,7 +430,7 @@ fd_table_attach(struct fd_table *ft, __wasi_fd_t fd, struct fd_object *fo, __wasi_rights_t rights_base, __wasi_rights_t rights_inheriting) REQUIRES_EXCLUSIVE(ft->lock) CONSUMES(fo->refcount) { - bh_assert(ft->size > fd && "File descriptor table too small"); + bh_assert(ft->size > (size_t)fd && "File descriptor table too small"); struct fd_entry *fe = &ft->entries[fd]; bh_assert(fe->object == NULL && "Attempted to overwrite an existing descriptor"); @@ -2585,7 +2585,7 @@ wasi_ssp_sock_connect(wasm_exec_env_t exec_env, struct fd_table *curfds, return __WASI_EACCES; } - error = fd_object_get(curfds, &fo, fd, __WASI_RIGHT_SOCK_BIND, 0); + error = fd_object_get(curfds, &fo, fd, __WASI_RIGHT_SOCK_CONNECT, 0); if (error != __WASI_ESUCCESS) { return error; } @@ -3105,7 +3105,6 @@ addr_pool_insert(struct addr_pool *addr_pool, const char *addr, uint8 mask) } next->next = NULL; - next->mask = mask; if (os_socket_inet_network(true, addr, &target) != BHT_OK) { // If parsing IPv4 fails, try IPv6 @@ -3116,10 +3115,20 @@ addr_pool_insert(struct addr_pool *addr_pool, const char *addr, uint8 mask) next->type = IPv6; bh_memcpy_s(next->addr.ip6, sizeof(next->addr.ip6), target.ipv6, sizeof(target.ipv6)); + if (mask > 128) { + wasm_runtime_free(next); + return false; + } + next->mask = mask; } else { next->type = IPv4; next->addr.ip4 = target.ipv4; + if (mask > 32) { + wasm_runtime_free(next); + return false; + } + next->mask = mask; } /* attach with */ diff --git a/core/iwasm/libraries/thread-mgr/thread_manager.c b/core/iwasm/libraries/thread-mgr/thread_manager.c index 5a647a9b64..563a9098e1 100644 --- a/core/iwasm/libraries/thread-mgr/thread_manager.c +++ b/core/iwasm/libraries/thread-mgr/thread_manager.c @@ -29,8 +29,6 @@ static bh_list cluster_list_head; static bh_list *const cluster_list = &cluster_list_head; static korp_mutex cluster_list_lock; -static korp_mutex _exception_lock; - typedef void (*list_visitor)(void *, void *); static uint32 cluster_max_thread_num = CLUSTER_MAX_THREAD_NUM; @@ -51,10 +49,6 @@ thread_manager_init() return false; if (os_mutex_init(&cluster_list_lock) != 0) return false; - if (os_mutex_init(&_exception_lock) != 0) { - os_mutex_destroy(&cluster_list_lock); - return false; - } return true; } @@ -69,7 +63,6 @@ thread_manager_destroy() cluster = next; } wasm_cluster_cancel_all_callbacks(); - os_mutex_destroy(&_exception_lock); os_mutex_destroy(&cluster_list_lock); } @@ -1540,19 +1533,13 @@ wasm_cluster_is_thread_terminated(WASMExecEnv *exec_env) void exception_lock(WASMModuleInstance *module_inst) { - /* - * Note: this lock could be per module instance if desirable. - * We can revisit on AOT version bump. - * It probably doesn't matter though because the exception handling - * logic should not be executed too frequently anyway. - */ - os_mutex_lock(&_exception_lock); + os_mutex_lock(&GetModuleInstanceExtraCommon(module_inst)->exception_lock); } void exception_unlock(WASMModuleInstance *module_inst) { - os_mutex_unlock(&_exception_lock); + os_mutex_unlock(&GetModuleInstanceExtraCommon(module_inst)->exception_lock); } void diff --git a/core/iwasm/libraries/wasi-nn/cmake/iwasm_helper.cmake b/core/iwasm/libraries/wasi-nn/cmake/iwasm_helper.cmake index 670988e1d8..45518de59c 100644 --- a/core/iwasm/libraries/wasi-nn/cmake/iwasm_helper.cmake +++ b/core/iwasm/libraries/wasi-nn/cmake/iwasm_helper.cmake @@ -28,12 +28,6 @@ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wformat -Wformat-security -W set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wformat -Wformat-security -Wno-unused") -if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64") - if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mindirect-branch-register") - endif () -endif () - set (WAMR_BUILD_INTERP 1) set (WAMR_BUILD_AOT 1) set (WAMR_BUILD_JIT 0) diff --git a/core/iwasm/libraries/wasi-nn/src/wasi_nn_llamacpp.c b/core/iwasm/libraries/wasi-nn/src/wasi_nn_llamacpp.c index 2e1e649365..d895aba992 100644 --- a/core/iwasm/libraries/wasi-nn/src/wasi_nn_llamacpp.c +++ b/core/iwasm/libraries/wasi-nn/src/wasi_nn_llamacpp.c @@ -623,8 +623,15 @@ get_output(void *ctx, graph_execution_context exec_ctx, uint32_t index, printf("%s\n", output_metadata); } - memcpy(output_tensor->buf, output_metadata, strlen(output_metadata)); - *output_tensor_size = strlen(output_metadata); + size_t metadata_len = strlen(output_metadata); + if (metadata_len > output_tensor->size) { + NN_ERR_PRINTF("Output buffer too small for metadata: " + "need %zu, got %zu", + metadata_len, output_tensor->size); + return too_large; + } + memcpy(output_tensor->buf, output_metadata, metadata_len); + *output_tensor_size = metadata_len; return success; } @@ -643,8 +650,15 @@ get_output(void *ctx, graph_execution_context exec_ctx, uint32_t index, printf("%s", buf); } - memcpy(output_tensor->buf + end_pos, buf, strlen(buf)); - end_pos += strlen(buf); + size_t piece_len = strlen(buf); + if (end_pos + piece_len > output_tensor->size) { + NN_ERR_PRINTF("Output buffer too small: need at least %zu," + " got %zu", + end_pos + piece_len, output_tensor->size); + return too_large; + } + memcpy(output_tensor->buf + end_pos, buf, piece_len); + end_pos += piece_len; } if (backend_ctx->config.stream_stdout) { diff --git a/core/shared/mem-alloc/ems/ems_gc.c b/core/shared/mem-alloc/ems/ems_gc.c index e97a07bba3..bc0488968d 100644 --- a/core/shared/mem-alloc/ems/ems_gc.c +++ b/core/shared/mem-alloc/ems/ems_gc.c @@ -308,8 +308,12 @@ reclaim_instance_heap(gc_heap_t *heap) return GC_SUCCESS; ret = gct_vm_begin_rootset_enumeration(heap->cluster, heap); #endif - if (!ret) + if (!ret) { + if (heap->root_set) { + rollback_mark(heap); + } return GC_ERROR; + } #if BH_ENABLE_GC_VERIFY != 0 /* no matter whether the enumeration is successful or not, the data diff --git a/core/shared/mem-alloc/ems/ems_kfc.c b/core/shared/mem-alloc/ems/ems_kfc.c index 2d5a4b13ea..ac2b127cae 100644 --- a/core/shared/mem-alloc/ems/ems_kfc.c +++ b/core/shared/mem-alloc/ems/ems_kfc.c @@ -286,13 +286,13 @@ gc_migrate(gc_handle_t handle, char *pool_buf_new, gc_size_t pool_buf_size) while (cur < end) { size = hmu_get_size(cur); -#if BH_ENABLE_GC_CORRUPTION_CHECK != 0 if (size <= 0 || size > (uint32)((uint8 *)end - (uint8 *)cur)) { LOG_ERROR("[GC_ERROR]Heap is corrupted, heap migrate failed.\n"); +#if BH_ENABLE_GC_CORRUPTION_CHECK != 0 heap->is_heap_corrupted = true; +#endif return GC_ERROR; } -#endif if (hmu_get_ut(cur) == HMU_FC && !HMU_IS_FC_NORMAL(size)) { tree_node = (hmu_tree_node_t *)cur; @@ -315,15 +315,13 @@ gc_migrate(gc_handle_t handle, char *pool_buf_new, gc_size_t pool_buf_size) cur = (hmu_t *)((char *)cur + size); } -#if BH_ENABLE_GC_CORRUPTION_CHECK != 0 if (cur != end) { LOG_ERROR("[GC_ERROR]Heap is corrupted, heap migrate failed.\n"); +#if BH_ENABLE_GC_CORRUPTION_CHECK != 0 heap->is_heap_corrupted = true; +#endif return GC_ERROR; } -#else - bh_assert(cur == end); -#endif return 0; } diff --git a/core/shared/platform/include/platform_wasi_types.h b/core/shared/platform/include/platform_wasi_types.h index 56ea7514ed..980d3f84ec 100644 --- a/core/shared/platform/include/platform_wasi_types.h +++ b/core/shared/platform/include/platform_wasi_types.h @@ -29,6 +29,9 @@ #endif /* _Alignof */ extern "C" { +#elif defined(_MSC_VER) && !_CRT_HAS_C11 +#define _Static_assert static_assert +#define _Alignof __alignof #endif /* There is no need to check the WASI layout if we're using uvwasi or libc-wasi @@ -530,19 +533,14 @@ assert_wasi_layout(offsetof(__wasi_subscription_t, userdata) == 0, "witx calcula assert_wasi_layout(offsetof(__wasi_subscription_t, u) == 8, "witx calculated offset"); /* keep syncing with wasi_socket_ext.h */ -typedef enum { - /* Used only for sock_addr_resolve hints */ - SOCKET_ANY = -1, - SOCKET_DGRAM = 0, - SOCKET_STREAM, -} __wasi_sock_type_t; typedef uint16_t __wasi_ip_port_t; /* Ensure that __wasi_addr_type_t has a size of 4 byte (I32). However, it will not have the type safety of enum. */ typedef uint32_t __wasi_addr_type_t; -enum { IPv4 = 0, IPv6 }; +#define IPv4 (0) +#define IPv6 (1) /* n0.n1.n2.n3 */ typedef struct __wasi_addr_ip4_t { @@ -589,20 +587,40 @@ typedef struct __wasi_addr_t { } addr; } __wasi_addr_t; -typedef enum { INET4 = 0, INET6, INET_UNSPEC } __wasi_address_family_t; +/* Force 32-bit wire width for cross-boundary fields */ +typedef int32_t __wasi_sock_type_t; +#define SOCKET_ANY (-1) +#define SOCKET_DGRAM (0) +#define SOCKET_STREAM (1) + +typedef int32_t __wasi_address_family_t; +#define INET4 (0) +#define INET6 (1) +#define INET_UNSPEC (2) typedef struct __wasi_addr_info_t { - __wasi_addr_t addr; + __wasi_addr_t addr; __wasi_sock_type_t type; } __wasi_addr_info_t; typedef struct __wasi_addr_info_hints_t { - __wasi_sock_type_t type; - __wasi_address_family_t family; - // this is to workaround lack of optional parameters - uint8_t hints_enabled; + __wasi_sock_type_t type; // 4 bytes + __wasi_address_family_t family; // 4 bytes + uint8_t hints_enabled; // 1 byte + uint8_t _pad[3]; // enforce layout } __wasi_addr_info_hints_t; +assert_wasi_layout(sizeof(__wasi_sock_type_t) == 4, "sock_type must be 4 bytes"); +assert_wasi_layout(sizeof(__wasi_address_family_t) == 4, "addr_family must be 4 bytes"); + +assert_wasi_layout(sizeof(__wasi_addr_info_hints_t) == 12, "hints_t must be 12 bytes"); +assert_wasi_layout(offsetof(__wasi_addr_info_hints_t, type) == 0, "hints.type@0"); +assert_wasi_layout(offsetof(__wasi_addr_info_hints_t, family) == 4, "hints.family@4"); +assert_wasi_layout(offsetof(__wasi_addr_info_hints_t, hints_enabled) == 8, "hints.enabled@8"); + +assert_wasi_layout(offsetof(__wasi_addr_info_t, type) == sizeof(__wasi_addr_t), + "addr_info.type follows addr"); + #undef assert_wasi_layout /* clang-format on */ @@ -610,4 +628,4 @@ typedef struct __wasi_addr_info_hints_t { } #endif -#endif /* end of _PLATFORM_WASI_TYPES_H */ \ No newline at end of file +#endif /* end of _PLATFORM_WASI_TYPES_H */ diff --git a/core/shared/platform/zephyr/platform_internal.h b/core/shared/platform/zephyr/platform_internal.h index 134b5c2b5f..08c0b4777b 100644 --- a/core/shared/platform/zephyr/platform_internal.h +++ b/core/shared/platform/zephyr/platform_internal.h @@ -7,8 +7,24 @@ #ifndef _PLATFORM_INTERNAL_H #define _PLATFORM_INTERNAL_H +/* + * Modern Zephyr uses zephyr/ namespace. + * + * Note: Cannot use KERNEL_VERSION_NUMBER here as it's defined in version.h + * which we're trying to include. Must use feature detection instead. + */ +#ifdef __has_include +#if __has_include() +#include +#include +#else #include #include +#endif +#else +#include +#include +#endif #if KERNEL_VERSION_NUMBER < 0x030200 /* version 3.2.0 */ #include diff --git a/core/shared/platform/zephyr/zephyr_file.c b/core/shared/platform/zephyr/zephyr_file.c index 1f48bc010c..54b357e318 100644 --- a/core/shared/platform/zephyr/zephyr_file.c +++ b/core/shared/platform/zephyr/zephyr_file.c @@ -120,13 +120,15 @@ zephyr_fs_alloc_obj(bool is_dir, const char *path, int *index) ptr = &desc_array[i]; ptr->used = true; ptr->is_dir = is_dir; - ptr->path = bh_strdup(path); ptr->dir_index = 0; + size_t path_len = strlen(path) + 1; + ptr->path = BH_MALLOC(path_len); if (ptr->path == NULL) { ptr->used = false; k_mutex_unlock(&desc_array_mutex); return NULL; } + strcpy(ptr->path, path); *index = i + 3; break; } @@ -451,6 +453,7 @@ os_openat(os_file_handle handle, const char *path, __wasi_oflags_t oflags, } if (!build_absolute_path(abs_path, sizeof(abs_path), path)) { + BH_FREE(*out); return __WASI_ENOMEM; } @@ -591,8 +594,9 @@ os_preadv(os_file_handle handle, const struct __wasi_iovec_t *iov, int iovcnt, total_read += bytes_read; - // If we read less than we asked for, stop reading - if (bytes_read < iov[i].buf_len) { + /* If we read less than we asked for, stop reading + bytes_read being a non-negative value was already checked */ + if ((size_t)bytes_read < iov[i].buf_len) { break; } } @@ -627,8 +631,9 @@ os_pwritev(os_file_handle handle, const struct __wasi_ciovec_t *iov, int iovcnt, total_written += bytes_written; - // If we wrote less than we asked for, stop writing - if (bytes_written < iov[i].buf_len) { + /* If we wrote less than we asked for, stop writing + bytes_read being a non-negative value was already checked */ + if ((size_t)bytes_written < iov[i].buf_len) { break; } } @@ -657,8 +662,9 @@ os_readv(os_file_handle handle, const struct __wasi_iovec_t *iov, int iovcnt, total_read += bytes_read; - // If we read less than we asked for, stop reading - if (bytes_read < iov[i].buf_len) { + /* If we read less than we asked for, stop reading + bytes_read being a non-negative value was already checked */ + if ((size_t)bytes_read < iov[i].buf_len) { break; } } @@ -702,8 +708,9 @@ os_writev(os_file_handle handle, const struct __wasi_ciovec_t *iov, int iovcnt, total_written += bytes_written; - // If we wrote less than we asked for, stop writing - if (bytes_written < iov[i].buf_len) { + /* If we wrote less than we asked for, stop writing + bytes_read being a non-negative value was already checked */ + if ((size_t)bytes_written < iov[i].buf_len) { break; } } @@ -850,11 +857,17 @@ os_renameat(os_file_handle old_handle, const char *old_path, for (int i = 0; i < CONFIG_WASI_MAX_OPEN_FILES; i++) { struct zephyr_fs_desc *ptr = &desc_array[i]; if (ptr->used && ptr->path && strcmp(ptr->path, abs_old_path) == 0) { - char *new_path_copy = bh_strdup(new_path); + size_t new_path_len = strlen(abs_new_path) + 1; + char *new_path_copy = BH_MALLOC(new_path_len); if (new_path_copy != NULL) { + strcpy(new_path_copy, abs_new_path); BH_FREE(ptr->path); ptr->path = new_path_copy; } + else { + k_mutex_unlock(&desc_array_mutex); + return __WASI_ENOMEM; + } break; // Only one descriptor should match } } @@ -1195,4 +1208,4 @@ bool os_is_stderr_handle(os_file_handle handle) { return (handle == (os_file_handle)stderr); -} \ No newline at end of file +} diff --git a/core/shared/platform/zephyr/zephyr_socket.c b/core/shared/platform/zephyr/zephyr_socket.c index 6d108623e3..56f37fc8e2 100644 --- a/core/shared/platform/zephyr/zephyr_socket.c +++ b/core/shared/platform/zephyr/zephyr_socket.c @@ -173,7 +173,7 @@ os_socket_getbooloption(bh_socket_t socket, int level, int optname, int optval; socklen_t optval_size = sizeof(optval); - if (zsock_setsockopt(socket->fd, level, optname, &optval, optval_size) + if (zsock_getsockopt(socket->fd, level, optname, &optval, &optval_size) != 0) { return BHT_ERROR; } @@ -190,7 +190,7 @@ os_socket_create(bh_socket_t *sock, bool is_ipv4, bool is_tcp) *(sock) = BH_MALLOC(sizeof(zephyr_handle)); - if (!sock) { + if (!*sock) { return BHT_ERROR; } @@ -262,8 +262,13 @@ os_socket_settimeout(bh_socket_t socket, uint64 timeout_us) timeout.tv_sec = timeout_us / 1000000; timeout.tv_usec = timeout_us % 1000000; - return zsock_setsockopt(socket->fd, SOL_SOCKET, SO_RCVTIMEO, &timeout, - sizeof(timeout)); + if (zsock_setsockopt(socket->fd, SOL_SOCKET, SO_RCVTIMEO, &timeout, + sizeof(timeout)) + != 0) { + return BHT_ERROR; + } + + return BHT_OK; } int @@ -277,7 +282,7 @@ os_socket_accept(bh_socket_t server_sock, bh_socket_t *sock, void *addr, unsigned int *addrlen) { *sock = BH_MALLOC(sizeof(zephyr_handle)); - if (!sock) { + if (!*sock) { return BHT_ERROR; } @@ -609,7 +614,7 @@ os_socket_get_send_timeout(bh_socket_t socket, uint64 *timeout_us) struct timeval tv; socklen_t tv_len = sizeof(tv); - if (zsock_setsockopt(socket->fd, SOL_SOCKET, SO_SNDTIMEO, &tv, tv_len) + if (zsock_getsockopt(socket->fd, SOL_SOCKET, SO_SNDTIMEO, &tv, &tv_len) != 0) { return BHT_ERROR; } @@ -639,7 +644,7 @@ os_socket_get_recv_timeout(bh_socket_t socket, uint64 *timeout_us) struct timeval tv; socklen_t tv_len = sizeof(tv); - if (zsock_setsockopt(socket->fd, SOL_SOCKET, SO_RCVTIMEO, &tv, tv_len) + if (zsock_getsockopt(socket->fd, SOL_SOCKET, SO_RCVTIMEO, &tv, &tv_len) != 0) { return BHT_ERROR; } @@ -693,21 +698,18 @@ os_socket_get_linger(bh_socket_t socket, bool *is_enabled, int *linger_s) return BHT_ERROR; } -// TCP_NODELAY Disable TCP buffering (ignored, for compatibility) int os_socket_set_tcp_no_delay(bh_socket_t socket, bool is_enabled) { - errno = ENOSYS; - - return BHT_ERROR; + return os_socket_setbooloption(socket, IPPROTO_TCP, TCP_NODELAY, + is_enabled); } int os_socket_get_tcp_no_delay(bh_socket_t socket, bool *is_enabled) { - errno = ENOSYS; - - return BHT_ERROR; + return os_socket_getbooloption(socket, IPPROTO_TCP, TCP_NODELAY, + is_enabled); } int @@ -760,8 +762,8 @@ os_socket_get_tcp_keep_idle(bh_socket_t socket, uint32_t *time_s) socklen_t time_s_len = sizeof(time_s_int); #ifdef TCP_KEEPIDLE - if (zsock_setsockopt(socket->fd, IPPROTO_TCP, TCP_KEEPIDLE, &time_s_int, - time_s_len) + if (zsock_getsockopt(socket->fd, IPPROTO_TCP, TCP_KEEPIDLE, &time_s_int, + &time_s_len) != 0) { return BHT_ERROR; } @@ -769,8 +771,8 @@ os_socket_get_tcp_keep_idle(bh_socket_t socket, uint32_t *time_s) return BHT_OK; #elif defined(TCP_KEEPALIVE) - if (zsock_setsockopt(socket->fd, IPPROTO_TCP, TCP_KEEPALIVE, &time_s_int, - time_s_len) + if (zsock_getsockopt(socket->fd, IPPROTO_TCP, TCP_KEEPALIVE, &time_s_int, + &time_s_len) != 0) { return BHT_ERROR; } @@ -856,17 +858,37 @@ os_socket_get_tcp_fastopen_connect(bh_socket_t socket, bool *is_enabled) int os_socket_set_ip_multicast_loop(bh_socket_t socket, bool ipv6, bool is_enabled) { - errno = ENOSYS; - - return BHT_ERROR; + if (ipv6) { +#ifdef IPPROTO_IPV6 + return os_socket_setbooloption(socket, IPPROTO_IPV6, + IPV6_MULTICAST_LOOP, is_enabled); +#else + errno = EAFNOSUPPORT; + return BHT_ERROR; +#endif + } + else { + return os_socket_setbooloption(socket, IPPROTO_IP, IP_MULTICAST_LOOP, + is_enabled); + } } int os_socket_get_ip_multicast_loop(bh_socket_t socket, bool ipv6, bool *is_enabled) { - errno = ENOSYS; - - return BHT_ERROR; + if (ipv6) { +#ifdef IPPROTO_IPV6 + return os_socket_getbooloption(socket, IPPROTO_IPV6, + IPV6_MULTICAST_LOOP, is_enabled); +#else + errno = EAFNOSUPPORT; + return BHT_ERROR; +#endif + } + else { + return os_socket_getbooloption(socket, IPPROTO_IP, IP_MULTICAST_LOOP, + is_enabled); + } } int @@ -965,13 +987,13 @@ os_socket_set_ip_ttl(bh_socket_t socket, uint8_t ttl_s) int os_socket_get_ip_ttl(bh_socket_t socket, uint8_t *ttl_s) { - socklen_t opt_len = sizeof(*ttl_s); - - if (zsock_setsockopt(socket->fd, IPPROTO_IP, IP_MULTICAST_TTL, ttl_s, - opt_len) - != 0) { + /* Most socket-level options utilize an int argument for optval */ + int opt; + socklen_t opt_len = sizeof(opt); + if (zsock_getsockopt(socket->fd, IPPROTO_IP, IP_TTL, &opt, &opt_len) != 0) { return BHT_ERROR; } + *ttl_s = (uint8_t)opt; return BHT_OK; } @@ -991,13 +1013,15 @@ os_socket_set_ip_multicast_ttl(bh_socket_t socket, uint8_t ttl_s) int os_socket_get_ip_multicast_ttl(bh_socket_t socket, uint8_t *ttl_s) { - socklen_t opt_len = sizeof(*ttl_s); - - if (zsock_setsockopt(socket->fd, IPPROTO_IP, IP_MULTICAST_TTL, ttl_s, - opt_len) + /* Most socket-level options utilize an int argument for optval */ + int opt; + socklen_t opt_len = sizeof(opt); + if (zsock_getsockopt(socket->fd, IPPROTO_IP, IP_MULTICAST_TTL, &opt, + &opt_len) != 0) { return BHT_ERROR; } + *ttl_s = (uint8_t)opt; return BHT_OK; } @@ -1059,4 +1083,4 @@ int os_poll(os_poll_file_handle *fds, os_nfds_t nfs, int timeout) { return zsock_poll(fds, nfs, timeout); -} \ No newline at end of file +} diff --git a/core/shared/utils/bh_common.c b/core/shared/utils/bh_common.c index 34b6f40e78..d86840d7d2 100644 --- a/core/shared/utils/bh_common.c +++ b/core/shared/utils/bh_common.c @@ -166,6 +166,16 @@ wa_strdup(const char *s) return s1; } +char * +bh_strtok_r(char *str, const char *delim, char **saveptr) +{ +#if !(defined(_WIN32) || defined(_WIN32_)) + return strtok_r(str, delim, saveptr); +#else + return strtok_s(str, delim, saveptr); +#endif +} + #if WASM_ENABLE_WAMR_COMPILER != 0 || WASM_ENABLE_JIT != 0 int bh_system(const char *cmd) diff --git a/core/shared/utils/bh_common.h b/core/shared/utils/bh_common.h index 093e622081..2f31bd5d80 100644 --- a/core/shared/utils/bh_common.h +++ b/core/shared/utils/bh_common.h @@ -66,6 +66,9 @@ bh_strdup(const char *s); char * wa_strdup(const char *s); +char * +bh_strtok_r(char *str, const char *delim, char **saveptr); + #if WASM_ENABLE_WAMR_COMPILER != 0 || WASM_ENABLE_JIT != 0 /* Executes a system command in bash/cmd.exe */ int diff --git a/core/shared/utils/bh_queue.c b/core/shared/utils/bh_queue.c index ddbb6fffe2..4fc756fbe4 100644 --- a/core/shared/utils/bh_queue.c +++ b/core/shared/utils/bh_queue.c @@ -96,14 +96,15 @@ bh_queue_destroy(bh_queue *queue) bool bh_post_msg2(bh_queue *queue, bh_queue_node *msg) { + bh_queue_mutex_lock(&queue->queue_lock); + if (queue->cnt >= queue->max) { queue->drops++; bh_free_msg(msg); + bh_queue_mutex_unlock(&queue->queue_lock); return false; } - bh_queue_mutex_lock(&queue->queue_lock); - if (queue->cnt == 0) { bh_assert(queue->head == NULL); bh_assert(queue->tail == NULL); @@ -131,7 +132,9 @@ bh_post_msg(bh_queue *queue, unsigned short tag, void *body, unsigned int len) { bh_queue_node *msg = bh_new_msg(tag, body, len, NULL); if (msg == NULL) { + bh_queue_mutex_lock(&queue->queue_lock); queue->drops++; + bh_queue_mutex_unlock(&queue->queue_lock); if (len != 0 && body) BH_FREE(body); return false; diff --git a/doc/build_wamr.md b/doc/build_wamr.md index fa6c6af8db..ca27d87ad1 100644 --- a/doc/build_wamr.md +++ b/doc/build_wamr.md @@ -1,36 +1,141 @@ - # Build WAMR vmcore -WAMR vmcore is a set of runtime libraries for loading and running Wasm modules. This document introduces how to build the WAMR vmcore. +WAMR vmcore is the runtime library set that loads and runs Wasm modules. This guide walks you through building the WAMR vmcore. References: -- [how to build iwasm](../product-mini/README.md): building different target platforms such as Linux, Windows, Mac etc -- [Blog: Introduction to WAMR running modes](https://bytecodealliance.github.io/wamr.dev/blog/introduction-to-wamr-running-modes/) +- [how to build iwasm](../product-mini/README.md): build for Linux, Windows, macOS, and more +- [Blog: Introduction to WAMR running modes](https://bytecodealliance.github.io/wamr.dev/blog/introduction-to-wamr-running-modes/) -## WAMR vmcore cmake building configurations +## building configurations -By including the script `runtime_lib.cmake` under folder [build-scripts](../build-scripts) in CMakeList.txt, it is easy to use vmcore to build host software with cmake. +Include the script `runtime_lib.cmake` from [build-scripts](../build-scripts) into your CMakeLists.txt to pull vmcore into your build. ```cmake -# add this into your CMakeList.txt +# add this into your CMakeLists.txt include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake) add_library(vmlib ${WAMR_RUNTIME_LIB_SOURCE}) ``` -The script `runtime_lib.cmake` defines a number of variables for configuring the WAMR runtime features. You can set these variables in your CMakeList.txt or pass the configurations from cmake command line. +The `runtime_lib.cmake` script exposes variables that control WAMR runtime features. Set them in CMakeLists.txt or pass them on the cmake command line. + +```cmake +# Set flags in CMakeLists.txt +set(WAMR_BUILD_AOT 1) +set(WAMR_BUILD_JIT 0) +set(WAMR_BUILD_LIBC_BUILTIN 1) +set(WAMR_BUILD_LIBC_WASI 1) +# Include the runtime lib script +include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake) +add_library(vmlib ${WAMR_RUNTIME_LIB_SOURCE}) +``` -Please refer to [a full list of configuration options](./tired_support.md#appendix-all-compilation-flags). +### All compilation flags + +| Compilation flags | Description | +| -------------------------------------------------------------------------------------------------------- | ------------------------------------ | +| [WAMR_APP_THREAD_STACK_SIZE_MAX](#set-maximum-app-thread-stack-size) | Maximum stack size for app threads | +| [WAMR_BH_LOG](#host-defined-log) | Host defined logging | +| [WAMR_BH_VPRINTF](#host-defined-vprintf) | Host defined vprintf | +| [WAMR_BUILD_ALLOC_WITH_USAGE](#user-defined-linear-memory-allocator) | Allocation with usage tracking | +| [WAMR_BUILD_ALLOC_WITH_USER_DATA](#user-defined-linear-memory-allocator) | Allocation with user data | +| [WAMR_BUILD_AOT](#configure-aot) | AoT compilation(wamrc) | +| [WAMR_BUILD_AOT](#configure-aot) | AoT runtime | +| [WAMR_BUILD_AOT_INTRINSICS](#aot-intrinsics) | AoT intrinsics | +| [WAMR_BUILD_AOT_STACK_FRAME](#aot-stack-frame-feature) | AoT stack frame | +| [WAMR_BUILD_AOT_VALIDATOR](#aot-validator) | AoT validator | +| [WAMR_BUILD_BULK_MEMORY](#bulk-memory-feature) | bulk memory | +| [WAMR_BUILD_COPY_CALL_STACK](#copy-call-stack) | copy call stack | +| [WAMR_BUILD_CUSTOM_NAME_SECTION](#name-section) | name section | +| [WAMR_BUILD_DEBUG_AOT](#source-debugging-features) | debug AoT | +| [WAMR_BUILD_DEBUG_INTERP](#source-debugging-features) | debug interpreter | +| [WAMR_BUILD_DUMP_CALL_STACK](#dump-call-stack-feature) | dump call stack | +| [WAMR_BUILD_DYNAMIC_AOT_DEBUG](#source-debugging-features) | dynamic AoT debugging | +| [WAMR_BUILD_EXCE_HANDLING](#exception-handling) | exception handling | +| [WAMR_BUILD_EXTENDED_CONST_EXPR](#extended-constant-expression) | extended constant expressions | +| [WAMR_BUILD_FAST_INTERP](#configure-interpreters) | fast interpreter | +| [WAMR_BUILD_FAST_JIT](#configure-fast-jit) | fast JIT | +| [WAMR_BUILD_FAST_JIT_DUMP](#configure-fast-jit) | fast JIT dump | +| [WAMR_BUILD_GC](#garbage-collection) | garbage collection | +| [WAMR_BUILD_GC_HEAP_VERIFY](#garbage-collection) | garbage collection heap verification | +| [WAMR_BUILD_GC_HEAP_SIZE_DEFAULT](garbage-collection) | default garbage collection heap size | +| [WAMR_BUILD_GLOBAL_HEAP_POOL](#a-pre-allocation-for-runtime-and-wasm-apps) | global heap pool | +| [WAMR_BUILD_GLOBAL_HEAP_SIZE](#a-pre-allocation-for-runtime-and-wasm-apps) | global heap size | +| [WAMR_BUILD_INSTRUCTION_METERING](#instruction-metering) | instruction metering | +| [WAMR_BUILD_INTERP](#configure-interpreters) | interpreter | +| [WAMR_BUILD_INVOKE_NATIVE_GENERAL](#invoke-general-ffi) | FFI general | +| [WAMR_BUILD_JIT](#configure-llvm-jit) | JIT compilation | +| [WAMR_BUILD_LAZY_JIT](#configure-llvm-jit) | lazy JIT compilation | +| [WAMR_BUILD_LIBC_BUILTIN](#configure-libc) | libc builtin functions | +| [WAMR_BUILD_LIBC_EMCC](#configure-libc) | libc emcc compatibility | +| [WAMR_BUILD_LIBC_UVWASI](#configure-libc) | libc uvwasi compatibility | +| [WAMR_BUILD_LIBC_WASI](#configure-libc) | wasi libc | +| [WAMR_BUILD_LIB_PTHREAD](#lib-pthread) | pthread library | +| [WAMR_BUILD_LIB_PTHREAD_SEMAPHORE](#lib-pthread-semaphore) | pthread semaphore support | +| [WAMR_BUILD_LIB_RATS](#librats) | RATS library | +| [WAMR_BUILD_LIB_WASI_THREADS](#lib-wasi-threads) | wasi threads | +| [WAMR_BUILD_LINUX_PERF](#linux-perf-support) | Linux performance counters | +| [WAMR_BUILD_LIME1](#lime1-target) | LIME1 runtime | +| [WAMR_BUILD_LOAD_CUSTOM_SECTION](#load-wasm-custom-sections) | loading custom sections | +| [WAMR_BUILD_MEMORY64](#memory64-feature) | memory64 support | +| [WAMR_BUILD_MEMORY_PROFILING](#memory-profiling-experiment) | memory profiling | +| [WAMR_BUILD_MINI_LOADER](#wasm-mini-loader) :warning: :exclamation: | mini loader | +| [WAMR_BUILD_MODULE_INST_CONTEXT](#module-instance-context-apis) | module instance context | +| [WAMR_BUILD_MULTI_MEMORY](#multi-memory) | multi-memory support | +| [WAMR_BUILD_MULTI_MODULE](#multi-module-feature) | multi-module support | +| [WAMR_BUILD_PERF_PROFILING](#performance-profiling-experiment) | performance profiling | +| [WAMR_BUILD_PLATFORM](#configure-platform-and-architecture) | Default platform | +| [WAMR_BUILD_QUICK_AOT_ENTRY](#quick-aotjti-entries) | quick AOT entry | +| [WAMR_BUILD_REF_TYPES](#reference-types-feature) | reference types | +| [WAMR_BUILD_SANITIZER](#sanitizer) | sanitizer | +| [WAMR_BUILD_SGX_IPFS](#intel-protected-file-system) | Intel Protected File System support | +| [WAMR_BUILD_SHARED_HEAP](#shared-heap-among-wasm-apps-and-host-native) | shared heap | +| [WAMR_BUILD_SHARED_MEMORY](shared-memory-feature) | shared memory | +| [WAMR_BUILD_SHRUNK_MEMORY](#shrunk-the-memory-usage) | shrunk memory | +| [WAMR_BUILD_SIMD](#128-bit-simd-feature) | SIMD support | +| [WAMR_BUILD_SIMDE](#128-bit-simd-feature) | SIMD E extensions | +| [WAMR_BUILD_SPEC_TEST](#support-spec-test) | spec test | +| [WAMR_BUILD_STACK_GUARD_SIZE](#stack-guard-size) | Stack guard size | +| [WAMR_BUILD_STATIC_PGO](running-pgoprofile-guided-optimization-instrumented-aot-file) | Static PGO | +| [WAMR_BUILD_STRINGREF](#garbage-collection) | String reference support | +| [WAMR_BUILD_TAIL_CALL](#tail-call-feature) | Tail call optimization | +| [WAMR_BUILD_TARGET](#configure-platform-and-architecture) | Default target architecture | +| [WAMR_BUILD_THREAD_MGR](#thread-manager) | Thread manager | +| [WAMR_BUILD_WAMR_COMPILER](#configure-aot) | WAMR compiler | +| [WAMR_BUILD_WASI_EPHEMERAL_NN](#lib-wasi-nn-with-wasi_ephemeral_nn-module-support) | WASI ephemeral NN | +| [WAMR_BUILD_WASI_NN](#lib-wasi-nn) | WASI NN | +| [WAMR_BUILD_WASI_NN_EXTERNAL_DELEGATE_PATH](#lib-wasi-nn-external-delegate-mode) | External delegate path for WASI NN | +| [WAMR_BUILD_WASI_NN_ENABLE_GPU](#lib-wasi-nn-gpu-mode) | GPU support for WASI NN | +| [WAMR_BUILD_WASI_NN_LLAMACPP](#lib-wasi-nn) | LLAMA CPP for WASI NN | +| [WAMR_BUILD_WASI_NN_ONNX](#lib-wasi-nn) | ONNX for WASI NN | +| [WAMR_BUILD_WASI_NN_OPENVINO](#lib-wasi-nn) | OpenVINO for WASI NN | +| [WAMR_BUILD_WASI_NN_TFLITE](#lib-wasi-nn) | TFLite for WASI NN | +| [WAMR_BUILD_WASM_CACHE](#wasm-cache) | WASM cache | +| [WAMR_CONFIGURABLE_BOUNDS_CHECKS](#configurable-memory-access-boundary-check) :warning: :exclamation: | Configurable bounds checks | +| [WAMR_DISABLE_APP_ENTRY](#exclude-wamr-application-entry-functions) | Disable app entry | +| [WAMR_DISABLE_HW_BOUND_CHECK](#disable-boundary-check-with-hardware-trap) | Disable hardware bound check | +| [WAMR_DISABLE_STACK_HW_BOUND_CHECK](#disable-native-stack-boundary-check-with-hardware-trap) | Disable stack hardware bound check | +| [WAMR_DISABLE_WAKEUP_BLOCKING_OP](#disable-async-wakeup-of-blocking-operation) | Disable wakeup blocking operation | +| [WAMR_DISABLE_WRITE_GS_BASE](#disable-writing-the-linear-memory-base-address-to-x86-gs-segment-register) | Disable write GS base | +| [WAMR_TEST_GC](#test-garbage-collection) | Test garbage collection | + +### **Privileged Features** :warning: :exclamation: + +_Privileged Features_ are powerful options that can boost performance or add capabilities but lower security by compromising isolation. Use them with care and test thoroughly. + +### **[config.h](../core/config.h)** + +Above compilation flags map to macros in `config.h`. For example, `WAMR_BUILD_AOT` maps to `WAMR_BUILD_AOT` in `config.h`. The build system sets these macros automatically based on your CMake settings. If your build doesn't set those flags, default values in `config.h` apply. ### **Configure platform and architecture** -- **WAMR_BUILD_PLATFORM**: set the target platform. It can be set to any platform name (folder name) under folder [core/shared/platform](../core/shared/platform). +- **WAMR_BUILD_PLATFORM**: set the target platform. Match the platform folder name under [core/shared/platform](../core/shared/platform). -- **WAMR_BUILD_TARGET**: set the target CPU architecture. Current supported targets are: X86_64, X86_32, AARCH64, ARM, THUMB, XTENSA, ARC, RISCV32, RISCV64 and MIPS. - - For ARM and THUMB, the format is \\[\]\[_VFP], where \ is the ARM sub-architecture and the "_VFP" suffix means using VFP coprocessor registers s0-s15 (d0-d7) for passing arguments or returning results in standard procedure-call. Both \ and "_VFP" are optional, e.g. ARMV7, ARMV7_VFP, THUMBV7, THUMBV7_VFP and so on. - - For AARCH64, the format is\[\], VFP is enabled by default. \ is optional, e.g. AARCH64, AARCH64V8, AARCH64V8.1 and so on. - - For RISCV64, the format is \[_abi], where "_abi" is optional, currently the supported formats are RISCV64, RISCV64_LP64D and RISCV64_LP64: RISCV64 and RISCV64_LP64D are identical, using [LP64D](https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-cc.adoc#named-abis) as abi (LP64 with hardware floating-point calling convention for FLEN=64). And RISCV64_LP64 uses [LP64](https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-cc.adoc#named-abis) as abi (Integer calling-convention only, and hardware floating-point calling convention is not used). - - For RISCV32, the format is \[_abi], where "_abi" is optional, currently the supported formats are RISCV32, RISCV32_ILP32D, RISCV32_ILP32F and RISCV32_ILP32: RISCV32 and RISCV32_ILP32D are identical, using [ILP32D](https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-cc.adoc#named-abis) as abi (ILP32 with hardware floating-point calling convention for FLEN=64). RISCV32_ILP32F uses [ILP32F](https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-cc.adoc#named-abis) as abi (ILP32 with hardware floating-point calling convention for FLEN=32). And RISCV32_ILP32 uses [ILP32](https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-cc.adoc#named-abis) as abi (Integer calling-convention only, and hardware floating-point calling convention is not used). +- **WAMR_BUILD_TARGET**: set the target CPU architecture. Supported targets: X86_64, X86_32, AARCH64, ARM, THUMB, XTENSA, ARC, RISCV32, RISCV64, and MIPS. + - For ARM and THUMB, use `[][_VFP]`. `` is the ARM sub-architecture. `_VFP` means arguments and returns use VFP coprocessor registers s0-s15 (d0-d7). Both are optional, for example ARMV7, ARMV7_VFP, THUMBV7, or THUMBV7_VFP. + - For AARCH64, use `[]`. VFP is on by default. `` is optional, for example AARCH64, AARCH64V8, or AARCH64V8.1. + - For RISCV64, use `[_abi]`. `_abi` is optional. Supported: RISCV64, RISCV64_LP64D, and RISCV64_LP64. RISCV64 and RISCV64_LP64D both use [LP64D](https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-cc.adoc#named-abis) (LP64 with hardware floating-point for FLEN=64). RISCV64_LP64 uses [LP64](https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-cc.adoc#named-abis) (integer calling convention only; no hardware floating-point calling convention). + - For RISCV32, use `[_abi]`. `_abi` is optional. Supported: RISCV32, RISCV32_ILP32D, RISCV32_ILP32F, and RISCV32_ILP32. RISCV32 and RISCV32_ILP32D both use [ILP32D](https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-cc.adoc#named-abis) (ILP32 with hardware floating-point for FLEN=64). RISCV32_ILP32F uses [ILP32F](https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-cc.adoc#named-abis) (ILP32 with hardware floating-point for FLEN=32). RISCV32_ILP32 uses [ILP32](https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-cc.adoc#named-abis) (integer calling convention only). ```bash cmake -DWAMR_BUILD_PLATFORM=linux -DWAMR_BUILD_TARGET=ARM @@ -38,171 +143,270 @@ cmake -DWAMR_BUILD_PLATFORM=linux -DWAMR_BUILD_TARGET=ARM ### **Configure interpreters** -- **WAMR_BUILD_INTERP**=1/0: enable or disable WASM interpreter +- **WAMR_BUILD_INTERP**=1/0: turn the WASM interpreter on or off. + +- **WAMR_BUILD_FAST_INTERP**=1/0: pick fast (default) or classic interpreter. + +> [!NOTE] +> The fast interpreter runs ~2X faster than classic interpreter, but consumes about 2X memory to hold the pre-compiled code. -- **WAMR_BUILD_FAST_INTERP**=1/0: build fast (default) or classic WASM interpreter. +### **Configure AOT** - NOTE: the fast interpreter runs ~2X faster than classic interpreter, but consumes about 2X memory to hold the pre-compiled code. +- **WAMR_BUILD_AOT**=1/0: turn AOT on or off. Defaults to on. +- **WAMR_BUILD_WAMR_COMPILER**=1/0. It is used to wasm loader and compilation to indictate compiler mode. -### **Configure AOT and JITs** +### **Configure LLVM JIT** -- **WAMR_BUILD_AOT**=1/0, enable AOT or not, default to enable if not set -- **WAMR_BUILD_JIT**=1/0, enable LLVM JIT or not, default to disable if not set -- **WAMR_BUILD_FAST_JIT**=1/0, enable Fast JIT or not, default to disable if not set -- **WAMR_BUILD_FAST_JIT**=1 and **WAMR_BUILD_JIT**=1, enable Multi-tier JIT, default to disable if not set +Comparing with fast JIT, LLVM JIT covers more architectures and produces better optimized code, but takes longer on cold start. + +- **WAMR_BUILD_JIT**=1/0: turn LLVM JIT on or off. Defaults to off. +- **WAMR_BUILD_LAZY_JIT**=1/0: turn lazy JIT on or off. Defaults to off. With lazy JIT, functions are compiled in background threads before they are called, which can reduce startup time for large modules. + +### **Configure Fast JIT** + +The fast JIT is a lightweight JIT that emits code quickly and tunes hot functions. + +- **WAMR_BUILD_FAST_JIT**=1/0: turn Fast JIT on or off. Defaults to off. +- **WAMR_BUILD_FAST_JIT_DUMP**=1/0: dump fast JIT compiled code to stdout for debugging. Defaults to off. + +> [!WARNING] +> It currently covers only a few architectures (x86_64). + +### **Configure Multi-tier JIT** + +Use fast jit as the first tier and LLVM JIT as the second tier. + +- With **WAMR_BUILD_FAST_JIT**=1 and **WAMR_BUILD_JIT**=1, you get multi-tier JIT. Defaults to off. + +> [!WARNING] +> It currently covers only a few architectures (x86_64). ### **Configure LIBC** -- **WAMR_BUILD_LIBC_BUILTIN**=1/0, build the built-in libc subset for WASM app, default to enable if not set +- **WAMR_BUILD_LIBC_BUILTIN**=1/0: build the built-in libc subset for WASM apps. Defaults to on. + +- **WAMR_BUILD_LIBC_WASI**=1/0: build the [WASI](https://github.com/WebAssembly/WASI) libc subset for WASM apps. Defaults to on. -- **WAMR_BUILD_LIBC_WASI**=1/0, build the [WASI](https://github.com/WebAssembly/WASI) libc subset for WASM app, default to enable if not set +- **WAMR_BUILD_LIBC_UVWASI**=1/0 (Experiment): build the WASI libc subset for WASM apps using [uvwasi](https://github.com/nodejs/uvwasi). Defaults to off. -- **WAMR_BUILD_LIBC_UVWASI**=1/0 (Experiment), build the [WASI](https://github.com/WebAssembly/WASI) libc subset for WASM app based on [uvwasi](https://github.com/nodejs/uvwasi) implementation, default to disable if not set +- **WAMR_BUILD_LIBC_EMCC**=1/0: build the emcc-compatible libc subset for WASM apps. Defaults to off. -> Note: WAMR doesn't support a safe sandbox on all platforms. For platforms that do not support **WAMR_BUILD_LIBC_WASI**, e.g. Windows, developers can try using an unsafe uvwasi-based WASI implementation by using **WAMR_BUILD_LIBC_UVWASI**. +> [!WARNING] +> WAMR is not a secure sandbox on every platform. On platforms where **WAMR_BUILD_LIBC_WASI** is unsupported (for example Windows), you can try the uvwasi-based WASI via **WAMR_BUILD_LIBC_UVWASI**, but it is unsafe. -### **Enable Multi-Module feature** +### **Multi-Module feature** -- **WAMR_BUILD_MULTI_MODULE**=1/0, default to disable if not set -> Note: See [Multiple Modules as Dependencies](./multi_module.md) for more details. +- **WAMR_BUILD_MULTI_MODULE**=1/0, default to off. -### **Enable WASM mini loader** +> [!NOTE] +> See [Multiple Modules as Dependencies](./multi_module.md) for details. -- **WAMR_BUILD_MINI_LOADER**=1/0, default to disable if not set +> [!WARNING] +> The multi-module feature is not supported in fast-jit or llvm-jit modes. -> Note: the mini loader doesn't check the integrity of the WASM binary file, developer must ensure that the WASM file is well-formed. +### **WASM mini loader** -### **Enable shared memory feature** -- **WAMR_BUILD_SHARED_MEMORY**=1/0, default to disable if not set +- **WAMR_BUILD_MINI_LOADER**=1/0, default to off. -### **Enable bulk memory feature** -- **WAMR_BUILD_BULK_MEMORY**=1/0, default to disable if not set +> [!NOTE] +> The mini loader skips integrity checks on the WASM binary. Make sure the file is valid yourself. -### **Enable memory64 feature** -- **WAMR_BUILD_MEMORY64**=1/0, default to disable if not set +> [!WARNING] +> This is a [privileged feature](#privileged-features) that compromises security. Use it only when you trust the WASM binary source. -> Note: Currently, the memory64 feature is only supported in classic interpreter running mode and AOT mode. +### **shared memory feature** -### **Enable thread manager** -- **WAMR_BUILD_THREAD_MGR**=1/0, default to disable if not set +- **WAMR_BUILD_SHARED_MEMORY**=1/0, default to off. -### **Enable lib-pthread** -- **WAMR_BUILD_LIB_PTHREAD**=1/0, default to disable if not set -> Note: The dependent feature of lib pthread such as the `shared memory` and `thread manager` will be enabled automatically. +### **bulk memory feature** -> See [WAMR pthread library](./pthread_library.md) for more details. +- **WAMR_BUILD_BULK_MEMORY**=1/0, default to off. -### **Enable lib-pthread-semaphore** -- **WAMR_BUILD_LIB_PTHREAD_SEMAPHORE**=1/0, default to disable if not set -> Note: This feature depends on `lib-pthread`, it will be enabled automatically if this feature is enabled. +### **memory64 feature** -### **Enable lib wasi-threads** -- **WAMR_BUILD_LIB_WASI_THREADS**=1/0, default to disable if not set -> Note: The dependent feature of lib wasi-threads such as the `shared memory` and `thread manager` will be enabled automatically. +- **WAMR_BUILD_MEMORY64**=1/0, default to off. -> See [wasi-threads](./pthread_impls.md#wasi-threads-new) and [Introduction to WAMR WASI threads](https://bytecodealliance.github.io/wamr.dev/blog/introduction-to-wamr-wasi-threads) for more details. +> [!WARNING] +> Supported only in classic interpreter mode and AOT mode. -### **Enable lib wasi-nn** -- **WAMR_BUILD_WASI_NN**=1/0, default to disable if not set -> Note: WAMR_BUILD_WASI_NN without WAMR_BUILD_WASI_EPHEMERAL_NN is deprecated and will likely be removed in future versions of WAMR. Please consider to enable WAMR_BUILD_WASI_EPHEMERAL_NN as well. -> Note: See [WASI-NN](../core/iwasm/libraries/wasi-nn) for more details. +### **thread manager** -### **Enable lib wasi-nn GPU mode** -- **WAMR_BUILD_WASI_NN_ENABLE_GPU**=1/0, default to disable if not set +- **WAMR_BUILD_THREAD_MGR**=1/0, default to off. -### **Enable lib wasi-nn external delegate mode** -- **WAMR_BUILD_WASI_NN_ENABLE_EXTERNAL_DELEGATE**=1/0, default to disable if not set +### **lib-pthread** -- **WAMR_BUILD_WASI_NN_EXTERNAL_DELEGATE_PATH**=Path to the external delegate shared library (e.g. `libedgetpu.so.1.0` for Coral USB) +- **WAMR_BUILD_LIB_PTHREAD**=1/0, default to off. -### **Enable lib wasi-nn with `wasi_ephemeral_nn` module support** -- **WAMR_BUILD_WASI_EPHEMERAL_NN**=1/0, default to enable if not set +> [!NOTE] +> When you enable lib pthread, required features such as `shared memory` and `thread manager` are enabled automatically. See [WAMR pthread library](./pthread_library.md) for details. + +### **lib-pthread-semaphore** + +- **WAMR_BUILD_LIB_PTHREAD_SEMAPHORE**=1/0, default to off. + +> [!NOTE] +> This depends on `lib-pthread` and turns it on automatically. + +### **lib wasi-threads** + +- **WAMR_BUILD_LIB_WASI_THREADS**=1/0, default to off. + +> [!NOTE] +> Enabling lib wasi-threads also enables its dependencies `shared memory` and `thread manager`. See [wasi-threads](./pthread_impls.md#wasi-threads-new) and [Introduction to WAMR WASI threads](https://bytecodealliance.github.io/wamr.dev/blog/introduction-to-wamr-wasi-threads) for details. + +### **lib wasi-nn** + +- **WAMR_BUILD_WASI_NN**=1/0, default to off. +- **WAMR_BUILD_WASI_NN_LLAMACPP**=1/0, default to off. +- **WAMR_BUILD_WASI_NN_ONNX**=1/0, default to off. +- **WAMR_BUILD_WASI_NN_OPENVINO**=1/0, default to off. +- **WAMR_BUILD_WASI_NN_TFLITE**=1/0, default to off. + +> [!NOTE] +> Using WAMR_BUILD_WASI_NN without WAMR_BUILD_WASI_EPHEMERAL_NN is deprecated and may be removed later. Please enable WAMR_BUILD_WASI_EPHEMERAL_NN too. See [WASI-NN](../core/iwasm/libraries/wasi-nn) for details. + +### **lib wasi-nn GPU mode** + +- **WAMR_BUILD_WASI_NN_ENABLE_GPU**=1/0, default to off. + +### **lib wasi-nn external delegate mode** + +- **WAMR_BUILD_WASI_NN_ENABLE_EXTERNAL_DELEGATE**=1/0, default to off. + +- **WAMR_BUILD_WASI_NN_EXTERNAL_DELEGATE_PATH**=Path to the external delegate shared library (for example `libedgetpu.so.1.0` for Coral USB). + +### **lib wasi-nn with `wasi_ephemeral_nn` module support** + +- **WAMR_BUILD_WASI_EPHEMERAL_NN**=1/0, default to on. ### **Disable boundary check with hardware trap** -- **WAMR_DISABLE_HW_BOUND_CHECK**=1/0, default to enable if not set and supported by platform -> Note: by default only platform [linux/darwin/android/windows/vxworks 64-bit](https://github.com/bytecodealliance/wasm-micro-runtime/blob/5fb5119239220b0803e7045ca49b0a29fe65e70e/core/shared/platform/linux/platform_internal.h#L81) will enable the boundary check with hardware trap feature, for 32-bit platforms it's automatically disabled even when the flag is set to 0, and the wamrc tool will generate AOT code without boundary check instructions in all 64-bit targets except SGX to improve performance. The boundary check includes linear memory access boundary and native stack access boundary, if `WAMR_DISABLE_STACK_HW_BOUND_CHECK` below isn't set. + +- **WAMR_DISABLE_HW_BOUND_CHECK**=1/0, default to on if the platform supports it. Otherwise, software boundary checks are used. + +> [!NOTE] +> By default only [linux/darwin/android/windows/vxworks 64-bit](https://github.com/bytecodealliance/wasm-micro-runtime/blob/5fb5119239220b0803e7045ca49b0a29fe65e70e/core/shared/platform/linux/platform_internal.h#L81) platforms enable this hardware trap boundary check. On 32-bit platforms it is off even if the flag is 0. The wamrc tool omits boundary check instructions in AOT code for all 64-bit targets except SGX to improve speed. The boundary check covers linear memory access and native stack access unless `WAMR_DISABLE_STACK_HW_BOUND_CHECK` is set. ### **Disable native stack boundary check with hardware trap** -- **WAMR_DISABLE_STACK_HW_BOUND_CHECK**=1/0, default to enable if not set and supported by platform, same as `WAMR_DISABLE_HW_BOUND_CHECK`. -> Note: When boundary check with hardware trap is disabled, or `WAMR_DISABLE_HW_BOUND_CHECK` is set to 1, the native stack boundary check with hardware trap will be disabled too, no matter what value is set to `WAMR_DISABLE_STACK_HW_BOUND_CHECK`. And when boundary check with hardware trap is enabled, the status of this feature is set according to the value of `WAMR_DISABLE_STACK_HW_BOUND_CHECK`. + +- **WAMR_DISABLE_STACK_HW_BOUND_CHECK**=1/0, default to on if the platform supports it; same rule as `WAMR_DISABLE_HW_BOUND_CHECK`. Otherwise, software boundary checks are used. + +> [!NOTE] +> If hardware trap boundary checks are off (or `WAMR_DISABLE_HW_BOUND_CHECK` is 1), native stack boundary checks are also off regardless of `WAMR_DISABLE_STACK_HW_BOUND_CHECK`. If hardware trap boundary checks are on, this setting decides whether the native stack check is on. ### **Disable async wakeup of blocking operation** -- **WAMR_DISABLE_WAKEUP_BLOCKING_OP**=1/0, default to enable if supported by the platform -> Note: The feature helps async termination of blocking threads. If you disable it, the runtime can wait for termination of blocking threads possibly forever. -### **Enable tail call feature** -- **WAMR_BUILD_TAIL_CALL**=1/0, default to disable if not set +- **WAMR_DISABLE_WAKEUP_BLOCKING_OP**=1/0, default to on when the platform supports it. + +> [!NOTE] +> This feature lets blocking threads terminate asynchronously. If you disable it, blocking threads may never finish when asked to exit. + +### **tail call feature** + +- **WAMR_BUILD_TAIL_CALL**=1/0, default to off. + +### **128-bit SIMD feature** + +- **WAMR_BUILD_SIMD**=1/0, default to on. +- **WAMR_BUILD_SIMDE**=1/0, default to off. + +SIMDE (SIMD Everywhere) implements SIMD operations in fast interpreter mode. + +> [!WARNING] +> Supported in AOT, JIT, and fast-interpreter modes with the SIMDe library. + +### **SIMDe library for SIMD in fast interpreter** + +- **WAMR_BUILD_LIB_SIMDE**=1/0, default to off. -### **Enable 128-bit SIMD feature** -- **WAMR_BUILD_SIMD**=1/0, default to enable if not set -> Note: supported in AOT mode, JIT mode, and fast-interpreter mode with SIMDe library. +> [!NOTE] +> When enabled, SIMDe (SIMD Everywhere) implements SIMD operations in fast interpreter mode. -### **Enable SIMDe library for SIMD in fast interpreter** -- **WAMR_BUILD_LIB_SIMDE**=1/0, default to disable if not set -> Note: If enabled, SIMDe (SIMD Everywhere) library will be used to implement SIMD operations in fast interpreter mode. +### **Exception Handling** -### **Enable Exception Handling** -- **WAMR_BUILD_EXCE_HANDLING**=1/0, default to disable if not set +- **WAMR_BUILD_EXCE_HANDLING**=1/0, default to off. -> Note: Currently, the exception handling feature is only supported in classic interpreter running mode. +> [!NOTE] +> Current implementation supports only Legacy Wasm exception handling proposal, not the latest version. -### **Enable Garbage Collection** -- **WAMR_BUILD_GC**=1/0, default to disable if not set +> [!WARNING] +> Exception handling currently works only in classic interpreter mode. + +### **Garbage Collection** + +- **WAMR_BUILD_GC**=1/0, default to off. +- **WAMR_BUILD_GC_HEAP_VERIFY**=1/0, default to off. When enabled, verifies the heap during free. +- **WAMR_BUILD_STRINGREF**=1/0, default to off. When enabled, need to set WAMR_STRINGREF_IMPL_SOURCE as well + +> [!WARNING] +> Garbage collection is not supported in fast-jit mode and multi-tier-jit mode. ### **Set the Garbage Collection heap size** -- **WAMR_BUILD_GC_HEAP_SIZE_DEFAULT**=n, default to 128 kB (131072) if not set -### **Configure Debug** +- **WAMR_BUILD_GC_HEAP_SIZE_DEFAULT**=n, default to 128 kB (131072). + +### **Multi Memory** + +- **WAMR_BUIL_MULTI_MEMORY**=1/0, default to off. + +> [!WARNING] +> Multi memory is supported only in classic interpreter mode. + +### **Name Section** + +- **WAMR_BUILD_CUSTOM_NAME_SECTION**=1/0: load function names from the custom name section. Default is off. + +### **AOT stack frame feature** -- **WAMR_BUILD_CUSTOM_NAME_SECTION**=1/0, load the function name from custom name section, default to disable if not set +- **WAMR_BUILD_AOT_STACK_FRAME**=1/0, default to off. -### **Enable AOT stack frame feature** -- **WAMR_BUILD_AOT_STACK_FRAME**=1/0, default to disable if not set -> Note: if it is enabled, the AOT or JIT stack frames (like stack frame of classic interpreter but only necessary data is committed) will be created for AOT or JIT mode in function calls. And please add `--enable-dump-call-stack` option to wamrc during compiling AOT module. +> [!NOTE] +> When enabled, AOT or JIT stack frames (similar to classic interpreter frames but storing only what is needed) are built during calls. Add `--enable-dump-call-stack` to wamrc when compiling AOT modules. -### **Enable dump call stack feature** -- **WAMR_BUILD_DUMP_CALL_STACK**=1/0, default to disable if not set +### **dump call stack feature** -> Note: if it is enabled, the call stack will be dumped when exception occurs. +- **WAMR_BUILD_DUMP_CALL_STACK**=1/0, default to off. -> - For interpreter mode, the function names are firstly extracted from *custom name section*, if this section doesn't exist or the feature is not enabled, then the name will be extracted from the import/export sections -> - For AOT/JIT mode, the function names are extracted from import/export section, please export as many functions as possible (for `wasi-sdk` you can use `-Wl,--export-all`) when compiling wasm module, and add `--enable-dump-call-stack --emit-custom-sections=name` option to wamrc during compiling AOT module. +> [!NOTE] +> When enabled, the runtime dumps the call stack on exceptions. +> +> - In interpreter mode, names come first from the custom name section. If that section is absent or disabled, names come from import/export sections. +> - In AOT/JIT mode, names come from the import/export section. Export as many functions as possible (for `wasi-sdk` you can use `-Wl,--export-all`) when compiling the wasm module, and add `--enable-dump-call-stack --emit-custom-sections=name` to wamrc when compiling the AOT module. -### **Enable memory profiling (Experiment)** -- **WAMR_BUILD_MEMORY_PROFILING**=1/0, default to disable if not set -> Note: if it is enabled, developer can use API `void wasm_runtime_dump_mem_consumption(wasm_exec_env_t exec_env)` to dump the memory consumption info. -Currently we only profile the memory consumption of module, module_instance and exec_env, the memory consumed by other components such as `wasi-ctx`, `multi-module` and `thread-manager` are not included. +### **memory profiling (Experiment)** -> Also refer to [Memory usage estimation for a module](./memory_usage.md). +- **WAMR_BUILD_MEMORY_PROFILING**=1/0, default to off. -### **Enable performance profiling (Experiment)** -- **WAMR_BUILD_PERF_PROFILING**=1/0, default to disable if not set -> Note: if it is enabled, developer can use API `void wasm_runtime_dump_perf_profiling(wasm_module_inst_t module_inst)` to dump the performance consumption info. Currently we only profile the performance consumption of each WASM function. +> [!NOTE] +> When enabled, call `void wasm_runtime_dump_mem_consumption(wasm_exec_env_t exec_env)` to dump memory usage. Currently only module, module_instance, and exec_env memory are measured; other components such as `wasi-ctx`, `multi-module`, and `thread-manager` are not included. See [Memory usage estimation for a module](./memory_usage.md). -> The function name searching sequence is the same with dump call stack feature. +### **performance profiling (Experiment)** -> Also refer to [Tune the performance of running wasm/aot file](./perf_tune.md). +- **WAMR_BUILD_PERF_PROFILING**=1/0, default to off. -### **Enable the global heap** -- **WAMR_BUILD_GLOBAL_HEAP_POOL**=1/0, default to disable if not set for all *iwasm* applications, except for the platforms Alios and Zephyr. +> [!NOTE] +> When enabled, call `void wasm_runtime_dump_perf_profiling(wasm_module_inst_t module_inst)` to dump per-function performance. Function name lookup follows the same order as the dump call stack feature. See [Tune the performance of running wasm/aot file](./perf_tune.md). -> **WAMR_BUILD_GLOBAL_HEAP_POOL** is used in the *iwasm* applications provided in the directory `product-mini`. When writing your own host application using WAMR, if you want to use a global heap and allocate memory from it, you must set the initialization argument `mem_alloc_type` to `Alloc_With_Pool`. -> The global heap is defined in the documentation [Memory model and memory usage tunning](memory_tune.md). +### **A pre-allocation for runtime and wasm apps** -### **Set the global heap size** -- **WAMR_BUILD_GLOBAL_HEAP_SIZE**=n, default to 10 MB (10485760) if not set for all *iwasm* applications, except for the platforms Alios (256 kB), Riot (256 kB) and Zephyr (128 kB). +- **WAMR_BUILD_GLOBAL_HEAP_POOL**=1/0, default to off for _iwasm_ apps except on Alios and Zephyr. +- **WAMR_BUILD_GLOBAL_HEAP_SIZE**=n, default to 10 MB (10485760) for _iwasm_ apps, except Alios (256 kB), Riot (256 kB), and Zephyr (128 kB). -> **WAMR_BUILD_GLOBAL_HEAP_SIZE** is used in the *iwasm* applications provided in the directory `product-mini`. When writing your own host application using WAMR, if you want to set the amount of memory dedicated to the global heap pool, you must set the initialization argument `mem_alloc_option.pool` with the appropriate values. -> The global heap is defined in the documentation [Memory model and memory usage tunning](memory_tune.md). -> Note: if `WAMR_BUILD_GLOBAL_HEAP_SIZE` is not set and the flag `WAMR_BUILD_SPEC_TEST` is set, the global heap size is equal to 300 MB (314572800), or 100 MB (104857600) when compiled for Intel SGX (Linux). +> [!NOTE] +> When enabled, WAMR uses a big global heap for runtime and wasm apps instead of allocating memory from the system directly. This can reduce memory fragmentation and improve performance when many small allocations happen. The global heap is allocated at startup. **WAMR_BUILD_GLOBAL_HEAP_POOL** applies to _iwasm_ apps in `product-mini`. For your own host app, set `mem_alloc_type` to `Alloc_With_Pool` if you want to use a global heap. The global heap is described in [Memory model and memory usage tunning](memory_tune.md). **WAMR_BUILD_GLOBAL_HEAP_SIZE** applies to _iwasm_ apps in `product-mini`. For your host app, set `mem_alloc_option.pool` with the size you want for the global heap. The global heap is described in [Memory model and memory usage tunning](memory_tune.md). ### **Set maximum app thread stack size** -- **WAMR_APP_THREAD_STACK_SIZE_MAX**=n, default to 8 MB (8388608) if not set -> Note: the AOT boundary check with hardware trap mechanism might consume large stack since the OS may lazily grow the stack mapping as a guard page is hit, we may use this configuration to reduce the total stack usage, e.g. -DWAMR_APP_THREAD_STACK_SIZE_MAX=131072 (128 KB). -### **Set vprintf callback** -- **WAMR_BH_VPRINTF**=, default to disable if not set -> Note: if the vprintf_callback function is provided by developer, the os_printf() and os_vprintf() in Linux, Darwin, Windows, VxWorks, Android and esp-idf platforms, besides WASI Libc output will call the callback function instead of libc vprintf() function to redirect the stdout output. For example, developer can define the callback function like below outside runtime lib: +- **WAMR_APP_THREAD_STACK_SIZE_MAX**=n, default to 8 MB (8388608). + +> [!NOTE] +> AOT boundary checks with hardware traps may use large stacks because the OS can grow stacks lazily when a guard page is hit. Use this setting to cap total stack use, for example `-DWAMR_APP_THREAD_STACK_SIZE_MAX=131072` (128 KB). + +### **Host defined vprintf** + +- **WAMR_BH_VPRINTF**=, default to off. + +> [!NOTE] +> If you provide `vprintf_callback`, `os_printf()` and `os_vprintf()` on Linux, Darwin, Windows, VxWorks, Android, and esp-idf, plus WASI libc output, call your callback instead of libc `vprintf()`. Example outside the runtime lib: > > ```C > int my_vprintf(const char *format, va_list ap) @@ -220,64 +424,91 @@ Currently we only profile the memory consumption of module, module_instance and > } > ``` > -> and then use `cmake -DWAMR_BH_VPRINTF=my_vprintf ..` to pass the callback function, or add `BH_VPRINTF=my_vprintf` macro for the compiler, e.g. add line `add_definitions(-DBH_VPRINTF=my_vprintf)` in CMakeLists.txt. See [basic sample](../samples/basic/src/main.c) for a usage example. +> Then run `cmake -DWAMR_BH_VPRINTF=my_vprintf ..`, or add the compiler macro `BH_VPRINTF=my_vprintf` (for example `add_definitions(-DBH_VPRINTF=my_vprintf)` in CMakeLists.txt). See [basic sample](../samples/basic/src/main.c) for an example. -### **WAMR_BH_LOG**=, default to disable if not set -> Note: if the log_callback function is provided by the developer, WAMR logs are redirected to such callback. For example: +### **WAMR_BH_LOG**=, default to off. + +> [!NOTE] +> If you provide `log_callback`, WAMR logs go there. Example: +> > ```C > void my_log(uint32 log_level, const char *file, int line, const char *fmt, ...) > { > /* Usage of custom logger */ > } > ``` -> See [basic sample](../samples/basic/src/main.c) for a usage example. +> +> See [basic sample](../samples/basic/src/main.c) for an example. -### **Enable reference types feature** -- **WAMR_BUILD_REF_TYPES**=1/0, default to enable if not set +### **reference types feature** + +- **WAMR_BUILD_REF_TYPES**=1/0, default to on. ### **Exclude WAMR application entry functions** -- **WAMR_DISABLE_APP_ENTRY**=1/0, default to disable if not set -> Note: The WAMR application entry (`core/iwasm/common/wasm_application.c`) encapsulate some common process to instantiate, execute the wasm functions and print the results. Some platform related APIs are used in these functions, so you can enable this flag to exclude this file if your platform doesn't support those APIs. -> *Don't enable this flag if you are building `product-mini`* +- **WAMR_DISABLE_APP_ENTRY**=1/0, default to off. + +> [!NOTE] +> The WAMR application entry (`core/iwasm/common/wasm_application.c`) wraps common steps to instantiate and run wasm functions and print results. These use platform APIs. this flag to skip the file if your platform lacks those APIs. _Do not enable this flag when building `product-mini`._ -### **Enable source debugging features** -- **WAMR_BUILD_DEBUG_INTERP**=1/0, default to 0 if not set -> Note: There are some other setup required by source debugging, please refer to [source_debugging.md](./source_debugging.md) and [WAMR source debugging basic](https://bytecodealliance.github.io/wamr.dev/blog/wamr-source-debugging-basic) for more details. +### **source debugging features** -### **Enable load wasm custom sections** -- **WAMR_BUILD_LOAD_CUSTOM_SECTION**=1/0, default to disable if not set +- **WAMR_BUILD_DEBUG_INTERP**=1/0, default to off. +- **WAMR_BUILD_DEBUG_AOT**=1/0, default to off. +- **WAMR_BUILD_DYNAMIC_AOT_DEBUG**=1/0, default to off. -> Note: By default, the custom sections are ignored. If the embedder wants to get custom sections from `wasm_module_t`, then `WAMR_BUILD_LOAD_CUSTOM_SECTION` should be enabled, and then `wasm_runtime_get_custom_section` can be used to get a custom section by name. +> [!NOTE] +> Source debugging needs extra setup. See [source_debugging.md](./source_debugging.md) and [WAMR source debugging basic](https://bytecodealliance.github.io/wamr.dev/blog/wamr-source-debugging-basic). -> Note: If `WAMR_BUILD_CUSTOM_NAME_SECTION` is enabled, then the `custom name section` will be treated as a special section and consumed by the runtime, not available to the embedder. +### **load wasm custom sections** -> For AoT file, must use `--emit-custom-sections` to specify which sections need to be emitted into AoT file, otherwise all custom sections will be ignored. +- **WAMR_BUILD_LOAD_CUSTOM_SECTION**=1/0, default to off. + +> [!NOTE] +> By default, custom sections are ignored. `WAMR_BUILD_LOAD_CUSTOM_SECTION` so the embedder can read them via `wasm_runtime_get_custom_section`. If `WAMR_BUILD_CUSTOM_NAME_SECTION` is on, the custom name section is consumed by the runtime and unavailable to the embedder. For AoT files, pass `--emit-custom-sections` to wamrc to keep the sections; otherwise they are dropped. ### **Stack guard size** -- **WAMR_BUILD_STACK_GUARD_SIZE**=n, default to N/A if not set. -> Note: By default, the stack guard size is 1K (1024) or 24K (if uvwasi enabled). + +- **WAMR_BUILD_STACK_GUARD_SIZE**=n, default to N/A when not set. + +> [!NOTE] +> By default, stack guard size is 1K (1024) or 24K when uvwasi is enabled. ### **Disable writing the linear memory base address to x86 GS segment register** -- **WAMR_DISABLE_WRITE_GS_BASE**=1/0, default to enable if not set and supported by platform -> Note: by default only platform [linux x86-64](https://github.com/bytecodealliance/wasm-micro-runtime/blob/5fb5119239220b0803e7045ca49b0a29fe65e70e/core/shared/platform/linux/platform_internal.h#L67) will enable this feature, for 32-bit platforms it's automatically disabled even when the flag is set to 0. In linux x86-64, writing the linear memory base address to x86 GS segment register may be used to speedup the linear memory access for LLVM AOT/JIT, when `--enable-segue=[]` option is added for `wamrc` or `iwasm`. -> See [Enable segue optimization for wamrc when generating the aot file](./perf_tune.md#3-enable-segue-optimization-for-wamrc-when-generating-the-aot-file) for more details. +- **WAMR_DISABLE_WRITE_GS_BASE**=1/0, default to on if the platform supports it. + +> [!NOTE] +> By default only [linux x86-64](https://github.com/bytecodealliance/wasm-micro-runtime/blob/5fb5119239220b0803e7045ca49b0a29fe65e70e/core/shared/platform/linux/platform_internal.h#L67) enables this. On 32-bit platforms it stays off even if set to 0. On linux x86-64, writing the linear memory base to the GS segment can speed up linear memory access for LLVM AOT/JIT when `--enable-segue=[]` is passed to `wamrc` or `iwasm`. +> +> See [segue optimization for wamrc when generating the aot file](./perf_tune.md#3-enable-segue-optimization-for-wamrc-when-generating-the-aot-file) for details. ### **User defined linear memory allocator** -- **WAMR_BUILD_ALLOC_WITH_USAGE**=1/0, default to disable if not set -> Notes: by default, the linear memory is allocated by system. when it's set to 1 and Alloc_With_Allocator is selected, it will be allocated by customer. -### **Enable running PGO(Profile-Guided Optimization) instrumented AOT file** -- **WAMR_BUILD_STATIC_PGO**=1/0, default to disable if not set -> Note: See [Use the AOT static PGO method](./perf_tune.md#5-use-the-aot-static-pgo-method) for more details. +- **WAMR_BUILD_ALLOC_WITH_USAGE**=1/0, default to off. +- **WAMR_BUILD_ALLOC_WITH_USER_DATA**=1/0, default to off. + +> [!NOTE] +> By default, the system allocates linear memory. With this on and `Alloc_With_Allocator` selected, you can provide your own allocator. + +### **running PGO(Profile-Guided Optimization) instrumented AOT file** + +- **WAMR_BUILD_STATIC_PGO**=1/0, default to off. + +> [!NOTE] +> See [Use the AOT static PGO method](./perf_tune.md#5-use-the-aot-static-pgo-method). -### **Enable linux perf support** -- **WAMR_BUILD_LINUX_PERF**=1/0, enable linux perf support to generate the flamegraph to analyze the performance of a wasm application, default to disable if not set -> Note: See [Use linux-perf](./perf_tune.md#7-use-linux-perf) for more details. +### **linux perf support** + +- **WAMR_BUILD_LINUX_PERF**=1/0: enable linux perf support to generate flamegraphs for wasm app performance. Default is off. + +> [!NOTE] +> See [Use linux-perf](./perf_tune.md#7-use-linux-perf). + +### **module instance context APIs** + +- **WAMR_BUILD_MODULE_INST_CONTEXT**=1/0: enable module instance context APIs so the embedder can set one or more contexts for a wasm module instance. Default is on. -### **Enable module instance context APIs** -- **WAMR_BUILD_MODULE_INST_CONTEXT**=1/0, enable module instance context APIs which can set one or more contexts created by the embedder for a wasm module instance, default to enable if not set: ```C wasm_runtime_create_context_key wasm_runtime_destroy_context_key @@ -285,95 +516,187 @@ Currently we only profile the memory consumption of module, module_instance and wasm_runtime_set_context_spread wasm_runtime_get_context ``` -> Note: See [wasm_export.h](../core/iwasm/include/wasm_export.h) for more details. -### **Enable quick AOT/JTI entries** -- **WAMR_BUILD_QUICK_AOT_ENTRY**=1/0, enable registering quick call entries to speedup the aot/jit func call process, default to enable if not set -> Note: See [Refine callings to AOT/JIT functions from host native](./perf_tune.md#83-refine-callings-to-aotjit-functions-from-host-native) for more details. +> [!NOTE] +> See [wasm_export.h](../core/iwasm/include/wasm_export.h) for details. + +### **quick AOT/JTI entries** + +- **WAMR_BUILD_QUICK_AOT_ENTRY**=1/0: register quick call entries to speed up AOT/JIT function calls. Default is on. + +> [!NOTE] +> See [Refine callings to AOT/JIT functions from host native](./perf_tune.md#83-refine-callings-to-aotjit-functions-from-host-native). + +### **AOT intrinsics** + +- **WAMR_BUILD_AOT_INTRINSICS**=1/0: turn on AOT intrinsic functions. Default is on. AOT code can call these when wamrc uses `--disable-llvm-intrinsics` or `--enable-builtin-intrinsics=`. + +> [!NOTE] +> See [Tuning the XIP intrinsic functions](./xip.md#tuning-the-xip-intrinsic-functions). -### **Enable AOT intrinsics** -- **WAMR_BUILD_AOT_INTRINSICS**=1/0, enable the AOT intrinsic functions, default to enable if not set. These functions can be called from the AOT code when `--disable-llvm-intrinsics` flag or `--enable-builtin-intrinsics=` flag is used by wamrc to generate the AOT file. -> Note: See [Tuning the XIP intrinsic functions](./xip.md#tuning-the-xip-intrinsic-functions) for more details. +### **extended constant expression** -### **Enable extended constant expression** -- **WAMR_BUILD_EXTENDED_CONST_EXPR**=1/0, default to disable if not set. -> Note: See [Extended Constant Expressions](https://github.com/WebAssembly/extended-const/blob/main/proposals/extended-const/Overview.md) for more details. +- **WAMR_BUILD_EXTENDED_CONST_EXPR**=1/0, default to off. -### **Enable bulk-memory-opt** -- **WAMR_BUILD_BULK_MEMORY_OPT**=1/0, default to disable if not set. -> Note: See [bulk-memory-opt](https://github.com/WebAssembly/tool-conventions/blob/main/Lime.md#bulk-memory-opt) for more details. +> [!NOTE] +> See [Extended Constant Expressions](https://github.com/WebAssembly/extended-const/blob/main/proposals/extended-const/Overview.md). -### **Enable call-indirect-overlong** -- **WAMR_BUILD_CALL_INDIRECT_OVERLONG**=1/0, default to disable if not set. -> Note: See [call-indirect-overlong](https://github.com/WebAssembly/tool-conventions/blob/main/Lime.md#call-indirect-overlong) for more details. +### **bulk-memory-opt** -### **Enable Lime1 target** -- **WAMR_BUILD_LIME1**=1/0, default to disable if not set. -> Note: See [Lime1](https://github.com/WebAssembly/tool-conventions/blob/main/Lime.md#lime1) for more details. +- **WAMR_BUILD_BULK_MEMORY_OPT**=1/0, default to off. + +> [!NOTE] +> See [bulk-memory-opt](https://github.com/WebAssembly/tool-conventions/blob/main/Lime.md#bulk-memory-opt). + +### **call-indirect-overlong** + +- **WAMR_BUILD_CALL_INDIRECT_OVERLONG**=1/0, default to off. + +> [!NOTE] +> See [call-indirect-overlong](https://github.com/WebAssembly/tool-conventions/blob/main/Lime.md#call-indirect-overlong). + +### **Lime1 target** + +- **WAMR_BUILD_LIME1**=1/0, default to off. + +> [!NOTE] +> See [Lime1](https://github.com/WebAssembly/tool-conventions/blob/main/Lime.md#lime1). ### **Configurable memory access boundary check** -- **WAMR_CONFIGURABLE_BOUNDS_CHECKS**=1/0, default to disable if not set -> Note: If it is enabled, allow to run `iwasm --disable-bounds-checks` to disable the memory access boundary checks for interpreter mode. -### **Module instance context APIs** -- **WAMR_BUILD_MODULE_INST_CONTEXT**=1/0, default to disable if not set -> Note: If it is enabled, allow to set one or more contexts created by embedder for a module instance, the below APIs are provided: -```C - wasm_runtime_create_context_key - wasm_runtime_destroy_context_key - wasm_runtime_set_context - wasm_runtime_set_context_spread - wasm_runtime_get_context -``` +- **WAMR_CONFIGURABLE_BOUNDS_CHECKS**=1/0, default to off. + +> [!WARNING] +> When enabled, you can run `iwasm --disable-bounds-checks` to turn off memory access boundary checks in interpreter mode. This is a [privileged feature](#privileged-features); use it carefully. ### **Shared heap among wasm apps and host native** -- **WAMR_BUILD_SHARED_HEAP**=1/0, default to disable if not set -> Note: If it is enabled, allow to create one or more shared heaps, and attach one to a module instance, the belows APIs ared provided: -```C - wasm_runtime_create_shared_heap - wasm_runtime_attach_shared_heap - wasm_runtime_detach_shared_heap - wasm_runtime_shared_heap_malloc - wasm_runtime_shared_heap_free -``` -And the wasm app can calls below APIs to allocate/free memory from/to the shared heap if it is attached to the app's module instance: -```C - void *shared_heap_malloc(); - void shared_heap_free(void *ptr); -``` + +- **WAMR_BUILD_SHARED_HEAP**=1/0, default to off. + +> [!NOTE] +> When enabled, you can create and attach shared heaps, and the following APIs become available: +> +> ```C +> wasm_runtime_create_shared_heap +> wasm_runtime_attach_shared_heap +> wasm_runtime_detach_shared_heap +> wasm_runtime_shared_heap_malloc +> wasm_runtime_shared_heap_free +> ``` +> +> A wasm app can call these to use the shared heap attached to its module instance: +> +> ```C +> void *shared_heap_malloc(); +> void shared_heap_free(void *ptr); +> ``` + +> [!WARNING] +> The shared-heap feature is not supported in fast-jit mode. ### **Shrunk the memory usage** -- **WAMR_BUILD_SHRUNK_MEMORY**=1/0, default to enable if not set -> Note: When enabled, this feature will reduce memory usage by decreasing the size of the linear memory, particularly when the `memory.grow` opcode is not used and memory usage is somewhat predictable. -## **Instruction metering** -- **WAMR_BUILD_INSTRUCTION_METERING**=1/0, default to disable if not set -> Note: Enabling this feature allows limiting the number of instructions a wasm module instance can execute. Use the `wasm_runtime_set_instruction_count_limit(...)` API before calling `wasm_runtime_call_*(...)` APIs to enforce this limit. +- **WAMR_BUILD_SHRUNK_MEMORY**=1/0, default to on. -## **Combination of configurations:** +> [!NOTE] +> When enabled, this reduces memory by shrinking linear memory, especially when `memory.grow` is unused and memory needs are predictable. -We can combine the configurations. For example, if we want to disable interpreter, enable AOT and WASI, we can run command: +### **Instruction metering** -``` Bash +- **WAMR_BUILD_INSTRUCTION_METERING**=1/0, default to off. + +> [!NOTE] +> This limits the number of instructions a wasm module instance can run. Call `wasm_runtime_set_instruction_count_limit(...)` before `wasm_runtime_call_*(...)` to enforce the cap. + +> [!WARNING] +> This is only supported in classic interpreter mode. + +### **Invoke general FFI** + +- **WAMR_BUILD_INVOKE_NATIVE_GENERAL**=1/0, default to off. + +By default, WAMR uses architecture-specific calling conventions to call native functions from WASM modules. When this feature is enabled, WAMR uses a general calling convention that works on all architectures but is slower. The details are in [iwasm_common.cmake](../core/iwasm/common/iwasm_common.cmake) + +### **Host defined log** + +- **WAMR_BH_LOG**=, default to off. + +### **AOT Validator** + +- **WAMR_BUILD_AOT_VALIDATOR**=1/0, default to off. + +> [!NOTE] +> By default, WAMR believes AOT files are valid and unforged. + +### **Copy Call Stack** + +- **WAMR_BUILD_COPY_CALL_STACK**=1/0, default to off. + +> [!NOTE] +> Unlike [dump call stack](dump-call-stack-feature), which prints the call stack on exceptions, this feature lets the embedder copy the call stack programmatically via `wasm_runtime_dump_call_stack_to_buf()`. + +### **Librats** + +- **WAMR_BUILD_LIB_RATS**=1/0, default to off. + +> [librats](https://github.com/inclavare-containers/librats) is a C library designed to facilitate remote attestation for secure computing environments. It provides a framework for attesting the integrity of computing environments remotely, enabling trust establishment between different Trusted Execution Environments (TEEs). + +> [!WARNING] +> This is for Intel SGX platforms only. + +### **Sanitizer** + +- **WAMR_BUILD_SANITIZER**=[ubsan|asan|tsan|posan], default is empty + +Use one or more of the following sanitizers when building WAMR with sanitizer support: AddressSanitizer, UndefinedBehaviorSanitizer, ThreadSanitizer, or Pointer-Overflow Sanitizer. + +### **Intel Protected File System** + +- **WAMR_BUILD_SGX_IPFS**=1/0, default to off. + +> [!WARNING] +> This is for Intel SGX platforms only. + +### **Support spec test** + +- **WAMR_BUILD_SPEC_TEST**=1/0, default to off. + +### **WASM Cache** + +- **WAMR_BUILD_WASM_CACHE**=1/0, default to off. + +### **Test Garbage Collection** + +- **WAMR_TEST_GC**=1/0, default to off. + +It is used to test garbage collection related APIs and features. Refer to [iwasm_gc.cmake](../core/iwasm/common/gc/iwasm_gc.cmake) for details. + +It is used to cache loaded wasm modules in memory to speed up module instantiation only in wasm-c-api. + +## **Combination of configurations** + +You can mix settings. For example, to disable the interpreter, enable AOT and WASI, run: + +```Bash cmake .. -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_LIBC_WASI=1 -DWAMR_BUILD_PLATFORM=linux ``` -Or if we want to enable interpreter, disable AOT and WASI, and build as X86_32, we can run command: +To enable the interpreter, disable AOT and WASI, and target X86_32, run: -``` Bash +```Bash cmake .. -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_AOT=0 -DWAMR_BUILD_LIBC_WASI=0 -DWAMR_BUILD_TARGET=X86_32 ``` -When enabling SIMD for fast interpreter mode, you'll need to enable both SIMD and the SIMDe library: +When enabling SIMD for fast interpreter mode, turn on both SIMD and the SIMDe library: -``` Bash +```Bash cmake .. -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_FAST_INTERP=1 -DWAMR_BUILD_SIMD=1 -DWAMR_BUILD_LIB_SIMDE=1 ``` -For Valgrind, begin with the following configurations and add additional ones as needed: +For Valgrind, start with these and add more as needed: -``` Bash +```Bash #... -DCMAKE_BUILD_TYPE=Debug \ -DWAMR_DISABLE_HW_BOUND_CHECK=0 \ @@ -381,8 +704,7 @@ For Valgrind, begin with the following configurations and add additional ones as #... ``` -To enable the minimal Lime1 feature set, we need to disable some features that are on by default, such as -bulk memory and reference types: +To enable the minimal Lime1 feature set, turn off features that are on by default such as bulk memory and reference types: ```Bash cmake .. -DWAMR_BUILD_LIME1=1 -DWAMR_BUILD_BULK_MEMORY=0 -DWAMR_BUILD_REF_TYPES=0 -DDWAMR_BUILD_SIMD=0 diff --git a/doc/shared_heap.md b/doc/shared_heap.md new file mode 100644 index 0000000000..4d014b08ba --- /dev/null +++ b/doc/shared_heap.md @@ -0,0 +1,38 @@ +# Introducing the Shared-Heap Feature in WAMR + +In the world of WebAssembly, flexibility and performance are key. The WebAssembly Micro Runtime (WAMR) has introduced a powerful feature known as the shared heap, designed to enhance performance by allowing data sharing between multiple WebAssembly (WASM) instances, or between WASM and its host, without incurring the overhead of data copying. Let's delve into what this feature offers and how it can be effectively utilized. + +## What is the Shared Heap? + +The shared heap is an innovative extension of the WebAssembly linear memory. Unlike traditional memory, which requires data copying between WASM instances or to the host, the shared heap allows direct access to the same memory space. This can significantly improve performance in scenarios where multiple WASM instances need to interact or share data with the host. + +## Key Benefits + +- Expanded Memory Space: The shared-heap feature effectively expands the linear memory space by introducing hosted memory address spaces. This new linear memory space can be seen as a virtual space, encompassing multiple real spaces. +- Toolchain Workaround: The shared heap acts as a workaround for the current lack of toolchain support for the multi-memory proposal. This provides a practical solution for developers needing enhanced memory capabilities. +- Boundary Checks and Sandbox Protection: The shared heap maintains boundary checks and extends sandbox protection to portions of the real memory space, ensuring secure and reliable memory access across shared heaps. +- Ongoing Evaluation: The shared-heap feature is still under evaluation, and the team is actively seeking better solutions to further improve the functionality and performance. + +## How Does It Work? + +While the concept of a shared heap might seem straightforward, implementing it correctly requires careful attention. It is a runtime feature, not part of the standard WebAssembly specification, nor an ongoing proposal. Here’s how you can leverage the shared heap in your applications: + +### Creating a Shared Heap + +1. WAMR Managed Shared Heap: Use the `wasm_runtime_create_shared_heap(SharedHeapInitArgs \*init_args)` API to create a shared heap. If only `init_args.size` is specified with `init_args.pre_allocated_addr` set to NULL, WAMR will allocate and manage the shared heap. This allows dynamic memory management through `wasm_runtime_shared_heap_malloc()` and `wasm_runtime_shared_heap_free()`. Memory allocation from this heap is valid and can be shared, with automatic cleanup when the runtime is destroyed. + +2. Preallocated Shared Heap: Alternatively, you can use pre-allocated memory, either from the system heap or a static global buffer. This requires you to handle its accessibility, size, and management. Specify `init_args.pre_allocated_addr` along with `init_args.size` to create this type of shared heap, which acts as a single large chunk for direct data sharing. + +### Creating and Attaching Shared Heap Chains + +To form a unified memory space, you can chain multiple shared heaps using the `wasm_runtime_chain_shared_heaps(wasm_shared_heap_t head, wasm_shared_heap_t body)` API. This creates a continuous memory region from the perspective of the WASM app, even though it might consist of separate regions in the native environment. + +Once chained, attach the shared heap to WASM apps using `wasm_runtime_attach_shared_heaps(wasm_module_inst_t module_inst, wasm_shared_heap_t shared_heaps)`. This ensures no overlap with the existing linear memory of the WASM app instance, preventing accidental overwrites. + +### Resource Allocation and Data Transfer + +After attaching the shared heap, both host and WASM code can allocate resources directly from it. Host code can use `wasm_runtime_shared_heap_malloc()`, while WASM code can utilize `shared_heap_malloc()`. This allows one side to allocate memory and pass the address or index to the other side, facilitating efficient data transfer. The original boundary checks for loading and storing in linear memory naturally extend to the shared-heap area, as it is part of the linear memory. This integration ensures that memory operations remain secure and consistent. + +## Conclusion + +The shared heap feature is an exciting advancement in WASM performance optimization. By enabling direct memory sharing, it reduces overhead and boosts efficiency in applications requiring high interactivity. While it offers great benefits, remember it heavily relies on correct implementation to manage shared data effectively. As the feature is still under evaluation, let's work together on a better solution. We are collecting every potential usage and unique feature, looking for the shared common ground that will drive future innovations in WebAssembly applications. diff --git a/doc/stability_wasm_proposals.md b/doc/stability_wasm_proposals.md index c8b90d5e44..8ad0571192 100644 --- a/doc/stability_wasm_proposals.md +++ b/doc/stability_wasm_proposals.md @@ -2,7 +2,7 @@ This document is intended to describe the current status of WebAssembly proposals and WASI proposals in WAMR. -Only track proposals that are followed in the [WebAssembly proposals](https://github.com/WebAssembly/proposals) and [WASI proposals](https://github.com/WebAssembly/WASI/blob/main/Proposals.md). +Only track proposals that are followed in the [WebAssembly proposals](https://github.com/WebAssembly/proposals) and [WASI proposals](https://github.com/WebAssembly/WASI/blob/main/docs/Proposals.md). Normally, the document tracks proposals that are in phase 4. However, if a proposal in an earlier phase receives support, it will be added to the list below. diff --git a/doc/tiered_support.md b/doc/tiered_support.md index 565d347b29..21adb31156 100644 --- a/doc/tiered_support.md +++ b/doc/tiered_support.md @@ -1,196 +1,183 @@ -# Tiered Supported - -**Tier definitions** - -- **A — Production Ready:** fully tested and stable. -- **B — Almost Production Ready:** partially tested; close to production. -- **C — Experimental / Not Production Ready:** unfinished or volatile. - -The condition _tested_ mentioned above specifically refers to whether there are enough tests in CI. - -## Architecture Support - -| Architecture | Tier | -| ------------ | ----- | -| **x86-64** | **A** | -| **x86-32** | **A** | -| AArch64 | B | -| ARC | B | -| ARM | B | -| RISCV32 | B | -| RISCV64 | B | -| THUMB | B | -| XTENSA | B | -| MIPS | C | - -## OS / Platform Support - -| Platform | Tier | -| ------------------ | ----- | -| **NuttX** | **A** | -| **Ubuntu** | **A** | -| Android | B | -| macOS | B | -| Windows | B | -| Zephyr | B | -| AliOS-Things | C | -| Cosmopolitan | C | -| ESP-IDF (FreeRTOS) | C | -| FreeBSD | C | -| iOS | C | -| RT-Thread | C | -| RIOT | C | -| VxWorks | C | - -## WebAssembly Proposal Support - -> During configuration, It is able to disable or enable the following features by setting the corresponding flags (see Appendix). It is also possible to check features status in the configuration output. - -| WASM Proposal / Extension | Tier | -| -------------------------------------- | ----------- | -| **Bulk Memory** | A | -| **Extended Constant Expressions** | A | -| **Import/Export of Mutable Globals** | A | -| **Memory64** | A | -| **Multi-value** | A | -| **Non-trapping float-to-int** | A | -| **Reference Types** | A | -| **Shared Memory (Threads)** | A | -| **SIMD (128-bit)** | A | -| **Sign-extension Operators** | A | -| GC (Garbage Collection) | B | -| Stringref | B | -| Tail Calls | B | -| Multi-memory | C | -| Legacy Exception Handling | C | -| Branch Hinting | Unsupported | -| Custom Annotation Syntax (text format) | Unsupported | -| Exception Handling (new spec) | Unsupported | -| JS String Builtins | Unsupported | -| Relaxed SIMD | Unsupported | - -# WAMR-Specific Feature Support - -> During configuration, It is able to disable or enable the following features by setting the corresponding flags (see Appendix). It is also possible to check features status in the configuration output. - -| WAMR Feature | Tier | -| --------------------------------- | ---- | -| **AoT (wamrc)** | A | -| **AOT intrinsics** | A | -| **Fast Interpreter** | A | -| **Interpreter (classic)** | A | -| **Libc builtin** | A | -| **Libc WASI** | A | -| **Quick AOT/JIT entries** | A | -| **Shrunk memory** | A | -| **Wakeup of blocking operations** | A | -| **WASM C API** | A | -| Fast JIT | B | -| LLVM ORC JIT | B | -| Memory profiling | B | -| Module instance context[^7] | B | -| Multi-module | B | -| Perf profiling | B | -| Pthread | B | -| Shared heap | B | -| WASI threads | B | -| WASI-NN (neural network APIs) | B | -| Debug Interpreter | B | -| Debug AOT | C | -| Tier-up (Fast JIT → LLVM JIT) | C | - ---- - -# Appendix: All compilation flags - -| Compilation flags | Tiered | Default | on Ubuntu | -| ------------------------------------------- | ------ | ------- | --------- | -| WAMR_APP_THREAD_STACK_SIZE_MAX | B | ND[^1] | | -| WAMR_BH_LOG | B | ND | | -| WAMR_BH_VPRINTF | B | ND | | -| WAMR_BUILD_ALLOC_WITH_USAGE | B | ND | | -| WAMR_BUILD_ALLOC_WITH_USER_DATA | B | ND | | -| WAMR_BUILD_AOT | A | ND | 1 | -| WAMR_BUILD_AOT_INTRINSICS | A | 1[^2] | | -| WAMR_BUILD_AOT_STACK_FRAME | A | ND | | -| WAMR_BUILD_AOT_VALIDATOR | B | ND | | -| WAMR_BUILD_BULK_MEMORY | A | 1 | | -| WAMR_BUILD_COPY_CALL_STACK | B | ND | | -| WAMR_BUILD_CUSTOM_NAME_SECTION | B | ND | | -| WAMR_BUILD_DEBUG_AOT | C | ND | | -| WAMR_BUILD_DEBUG_INTERP | B | ND | | -| WAMR_BUILD_DUMP_CALL_STACK | B | ND | | -| WAMR_BUILD_DYNAMIC_AOT_DEBUG | C | ND | | -| WAMR_BUILD_EXCE_HANDLING | C | 0 | | -| WAMR_BUILD_EXTENDED_CONST_EXPR | A | 0 | | -| WAMR_BUILD_FAST_INTERP | A | ND | 1 | -| WAMR_BUILD_FAST_JIT | B | ND | | -| WAMR_BUILD_FAST_JIT_DUMP | B | ND | | -| WAMR_BUILD_GC | B | 0 | | -| WAMR_BUILD_GC_HEAP_VERIFY | B | ND | | -| WAMR_BUILD_GLOBAL_HEAP_POOL | A | ND | | -| WAMR_BUILD_GLOBAL_HEAP_SIZE | A | ND | | -| WAMR_BUILD_INSTRUCTION_METERING | C | ND | | -| WAMR_BUILD_INTERP | A | ND | 1 | -| WAMR_BUILD_INVOKE_NATIVE_GENERAL | B | ND | | -| WAMR_BUILD_JIT | B | ND | | -| WAMR_BUILD_LAZY_JIT | B | 1[^3] | | -| WAMR_BUILD_LIBC_BUILTIN | A | ND | 1 | -| WAMR_BUILD_LIBC_EMCC | C | ND | | -| WAMR_BUILD_LIBC_UVWASI | C | ND | | -| WAMR_BUILD_LIBC_WASI | A | ND | 1 | -| WAMR_BUILD_LIB_PTHREAD | B | ND | | -| WAMR_BUILD_LIB_PTHREAD_SEMAPHORE | B | ND | | -| WAMR_BUILD_LIB_RATS | C | ND | | -| WAMR_BUILD_LIB_WASI_THREADS | B | ND | | -| WAMR_BUILD_LINUX_PERF | B | ND | | -| WAMR_BUILD_LIME1 | A | NO | | -| WAMR_BUILD_LOAD_CUSTOM_SECTION | A | ND | | -| WAMR_BUILD_MEMORY64 | A | 0 | | -| WAMR_BUILD_MEMORY_PROFILING | B | ND | | -| WAMR_BUILD_MINI_LOADER | B | ND | | -| WAMR_BUILD_MODULE_INST_CONTEXT | B | ND | 1 | -| WAMR_BUILD_MULTI_MEMORY | C | 0 | | -| WAMR_BUILD_MULTI_MODULE | B | ND | | -| WAMR_BUILD_PERF_PROFILING | B | ND | | -| WAMR_BUILD_PLATFORM | - | ND | linux | -| WAMR_BUILD_QUICK_AOT_ENTRY | A | 1[^4] | | -| WAMR_BUILD_REF_TYPES | A | ND | 1 | -| WAMR_BUILD_SANITIZER | B | ND | | -| WAMR_BUILD_SGX_IPFS | C | ND | | -| WAMR_BUILD_SHARED_HEAP | A | ND | | -| WAMR_BUILD_SHARED_MEMORY | A | 0 | 1 | -| WAMR_BUILD_SHRUNK_MEMORY | A | ND | 1 | -| WAMR_BUILD_SIMD | A | ND | 1 | -| WAMR_BUILD_SIMDE | A | ND | 1 | -| WAMR_BUILD_SPEC_TEST | A | ND | | -| WAMR_BUILD_STACK_GUARD_SIZE | B | ND | | -| WAMR_BUILD_STATIC_PGO | B | ND | | -| WAMR_BUILD_STRINGREF | B | 0 | | -| WAMR_BUILD_TAIL_CALL | A | 0 | 1 | -| WAMR_BUILD_TARGET | - | ND | X86-64 | -| WAMR_BUILD_THREAD_MGR | A | ND | | -| WAMR_BUILD_WAMR_COMPILER | A | ND | | -| WAMR_BUILD_WASI_EPHEMERAL_NN | B | ND | | -| WAMR_BUILD_WASI_NN | B | ND | | -| WAMR_BUILD_WASI_NN_ENABLE_EXTERNAL_DELEGATE | B | ND | | -| WAMR_BUILD_WASI_NN_ENABLE_GPU | B | ND | | -| WAMR_BUILD_WASI_NN_EXTERNAL_DELEGATE_PATH | B | ND | | -| WAMR_BUILD_WASI_NN_LLAMACPP | B | ND | | -| WAMR_BUILD_WASI_NN_ONNX | B | ND | | -| WAMR_BUILD_WASI_NN_OPENVINO | B | ND | | -| WAMR_BUILD_WASI_NN_TFLITE | B | ND | | -| WAMR_BUILD_WASI_TEST | B | ND | | -| WAMR_BUILD_WASM_CACHE | B | ND | | -| WAMR_CONFIGURABLE_BOUNDS_CHECKS | C | ND | | -| WAMR_DISABLE_APP_ENTRY | A | ND | | -| WAMR_DISABLE_HW_BOUND_CHECK | A | ND | | -| WAMR_DISABLE_STACK_HW_BOUND_CHECK | A | ND | | -| WAMR_DISABLE_WAKEUP_BLOCKING_OP | B | ND | | -| WAMR_DISABLE_WRITE_GS_BASE | B | ND | | -| WAMR_TEST_GC | B | ND | | - -[^1]: _ND_ represents _not defined_ -[^2]: active if `WAMR_BUILD_AOT` is 1 -[^3]: active if `WAMR_BUILD_FAST_JIT` or `WAMR_BUILD_JIT1` is 1 -[^4]: active if `WAMR_BUILD_AOT` or `WAMR_BUILD_JIT` is 1 +# Tiered Support + +## Tier A + +This tier is the highest level of support. Features and targets in this tier are fully supported, actively maintained, and regularly tested. Users can expect prompt assistance and comprehensive documentation for any issues or questions related to these features. Users can rely on Tier A features for production environments. Targets in this tier usually have been used in products. + +## Tier B + +This tier represents a moderate level of support. Features and targets in this tier are generally supported and maintained, but may not receive the same level of attention as Tier A. While efforts are made to ensure stability, users may encounter occasional issues that are not immediately addressed. Documentation may be less comprehensive compared to Tier A. Users are encouraged to report any issues they encounter, but response times may vary. + +## Tier C + +This tier indicates experimental features with foundational support levels. These implementations are typically optimized for specific platforms, running modes, or use cases, and may not receive active maintenance. Documentation tends to be minimal or require updates. Production deployment requires specialized expertise and careful evaluation, including establishing appropriate threat models and ensuring comprehensive understanding of the implementation scope. Users should be prepared to troubleshoot issues and handle ongoing maintenance independently, accepting full responsibility for any limitations or challenges that may arise. + +> [!NOTE] +> +> - **actively maintained** and **fully supported**. users can expect timely assistance, comprehensive documentation, and regular updates for any issues or questions related to these features. +> - **regularly tested**. means there are automated tests in CI that run on a regular basis to ensure the stability and functionality of these features. + +## Labels + +**Target** refers to the specific hardware architecture or operating system that the runtime can be compiled for and run on. + +**Runtime Extensions** are features that extend the runtime capabilities of the system beyond the core WebAssembly specification. These extensions may include optimizations, additional APIs, or other enhancements that improve performance, usability, or functionality. + +**Portability** indicates the ability of the runtime to operate across different platforms or environments without requiring significant modifications. This includes compatibility with various operating systems, hardware architectures, and development frameworks. + +# TierA + +## Targets + +| Description | +| -------------------------- | +| aarch64-unknown-nuttx-eabi | +| i386-pc-linux-gnu | +| x86_64-pc-linux-gnu | +| x86_64-apple-darwin | +| x86_64-none-linux-gnu | + +## Features + +| Description | Compilation Flags | Labels | +| -------------------------------- | ----------------------------------------------------------------------------------------------------------- | ------------------ | +| Linux Compatibility | WAMR_BUILD_PLATFORM=linux | Portability | +| AoT runtime | [WAMR_BUILD_AOT](./build_wamr.md#configure-aot) | Running mode | +| Fast Interpreter | [WAMR_BUILD_FAST_INTERP](./build_wamr.md#configure-interpreters) | Running mode | +| Classic Interpreter | [WAMR_BUILD_INTERP](./build_wamr.md#configure-interpreters) | Running mode | +| AoT compilation (wamrc) | [WAMR_BUILD_WAMR_COMPILER](./build_wamr.md#configure-aot) | Compiler | +| Bulk Memory | [WAMR_BUILD_BULK_MEMORY](./build_wamr.md#bulk-memory-feature) | Wasm Proposal | +| Name section | [WAMR_BUILD_CUSTOM_NAME_SECTION](./build_wamr.md#name-section) | Wasm Proposal | +| Extended Constant Expressions | [WAMR_BUILD_EXTENDED_CONST_EXPR](./build_wamr.md#extended-constant-expression) | Wasm Proposal | +| Non-trapping float-to-int | ALWAYS ON. Can not be disabled | Wasm Proposal | +| Import/Export of Mutable Globals | ALWAYS ON. Can not be disabled | Wasm Proposal | +| Multi-value | ALWAYS ON. Can not be disabled | Wasm Proposal | +| WASI LIBC | [WAMR_BUILD_LIBC_WASI](./build_wamr.md#configure-libc) | Wasm Proposal | +| WASI threads | [WAMR_BUILD_LIB_WASI_THREADS](./build_wamr.md#lib-wasi-threads) | Wasm Proposal | +| Custom sections | [WAMR_BUILD_LOAD_CUSTOM_SECTION](./build_wamr.md#load-wasm-custom-sections) | Wasm Proposal | +| Memory64 | [WAMR_BUILD_MEMORY64](./build_wamr.md#memory64-feature) | Wasm Proposal | +| Reference Types | [WAMR_BUILD_REF_TYPES](./build_wamr.md#reference-types-feature) | Wasm Proposal | +| Threads | [WAMR_BUILD_SHARED_MEMORY](./build_wamr.md#shared-memory-feature) | Wasm Proposal | +| SIMD (128-bit) | [WAMR_BUILD_SIMD](./build_wamr.md#128-bit-simd-feature) | Wasm Proposal | +| AOT intrinsics | [WAMR_BUILD_AOT_INTRINSICS](./build_wamr.md#aot-intrinsics) | Runtime Extensions | +| AoT stack frame | [WAMR_BUILD_AOT_STACK_FRAME](./build_wamr.md#aot-stack-frame-feature) | Runtime Extensions | +| Global heap pool | [WAMR_BUILD_GLOBAL_HEAP_POOL](./build_wamr.md#a-pre-allocation-for-runtime-and-wasm-apps) | Runtime Extensions | +| Global heap size | [WAMR_BUILD_GLOBAL_HEAP_SIZE](./build_wamr.md#a-pre-allocation-for-runtime-and-wasm-apps) | Runtime Extensions | +| Libc builtin | [WAMR_BUILD_LIBC_BUILTIN](./build_wamr.md#configure-libc) | Runtime Extensions | +| Module instance context | [WAMR_BUILD_MODULE_INST_CONTEXT](./build_wamr.md#module-instance-context-apis) | Runtime Extensions | +| Quick AOT/JIT entries | [WAMR_BUILD_QUICK_AOT_ENTRY](./build_wamr.md#configure-aot) | Runtime Extensions | +| Shrunk memory | [WAMR_BUILD_SHRUNK_MEMORY](./build_wamr.md#shrunk-the-memory-usage) | Runtime Extensions | +| Thread manager | [WAMR_BUILD_THREAD_MGR](./build_wamr.md#thread-manager) | Runtime Extensions | +| App entry | [WAMR_DISABLE_APP_ENTRY](./build_wamr.md#exclude-wamr-application-entry-functions) | Runtime Extensions | +| hardware bound check | [WAMR_DISABLE_HW_BOUND_CHECK](./build_wamr.md#disable-boundary-check-with-hardware-trap) | Runtime Extensions | +| stack hardware bound check | [WAMR_DISABLE_STACK_HW_BOUND_CHECK](./build_wamr.md#disable-native-stack-boundary-check-with-hardware-trap) | Runtime Extensions | +| Wakeup blocking operation | [WAMR_DISABLE_WAKEUP_BLOCKING_OP](./build_wamr.md#disable-async-wakeup-of-blocking-operation) | Runtime Extensions | + +# TierB + +## Targets + +| Description | +| ---------------------- | +| arc-unknown-none-elf | +| x86_64-pc-windows-msvc | +| mips-unknown-elf | +| mips64-unknown-elf | + +## Features + +| Description | Compilation Flags | Labels | +| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ------------------ | +| Darwin Compatibility | WAMR_BUILD_PLATFORM=darwin | Portability | +| ESP-IDF Compatibility | WAMR_BUILD_PALTFORM=esp-idf | Portability | +| Nuttx Compatibility | WAMR_BUILD_PALTFORM=nuttx | Portability | +| SGX Compatibility | WAMR_BUILD_PALTFORM=linux-sgx | Portability | +| Zephyr Compatibility | WAMR_BUILD_PALTFORM=zephyr | Portability | +| GC (Garbage Collection) | [WAMR_BUILD_GC](./build_wamr.md#garbage-collection) | Wasm Proposal | +| Stringref | [WAMR_BUILD_STRINGREF](./build_wamr.md#garbage-collection) | Wasm Proposal | +| Tail Calls | [WAMR_BUILD_TAIL_CALL](./build_wamr.md#tail-call-feature) | Wasm Proposal | +| LLVM JIT | [WAMR_BUILD_JIT](./build_wamr.md#configure-llvm-jit) | Running mode | +| Per Instance running mode | ALWAYS ON. Can not be disabled | Runtime Extensions | +| Maximum stack size for app threads | [WAMR_APP_THREAD_STACK_SIZE_MAX](./build_wamr.md#set-maximum-app-thread-stack-size) | Runtime Extensions | +| Host defined logging | [WAMR_BH_LOG](./build_wamr.md#host-defined-log) | Runtime Extensions | +| Host defined vprintf | [WAMR_BH_vprintf](./build_wamr.md#host-defined-vprintf) | Runtime Extensions | +| Allocation with usage tracking | [WAMR_BUILD_ALLOC_WITH_USAGE](./build_wamr.md#user-defined-linear-memory-allocator) | Runtime Extensions | +| Allocation with user data | [WAMR_BUILD_ALLOC_WITH_USER_DATA](./build_wamr.md#user-defined-linear-memory-allocator) | Runtime Extensions | +| Bulk-memory-opt | [WAMR_BUILD_BULK_MEMORY_OPT](./build_wamr.md#bulk-memory-opt) | Runtime Extensions | +| Call-indirect-overlong | [WAMR_BUILD_CALL_INDIRECT_OVERLONG](./build_wamr.md#call-indirect-overlong) | Runtime Extensions | +| Copy Call Stack | [WAMR_BUILD_COPY_CALL_STACK](./build_wamr.md#copy-call-stack) | Runtime Extensions | +| Debug Interpreter | [WAMR_BUILD_DEBUG_INTERP](./build_wamr.md#configure-debug) | Runtime Extensions | +| Dump call stack | [WAMR_BUILD_DUMP_CALL_STACK](./build_wamr.md#dump-call-stack-feature) | Runtime Extensions | +| Garbage Collection Heap Verify | [WAMR_BUILD_GC_HEAP_VERIFY](./build_wamr.md#garbage-collection) | Runtime Extensions | +| Native General Invocation | [WAMR_BUILD_INVOKE_NATIVE_GENERAL](./build_wamr.md#invoke-general-ffi) | Runtime Extensions | +| Lazy JIT Compilation | [WAMR_BUILD_LAZY_JIT](./build_wamr.md#configure-llvm-jit) | Runtime Extensions | +| Pthread | [WAMR_BUILD_LIB_PTHREAD](./build_wamr.md#lib-pthread) | Runtime Extensions | +| Pthread Semaphore Support | [WAMR_BUILD_LIB_PTHREAD_SEMAPHORE](./build_wamr.md#lib-pthread-semaphore) | Runtime Extensions | +| Lime1 runtime | [WAMR_BUILD_LIME1](./build_wamr.md#lime1-target) | Runtime Extensions | +| Linux Performance Counters | [WAMR_BUILD_LINUX_PERF](./build_wamr.md#linux-perf-support) | Runtime Extensions | +| Memory profiling | [WAMR_BUILD_MEMORY_PROFILING](./build_wamr.md#memory-profiling-experiment) | Runtime Extensions | +| Multi-module | [WAMR_BUILD_MULTI_MODULE](./build_wamr.md#multi-module-feature) | Runtime Extensions | +| Perf profiling | [WAMR_BUILD_PERF_PROFILING](./build_wamr.md#performance-profiling-experiment) | Runtime Extensions | +| Shared heap | [WAMR_BUILD_SHARED_HEAP](./build_wamr.md#shared-heap-among-wasm-apps-and-host-native) | Runtime Extensions | +| Stack Guard Size | [WAMR_BUILD_STACK_GUARD_SIZE](./build_wamr.md#stack-guard-size) | Runtime Extensions | +| WASI Ephemeral NN | [WAMR_BUILD_WASI_EPHEMERAL_NN](./build_wamr.md#lib-wasi-nn-with-wasi_ephemeral_nn-module-support) | Runtime Extensions | +| WASI-NN (neural network APIs) | [WAMR_BUILD_WASI_NN](./build_wamr.md#lib-wasi-nn) | Runtime Extensions | +| External Delegate for WASI NN | [WAMR_BUILD_WASI_NN_ENABLE_EXTERNAL_DELEGATE](./build_wamr.md#lib-wasi-nn-external-delegate-mode) | Runtime Extensions | +| GPU Support for WASI NN | [WAMR_BUILD_WASI_NN_ENABLE_GPU](./build_wamr.md#lib-wasi-nn-gpu-mode) | Runtime Extensions | +| External Delegate Path for WASI NN | [WAMR_BUILD_WASI_NN_EXTERNAL_DELEGATE_PATH](./build_wamr.md#lib-wasi-nn-external-delegate-mode) | Runtime Extensions | +| LLAMA CPP for WASI NN | [WAMR_BUILD_WASI_NN_LLAMACPP](./build_wamr.md#lib-wasi-nn) | Runtime Extensions | +| ONNX for WASI NN | [WAMR_BUILD_WASI_NN_ONNX](./build_wamr.md#lib-wasi-nn) | Runtime Extensions | +| OpenVINO for WASI NN | [WAMR_BUILD_WASI_NN_OPENVINO](./build_wamr.md#lib-wasi-nn) | Runtime Extensions | +| TFLite for WASI NN | [WAMR_BUILD_WASI_NN_TFLITE](./build_wamr.md#lib-wasi-nn) | Runtime Extensions | +| Configurable bounds checks | [WAMR_CONFIGURABLE_BOUNDS_CHECKS](./build_wamr.md#configurable-memory-access-boundary-check) | Runtime Extensions | +| Write GS base | [WAMR_DISABLE_WRITE_GS_BASE](./build_wamr.md#disable-writing-the-linear-memory-base-address-to-x86-gs-segment-register) | Runtime Extensions | + +# TierC + +## Targets + +| Description | +| ---------------------- | +| aarch64-apple-ios | +| arm-none-eabi | +| i386-unknown-elf | +| i386-wrs-vxworks | +| riscv32-esp-elf | +| riscv32-unknown-elf | +| riscv64-unknown-elf | +| x86_64-linux-android | +| x86_64-linux-cosmo | +| x86_64-unknown-freebsd | +| x86_64-wrs-vxworks | +| xtensa-esp32-elf | + +## Features + +| Description | Compilation Flags | Labels | +| ------------------------- | ----------------------------------------------------------------------------------------------------- | ------------------ | +| AliOS compatibility | WAMR_BUILD_PLATFORM=alios-things | Portability | +| Android Compatibility | WAMR_BUILD_PLATFORM=android | Portability | +| Cosmo Compatibility | WAMR_BUILD_PLATFORM=cosmopolitan | Portability | +| FreeBSD Compatibility | WAMR_BUILD_PLATFORM=freebsd | Portability | +| iOS Compatibility | WAMR_BUILD_PLATFORM=darwin | Portability | +| RIOT OS Compatibility | WAMR_BUILD_PLATFORM=riot | Portability | +| RT-Thread Compatibility | WAMR_BUILD_PLATFORM=rt-thread | Portability | +| VxWorks Compatibility | WAMR_BUILD_PLATFORM=vxworks | Portability | +| Windows Compatibility | WAMR_BUILD_PLATFORM=windows | Portability | +| Legacy Exception Handling | [WAMR_BUILD_EXCE_HANDLING](./build_wamr.md#exception-handling) | Wasm Proposal | +| Multi-memory | [WAMR_BUILD_MULTI_MEMORY](./build_wamr.md#multi-memory) | Wasm Proposal | +| Fast JIT | [WAMR_BUILD_FAST_JIT](./build_wamr.md#configure-fast-jit) | Running mode | +| Multi-tier JIT | [Combination of flags](./build_wamr.md#configure-multi-tier-jit) | Running mode | +| AoT Validator | [WAMR_BUILD_AOT_VALIDATOR](./build_wamr.md#aot-validator) | Runtime Extensions | +| Debug AOT | [WAMR_BUILD_DEBUG_AOT](./build_wamr.md#configure-debug) | Runtime Extensions | +| Dynamic AoT debugging | [WAMR_BUILD_DYNAMIC_AOT_DEBUG](./build_wamr.md#configure-debug) | Runtime Extensions | +| Fast JIT Dump | [WAMR_BUILD_FAST_JIT_DUMP](./build_wamr.md#configure-fast-jit) | Runtime Extensions | +| Instruction Metering | [WAMR_BUILD_INSTRUCTION_METERING](./build_wamr.md#instruction-metering) | Runtime Extensions | +| Libc EMCC Compatibility | [WAMR_BUILD_LIBC_EMCC](./build_wamr.md#libc-emcc) | Runtime Extensions | +| Libc UVWASI Compatibility | [WAMR_BUILD_LIBC_UVWASI](./build_wamr.md#libc-uvwasi) | Runtime Extensions | +| RATS Library | [WAMR_BUILD_LIB_RATS](./build_wamr.md#librats) | Runtime Extensions | +| Mini Loader | [WAMR_BUILD_MINI_LOADER](./build_wamr.md#wasm-mini-loader) | Runtime Extensions | +| SGX IPFS Support | [WAMR_BUILD_SGX_IPFS](./build_wamr.md#intel-protected-file-system) | Runtime Extensions | +| Static PGO | [WAMR_BUILD_STATIC_PGO](./build_wamr.md#running-pgoprofile-guided-optimization-instrumented-aot-file) | Runtime Extensions | +| WASM cache | [WAMR_BUILD_WASM_CACHE](./build_wamr.md#wasm-cache) | Runtime Extensions | +| Test garbage collection | [WAMR_TEST_GC](./build_wamr.md#test-garbage-collection) | Runtime Extensions | diff --git a/gitbook/tutorial/README.md b/gitbook/tutorial/README.md index 85b63677f0..7d76c83eda 100644 --- a/gitbook/tutorial/README.md +++ b/gitbook/tutorial/README.md @@ -1,6 +1,6 @@ # Tutorial -In this chapter, we want to walk you through the basic development knowledge and skills of WARM you may need so that you are ready to write your wasm application with WARM. +In this chapter, we want to walk you through the basic development knowledge and skills of WAMR you may need so that you are ready to write your wasm application with WAMR. For starters, you could learn how to compile different running mode of WAMR and their usage in [this section](build-tutorial/README.md). diff --git a/idf_component.yml b/idf_component.yml index a8083a7425..db4afc77d7 100644 --- a/idf_component.yml +++ b/idf_component.yml @@ -8,10 +8,11 @@ dependencies: idf: ">=4.4" targets: - esp32 + - esp32s2 - esp32s3 - esp32c3 - esp32c6 - esp32p4 - esp32c5 examples: - - path: product-mini/platforms/esp-idf \ No newline at end of file + - path: product-mini/platforms/esp-idf diff --git a/language-bindings/go/build.sh b/language-bindings/go/build.sh index fe46a9a838..c6736ed87e 100755 --- a/language-bindings/go/build.sh +++ b/language-bindings/go/build.sh @@ -21,7 +21,7 @@ cmake ${WAMR_DIR}/product-mini/platforms/${PLATFORM} \ -DWAMR_BUILD_LIB_PTHREAD=1 -DWAMR_BUILD_DUMP_CALL_STACK=1 \ -DWAMR_BUILD_MEMORY_PROFILING=1 make -j ${nproc} -cp -a libvmlib.a ${WAMR_GO_DIR}/packaged/lib/${PLATFORM}-${ARCH} +cp -a libiwasm.a ${WAMR_GO_DIR}/packaged/lib/${PLATFORM}-${ARCH} cd ${WAMR_GO_DIR} go test diff --git a/language-bindings/go/go.mod b/language-bindings/go/go.mod index b7e428654c..3425bcb270 100644 --- a/language-bindings/go/go.mod +++ b/language-bindings/go/go.mod @@ -2,4 +2,4 @@ module github.com/bytecodealliance/wasm-micro-runtime/language-bindings/go go 1.15 -require github.com/stretchr/testify v1.7.0 +require github.com/stretchr/testify v1.11.1 diff --git a/language-bindings/go/go.sum b/language-bindings/go/go.sum index acb88a48f6..1cd876dc18 100644 --- a/language-bindings/go/go.sum +++ b/language-bindings/go/go.sum @@ -1,11 +1,19 @@ -github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/language-bindings/go/wamr/cgo.go b/language-bindings/go/wamr/cgo.go index 74766c3018..cac3bcbccc 100644 --- a/language-bindings/go/wamr/cgo.go +++ b/language-bindings/go/wamr/cgo.go @@ -6,7 +6,7 @@ package wamr // #cgo CFLAGS: -I${SRCDIR}/packaged/include -// #cgo LDFLAGS: -lvmlib -lm +// #cgo LDFLAGS: -liwasm -lm // // #cgo linux,amd64 LDFLAGS: -Wl,-rpath,${SRCDIR}/packaged/lib/linux-amd64 -L${SRCDIR}/packaged/lib/linux-amd64 // #cgo linux,arm64 LDFLAGS: -Wl,-rpath,${SRCDIR}/packaged/lib/linux-aarch64 -L${SRCDIR}/packaged/lib/linux-aarch64 diff --git a/product-mini/platforms/android/CMakeLists.txt b/product-mini/platforms/android/CMakeLists.txt index 9cc8cc6b94..7c4671331d 100644 --- a/product-mini/platforms/android/CMakeLists.txt +++ b/product-mini/platforms/android/CMakeLists.txt @@ -111,12 +111,6 @@ set_version_info (vmlib) set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections -pie -fPIE") -if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64") - if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mindirect-branch-register") - endif () -endif () - # The following flags are to enhance security, but it may impact performance, # we disable them by default. #if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64") diff --git a/product-mini/platforms/common/libc_wasi.c b/product-mini/platforms/common/libc_wasi.c index eb2e8c27f3..8e45d7329c 100644 --- a/product-mini/platforms/common/libc_wasi.c +++ b/product-mini/platforms/common/libc_wasi.c @@ -162,16 +162,18 @@ libc_wasi_parse(char *arg, libc_wasi_parse_context_t *ctx) return LIBC_WASI_PARSE_RESULT_OK; } -void -libc_wasi_init(wasm_module_t wasm_module, int argc, char **argv, - libc_wasi_parse_context_t *ctx) +static void +libc_wasi_set_init_args(struct InstantiationArgs2 *args, int argc, char **argv, + libc_wasi_parse_context_t *ctx) { - wasm_runtime_set_wasi_args(wasm_module, ctx->dir_list, ctx->dir_list_size, - ctx->map_dir_list, ctx->map_dir_list_size, - ctx->env_list, ctx->env_list_size, argv, argc); - - wasm_runtime_set_wasi_addr_pool(wasm_module, ctx->addr_pool, - ctx->addr_pool_size); - wasm_runtime_set_wasi_ns_lookup_pool(wasm_module, ctx->ns_lookup_pool, - ctx->ns_lookup_pool_size); + wasm_runtime_instantiation_args_set_wasi_arg(args, argv, argc); + wasm_runtime_instantiation_args_set_wasi_env(args, ctx->env_list, + ctx->env_list_size); + wasm_runtime_instantiation_args_set_wasi_dir( + args, ctx->dir_list, ctx->dir_list_size, ctx->map_dir_list, + ctx->map_dir_list_size); + wasm_runtime_instantiation_args_set_wasi_addr_pool(args, ctx->addr_pool, + ctx->addr_pool_size); + wasm_runtime_instantiation_args_set_wasi_ns_lookup_pool( + args, ctx->ns_lookup_pool, ctx->ns_lookup_pool_size); } diff --git a/product-mini/platforms/cosmopolitan/CMakeLists.txt b/product-mini/platforms/cosmopolitan/CMakeLists.txt index 37641497aa..6b834369e6 100644 --- a/product-mini/platforms/cosmopolitan/CMakeLists.txt +++ b/product-mini/platforms/cosmopolitan/CMakeLists.txt @@ -136,14 +136,6 @@ set_version_info (vmlib) set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections") -if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64") - if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mindirect-branch-register") - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mindirect-branch-register") - # UNDEFINED BEHAVIOR, refer to https://en.cppreference.com/w/cpp/language/ub - endif () -endif () - # The following flags are to enhance security, but it may impact performance, # we disable them by default. #if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64") diff --git a/product-mini/platforms/ios/CMakeLists.txt b/product-mini/platforms/ios/CMakeLists.txt index bc8542ffe9..80c618e8d2 100644 --- a/product-mini/platforms/ios/CMakeLists.txt +++ b/product-mini/platforms/ios/CMakeLists.txt @@ -113,12 +113,6 @@ include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake) set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections -pie -fPIE") -if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64") - if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mindirect-branch-register") - endif () -endif () - # The following flags are to enhance security, but it may impact performance, # we disable them by default. #if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64") diff --git a/product-mini/platforms/linux-sgx/CMakeLists.txt b/product-mini/platforms/linux-sgx/CMakeLists.txt index af911a0db0..dd2dc39197 100644 --- a/product-mini/platforms/linux-sgx/CMakeLists.txt +++ b/product-mini/platforms/linux-sgx/CMakeLists.txt @@ -16,10 +16,6 @@ if (NOT DEFINED WAMR_BUILD_TARGET) if (CMAKE_SIZEOF_VOID_P EQUAL 8) # Build as X86_64 by default in 64-bit platform set (WAMR_BUILD_TARGET "X86_64") - if (NOT DEFINED WAMR_BUILD_SIMD) - # Enable SIMD by default in 64-bit platform - set (WAMR_BUILD_SIMD 1) - endif () elseif (CMAKE_SIZEOF_VOID_P EQUAL 4) # Build as X86_32 by default in 32-bit platform set (WAMR_BUILD_TARGET "X86_32") @@ -74,7 +70,7 @@ if (NOT DEFINED WAMR_BUILD_FAST_INTERP) endif () if (NOT DEFINED WAMR_BUILD_MULTI_MODULE) - # Enable multiple modules + # Disable multiple modules set (WAMR_BUILD_MULTI_MODULE 0) endif () diff --git a/product-mini/platforms/linux-sgx/enclave-sample/Enclave/Enclave.config.xml b/product-mini/platforms/linux-sgx/enclave-sample/Enclave/Enclave.config.xml index cb08e3479a..ea3a63f8f5 100644 --- a/product-mini/platforms/linux-sgx/enclave-sample/Enclave/Enclave.config.xml +++ b/product-mini/platforms/linux-sgx/enclave-sample/Enclave/Enclave.config.xml @@ -8,7 +8,8 @@ 1 10 1 - 0 + + 1 0 0xFFFFFFFF diff --git a/product-mini/platforms/linux-sgx/enclave-sample/Enclave/Enclave.cpp b/product-mini/platforms/linux-sgx/enclave-sample/Enclave/Enclave.cpp index 91f03a979e..dc3b6c3a24 100644 --- a/product-mini/platforms/linux-sgx/enclave-sample/Enclave/Enclave.cpp +++ b/product-mini/platforms/linux-sgx/enclave-sample/Enclave/Enclave.cpp @@ -81,6 +81,171 @@ static EnclaveModule *enclave_module_list = NULL; static korp_mutex enclave_module_list_lock = OS_THREAD_MUTEX_INITIALIZER; #endif +/* Handle table for secure EnclaveModule reference management */ +#define MAX_MODULES 128 +typedef struct HandleTableEntry { + uint32 id; + EnclaveModule *module_ref; + bool in_use; +} HandleTableEntry; + +static HandleTableEntry module_table[MAX_MODULES] = { 0 }; +static uint32 next_module_id = 1; +static korp_mutex module_table_lock = OS_THREAD_MUTEX_INITIALIZER; + +/* : Allocate secure handle for EnclaveModule, preventing pointer + * exposure */ +static uint32 +allocate_module_handle(EnclaveModule *module) +{ + uint32 handle_id = 0; + + os_mutex_lock(&module_table_lock); + + /* Find free slot */ + for (uint32 i = 0; i < MAX_MODULES; i++) { + if (!module_table[i].in_use) { + module_table[i].id = next_module_id++; + module_table[i].module_ref = module; + module_table[i].in_use = true; + handle_id = module_table[i].id; + break; + } + } + + os_mutex_unlock(&module_table_lock); + + if (handle_id == 0) { + int bytes_written = 0; + ocall_print(&bytes_written, + "SECURITY WARNING: Module handle table full\n"); + } + + return handle_id; +} + +/* Lookup EnclaveModule by handle ID, preventing direct pointer access */ +static EnclaveModule * +lookup_module_by_handle(uint32 handle_id) +{ + EnclaveModule *module = NULL; + + if (handle_id == 0) + return NULL; + + os_mutex_lock(&module_table_lock); + + for (uint32 i = 0; i < MAX_MODULES; i++) { + if (module_table[i].in_use && module_table[i].id == handle_id) { + module = module_table[i].module_ref; + break; + } + } + + os_mutex_unlock(&module_table_lock); + + return module; +} + +static void +release_module_handle(uint32 handle_id) +{ + os_mutex_lock(&module_table_lock); + + for (uint32 i = 0; i < MAX_MODULES; i++) { + if (module_table[i].in_use && module_table[i].id == handle_id) { + module_table[i].id = 0; + module_table[i].module_ref = NULL; + module_table[i].in_use = false; + break; + } + } + + os_mutex_unlock(&module_table_lock); +} + +/* Handle table for secure wasm_module_inst_t reference management */ +#define MAX_INSTANCES 128 +typedef struct InstanceTableEntry { + uint32 id; + wasm_module_inst_t inst_ref; + bool in_use; +} InstanceTableEntry; + +static InstanceTableEntry instance_table[MAX_INSTANCES] = { 0 }; +static uint32 next_instance_id = 1; +static korp_mutex instance_table_lock = OS_THREAD_MUTEX_INITIALIZER; + +/*Allocate secure handle for wasm_module_inst_t, preventing pointer exposure */ +static uint32 +allocate_instance_handle(wasm_module_inst_t inst) +{ + uint32 handle_id = 0; + + os_mutex_lock(&instance_table_lock); + + for (uint32 i = 0; i < MAX_INSTANCES; i++) { + if (!instance_table[i].in_use) { + instance_table[i].id = next_instance_id++; + instance_table[i].inst_ref = inst; + instance_table[i].in_use = true; + handle_id = instance_table[i].id; + break; + } + } + + os_mutex_unlock(&instance_table_lock); + + if (handle_id == 0) { + int bytes_written = 0; + ocall_print(&bytes_written, + "SECURITY WARNING: Instance handle table full\n"); + } + + return handle_id; +} + +/* SECURITY: Lookup wasm_module_inst_t by handle ID, preventing direct pointer + * access */ +static wasm_module_inst_t +lookup_instance_by_handle(uint32 handle_id) +{ + wasm_module_inst_t inst = NULL; + + if (handle_id == 0) + return NULL; + + os_mutex_lock(&instance_table_lock); + + for (uint32 i = 0; i < MAX_INSTANCES; i++) { + if (instance_table[i].in_use && instance_table[i].id == handle_id) { + inst = instance_table[i].inst_ref; + break; + } + } + + os_mutex_unlock(&instance_table_lock); + + return inst; +} + +static void +release_instance_handle(uint32 handle_id) +{ + os_mutex_lock(&instance_table_lock); + + for (uint32 i = 0; i < MAX_INSTANCES; i++) { + if (instance_table[i].in_use && instance_table[i].id == handle_id) { + instance_table[i].id = 0; + instance_table[i].inst_ref = NULL; + instance_table[i].in_use = false; + break; + } + } + + os_mutex_unlock(&instance_table_lock); +} + #if WASM_ENABLE_GLOBAL_HEAP_POOL != 0 static char global_heap_buf[WASM_GLOBAL_HEAP_SIZE] = { 0 }; #endif @@ -277,7 +442,17 @@ handle_cmd_load_module(uint64 *args, uint32 argc) return; } - *(EnclaveModule **)args_org = enclave_module; + uint32 enclave_module_id = allocate_module_handle(enclave_module); + if (enclave_module_id == 0) { + /* Handle table full - cleanup and return error */ + if (!enclave_module->is_xip_file) + wasm_runtime_free(enclave_module); + else + os_munmap(enclave_module, (uint32)total_size); + *(void **)args_org = NULL; + return; + } + *(uint32 *)args_org = enclave_module_id; #if WASM_ENABLE_LIB_RATS != 0 /* Calculate the module hash */ @@ -299,7 +474,8 @@ handle_cmd_load_module(uint64 *args, uint32 argc) static void handle_cmd_unload_module(uint64 *args, uint32 argc) { - EnclaveModule *enclave_module = *(EnclaveModule **)args++; + uint32 module_handle_id = *(uint32 *)args++; + EnclaveModule *enclave_module = lookup_module_by_handle(module_handle_id); bh_assert(argc == 1); @@ -328,6 +504,9 @@ handle_cmd_unload_module(uint64 *args, uint32 argc) os_mutex_unlock(&enclave_module_list_lock); #endif + /* Release module handle */ + release_module_handle(module_handle_id); + /* Destroy enclave module resources */ if (enclave_module->wasi_arg_buf) wasm_runtime_free(enclave_module->wasi_arg_buf); @@ -368,7 +547,8 @@ static void handle_cmd_instantiate_module(uint64 *args, uint32 argc) { uint64 *args_org = args; - EnclaveModule *enclave_module = *(EnclaveModule **)args++; + uint32 module_handle_id = *(uint32 *)args++; + EnclaveModule *enclave_module = lookup_module_by_handle(module_handle_id); uint32 stack_size = *(uint32 *)args++; uint32 heap_size = *(uint32 *)args++; char *error_buf = *(char **)args++; @@ -377,7 +557,7 @@ handle_cmd_instantiate_module(uint64 *args, uint32 argc) bh_assert(argc == 5); - if (!runtime_inited) { + if (!runtime_inited || !enclave_module) { *(void **)args_org = NULL; return; } @@ -389,7 +569,13 @@ handle_cmd_instantiate_module(uint64 *args, uint32 argc) return; } - *(wasm_module_inst_t *)args_org = module_inst; + uint32 instance_id = allocate_instance_handle(module_inst); + if (instance_id == 0) { + wasm_runtime_deinstantiate(module_inst); + *(void **)args_org = NULL; + return; + } + *(uint32 *)args_org = instance_id; LOG_VERBOSE("Instantiate module success.\n"); } @@ -397,7 +583,9 @@ handle_cmd_instantiate_module(uint64 *args, uint32 argc) static void handle_cmd_deinstantiate_module(uint64 *args, uint32 argc) { - wasm_module_inst_t module_inst = *(wasm_module_inst_t *)args++; + uint32 instance_handle_id = *(uint32 *)args++; + wasm_module_inst_t module_inst = + lookup_instance_by_handle(instance_handle_id); bh_assert(argc == 1); @@ -407,6 +595,8 @@ handle_cmd_deinstantiate_module(uint64 *args, uint32 argc) wasm_runtime_deinstantiate(module_inst); + release_instance_handle(instance_handle_id); + LOG_VERBOSE("Deinstantiate module success.\n"); } @@ -414,7 +604,9 @@ static void handle_cmd_get_exception(uint64 *args, uint32 argc) { uint64 *args_org = args; - wasm_module_inst_t module_inst = *(wasm_module_inst_t *)args++; + uint32 instance_handle_id = *(uint32 *)args++; + wasm_module_inst_t module_inst = + lookup_instance_by_handle(instance_handle_id); char *exception = *(char **)args++; uint32 exception_size = *(uint32 *)args++; const char *exception1; @@ -438,7 +630,9 @@ handle_cmd_get_exception(uint64 *args, uint32 argc) static void handle_cmd_exec_app_main(uint64 *args, int32 argc) { - wasm_module_inst_t module_inst = *(wasm_module_inst_t *)args++; + uint32 instance_handle_id = *(uint32 *)args++; + wasm_module_inst_t module_inst = + lookup_instance_by_handle(instance_handle_id); uint32 app_argc = *(uint32 *)args++; char **app_argv = NULL; uint64 total_size; @@ -471,7 +665,9 @@ handle_cmd_exec_app_main(uint64 *args, int32 argc) static void handle_cmd_exec_app_func(uint64 *args, int32 argc) { - wasm_module_inst_t module_inst = *(wasm_module_inst_t *)args++; + uint32 instance_handle_id = *(uint32 *)args++; + wasm_module_inst_t module_inst = + lookup_instance_by_handle(instance_handle_id); char *func_name = *(char **)args++; uint32 app_argc = *(uint32 *)args++; char **app_argv = NULL; @@ -515,7 +711,8 @@ static void handle_cmd_set_wasi_args(uint64 *args, int32 argc) { uint64 *args_org = args; - EnclaveModule *enclave_module = *(EnclaveModule **)args++; + uint32 module_handle_id = *(uint32 *)args++; + EnclaveModule *enclave_module = lookup_module_by_handle(module_handle_id); char **dir_list = *(char ***)args++; uint32 dir_list_size = *(uint32 *)args++; char **env_list = *(char ***)args++; @@ -533,7 +730,48 @@ handle_cmd_set_wasi_args(uint64 *args, int32 argc) bh_assert(argc == 10); - if (!runtime_inited) { + if (!runtime_inited || !enclave_module) { + *args_org = false; + return; + } + + /* Validate all pointer arrays before use */ + if (dir_list_size > 0 + && (!dir_list + || !sgx_is_outside_enclave(dir_list, + sizeof(char *) * dir_list_size))) { + int bytes_written = 0; + ocall_print(&bytes_written, "SECURITY ERROR: Invalid dir_list\n"); + *args_org = false; + return; + } + + if (env_list_size > 0 + && (!env_list + || !sgx_is_outside_enclave(env_list, + sizeof(char *) * env_list_size))) { + int bytes_written = 0; + ocall_print(&bytes_written, "SECURITY ERROR: Invalid env_list\n"); + *args_org = false; + return; + } + + if (wasi_argc > 0 + && (!wasi_argv + || !sgx_is_outside_enclave(wasi_argv, + sizeof(char *) * wasi_argc))) { + int bytes_written = 0; + ocall_print(&bytes_written, "SECURITY ERROR: Invalid wasi_argv\n"); + *args_org = false; + return; + } + + if (addr_pool_list_size > 0 + && (!addr_pool_list + || !sgx_is_outside_enclave(addr_pool_list, + sizeof(char *) * addr_pool_list_size))) { + int bytes_written = 0; + ocall_print(&bytes_written, "SECURITY ERROR: Invalid addr_pool_list\n"); *args_org = false; return; } @@ -695,9 +933,38 @@ void ecall_handle_command(unsigned cmd, unsigned char *cmd_buf, unsigned cmd_buf_size) { + /* + * Validate buffer before processing + * cmd_buf can be NULL if cmd_buf_size is 0, but if cmd_buf_size is + * non-zero, cmd_buf must be valid + */ + if ((!cmd_buf && cmd_buf_size > 0) || (cmd_buf && cmd_buf_size == 0)) { + int bytes_written = 0; + ocall_print(&bytes_written, + "SECURITY ERROR: Invalid buffer parameters\n"); + return; + } + + // Because of [in, out] cmd_buf in edl, it is allocated inside enclave. + if (cmd_buf && sgx_is_outside_enclave(cmd_buf, cmd_buf_size)) { + int bytes_written = 0; + ocall_print(&bytes_written, + "SECURITY ERROR: Buffer should be inside enclave\n"); + return; + } + + if (cmd_buf_size % sizeof(uint64) != 0) { + int bytes_written = 0; + ocall_print(&bytes_written, + "SECURITY ERROR: Buffer alignment invalid\n"); + return; + } + uint64 *args = (uint64 *)cmd_buf; uint32 argc = cmd_buf_size / sizeof(uint64); + LOG_VERBOSE("Received command %d with %u arguments.\n", cmd, argc); + switch (cmd) { case CMD_INIT_RUNTIME: handle_cmd_init_runtime(args, argc); diff --git a/product-mini/platforms/linux-sgx/enclave-sample/Enclave/Enclave.edl b/product-mini/platforms/linux-sgx/enclave-sample/Enclave/Enclave.edl index 0de4c6404a..5fe69a8d3f 100644 --- a/product-mini/platforms/linux-sgx/enclave-sample/Enclave/Enclave.edl +++ b/product-mini/platforms/linux-sgx/enclave-sample/Enclave/Enclave.edl @@ -18,6 +18,7 @@ enclave { from "sgx_tprotected_fs.edl" import *; #endif + //TODO: replace void with an int as error code trusted { /* define ECALLs here. */ public void ecall_handle_command(unsigned cmd, diff --git a/product-mini/platforms/linux/CMakeLists.txt b/product-mini/platforms/linux/CMakeLists.txt index e369197dc9..a0c0675d52 100644 --- a/product-mini/platforms/linux/CMakeLists.txt +++ b/product-mini/platforms/linux/CMakeLists.txt @@ -139,14 +139,6 @@ check_pie_supported() set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections") -if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64") - if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mindirect-branch-register") - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mindirect-branch-register") - # UNDEFINED BEHAVIOR, refer to https://en.cppreference.com/w/cpp/language/ub - endif () -endif () - # The following flags are to enhance security, but it may impact performance, # we disable them by default. #if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64") diff --git a/product-mini/platforms/posix/main.c b/product-mini/platforms/posix/main.c index f013ec9d0b..2d7d3afeb8 100644 --- a/product-mini/platforms/posix/main.c +++ b/product-mini/platforms/posix/main.c @@ -962,10 +962,6 @@ main(int argc, char *argv[]) } #endif -#if WASM_ENABLE_LIBC_WASI != 0 - libc_wasi_init(wasm_module, argc, argv, &wasi_parse_ctx); -#endif - if (!wasm_runtime_instantiation_args_create(&inst_args)) { printf("failed to create instantiate args\n"); goto fail3; @@ -974,6 +970,9 @@ main(int argc, char *argv[]) stack_size); wasm_runtime_instantiation_args_set_host_managed_heap_size(inst_args, heap_size); +#if WASM_ENABLE_LIBC_WASI != 0 + libc_wasi_set_init_args(inst_args, argc, argv, &wasi_parse_ctx); +#endif /* instantiate the module */ wasm_module_inst = wasm_runtime_instantiate_ex2( diff --git a/product-mini/platforms/rt-thread/iwasm.c b/product-mini/platforms/rt-thread/iwasm.c index 39ddfaebb7..56905fbc60 100644 --- a/product-mini/platforms/rt-thread/iwasm.c +++ b/product-mini/platforms/rt-thread/iwasm.c @@ -380,7 +380,7 @@ iwasm(int argc, char **argv) wasm_runtime_instantiation_args_set_host_managed_heap_size(inst_args, heap_size); #if WASM_ENABLE_LIBC_WASI != 0 - libc_wasi_init(wasm_module, argc, argv, &wasi_parse_ctx); + libc_wasi_set_init_args(wasm_module, argc, argv, &wasi_parse_ctx); #endif rt_memset(error_buf, 0x00, sizeof(error_buf)); diff --git a/product-mini/platforms/windows/CMakeLists.txt b/product-mini/platforms/windows/CMakeLists.txt index 39b373deb0..326c2cf6cf 100644 --- a/product-mini/platforms/windows/CMakeLists.txt +++ b/product-mini/platforms/windows/CMakeLists.txt @@ -114,12 +114,6 @@ if (NOT MINGW) set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO") endif () -if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64") - if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang" OR MSVC)) - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mindirect-branch-register") - endif () -endif () - # The following flags are to enhance security, but it may impact performance, # we disable them by default. #if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64") diff --git a/product-mini/platforms/windows/main.c b/product-mini/platforms/windows/main.c index 4be3a76cbe..a19c50d064 100644 --- a/product-mini/platforms/windows/main.c +++ b/product-mini/platforms/windows/main.c @@ -598,10 +598,6 @@ main(int argc, char *argv[]) goto fail2; } -#if WASM_ENABLE_LIBC_WASI != 0 - libc_wasi_init(wasm_module, argc, argv, &wasi_parse_ctx); -#endif - if (!wasm_runtime_instantiation_args_create(&inst_args)) { printf("failed to create instantiate args\n"); goto fail3; @@ -610,6 +606,9 @@ main(int argc, char *argv[]) stack_size); wasm_runtime_instantiation_args_set_host_managed_heap_size(inst_args, heap_size); +#if WASM_ENABLE_LIBC_WASI != 0 + libc_wasi_set_init_args(inst_args, argc, argv, &wasi_parse_ctx); +#endif /* instantiate the module */ wasm_module_inst = wasm_runtime_instantiate_ex2( diff --git a/samples/basic/CMakeLists.txt b/samples/basic/CMakeLists.txt index e7417e634c..244ed81c11 100644 --- a/samples/basic/CMakeLists.txt +++ b/samples/basic/CMakeLists.txt @@ -60,11 +60,6 @@ if (NOT MSVC) if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections") endif () - if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64") - if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mindirect-branch-register") - endif () - endif () endif () # build out vmlib diff --git a/samples/file/src/CMakeLists.txt b/samples/file/src/CMakeLists.txt index d54e93c082..11cbd5ac1e 100644 --- a/samples/file/src/CMakeLists.txt +++ b/samples/file/src/CMakeLists.txt @@ -61,11 +61,6 @@ if (NOT MSVC) if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections") endif () - if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64") - if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mindirect-branch-register") - endif () - endif () endif () # build out vmlib diff --git a/samples/import-func-callback/CMakeLists.txt b/samples/import-func-callback/CMakeLists.txt index be0cc5032a..64a4ddc7b0 100644 --- a/samples/import-func-callback/CMakeLists.txt +++ b/samples/import-func-callback/CMakeLists.txt @@ -53,11 +53,6 @@ if (NOT MSVC) set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections") endif () set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wformat -Wformat-security") - if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64") - if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mindirect-branch-register") - endif () - endif () endif () # build out vmlib diff --git a/samples/inst-context-threads/CMakeLists.txt b/samples/inst-context-threads/CMakeLists.txt index b32d3053bf..6d4b1e8565 100644 --- a/samples/inst-context-threads/CMakeLists.txt +++ b/samples/inst-context-threads/CMakeLists.txt @@ -61,11 +61,6 @@ if (NOT MSVC) if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections") endif () - if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64") - if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mindirect-branch-register") - endif () - endif () endif () # build out vmlib diff --git a/samples/inst-context/CMakeLists.txt b/samples/inst-context/CMakeLists.txt index b9866a5ebd..91584ad9c3 100644 --- a/samples/inst-context/CMakeLists.txt +++ b/samples/inst-context/CMakeLists.txt @@ -60,11 +60,6 @@ if (NOT MSVC) if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections") endif () - if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64") - if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mindirect-branch-register") - endif () - endif () endif () # build out vmlib diff --git a/samples/multi-module/CMakeLists.txt b/samples/multi-module/CMakeLists.txt index 7d0499e4cc..c823e517bc 100644 --- a/samples/multi-module/CMakeLists.txt +++ b/samples/multi-module/CMakeLists.txt @@ -65,11 +65,6 @@ set(WAMR_BUILD_MULTI_MODULE 1) if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections") endif () -if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64") - if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mindirect-branch-register") - endif () -endif () # build out vmlib set(WAMR_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/../..) diff --git a/samples/native-stack-overflow/CMakeLists.txt b/samples/native-stack-overflow/CMakeLists.txt index a2079bf4f5..48ffd4f5b8 100644 --- a/samples/native-stack-overflow/CMakeLists.txt +++ b/samples/native-stack-overflow/CMakeLists.txt @@ -60,11 +60,6 @@ if (NOT MSVC) if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections") endif () - if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64") - if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mindirect-branch-register") - endif () - endif () endif () if (CMAKE_C_COMPILER_ID MATCHES "Clang" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER 13.0.0) diff --git a/samples/ref-types/CMakeLists.txt b/samples/ref-types/CMakeLists.txt index 0d0852a2ee..13807444d6 100644 --- a/samples/ref-types/CMakeLists.txt +++ b/samples/ref-types/CMakeLists.txt @@ -74,11 +74,6 @@ if (NOT MSVC) if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections") endif () - if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64") - if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mindirect-branch-register") - endif () - endif () endif() # build out vmlib set(WAMR_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/../..) diff --git a/samples/shared-heap/CMakeLists.txt b/samples/shared-heap/CMakeLists.txt index 94690a4ed5..89e79a5b3f 100644 --- a/samples/shared-heap/CMakeLists.txt +++ b/samples/shared-heap/CMakeLists.txt @@ -61,11 +61,6 @@ if (NOT MSVC) if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections") endif () - if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64") - if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mindirect-branch-register") - endif () - endif () endif () # build out vmlib diff --git a/samples/shared-module/CMakeLists.txt b/samples/shared-module/CMakeLists.txt index 4c9201e51c..552aa93156 100644 --- a/samples/shared-module/CMakeLists.txt +++ b/samples/shared-module/CMakeLists.txt @@ -65,11 +65,6 @@ if (NOT MSVC) if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections") endif () - if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64") - if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mindirect-branch-register") - endif () - endif () endif () # build out vmlib diff --git a/samples/terminate/CMakeLists.txt b/samples/terminate/CMakeLists.txt index 3807332588..80b8fb688c 100644 --- a/samples/terminate/CMakeLists.txt +++ b/samples/terminate/CMakeLists.txt @@ -68,11 +68,6 @@ if (NOT MSVC) if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections") endif () - if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64") - if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mindirect-branch-register") - endif () - endif () endif () # build out vmlib diff --git a/samples/wasm-c-api/CMakeLists.txt b/samples/wasm-c-api/CMakeLists.txt index c15cd28026..fb95a06287 100644 --- a/samples/wasm-c-api/CMakeLists.txt +++ b/samples/wasm-c-api/CMakeLists.txt @@ -66,9 +66,12 @@ if(NOT DEFINED WAMR_BUILD_JIT) set(WAMR_BUILD_JIT 0) endif() +if(NOT DEFINED WAMR_BUILD_MULTI_MODULE) + set(WAMR_BUILD_MULTI_MODULE 1) +endif() + set(WAMR_BUILD_LIBC_BUILTIN 1) set(WAMR_BUILD_LIBC_WASI 0) -set(WAMR_BUILD_MULTI_MODULE 1) set(WAMR_BUILD_DUMP_CALL_STACK 1) set(WAMR_BUILD_REF_TYPES 1) @@ -86,11 +89,6 @@ if (NOT MSVC) if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections") endif () - if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64") - if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mindirect-branch-register") - endif () - endif () endif() # build out vmlib set(WAMR_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/../..) diff --git a/test-tools/aot-analyzer/CMakeLists.txt b/test-tools/aot-analyzer/CMakeLists.txt index 04d3b636ce..9c317a6e6b 100644 --- a/test-tools/aot-analyzer/CMakeLists.txt +++ b/test-tools/aot-analyzer/CMakeLists.txt @@ -61,12 +61,6 @@ if (NOT DEFINED WAMR_BIG_ENDIAN) set (WAMR_BIG_ENDIAN 0) endif () -if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64") - if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mindirect-branch-register") - endif () -endif () - # build out vmlib set (WAMR_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/../..) include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake) diff --git a/tests/fuzz/wasm-mutator-fuzz/CMakeLists.txt b/tests/fuzz/wasm-mutator-fuzz/CMakeLists.txt index 500ad8fe3c..de0f6aebb8 100644 --- a/tests/fuzz/wasm-mutator-fuzz/CMakeLists.txt +++ b/tests/fuzz/wasm-mutator-fuzz/CMakeLists.txt @@ -172,21 +172,19 @@ set(IWASM_DIR ${REPO_ROOT_DIR}/core/iwasm) # Global setting add_compile_options(-Wno-unused-command-line-argument) -# Enable fuzzer -add_definitions(-DWASM_ENABLE_FUZZ_TEST=1) -# '-fsanitize=vptr' not allowed with '-fno-rtti -# But, LLVM by default, disables the use of `rtti` in the compiler -add_compile_options(-fsanitize=fuzzer -fno-sanitize=vptr) -add_link_options(-fsanitize=fuzzer -fno-sanitize=vptr) - # Enable sanitizers if not in oss-fuzz environment set(CFLAGS_ENV $ENV{CFLAGS}) -string(FIND "${CFLAGS_ENV}" "-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION" FUZZ_POS) + string(FIND "${CFLAGS_ENV}" "-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION" FUZZ_POS) if (FUZZ_POS GREATER -1) set(IN_OSS_FUZZ 1) else() set(IN_OSS_FUZZ 0) endif() +# Enable fuzzer +add_definitions(-DWASM_ENABLE_FUZZ_TEST=1) + +include(${CMAKE_CURRENT_LIST_DIR}/sanitizer_flags.cmake) + add_subdirectory(aot-compiler) add_subdirectory(wasm-mutator) diff --git a/tests/fuzz/wasm-mutator-fuzz/README.md b/tests/fuzz/wasm-mutator-fuzz/README.md index 09fd757be4..26029d15cd 100644 --- a/tests/fuzz/wasm-mutator-fuzz/README.md +++ b/tests/fuzz/wasm-mutator-fuzz/README.md @@ -48,36 +48,3 @@ $ ./build/wasm-mutator/wasm_mutator_fuzz ./build/CORPUS_DIR $ ./build/aot-compiler/aot_compiler_fuzz ./build/CORPUS_DIR ```` - -## Fuzzing Server - -```shell -1. Installation Dependent Environment -$ cd server -$ pip install -r requirements.txt - -2. Database Migration -$ python3 app/manager.py db init -$ python3 app/manager.py db migrate -$ python3 app/manager.py db upgrade - -3. Change localhost to your machine's IP address -$ cd ../portal -$ vim .env # Change localhost to your machine's IP address # http://:16667 - -4. Run Server and Portal -$ cd .. # Switch to the original directory -If you want to customize the front-end deployment port: # defaut 9999 - $ vim .env # Please change the portal_port to the port you want to use - -The server is deployed on port 16667 by default, If you want to change the server deployment port: - $ vim .env # Please change the server_port to the port you want to use - $ vim portal/.env # Please change the VITE_SERVER_URL to the port you want to use # http://ip: - - -If your network needs to set up a proxy - $ vim .env # Change proxy to your proxy address - -$ docker-compose up --build -d -Wait for completion, Access the port set by env -``` diff --git a/tests/fuzz/wasm-mutator-fuzz/aot-compiler/CMakeLists.txt b/tests/fuzz/wasm-mutator-fuzz/aot-compiler/CMakeLists.txt index 5ca33906a5..120902dafc 100644 --- a/tests/fuzz/wasm-mutator-fuzz/aot-compiler/CMakeLists.txt +++ b/tests/fuzz/wasm-mutator-fuzz/aot-compiler/CMakeLists.txt @@ -1,12 +1,6 @@ # Copyright (C) 2025 Intel Corporation. All rights reserved. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -# Set default build options with the ability to override from the command line -if(NOT WAMR_BUILD_INTERP) - set(WAMR_BUILD_INTERP 1) -endif() - -set(WAMR_BUILD_WAMR_COMPILER 1) set(WAMR_BUILD_AOT 0) set(WAMR_BUILD_INTERP 1) set(WAMR_BUILD_JIT 0) @@ -67,17 +61,6 @@ target_link_directories(aotclib PUBLIC ${LLVM_LIBRARY_DIR}) target_link_libraries(aotclib PUBLIC ${REQUIRED_LLVM_LIBS}) -if(NOT IN_OSS_FUZZ) - message(STATUS "Enable ASan and UBSan in non-oss-fuzz environment for aotclib") - target_compile_options(aotclib PUBLIC - -fprofile-instr-generate -fcoverage-mapping - -fno-sanitize-recover=all - -fsanitize=address,undefined - -fsanitize=float-divide-by-zero,unsigned-integer-overflow,local-bounds,nullability - -fno-sanitize=alignment - ) - target_link_options(aotclib PUBLIC -fsanitize=address,undefined -fprofile-instr-generate) -endif() - -add_executable(aot_compiler_fuzz aot_compiler_fuzz.cc) +add_executable(aot_compiler_fuzz aot_compiler_fuzz.cc ../common/fuzzer_common.cc) +target_include_directories(aot_compiler_fuzz PRIVATE ../common) target_link_libraries(aot_compiler_fuzz PRIVATE stdc++ aotclib) diff --git a/tests/fuzz/wasm-mutator-fuzz/aot-compiler/aot_compiler_fuzz.cc b/tests/fuzz/wasm-mutator-fuzz/aot-compiler/aot_compiler_fuzz.cc index c8ec4c0d52..49f275b189 100644 --- a/tests/fuzz/wasm-mutator-fuzz/aot-compiler/aot_compiler_fuzz.cc +++ b/tests/fuzz/wasm-mutator-fuzz/aot-compiler/aot_compiler_fuzz.cc @@ -11,6 +11,7 @@ #include "aot_export.h" #include "wasm_export.h" #include "bh_read_file.h" +#include "../common/fuzzer_common.h" static void handle_aot_recent_error(const char *tag) @@ -26,32 +27,41 @@ handle_aot_recent_error(const char *tag) extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { + char kTargetArch[] = "x86_64"; + char kTargetAbi[] = "gnu"; wasm_module_t module = NULL; - char error_buf[128] = { 0 }; + char error_buf[ERROR_BUF_SIZE] = { 0 }; AOTCompOption option = { 0 }; aot_comp_data_t comp_data = NULL; aot_comp_context_t comp_ctx = NULL; + uint8 *aot_file_buf = NULL; + uint32 aot_file_size = 0; + wasm_module_t aot_module = NULL; + wasm_module_inst_t inst = NULL; - /* libfuzzer don't allow to modify the given Data, so make a copy here */ - std::vector myData(Data, Data + Size); + /* wasm_runtime_load may modify the input buffer in-place, + * so we must work on a copy to avoid overwriting libFuzzer's const input */ + std::vector data_copy(Data, Data + Size); if (Size >= 4 - && get_package_type(myData.data(), Size) != Wasm_Module_Bytecode) { + && get_package_type(data_copy.data(), Size) + != Wasm_Module_Bytecode) { printf("Invalid wasm file: magic header not detected\n"); return 0; } wasm_runtime_init(); - module = wasm_runtime_load((uint8_t *)myData.data(), Size, error_buf, 120); + module = wasm_runtime_load(data_copy.data(), Size, error_buf, + MAX_ERROR_BUF_SIZE); if (!module) { std::cout << "[LOADING] " << error_buf << std::endl; goto DESTROY_RUNTIME; } // TODO: target_arch and other fields - option.target_arch = "x86_64"; - option.target_abi = "gnu"; + option.target_arch = kTargetArch; + option.target_abi = kTargetAbi; option.enable_bulk_memory = true; option.enable_thread_mgr = true; option.enable_tail_call = true; @@ -78,6 +88,34 @@ LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) goto DESTROY_COMP_CTX; } + aot_file_buf = aot_emit_aot_file_buf(comp_ctx, comp_data, &aot_file_size); + if (!aot_file_buf) { + handle_aot_recent_error("[EMITTING AOT FILE]"); + goto DESTROY_COMP_CTX; + } + + aot_module = wasm_runtime_load(aot_file_buf, aot_file_size, error_buf, + ERROR_BUF_SIZE); + if (!aot_module) { + std::cout << "[LOADING AOT MODULE] " << error_buf << std::endl; + goto RELEASE_AOT_FILE_BUF; + } + + inst = wasm_runtime_instantiate(aot_module, 1024 * 8, 0, error_buf, + ERROR_BUF_SIZE); + if (!inst) { + std::cout << "[INSTANTIATING AOT MODULE] " << error_buf << std::endl; + goto UNLOAD_AOT_MODULE; + } + + execute_export_functions(module, inst); + +DEINSTANTIZE_AOT_MODULE: + wasm_runtime_deinstantiate(inst); +UNLOAD_AOT_MODULE: + wasm_runtime_unload(aot_module); +RELEASE_AOT_FILE_BUF: + wasm_runtime_free(aot_file_buf); DESTROY_COMP_CTX: aot_destroy_comp_context(comp_ctx); DESTROY_COMP_DATA: diff --git a/tests/fuzz/wasm-mutator-fuzz/common/fuzzer_common.cc b/tests/fuzz/wasm-mutator-fuzz/common/fuzzer_common.cc new file mode 100644 index 0000000000..9a25c118d1 --- /dev/null +++ b/tests/fuzz/wasm-mutator-fuzz/common/fuzzer_common.cc @@ -0,0 +1,145 @@ +// Copyright (C) 2025 Intel Corporation. All rights reserved. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +#include "fuzzer_common.h" +#include +#include + +void +print_execution_args(const wasm_export_t &export_type, + const std::vector &args, unsigned param_count) +{ + std::cout << "[EXECUTION] " << export_type.name << "("; + for (unsigned p_i = 0; p_i < param_count; p_i++) { + if (p_i != 0) { + std::cout << ", "; + } + + switch (args[p_i].kind) { + case WASM_I32: + std::cout << "i32:" << args[p_i].of.i32; + break; + case WASM_I64: + std::cout << "i64:" << args[p_i].of.i64; + break; + case WASM_F32: + std::cout << "f32:" << args[p_i].of.f32; + break; + case WASM_F64: + std::cout << "f64:" << args[p_i].of.f64; + break; + case WASM_EXTERNREF: + std::cout << "externref:" << args[p_i].of.foreign; + break; + default: + // because aft is_supported_val_kind() check, so we can safely + // return as WASM_FUNCREF + std::cout << "funcref:" << args[p_i].of.ref; + break; + } + } + std::cout << ")" << std::endl; +} + +bool +execute_export_functions(wasm_module_t module, wasm_module_inst_t inst) +{ + int32_t export_count = wasm_runtime_get_export_count(module); + + for (int e_i = 0; e_i < export_count; e_i++) { + wasm_export_t export_type; + + memset(&export_type, 0, sizeof(export_type)); + wasm_runtime_get_export_type(module, e_i, &export_type); + + if (export_type.kind != WASM_IMPORT_EXPORT_KIND_FUNC) { + continue; + } + + wasm_function_inst_t func = + wasm_runtime_lookup_function(inst, export_type.name); + if (!func) { + std::cout << "Failed to lookup function: " << export_type.name + << std::endl; + continue; + } + + wasm_func_type_t func_type = export_type.u.func_type; + uint32_t param_count = wasm_func_type_get_param_count(func_type); + + /* build arguments with capacity reservation */ + std::vector args; + args.reserve(param_count); // Optimization: prevent reallocations + for (unsigned p_i = 0; p_i < param_count; p_i++) { + wasm_valkind_t param_type = + wasm_func_type_get_param_valkind(func_type, p_i); + + if (!is_supported_val_kind(param_type)) { + std::cout + << "Bypass execution because of unsupported value kind: " + << param_type << std::endl; + return true; + } + + wasm_val_t arg = pre_defined_val(param_type); + args.push_back(arg); + } + + /* build results storage */ + uint32_t result_count = wasm_func_type_get_result_count(func_type); + std::vector results( + result_count); // Optimization: direct initialization + + print_execution_args(export_type, args, param_count); + + /* execute the function */ + wasm_exec_env_t exec_env = wasm_runtime_get_exec_env_singleton(inst); + if (!exec_env) { + std::cout << "Failed to get exec env" << std::endl; + return false; + } + + bool ret = + wasm_runtime_call_wasm_a(exec_env, func, result_count, + results.data(), param_count, args.data()); + if (!ret) { + const char *exception = wasm_runtime_get_exception(inst); + if (!exception) { + std::cout << "[EXECUTION] " << export_type.name + << "() failed. No exception info." << std::endl; + } + else { + std::cout << "[EXECUTION] " << export_type.name << "() failed. " + << exception << std::endl; + } + } + + wasm_runtime_clear_exception(inst); + } + + return true; +} + +void +report_fuzzer_error(FuzzerErrorPhase phase, const char *message) +{ + const char *phase_name = ""; + switch (phase) { + case FuzzerErrorPhase::LOADING: + phase_name = "LOADING"; + break; + case FuzzerErrorPhase::INSTANTIATING: + phase_name = "INSTANTIATING"; + break; + case FuzzerErrorPhase::COMPILING: + phase_name = "COMPILING"; + break; + case FuzzerErrorPhase::EXECUTION: + phase_name = "EXECUTION"; + break; + case FuzzerErrorPhase::CLEANUP: + phase_name = "CLEANUP"; + break; + } + std::cout << "[" << phase_name << "] " << message << std::endl; +} \ No newline at end of file diff --git a/tests/fuzz/wasm-mutator-fuzz/common/fuzzer_common.h b/tests/fuzz/wasm-mutator-fuzz/common/fuzzer_common.h new file mode 100644 index 0000000000..365562c901 --- /dev/null +++ b/tests/fuzz/wasm-mutator-fuzz/common/fuzzer_common.h @@ -0,0 +1,77 @@ +// Copyright (C) 2025 Intel Corporation. All rights reserved. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +#ifndef FUZZER_COMMON_H +#define FUZZER_COMMON_H + +#include "wasm_export.h" +#include +#include + +// Constants for consistent buffer sizes +constexpr size_t ERROR_BUF_SIZE = 128; +constexpr size_t MAX_ERROR_BUF_SIZE = 120; // Used in wasm_runtime_load + +// Error phases for consistent reporting +enum class FuzzerErrorPhase { + LOADING, + INSTANTIATING, + COMPILING, + EXECUTION, + CLEANUP +}; + +// Small inline helper functions + +// Check if a value kind is supported by the fuzzer +static inline bool +is_supported_val_kind(wasm_valkind_t kind) +{ + return kind == WASM_I32 || kind == WASM_I64 || kind == WASM_F32 + || kind == WASM_F64 || kind == WASM_EXTERNREF + || kind == WASM_FUNCREF; +} + +// Generate a predefined value for a given value kind +static inline wasm_val_t +pre_defined_val(wasm_valkind_t kind) +{ + if (kind == WASM_I32) { + return wasm_val_t{ .kind = WASM_I32, .of = { .i32 = 2025 } }; + } + else if (kind == WASM_I64) { + return wasm_val_t{ .kind = WASM_I64, .of = { .i64 = 168 } }; + } + else if (kind == WASM_F32) { + return wasm_val_t{ .kind = WASM_F32, .of = { .f32 = 3.14159f } }; + } + else if (kind == WASM_F64) { + return wasm_val_t{ .kind = WASM_F64, .of = { .f64 = 2.71828 } }; + } + else if (kind == WASM_EXTERNREF) { + return wasm_val_t{ .kind = WASM_EXTERNREF, + .of = { .foreign = 0xabcddead } }; + } + // because aft is_supported_val_kind() check, so we can safely return as + // WASM_FUNCREF + else { + return wasm_val_t{ .kind = WASM_FUNCREF, .of = { .ref = nullptr } }; + } +} + +// Function declarations (implemented in fuzzer_common.cc) + +// Print execution arguments for debugging +void +print_execution_args(const wasm_export_t &export_type, + const std::vector &args, unsigned param_count); + +// Execute all export functions in a module +bool +execute_export_functions(wasm_module_t module, wasm_module_inst_t inst); + +// Helper for consistent error reporting +void +report_fuzzer_error(FuzzerErrorPhase phase, const char *message); + +#endif // FUZZER_COMMON_H \ No newline at end of file diff --git a/tests/fuzz/wasm-mutator-fuzz/docker-compose.yml b/tests/fuzz/wasm-mutator-fuzz/docker-compose.yml deleted file mode 100644 index 07d0a1a6c8..0000000000 --- a/tests/fuzz/wasm-mutator-fuzz/docker-compose.yml +++ /dev/null @@ -1,29 +0,0 @@ -# yaml configuration -services: - web: - platform: linux/amd64 - container_name: fuzz_web - build: - context: ./portal - dockerfile: Dockerfile - args: - - proxy=${proxy} - volumes: - - "./portal:/portal" - ports: - - "${portal_port}:80" - server: - build: - context: ../../.. - dockerfile: ./tests/fuzz/wasm-mutator-fuzz/server/Dockerfile - args: - - proxy=${proxy} - ports: - - "${server_port}:16667" - container_name: fuzz_server - volumes: - - "./server/app/data.db:/wamr-test/tests/fuzz/wasm-mutator-fuzz/server/app/data.db" - - "./workspace:/wamr-test/tests/fuzz/wasm-mutator-fuzz/workspace" - environment: - - "TZ=Asia/Shanghai" - restart: on-failure diff --git a/tests/fuzz/wasm-mutator-fuzz/portal/.env b/tests/fuzz/wasm-mutator-fuzz/portal/.env deleted file mode 100644 index 1e0ea14c69..0000000000 --- a/tests/fuzz/wasm-mutator-fuzz/portal/.env +++ /dev/null @@ -1 +0,0 @@ -VITE_SERVER_URL=http://localhost:16667 diff --git a/tests/fuzz/wasm-mutator-fuzz/portal/.gitignore b/tests/fuzz/wasm-mutator-fuzz/portal/.gitignore deleted file mode 100644 index a547bf36d8..0000000000 --- a/tests/fuzz/wasm-mutator-fuzz/portal/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* - -node_modules -dist -dist-ssr -*.local - -# Editor directories and files -.vscode/* -!.vscode/extensions.json -.idea -.DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? diff --git a/tests/fuzz/wasm-mutator-fuzz/portal/Dockerfile b/tests/fuzz/wasm-mutator-fuzz/portal/Dockerfile deleted file mode 100644 index 877f479115..0000000000 --- a/tests/fuzz/wasm-mutator-fuzz/portal/Dockerfile +++ /dev/null @@ -1,24 +0,0 @@ -FROM node:16 as builder - -WORKDIR /portal -COPY . . - -ARG proxy="" - -RUN if [ "$proxy" != "" ]; \ - then npm config set proxy "$proxy" && npm config set https-proxy "$proxy"; \ - else echo Do not set proxy; \ - fi -RUN npm install && chmod +x node_modules/.bin/tsc \ - && chmod +x node_modules/.bin/vite \ - && npm run build - -FROM nginx:alpine -WORKDIR /portal -COPY --from=builder /portal/dist/ /usr/share/nginx/html/ -RUN rm /etc/nginx/conf.d/default.conf -COPY nginx.conf /etc/nginx/nginx.conf -COPY default.conf.template /etc/nginx/conf.d - -# hadolint ignore=DL3025 -CMD /bin/sh -c "envsubst '80' < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf" && nginx -g 'daemon off;' \ No newline at end of file diff --git a/tests/fuzz/wasm-mutator-fuzz/portal/default.conf.template b/tests/fuzz/wasm-mutator-fuzz/portal/default.conf.template deleted file mode 100644 index f52689780a..0000000000 --- a/tests/fuzz/wasm-mutator-fuzz/portal/default.conf.template +++ /dev/null @@ -1,53 +0,0 @@ -server { - - listen 80 default_server; - - location ^~ / { - root /usr/share/nginx/html; - index index.html index.htm; - try_files $uri $uri/ /index.html; - } - - location @router { - rewrite ^.*$ /index.html last; # important! - } - - - location ~* \.(?:manifest|appcache|html?|xml|json)$ { - - root /usr/share/nginx/html; - - if ($request_uri ~* .*[.](manifest|appcache|xml|json)$) { - add_header Cache-Control "public, max-age=2592000"; - } - - if ($request_filename ~* ^.*[.](html|htm)$) { - add_header Cache-Control "public, no-cache"; - } - - expires -1; - } - - location ~* \.(?:js|css|map|jpg|png|svg|ico)$ { - root /usr/share/nginx/html; - try_files $uri =404; - - expires 1y; - access_log off; - - add_header Cache-Control "public"; - } - - location ~ ^.+\..+$ { - root /usr/share/nginx/html; - try_files $uri =404; - - include /etc/nginx/mime.types; - } - - error_page 500 502 503 504 /50x.html; - - location = /50x.html { - root /usr/share/nginx/html; - } -} \ No newline at end of file diff --git a/tests/fuzz/wasm-mutator-fuzz/portal/index.html b/tests/fuzz/wasm-mutator-fuzz/portal/index.html deleted file mode 100644 index 12b6c85a28..0000000000 --- a/tests/fuzz/wasm-mutator-fuzz/portal/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - WAMR fuzzing test system - - -
- - - diff --git a/tests/fuzz/wasm-mutator-fuzz/portal/nginx.conf b/tests/fuzz/wasm-mutator-fuzz/portal/nginx.conf deleted file mode 100644 index 5bc72147ec..0000000000 --- a/tests/fuzz/wasm-mutator-fuzz/portal/nginx.conf +++ /dev/null @@ -1,15 +0,0 @@ -error_log stderr; - -pid /var/run/nginx.pid; - -events { - worker_connections 1024; -} - -http { - access_log /dev/stdout; - server_tokens off; - - include /etc/nginx/mime.types; - include /etc/nginx/conf.d/*.conf; -} \ No newline at end of file diff --git a/tests/fuzz/wasm-mutator-fuzz/portal/osv-scanner.toml b/tests/fuzz/wasm-mutator-fuzz/portal/osv-scanner.toml deleted file mode 100644 index b1b7145dec..0000000000 --- a/tests/fuzz/wasm-mutator-fuzz/portal/osv-scanner.toml +++ /dev/null @@ -1,59 +0,0 @@ -# GHSA-67hx-6x53-jw92 -[[PackageOverrides]] -name = "@babel/traverse" -ecosystem = "npm" -ignore = true -reason = "Accepted known vulnerabilities for testing purposes" - -# GHSA-67hx-6x53-jw92 -[[PackageOverrides]] -name = "babel-traverse" -ecosystem = "npm" -ignore = true -reason = "Accepted known vulnerabilities for testing purposes" - -# GHSA-9c47-m6qq-7p4h -[[PackageOverrides]] -name = "json5" -ecosystem = "npm" -ignore = true -reason = "Dependency not critical for security" - -# GHSA-7fh5-64p2-3v2j -[[PackageOverrides]] -name = "postcss" -ecosystem = "npm" -ignore = true -reason = "Vulnerabilities do not affect current use case" - -# GHSA-gcx4-mw62-g8wm -[[PackageOverrides]] -name = "rollup" -ecosystem = "npm" -ignore = true -reason = "Legacy build tool under controlled environment" - -# GHSA-c2qf-rxjj-qqgw -[[PackageOverrides]] -name = "semver" -ecosystem = "npm" -ignore = true -reason = "Version parsing is managed securely" - -# GHSA-353f-5xf4-qw67 -# GHSA-c24v-8rfc-w8vw -# GHSA-8jhw-289h-jh2g -# GHSA-64vr-g452-qvp3 -# GHSA-9cwx-2883-4wfx -[[PackageOverrides]] -name = "vite" -ecosystem = "npm" -ignore = true -reason = "Development server not exposed to untrusted networks" - -# GHSA-mwcw-c2x4-8c55 -[[PackageOverrides]] -name = "nanoid" -ecosystem = "npm" -ignore = true -reason = "Accepted known vulnerabilities for testing purposes" diff --git a/tests/fuzz/wasm-mutator-fuzz/portal/package-lock.json b/tests/fuzz/wasm-mutator-fuzz/portal/package-lock.json deleted file mode 100644 index 87dc143d04..0000000000 --- a/tests/fuzz/wasm-mutator-fuzz/portal/package-lock.json +++ /dev/null @@ -1,4177 +0,0 @@ -{ - "name": "my-react", - "version": "0.0.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "my-react", - "version": "0.0.0", - "dependencies": { - "@ant-design/icons": "^4.7.0", - "antd": "^4.22.8", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "react-highlight-words": "^0.18.0", - "react-router-dom": "^6.3.0", - "scripts": "^0.1.0" - }, - "devDependencies": { - "@types/react": "^18.0.17", - "@types/react-dom": "^18.0.6", - "@vitejs/plugin-react": "^4.3.4", - "typescript": "^4.6.4", - "vite": "^6.2.2" - } - }, - "node_modules/@ampproject/remapping": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", - "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@ant-design/colors": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@ant-design/colors/-/colors-6.0.0.tgz", - "integrity": "sha512-qAZRvPzfdWHtfameEGP2Qvuf838NhergR35o+EuVyB5XvSA98xod5r4utvi4TJ3ywmevm290g9nsCG5MryrdWQ==", - "dependencies": { - "@ctrl/tinycolor": "^3.4.0" - } - }, - "node_modules/@ant-design/icons": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/@ant-design/icons/-/icons-4.7.0.tgz", - "integrity": "sha512-aoB4Z7JA431rt6d4u+8xcNPPCrdufSRMUOpxa1ab6mz1JCQZOEVolj2WVs/tDFmN62zzK30mNelEsprLYsSF3g==", - "dependencies": { - "@ant-design/colors": "^6.0.0", - "@ant-design/icons-svg": "^4.2.1", - "@babel/runtime": "^7.11.2", - "classnames": "^2.2.6", - "rc-util": "^5.9.4" - }, - "engines": { - "node": ">=8" - }, - "peerDependencies": { - "react": ">=16.0.0", - "react-dom": ">=16.0.0" - } - }, - "node_modules/@ant-design/icons-svg": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@ant-design/icons-svg/-/icons-svg-4.2.1.tgz", - "integrity": "sha512-EB0iwlKDGpG93hW8f85CTJTs4SvMX7tt5ceupvhALp1IF44SeUFOMhKUOYqpsoYWQKAOuTRDMqn75rEaKDp0Xw==" - }, - "node_modules/@ant-design/react-slick": { - "version": "0.29.2", - "resolved": "https://registry.npmjs.org/@ant-design/react-slick/-/react-slick-0.29.2.tgz", - "integrity": "sha512-kgjtKmkGHa19FW21lHnAfyyH9AAoh35pBdcJ53rHmQ3O+cfFHGHnUbj/HFrRNJ5vIts09FKJVAD8RpaC+RaWfA==", - "dependencies": { - "@babel/runtime": "^7.10.4", - "classnames": "^2.2.5", - "json2mq": "^0.2.0", - "lodash": "^4.17.21", - "resize-observer-polyfill": "^1.5.1" - }, - "peerDependencies": { - "react": ">=16.9.0" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.26.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", - "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.25.9", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.26.8", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.8.tgz", - "integrity": "sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.26.10", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.10.tgz", - "integrity": "sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.26.2", - "@babel/generator": "^7.26.10", - "@babel/helper-compilation-targets": "^7.26.5", - "@babel/helper-module-transforms": "^7.26.0", - "@babel/helpers": "^7.26.10", - "@babel/parser": "^7.26.10", - "@babel/template": "^7.26.9", - "@babel/traverse": "^7.26.10", - "@babel/types": "^7.26.10", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/generator": { - "version": "7.26.10", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.10.tgz", - "integrity": "sha512-rRHT8siFIXQrAYOYqZQVsAr8vJ+cBNqcVAY6m5V8/4QqzaPl+zDBe6cLEPRDuNOUf3ww8RfJVlOyQMoSI+5Ang==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.26.10", - "@babel/types": "^7.26.10", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^3.0.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.26.5", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.26.5.tgz", - "integrity": "sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.26.5", - "@babel/helper-validator-option": "^7.25.9", - "browserslist": "^4.24.0", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", - "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/traverse": "^7.25.9", - "@babel/types": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz", - "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-imports": "^7.25.9", - "@babel/helper-validator-identifier": "^7.25.9", - "@babel/traverse": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.26.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.26.5.tgz", - "integrity": "sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", - "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", - "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", - "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.26.10", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.10.tgz", - "integrity": "sha512-UPYc3SauzZ3JGgj87GgZ89JVdC5dj0AoetR5Bw6wj4niittNyFh6+eOGonYvJ1ao6B8lEa3Q3klS7ADZ53bc5g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.26.9", - "@babel/types": "^7.26.10" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/parser": { - "version": "7.26.10", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.10.tgz", - "integrity": "sha512-6aQR2zGE/QFi8JpDLjUZEPYOs7+mhKXm86VaKFiLP35JQwQb6bwUE+XbvkH0EptsYhbNBSUGaUBLKqxH1xSgsA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.26.10" - }, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/plugin-transform-react-jsx-self": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.25.9.tgz", - "integrity": "sha512-y8quW6p0WHkEhmErnfe58r7x0A70uKphQm8Sp8cV7tjNQwK56sNVK0M73LK3WuYmsuyrftut4xAkjjgU0twaMg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-react-jsx-source": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.25.9.tgz", - "integrity": "sha512-+iqjT8xmXhhYv4/uiYd8FNQsraMFZIfxVSqxxVSZP0WbbSAWvBXAul0m/zu+7Vv4O/3WtApy9pmaTMiumEZgfg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/runtime": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", - "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", - "dependencies": { - "regenerator-runtime": "^0.13.4" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/template": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.26.9.tgz", - "integrity": "sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.26.2", - "@babel/parser": "^7.26.9", - "@babel/types": "^7.26.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.26.10", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.10.tgz", - "integrity": "sha512-k8NuDrxr0WrPH5Aupqb2LCVURP/S0vBEn5mK6iH+GIYob66U5EtoZvcdudR2jQ4cmTwhEwW1DLB+Yyas9zjF6A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.26.2", - "@babel/generator": "^7.26.10", - "@babel/parser": "^7.26.10", - "@babel/template": "^7.26.9", - "@babel/types": "^7.26.10", - "debug": "^4.3.1", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/types": { - "version": "7.26.10", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.10.tgz", - "integrity": "sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.25.9", - "@babel/helper-validator-identifier": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@ctrl/tinycolor": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/@ctrl/tinycolor/-/tinycolor-3.4.1.tgz", - "integrity": "sha512-ej5oVy6lykXsvieQtqZxCOaLT+xD4+QNarq78cIYISHmZXshCvROLudpQN3lfL8G0NL7plMSSK+zlyvCaIJ4Iw==", - "engines": { - "node": ">=10" - } - }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.1.tgz", - "integrity": "sha512-kfYGy8IdzTGy+z0vFGvExZtxkFlA4zAxgKEahG9KE1ScBjpQnFsNOX8KTU5ojNru5ed5CVoJYXFtoxaq5nFbjQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.1.tgz", - "integrity": "sha512-dp+MshLYux6j/JjdqVLnMglQlFu+MuVeNrmT5nk6q07wNhCdSnB7QZj+7G8VMUGh1q+vj2Bq8kRsuyA00I/k+Q==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.1.tgz", - "integrity": "sha512-50tM0zCJW5kGqgG7fQ7IHvQOcAn9TKiVRuQ/lN0xR+T2lzEFvAi1ZcS8DiksFcEpf1t/GYOeOfCAgDHFpkiSmA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.1.tgz", - "integrity": "sha512-GCj6WfUtNldqUzYkN/ITtlhwQqGWu9S45vUXs7EIYf+7rCiiqH9bCloatO9VhxsL0Pji+PF4Lz2XXCES+Q8hDw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.1.tgz", - "integrity": "sha512-5hEZKPf+nQjYoSr/elb62U19/l1mZDdqidGfmFutVUjjUZrOazAtwK+Kr+3y0C/oeJfLlxo9fXb1w7L+P7E4FQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.1.tgz", - "integrity": "sha512-hxVnwL2Dqs3fM1IWq8Iezh0cX7ZGdVhbTfnOy5uURtao5OIVCEyj9xIzemDi7sRvKsuSdtCAhMKarxqtlyVyfA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.1.tgz", - "integrity": "sha512-1MrCZs0fZa2g8E+FUo2ipw6jw5qqQiH+tERoS5fAfKnRx6NXH31tXBKI3VpmLijLH6yriMZsxJtaXUyFt/8Y4A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.1.tgz", - "integrity": "sha512-0IZWLiTyz7nm0xuIs0q1Y3QWJC52R8aSXxe40VUxm6BB1RNmkODtW6LHvWRrGiICulcX7ZvyH6h5fqdLu4gkww==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.1.tgz", - "integrity": "sha512-NdKOhS4u7JhDKw9G3cY6sWqFcnLITn6SqivVArbzIaf3cemShqfLGHYMx8Xlm/lBit3/5d7kXvriTUGa5YViuQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.1.tgz", - "integrity": "sha512-jaN3dHi0/DDPelk0nLcXRm1q7DNJpjXy7yWaWvbfkPvI+7XNSc/lDOnCLN7gzsyzgu6qSAmgSvP9oXAhP973uQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.1.tgz", - "integrity": "sha512-OJykPaF4v8JidKNGz8c/q1lBO44sQNUQtq1KktJXdBLn1hPod5rE/Hko5ugKKZd+D2+o1a9MFGUEIUwO2YfgkQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.1.tgz", - "integrity": "sha512-nGfornQj4dzcq5Vp835oM/o21UMlXzn79KobKlcs3Wz9smwiifknLy4xDCLUU0BWp7b/houtdrgUz7nOGnfIYg==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.1.tgz", - "integrity": "sha512-1osBbPEFYwIE5IVB/0g2X6i1qInZa1aIoj1TdL4AaAb55xIIgbg8Doq6a5BzYWgr+tEcDzYH67XVnTmUzL+nXg==", - "cpu": [ - "mips64el" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.1.tgz", - "integrity": "sha512-/6VBJOwUf3TdTvJZ82qF3tbLuWsscd7/1w+D9LH0W/SqUgM5/JJD0lrJ1fVIfZsqB6RFmLCe0Xz3fmZc3WtyVg==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.1.tgz", - "integrity": "sha512-nSut/Mx5gnilhcq2yIMLMe3Wl4FK5wx/o0QuuCLMtmJn+WeWYoEGDN1ipcN72g1WHsnIbxGXd4i/MF0gTcuAjQ==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.1.tgz", - "integrity": "sha512-cEECeLlJNfT8kZHqLarDBQso9a27o2Zd2AQ8USAEoGtejOrCYHNtKP8XQhMDJMtthdF4GBmjR2au3x1udADQQQ==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.1.tgz", - "integrity": "sha512-xbfUhu/gnvSEg+EGovRc+kjBAkrvtk38RlerAzQxvMzlB4fXpCFCeUAYzJvrnhFtdeyVCDANSjJvOvGYoeKzFA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/netbsd-arm64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.1.tgz", - "integrity": "sha512-O96poM2XGhLtpTh+s4+nP7YCCAfb4tJNRVZHfIE7dgmax+yMP2WgMd2OecBuaATHKTHsLWHQeuaxMRnCsH8+5g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.1.tgz", - "integrity": "sha512-X53z6uXip6KFXBQ+Krbx25XHV/NCbzryM6ehOAeAil7X7oa4XIq+394PWGnwaSQ2WRA0KI6PUO6hTO5zeF5ijA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-arm64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.1.tgz", - "integrity": "sha512-Na9T3szbXezdzM/Kfs3GcRQNjHzM6GzFBeU1/6IV/npKP5ORtp9zbQjvkDJ47s6BCgaAZnnnu/cY1x342+MvZg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.1.tgz", - "integrity": "sha512-T3H78X2h1tszfRSf+txbt5aOp/e7TAz3ptVKu9Oyir3IAOFPGV6O9c2naym5TOriy1l0nNf6a4X5UXRZSGX/dw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.1.tgz", - "integrity": "sha512-2H3RUvcmULO7dIE5EWJH8eubZAI4xw54H1ilJnRNZdeo8dTADEZ21w6J22XBkXqGJbe0+wnNJtw3UXRoLJnFEg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.1.tgz", - "integrity": "sha512-GE7XvrdOzrb+yVKB9KsRMq+7a2U/K5Cf/8grVFRAGJmfADr/e/ODQ134RK2/eeHqYV5eQRFxb1hY7Nr15fv1NQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.1.tgz", - "integrity": "sha512-uOxSJCIcavSiT6UnBhBzE8wy3n0hOkJsBOzy7HDAuTDE++1DJMRRVCPGisULScHL+a/ZwdXPpXD3IyFKjA7K8A==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.1.tgz", - "integrity": "sha512-Y1EQdcfwMSeQN/ujR5VayLOJ1BHaK+ssyk0AEzPjC+t1lITgsnccPqFjb6V+LsTp/9Iov4ysfjxLaGJ9RPtkVg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", - "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.36.0.tgz", - "integrity": "sha512-jgrXjjcEwN6XpZXL0HUeOVGfjXhPyxAbbhD0BlXUB+abTOpbPiN5Wb3kOT7yb+uEtATNYF5x5gIfwutmuBA26w==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-android-arm64": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.36.0.tgz", - "integrity": "sha512-NyfuLvdPdNUfUNeYKUwPwKsE5SXa2J6bCt2LdB/N+AxShnkpiczi3tcLJrm5mA+eqpy0HmaIY9F6XCa32N5yzg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.36.0.tgz", - "integrity": "sha512-JQ1Jk5G4bGrD4pWJQzWsD8I1n1mgPXq33+/vP4sk8j/z/C2siRuxZtaUA7yMTf71TCZTZl/4e1bfzwUmFb3+rw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.36.0.tgz", - "integrity": "sha512-6c6wMZa1lrtiRsbDziCmjE53YbTkxMYhhnWnSW8R/yqsM7a6mSJ3uAVT0t8Y/DGt7gxUWYuFM4bwWk9XCJrFKA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.36.0.tgz", - "integrity": "sha512-KXVsijKeJXOl8QzXTsA+sHVDsFOmMCdBRgFmBb+mfEb/7geR7+C8ypAml4fquUt14ZyVXaw2o1FWhqAfOvA4sg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.36.0.tgz", - "integrity": "sha512-dVeWq1ebbvByI+ndz4IJcD4a09RJgRYmLccwlQ8bPd4olz3Y213uf1iwvc7ZaxNn2ab7bjc08PrtBgMu6nb4pQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.36.0.tgz", - "integrity": "sha512-bvXVU42mOVcF4le6XSjscdXjqx8okv4n5vmwgzcmtvFdifQ5U4dXFYaCB87namDRKlUL9ybVtLQ9ztnawaSzvg==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.36.0.tgz", - "integrity": "sha512-JFIQrDJYrxOnyDQGYkqnNBtjDwTgbasdbUiQvcU8JmGDfValfH1lNpng+4FWlhaVIR4KPkeddYjsVVbmJYvDcg==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.36.0.tgz", - "integrity": "sha512-KqjYVh3oM1bj//5X7k79PSCZ6CvaVzb7Qs7VMWS+SlWB5M8p3FqufLP9VNp4CazJ0CsPDLwVD9r3vX7Ci4J56A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.36.0.tgz", - "integrity": "sha512-QiGnhScND+mAAtfHqeT+cB1S9yFnNQ/EwCg5yE3MzoaZZnIV0RV9O5alJAoJKX/sBONVKeZdMfO8QSaWEygMhw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.36.0.tgz", - "integrity": "sha512-1ZPyEDWF8phd4FQtTzMh8FQwqzvIjLsl6/84gzUxnMNFBtExBtpL51H67mV9xipuxl1AEAerRBgBwFNpkw8+Lg==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.36.0.tgz", - "integrity": "sha512-VMPMEIUpPFKpPI9GZMhJrtu8rxnp6mJR3ZzQPykq4xc2GmdHj3Q4cA+7avMyegXy4n1v+Qynr9fR88BmyO74tg==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.36.0.tgz", - "integrity": "sha512-ttE6ayb/kHwNRJGYLpuAvB7SMtOeQnVXEIpMtAvx3kepFQeowVED0n1K9nAdraHUPJ5hydEMxBpIR7o4nrm8uA==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.36.0.tgz", - "integrity": "sha512-4a5gf2jpS0AIe7uBjxDeUMNcFmaRTbNv7NxI5xOCs4lhzsVyGR/0qBXduPnoWf6dGC365saTiwag8hP1imTgag==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.36.0.tgz", - "integrity": "sha512-5KtoW8UWmwFKQ96aQL3LlRXX16IMwyzMq/jSSVIIyAANiE1doaQsx/KRyhAvpHlPjPiSU/AYX/8m+lQ9VToxFQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.36.0.tgz", - "integrity": "sha512-sycrYZPrv2ag4OCvaN5js+f01eoZ2U+RmT5as8vhxiFz+kxwlHrsxOwKPSA8WyS+Wc6Epid9QeI/IkQ9NkgYyQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.36.0.tgz", - "integrity": "sha512-qbqt4N7tokFwwSVlWDsjfoHgviS3n/vZ8LK0h1uLG9TYIRuUTJC88E1xb3LM2iqZ/WTqNQjYrtmtGmrmmawB6A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.36.0.tgz", - "integrity": "sha512-t+RY0JuRamIocMuQcfwYSOkmdX9dtkr1PbhKW42AMvaDQa+jOdpUYysroTF/nuPpAaQMWp7ye+ndlmmthieJrQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.36.0.tgz", - "integrity": "sha512-aRXd7tRZkWLqGbChgcMMDEHjOKudo1kChb1Jt1IfR8cY/KIpgNviLeJy5FUb9IpSuQj8dU2fAYNMPW/hLKOSTw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@types/babel__core": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", - "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "node_modules/@types/babel__generator": { - "version": "7.6.8", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", - "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__template": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", - "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__traverse": { - "version": "7.20.6", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", - "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.20.7" - } - }, - "node_modules/@types/estree": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/prop-types": { - "version": "15.7.5", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", - "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==", - "dev": true - }, - "node_modules/@types/react": { - "version": "18.0.17", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.17.tgz", - "integrity": "sha512-38ETy4tL+rn4uQQi7mB81G7V1g0u2ryquNmsVIOKUAEIDK+3CUjZ6rSRpdvS99dNBnkLFL83qfmtLacGOTIhwQ==", - "dev": true, - "dependencies": { - "@types/prop-types": "*", - "@types/scheduler": "*", - "csstype": "^3.0.2" - } - }, - "node_modules/@types/react-dom": { - "version": "18.0.6", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.0.6.tgz", - "integrity": "sha512-/5OFZgfIPSwy+YuIBP/FgJnQnsxhZhjjrnxudMddeblOouIodEQ75X14Rr4wGSG/bknL+Omy9iWlLo1u/9GzAA==", - "dev": true, - "dependencies": { - "@types/react": "*" - } - }, - "node_modules/@types/scheduler": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", - "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==", - "dev": true - }, - "node_modules/@vitejs/plugin-react": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.3.4.tgz", - "integrity": "sha512-SCCPBJtYLdE8PX/7ZQAs1QAZ8Jqwih+0VBLum1EGqmCCQal+MIUqLCzj3ZUy8ufbC0cAM4LRlSTm7IQJwWT4ug==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.26.0", - "@babel/plugin-transform-react-jsx-self": "^7.25.9", - "@babel/plugin-transform-react-jsx-source": "^7.25.9", - "@types/babel__core": "^7.20.5", - "react-refresh": "^0.14.2" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "peerDependencies": { - "vite": "^4.2.0 || ^5.0.0 || ^6.0.0" - } - }, - "node_modules/antd": { - "version": "4.22.8", - "resolved": "https://registry.npmjs.org/antd/-/antd-4.22.8.tgz", - "integrity": "sha512-mqHuCg9itZX+z6wk+mvRBcfz/U9iiIXS4LoNkyo8X/UBgdN8CoetFmrdvA1UQy1BuWa0/n62LiS1LatdvoTuHw==", - "dependencies": { - "@ant-design/colors": "^6.0.0", - "@ant-design/icons": "^4.7.0", - "@ant-design/react-slick": "~0.29.1", - "@babel/runtime": "^7.18.3", - "@ctrl/tinycolor": "^3.4.0", - "classnames": "^2.2.6", - "copy-to-clipboard": "^3.2.0", - "lodash": "^4.17.21", - "memoize-one": "^6.0.0", - "moment": "^2.29.2", - "rc-cascader": "~3.6.0", - "rc-checkbox": "~2.3.0", - "rc-collapse": "~3.3.0", - "rc-dialog": "~8.9.0", - "rc-drawer": "~5.1.0", - "rc-dropdown": "~4.0.0", - "rc-field-form": "~1.27.0", - "rc-image": "~5.7.0", - "rc-input": "~0.0.1-alpha.5", - "rc-input-number": "~7.3.5", - "rc-mentions": "~1.9.1", - "rc-menu": "~9.6.3", - "rc-motion": "^2.6.1", - "rc-notification": "~4.6.0", - "rc-pagination": "~3.1.17", - "rc-picker": "~2.6.10", - "rc-progress": "~3.3.2", - "rc-rate": "~2.9.0", - "rc-resize-observer": "^1.2.0", - "rc-segmented": "~2.1.0", - "rc-select": "~14.1.1", - "rc-slider": "~10.0.0", - "rc-steps": "~4.1.0", - "rc-switch": "~3.2.0", - "rc-table": "~7.25.3", - "rc-tabs": "~11.16.0", - "rc-textarea": "~0.3.0", - "rc-tooltip": "~5.2.0", - "rc-tree": "~5.6.5", - "rc-tree-select": "~5.4.0", - "rc-trigger": "^5.2.10", - "rc-upload": "~4.3.0", - "rc-util": "^5.22.5", - "scroll-into-view-if-needed": "^2.2.25" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/ant-design" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "node_modules/array-tree-filter": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-tree-filter/-/array-tree-filter-2.1.0.tgz", - "integrity": "sha512-4ROwICNlNw/Hqa9v+rk5h22KjmzB1JGTMVKP2AKJBOCgb0yL0ASf0+YvCcLNNwquOHNX48jkeZIJ3a+oOQqKcw==" - }, - "node_modules/async-validator": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/async-validator/-/async-validator-4.2.5.tgz", - "integrity": "sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg==" - }, - "node_modules/browserslist": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz", - "integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "caniuse-lite": "^1.0.30001688", - "electron-to-chromium": "^1.5.73", - "node-releases": "^2.0.19", - "update-browserslist-db": "^1.1.1" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001706", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001706.tgz", - "integrity": "sha512-3ZczoTApMAZwPKYWmwVbQMFpXBDds3/0VciVoUwPUbldlYyVLmRVuRs/PcUZtHpbLRpzzDvrvnFuREsGt6lUug==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, - "node_modules/classnames": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.1.tgz", - "integrity": "sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA==" - }, - "node_modules/compute-scroll-into-view": { - "version": "1.0.17", - "resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-1.0.17.tgz", - "integrity": "sha512-j4dx+Fb0URmzbwwMUrhqWM2BEWHdFGx+qZ9qqASHRPqvTYdqvWnHg0H1hIbcyLnvgnoNAVMlwkepyqM3DaIFUg==" - }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true, - "license": "MIT" - }, - "node_modules/copy-to-clipboard": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.3.2.tgz", - "integrity": "sha512-Vme1Z6RUDzrb6xAI7EZlVZ5uvOk2F//GaxKUxajDqm9LhOVM1inxNAD2vy+UZDYsd0uyA9s7b3/FVZPSxqrCfg==", - "dependencies": { - "toggle-selection": "^1.0.6" - } - }, - "node_modules/csstype": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz", - "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==", - "dev": true - }, - "node_modules/date-fns": { - "version": "2.29.2", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.29.2.tgz", - "integrity": "sha512-0VNbwmWJDS/G3ySwFSJA3ayhbURMTJLtwM2DTxf9CWondCnh6DTNlO9JgRSq6ibf4eD0lfMJNBxUdEAHHix+bA==", - "engines": { - "node": ">=0.11" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/date-fns" - } - }, - "node_modules/dayjs": { - "version": "1.11.5", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.5.tgz", - "integrity": "sha512-CAdX5Q3YW3Gclyo5Vpqkgpj8fSdLQcRuzfX6mC6Phy0nfJ0eGYOeS7m4mt2plDWLAtA4TqTakvbboHvUxfe4iA==" - }, - "node_modules/debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/dom-align": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/dom-align/-/dom-align-1.12.3.tgz", - "integrity": "sha512-Gj9hZN3a07cbR6zviMUBOMPdWxYhbMI+x+WS0NAIu2zFZmbK8ys9R79g+iG9qLnlCwpFoaB+fKy8Pdv470GsPA==" - }, - "node_modules/electron-to-chromium": { - "version": "1.5.121", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.121.tgz", - "integrity": "sha512-gpIEzIb3uvm6V8IK452TvzOvZ3EAF8D5i11SMUG7BjpF2aalh5KyKX5dO+GDW5m9Qdia1ejLm6WM5NOIOd7sbQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/esbuild": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.1.tgz", - "integrity": "sha512-BGO5LtrGC7vxnqucAe/rmvKdJllfGaYWdyABvyMoXQlfYMb2bbRuReWR5tEGE//4LcNJj9XrkovTqNYRFZHAMQ==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.1", - "@esbuild/android-arm": "0.25.1", - "@esbuild/android-arm64": "0.25.1", - "@esbuild/android-x64": "0.25.1", - "@esbuild/darwin-arm64": "0.25.1", - "@esbuild/darwin-x64": "0.25.1", - "@esbuild/freebsd-arm64": "0.25.1", - "@esbuild/freebsd-x64": "0.25.1", - "@esbuild/linux-arm": "0.25.1", - "@esbuild/linux-arm64": "0.25.1", - "@esbuild/linux-ia32": "0.25.1", - "@esbuild/linux-loong64": "0.25.1", - "@esbuild/linux-mips64el": "0.25.1", - "@esbuild/linux-ppc64": "0.25.1", - "@esbuild/linux-riscv64": "0.25.1", - "@esbuild/linux-s390x": "0.25.1", - "@esbuild/linux-x64": "0.25.1", - "@esbuild/netbsd-arm64": "0.25.1", - "@esbuild/netbsd-x64": "0.25.1", - "@esbuild/openbsd-arm64": "0.25.1", - "@esbuild/openbsd-x64": "0.25.1", - "@esbuild/sunos-x64": "0.25.1", - "@esbuild/win32-arm64": "0.25.1", - "@esbuild/win32-ia32": "0.25.1", - "@esbuild/win32-x64": "0.25.1" - } - }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/highlight-words-core": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/highlight-words-core/-/highlight-words-core-1.2.2.tgz", - "integrity": "sha512-BXUKIkUuh6cmmxzi5OIbUJxrG8OAk2MqoL1DtO3Wo9D2faJg2ph5ntyuQeLqaHJmzER6H5tllCDA9ZnNe9BVGg==" - }, - "node_modules/history": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/history/-/history-5.3.0.tgz", - "integrity": "sha512-ZqaKwjjrAYUYfLG+htGaIIZ4nioX2L70ZUMIFysS3xvBsSG4x/n1V6TXV3N8ZYNuFGlDirFg32T7B6WOUPDYcQ==", - "dependencies": { - "@babel/runtime": "^7.7.6" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" - }, - "node_modules/jsesc": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", - "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/json2mq": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/json2mq/-/json2mq-0.2.0.tgz", - "integrity": "sha512-SzoRg7ux5DWTII9J2qkrZrqV1gt+rTaoufMxEzXbS26Uid0NwaJd123HcoB80TgubEppxxIGdNxCx50fEoEWQA==", - "dependencies": { - "string-convert": "^0.2.0" - } - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "node_modules/loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, - "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/memoize-one": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-6.0.0.tgz", - "integrity": "sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw==" - }, - "node_modules/moment": { - "version": "2.29.4", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", - "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==", - "engines": { - "node": "*" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, - "license": "MIT" - }, - "node_modules/nanoid": { - "version": "3.3.11", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", - "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/node-releases": { - "version": "2.0.19", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", - "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", - "dev": true, - "license": "MIT" - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "dev": true, - "license": "ISC" - }, - "node_modules/postcss": { - "version": "8.5.3", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz", - "integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "nanoid": "^3.3.8", - "picocolors": "^1.1.1", - "source-map-js": "^1.2.1" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/prop-types": { - "version": "15.8.1", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", - "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dependencies": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.13.1" - } - }, - "node_modules/rc-align": { - "version": "4.0.12", - "resolved": "https://registry.npmjs.org/rc-align/-/rc-align-4.0.12.tgz", - "integrity": "sha512-3DuwSJp8iC/dgHzwreOQl52soj40LchlfUHtgACOUtwGuoFIOVh6n/sCpfqCU8kO5+iz6qR0YKvjgB8iPdE3aQ==", - "dependencies": { - "@babel/runtime": "^7.10.1", - "classnames": "2.x", - "dom-align": "^1.7.0", - "lodash": "^4.17.21", - "rc-util": "^5.3.0", - "resize-observer-polyfill": "^1.5.1" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "node_modules/rc-cascader": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/rc-cascader/-/rc-cascader-3.6.2.tgz", - "integrity": "sha512-sf2otpazlROTzkD3nZVfIzXmfBLiEOBTXA5wxozGXBpS902McDpvF0bdcYBu5hN+rviEAm6Mh9cLXNQ1Ty8wKQ==", - "dependencies": { - "@babel/runtime": "^7.12.5", - "array-tree-filter": "^2.1.0", - "classnames": "^2.3.1", - "rc-select": "~14.1.0", - "rc-tree": "~5.6.3", - "rc-util": "^5.6.1" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "node_modules/rc-checkbox": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/rc-checkbox/-/rc-checkbox-2.3.2.tgz", - "integrity": "sha512-afVi1FYiGv1U0JlpNH/UaEXdh6WUJjcWokj/nUN2TgG80bfG+MDdbfHKlLcNNba94mbjy2/SXJ1HDgrOkXGAjg==", - "dependencies": { - "@babel/runtime": "^7.10.1", - "classnames": "^2.2.1" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "node_modules/rc-collapse": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/rc-collapse/-/rc-collapse-3.3.1.tgz", - "integrity": "sha512-cOJfcSe3R8vocrF8T+PgaHDrgeA1tX+lwfhwSj60NX9QVRidsILIbRNDLD6nAzmcvVC5PWiIRiR4S1OobxdhCg==", - "dependencies": { - "@babel/runtime": "^7.10.1", - "classnames": "2.x", - "rc-motion": "^2.3.4", - "rc-util": "^5.2.1", - "shallowequal": "^1.1.0" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "node_modules/rc-dialog": { - "version": "8.9.0", - "resolved": "https://registry.npmjs.org/rc-dialog/-/rc-dialog-8.9.0.tgz", - "integrity": "sha512-Cp0tbJnrvPchJfnwIvOMWmJ4yjX3HWFatO6oBFD1jx8QkgsQCR0p8nUWAKdd3seLJhEC39/v56kZaEjwp9muoQ==", - "dependencies": { - "@babel/runtime": "^7.10.1", - "classnames": "^2.2.6", - "rc-motion": "^2.3.0", - "rc-util": "^5.21.0" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "node_modules/rc-drawer": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/rc-drawer/-/rc-drawer-5.1.0.tgz", - "integrity": "sha512-pU3Tsn99pxGdYowXehzZbdDVE+4lDXSGb7p8vA9mSmr569oc2Izh4Zw5vLKSe/Xxn2p5MSNbLVqD4tz+pK6SOw==", - "dependencies": { - "@babel/runtime": "^7.10.1", - "classnames": "^2.2.6", - "rc-motion": "^2.6.1", - "rc-util": "^5.21.2" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "node_modules/rc-dropdown": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/rc-dropdown/-/rc-dropdown-4.0.1.tgz", - "integrity": "sha512-OdpXuOcme1rm45cR0Jzgfl1otzmU4vuBVb+etXM8vcaULGokAKVpKlw8p6xzspG7jGd/XxShvq+N3VNEfk/l5g==", - "dependencies": { - "@babel/runtime": "^7.18.3", - "classnames": "^2.2.6", - "rc-trigger": "^5.3.1", - "rc-util": "^5.17.0" - }, - "peerDependencies": { - "react": ">=16.11.0", - "react-dom": ">=16.11.0" - } - }, - "node_modules/rc-field-form": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/rc-field-form/-/rc-field-form-1.27.1.tgz", - "integrity": "sha512-RShegnwFu6TH8tl2olCxn+B4Wyh5EiQH8c/7wucbkLNyue05YiH5gomUAg1vbZjp71yFKwegClctsEG5CNBWAA==", - "dependencies": { - "@babel/runtime": "^7.18.0", - "async-validator": "^4.1.0", - "rc-util": "^5.8.0" - }, - "engines": { - "node": ">=8.x" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "node_modules/rc-image": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/rc-image/-/rc-image-5.7.1.tgz", - "integrity": "sha512-QyMfdhoUfb5W14plqXSisaYwpdstcLYnB0MjX5ccIK2rydQM9sDPuekQWu500DDGR2dBaIF5vx9XbWkNFK17Fg==", - "dependencies": { - "@babel/runtime": "^7.11.2", - "classnames": "^2.2.6", - "rc-dialog": "~8.9.0", - "rc-util": "^5.0.6" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "node_modules/rc-input": { - "version": "0.0.1-alpha.7", - "resolved": "https://registry.npmjs.org/rc-input/-/rc-input-0.0.1-alpha.7.tgz", - "integrity": "sha512-eozaqpCYWSY5LBMwlHgC01GArkVEP+XlJ84OMvdkwUnJBSv83Yxa15pZpn7vACAj84uDC4xOA2CoFdbLuqB08Q==", - "dependencies": { - "@babel/runtime": "^7.11.1", - "classnames": "^2.2.1", - "rc-util": "^5.18.1" - }, - "peerDependencies": { - "react": ">=16.0.0", - "react-dom": ">=16.0.0" - } - }, - "node_modules/rc-input-number": { - "version": "7.3.6", - "resolved": "https://registry.npmjs.org/rc-input-number/-/rc-input-number-7.3.6.tgz", - "integrity": "sha512-Se62oMOBn9HwF/gSag+YtAYyKZsjJzEsqmyAJHAnAvPfjZJOu7dLMlQRwBbTtELbKXM/Y5Fztcq8CW2Y9f49qA==", - "dependencies": { - "@babel/runtime": "^7.10.1", - "classnames": "^2.2.5", - "rc-util": "^5.23.0" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "node_modules/rc-mentions": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/rc-mentions/-/rc-mentions-1.9.2.tgz", - "integrity": "sha512-uxb/lzNnEGmvraKWNGE6KXMVXvt8RQv9XW8R0Dqi3hYsyPiAZeHRCHQKdLARuk5YBhFhZ6ga55D/8XuY367g3g==", - "dependencies": { - "@babel/runtime": "^7.10.1", - "classnames": "^2.2.6", - "rc-menu": "~9.6.0", - "rc-textarea": "^0.3.0", - "rc-trigger": "^5.0.4", - "rc-util": "^5.22.5" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "node_modules/rc-menu": { - "version": "9.6.3", - "resolved": "https://registry.npmjs.org/rc-menu/-/rc-menu-9.6.3.tgz", - "integrity": "sha512-KY9QilKWgkJZ0JSpOBgIpQF2wMRRodRxpIMYyIJ3Nd5N6xfVLOxXCxevHcBplt+Ez7MhUF+I03MuAKqWQJLZgw==", - "dependencies": { - "@babel/runtime": "^7.10.1", - "classnames": "2.x", - "rc-motion": "^2.4.3", - "rc-overflow": "^1.2.0", - "rc-trigger": "^5.1.2", - "rc-util": "^5.12.0", - "shallowequal": "^1.1.0" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "node_modules/rc-motion": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rc-motion/-/rc-motion-2.6.2.tgz", - "integrity": "sha512-4w1FaX3dtV749P8GwfS4fYnFG4Rb9pxvCYPc/b2fw1cmlHJWNNgOFIz7ysiD+eOrzJSvnLJWlNQQncpNMXwwpg==", - "dependencies": { - "@babel/runtime": "^7.11.1", - "classnames": "^2.2.1", - "rc-util": "^5.21.0" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "node_modules/rc-notification": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/rc-notification/-/rc-notification-4.6.0.tgz", - "integrity": "sha512-xF3MKgIoynzjQAO4lqsoraiFo3UXNYlBfpHs0VWvwF+4pimen9/H1DYLN2mfRWhHovW6gRpla73m2nmyIqAMZQ==", - "dependencies": { - "@babel/runtime": "^7.10.1", - "classnames": "2.x", - "rc-motion": "^2.2.0", - "rc-util": "^5.20.1" - }, - "engines": { - "node": ">=8.x" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "node_modules/rc-overflow": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc-overflow/-/rc-overflow-1.2.8.tgz", - "integrity": "sha512-QJ0UItckWPQ37ZL1dMEBAdY1dhfTXFL9k6oTTcyydVwoUNMnMqCGqnRNA98axSr/OeDKqR6DVFyi8eA5RQI/uQ==", - "dependencies": { - "@babel/runtime": "^7.11.1", - "classnames": "^2.2.1", - "rc-resize-observer": "^1.0.0", - "rc-util": "^5.19.2" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "node_modules/rc-pagination": { - "version": "3.1.17", - "resolved": "https://registry.npmjs.org/rc-pagination/-/rc-pagination-3.1.17.tgz", - "integrity": "sha512-/BQ5UxcBnW28vFAcP2hfh+Xg15W0QZn8TWYwdCApchMH1H0CxiaUUcULP8uXcFM1TygcdKWdt3JqsL9cTAfdkQ==", - "dependencies": { - "@babel/runtime": "^7.10.1", - "classnames": "^2.2.1" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "node_modules/rc-picker": { - "version": "2.6.10", - "resolved": "https://registry.npmjs.org/rc-picker/-/rc-picker-2.6.10.tgz", - "integrity": "sha512-9wYtw0DFWs9FO92Qh2D76P0iojUr8ZhLOtScUeOit6ks/F+TBLrOC1uze3IOu+u9gbDAjmosNWLKbBzx/Yuv2w==", - "dependencies": { - "@babel/runtime": "^7.10.1", - "classnames": "^2.2.1", - "date-fns": "2.x", - "dayjs": "1.x", - "moment": "^2.24.0", - "rc-trigger": "^5.0.4", - "rc-util": "^5.4.0", - "shallowequal": "^1.1.0" - }, - "engines": { - "node": ">=8.x" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "node_modules/rc-progress": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/rc-progress/-/rc-progress-3.3.3.tgz", - "integrity": "sha512-MDVNVHzGanYtRy2KKraEaWeZLri2ZHWIRyaE1a9MQ2MuJ09m+Wxj5cfcaoaR6z5iRpHpA59YeUxAlpML8N4PJw==", - "dependencies": { - "@babel/runtime": "^7.10.1", - "classnames": "^2.2.6", - "rc-util": "^5.16.1" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "node_modules/rc-rate": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/rc-rate/-/rc-rate-2.9.2.tgz", - "integrity": "sha512-SaiZFyN8pe0Fgphv8t3+kidlej+cq/EALkAJAc3A0w0XcPaH2L1aggM8bhe1u6GAGuQNAoFvTLjw4qLPGRKV5g==", - "dependencies": { - "@babel/runtime": "^7.10.1", - "classnames": "^2.2.5", - "rc-util": "^5.0.1" - }, - "engines": { - "node": ">=8.x" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "node_modules/rc-resize-observer": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/rc-resize-observer/-/rc-resize-observer-1.2.0.tgz", - "integrity": "sha512-6W+UzT3PyDM0wVCEHfoW3qTHPTvbdSgiA43buiy8PzmeMnfgnDeb9NjdimMXMl3/TcrvvWl5RRVdp+NqcR47pQ==", - "dependencies": { - "@babel/runtime": "^7.10.1", - "classnames": "^2.2.1", - "rc-util": "^5.15.0", - "resize-observer-polyfill": "^1.5.1" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "node_modules/rc-segmented": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/rc-segmented/-/rc-segmented-2.1.0.tgz", - "integrity": "sha512-hUlonro+pYoZcwrH6Vm56B2ftLfQh046hrwif/VwLIw1j3zGt52p5mREBwmeVzXnSwgnagpOpfafspzs1asjGw==", - "dependencies": { - "@babel/runtime": "^7.11.1", - "classnames": "^2.2.1", - "rc-motion": "^2.4.4", - "rc-util": "^5.17.0" - }, - "peerDependencies": { - "react": ">=16.0.0", - "react-dom": ">=16.0.0" - } - }, - "node_modules/rc-select": { - "version": "14.1.9", - "resolved": "https://registry.npmjs.org/rc-select/-/rc-select-14.1.9.tgz", - "integrity": "sha512-DK01+Q7oCWr5jVPiEp/BTQ8xCB4rI4LfXzZtSmBWJhOMuibyZD1Vlz/DlVKCUFmtBM4SzG4/SltGHoGlcbCqiw==", - "dependencies": { - "@babel/runtime": "^7.10.1", - "classnames": "2.x", - "rc-motion": "^2.0.1", - "rc-overflow": "^1.0.0", - "rc-trigger": "^5.0.4", - "rc-util": "^5.16.1", - "rc-virtual-list": "^3.2.0" - }, - "engines": { - "node": ">=8.x" - }, - "peerDependencies": { - "react": "*", - "react-dom": "*" - } - }, - "node_modules/rc-slider": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/rc-slider/-/rc-slider-10.0.1.tgz", - "integrity": "sha512-igTKF3zBet7oS/3yNiIlmU8KnZ45npmrmHlUUio8PNbIhzMcsh+oE/r2UD42Y6YD2D/s+kzCQkzQrPD6RY435Q==", - "dependencies": { - "@babel/runtime": "^7.10.1", - "classnames": "^2.2.5", - "rc-util": "^5.18.1", - "shallowequal": "^1.1.0" - }, - "engines": { - "node": ">=8.x" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "node_modules/rc-steps": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/rc-steps/-/rc-steps-4.1.4.tgz", - "integrity": "sha512-qoCqKZWSpkh/b03ASGx1WhpKnuZcRWmvuW+ZUu4mvMdfvFzVxblTwUM+9aBd0mlEUFmt6GW8FXhMpHkK3Uzp3w==", - "dependencies": { - "@babel/runtime": "^7.10.2", - "classnames": "^2.2.3", - "rc-util": "^5.0.1" - }, - "engines": { - "node": ">=8.x" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "node_modules/rc-switch": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/rc-switch/-/rc-switch-3.2.2.tgz", - "integrity": "sha512-+gUJClsZZzvAHGy1vZfnwySxj+MjLlGRyXKXScrtCTcmiYNPzxDFOxdQ/3pK1Kt/0POvwJ/6ALOR8gwdXGhs+A==", - "dependencies": { - "@babel/runtime": "^7.10.1", - "classnames": "^2.2.1", - "rc-util": "^5.0.1" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "node_modules/rc-table": { - "version": "7.25.3", - "resolved": "https://registry.npmjs.org/rc-table/-/rc-table-7.25.3.tgz", - "integrity": "sha512-McsLJ2rg8EEpRBRYN4Pf9gT7ZNYnjvF9zrBpUBBbUX/fxk+eGi5ff1iPIhMyiHsH71/BmTUzX9nc9XqupD0nMg==", - "dependencies": { - "@babel/runtime": "^7.10.1", - "classnames": "^2.2.5", - "rc-resize-observer": "^1.1.0", - "rc-util": "^5.22.5", - "shallowequal": "^1.1.0" - }, - "engines": { - "node": ">=8.x" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "node_modules/rc-tabs": { - "version": "11.16.1", - "resolved": "https://registry.npmjs.org/rc-tabs/-/rc-tabs-11.16.1.tgz", - "integrity": "sha512-bR7Dap23YyfzZQwtKomhiFEFzZuE7WaKWo+ypNRSGB9PDKSc6tM12VP8LWYkvmmQHthgwP0WRN8nFbSJWuqLYw==", - "dependencies": { - "@babel/runtime": "^7.11.2", - "classnames": "2.x", - "rc-dropdown": "~4.0.0", - "rc-menu": "~9.6.0", - "rc-resize-observer": "^1.0.0", - "rc-util": "^5.5.0" - }, - "engines": { - "node": ">=8.x" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "node_modules/rc-textarea": { - "version": "0.3.7", - "resolved": "https://registry.npmjs.org/rc-textarea/-/rc-textarea-0.3.7.tgz", - "integrity": "sha512-yCdZ6binKmAQB13hc/oehh0E/QRwoPP1pjF21aHBxlgXO3RzPF6dUu4LG2R4FZ1zx/fQd2L1faktulrXOM/2rw==", - "dependencies": { - "@babel/runtime": "^7.10.1", - "classnames": "^2.2.1", - "rc-resize-observer": "^1.0.0", - "rc-util": "^5.7.0", - "shallowequal": "^1.1.0" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "node_modules/rc-tooltip": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/rc-tooltip/-/rc-tooltip-5.2.2.tgz", - "integrity": "sha512-jtQzU/18S6EI3lhSGoDYhPqNpWajMtS5VV/ld1LwyfrDByQpYmw/LW6U7oFXXLukjfDHQ7Ju705A82PRNFWYhg==", - "dependencies": { - "@babel/runtime": "^7.11.2", - "classnames": "^2.3.1", - "rc-trigger": "^5.0.0" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "node_modules/rc-tree": { - "version": "5.6.6", - "resolved": "https://registry.npmjs.org/rc-tree/-/rc-tree-5.6.6.tgz", - "integrity": "sha512-HI/q4D4AHOp48OZcBUvJFWkI5OfnZivvGYI0xzI0dy0Mita2KcTGZv7/Yl6Aq3bL3od3x5AqAXq/7qxR3x4Kkg==", - "dependencies": { - "@babel/runtime": "^7.10.1", - "classnames": "2.x", - "rc-motion": "^2.0.1", - "rc-util": "^5.16.1", - "rc-virtual-list": "^3.4.8" - }, - "engines": { - "node": ">=10.x" - }, - "peerDependencies": { - "react": "*", - "react-dom": "*" - } - }, - "node_modules/rc-tree-select": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/rc-tree-select/-/rc-tree-select-5.4.1.tgz", - "integrity": "sha512-xhXnKP8Stu2Q7wTcjJaSzSOLd4wmFtUZOwmy1cioaWyPbpiKlYdnALXA/9U49HOaV3KFXdRHE9Yi0KYED7yOAQ==", - "dependencies": { - "@babel/runtime": "^7.10.1", - "classnames": "2.x", - "rc-select": "~14.1.0", - "rc-tree": "~5.6.1", - "rc-util": "^5.16.1" - }, - "peerDependencies": { - "react": "*", - "react-dom": "*" - } - }, - "node_modules/rc-trigger": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/rc-trigger/-/rc-trigger-5.3.1.tgz", - "integrity": "sha512-5gaFbDkYSefZ14j2AdzucXzlWgU2ri5uEjkHvsf1ynRhdJbKxNOnw4PBZ9+FVULNGFiDzzlVF8RJnR9P/xrnKQ==", - "dependencies": { - "@babel/runtime": "^7.18.3", - "classnames": "^2.2.6", - "rc-align": "^4.0.0", - "rc-motion": "^2.0.0", - "rc-util": "^5.19.2" - }, - "engines": { - "node": ">=8.x" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "node_modules/rc-upload": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/rc-upload/-/rc-upload-4.3.4.tgz", - "integrity": "sha512-uVbtHFGNjHG/RyAfm9fluXB6pvArAGyAx8z7XzXXyorEgVIWj6mOlriuDm0XowDHYz4ycNK0nE0oP3cbFnzxiQ==", - "dependencies": { - "@babel/runtime": "^7.18.3", - "classnames": "^2.2.5", - "rc-util": "^5.2.0" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "node_modules/rc-util": { - "version": "5.23.0", - "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-5.23.0.tgz", - "integrity": "sha512-lgm6diJ/pLgyfoZY59Vz7sW4mSoQCgozqbBye9IJ7/mb5w5h4T7h+i2JpXAx/UBQxscBZe68q0sP7EW+qfkKUg==", - "dependencies": { - "@babel/runtime": "^7.18.3", - "react-is": "^16.12.0", - "shallowequal": "^1.1.0" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "node_modules/rc-virtual-list": { - "version": "3.4.8", - "resolved": "https://registry.npmjs.org/rc-virtual-list/-/rc-virtual-list-3.4.8.tgz", - "integrity": "sha512-qSN+Rv4i/E7RCTvTMr1uZo7f3crJJg/5DekoCagydo9zsXrxj07zsFSxqizqW+ldGA16lwa8So/bIbV9Ofjddg==", - "dependencies": { - "classnames": "^2.2.6", - "rc-resize-observer": "^1.0.0", - "rc-util": "^5.15.0" - }, - "engines": { - "node": ">=8.x" - }, - "peerDependencies": { - "react": "*", - "react-dom": "*" - } - }, - "node_modules/react": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", - "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", - "dependencies": { - "loose-envify": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-dom": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", - "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", - "dependencies": { - "loose-envify": "^1.1.0", - "scheduler": "^0.23.0" - }, - "peerDependencies": { - "react": "^18.2.0" - } - }, - "node_modules/react-highlight-words": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/react-highlight-words/-/react-highlight-words-0.18.0.tgz", - "integrity": "sha512-5z+46eLPjB4JWgOhuQ0E+6iUPTD1U3amiy5KKjzZmeJ5zyvHr91hnzBT3UHya/KlySm5KRTKpYpba9vs67oO2A==", - "dependencies": { - "highlight-words-core": "^1.2.0", - "memoize-one": "^4.0.0", - "prop-types": "^15.5.8" - }, - "peerDependencies": { - "react": "^0.14.0 || ^15.0.0 || ^16.0.0-0 || ^17.0.0-0 || ^18.0.0-0" - } - }, - "node_modules/react-highlight-words/node_modules/memoize-one": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-4.0.3.tgz", - "integrity": "sha512-QmpUu4KqDmX0plH4u+tf0riMc1KHE1+lw95cMrLlXQAFOx/xnBtwhZ52XJxd9X2O6kwKBqX32kmhbhlobD0cuw==" - }, - "node_modules/react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" - }, - "node_modules/react-refresh": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.2.tgz", - "integrity": "sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-router": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.3.0.tgz", - "integrity": "sha512-7Wh1DzVQ+tlFjkeo+ujvjSqSJmkt1+8JO+T5xklPlgrh70y7ogx75ODRW0ThWhY7S+6yEDks8TYrtQe/aoboBQ==", - "dependencies": { - "history": "^5.2.0" - }, - "peerDependencies": { - "react": ">=16.8" - } - }, - "node_modules/react-router-dom": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.3.0.tgz", - "integrity": "sha512-uaJj7LKytRxZNQV8+RbzJWnJ8K2nPsOOEuX7aQstlMZKQT0164C+X2w6bnkqU3sjtLvpd5ojrezAyfZ1+0sStw==", - "dependencies": { - "history": "^5.2.0", - "react-router": "6.3.0" - }, - "peerDependencies": { - "react": ">=16.8", - "react-dom": ">=16.8" - } - }, - "node_modules/regenerator-runtime": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==" - }, - "node_modules/resize-observer-polyfill": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz", - "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==" - }, - "node_modules/rollup": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.36.0.tgz", - "integrity": "sha512-zwATAXNQxUcd40zgtQG0ZafcRK4g004WtEl7kbuhTWPvf07PsfohXl39jVUvPF7jvNAIkKPQ2XrsDlWuxBd++Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "1.0.6" - }, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.36.0", - "@rollup/rollup-android-arm64": "4.36.0", - "@rollup/rollup-darwin-arm64": "4.36.0", - "@rollup/rollup-darwin-x64": "4.36.0", - "@rollup/rollup-freebsd-arm64": "4.36.0", - "@rollup/rollup-freebsd-x64": "4.36.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.36.0", - "@rollup/rollup-linux-arm-musleabihf": "4.36.0", - "@rollup/rollup-linux-arm64-gnu": "4.36.0", - "@rollup/rollup-linux-arm64-musl": "4.36.0", - "@rollup/rollup-linux-loongarch64-gnu": "4.36.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.36.0", - "@rollup/rollup-linux-riscv64-gnu": "4.36.0", - "@rollup/rollup-linux-s390x-gnu": "4.36.0", - "@rollup/rollup-linux-x64-gnu": "4.36.0", - "@rollup/rollup-linux-x64-musl": "4.36.0", - "@rollup/rollup-win32-arm64-msvc": "4.36.0", - "@rollup/rollup-win32-ia32-msvc": "4.36.0", - "@rollup/rollup-win32-x64-msvc": "4.36.0", - "fsevents": "~2.3.2" - } - }, - "node_modules/scheduler": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", - "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", - "dependencies": { - "loose-envify": "^1.1.0" - } - }, - "node_modules/scripts": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/scripts/-/scripts-0.1.0.tgz", - "integrity": "sha512-URMy4uj80+USxik0E+P7OeagdYGRM6vJQ+8zADRRNjcoIVdouxB7B60P4G4y20TizSGXdE0nAW5sSM1IIXa3hw==", - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/scroll-into-view-if-needed": { - "version": "2.2.29", - "resolved": "https://registry.npmjs.org/scroll-into-view-if-needed/-/scroll-into-view-if-needed-2.2.29.tgz", - "integrity": "sha512-hxpAR6AN+Gh53AdAimHM6C8oTN1ppwVZITihix+WqalywBeFcQ6LdQP5ABNl26nX8GTEL7VT+b8lKpdqq65wXg==", - "dependencies": { - "compute-scroll-into-view": "^1.0.17" - } - }, - "node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/shallowequal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", - "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==" - }, - "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/string-convert": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/string-convert/-/string-convert-0.2.1.tgz", - "integrity": "sha512-u/1tdPl4yQnPBjnVrmdLo9gtuLvELKsAoRapekWggdiQNvvvum+jYF329d84NAa660KQw7pB2n36KrIKVoXa3A==" - }, - "node_modules/toggle-selection": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/toggle-selection/-/toggle-selection-1.0.6.tgz", - "integrity": "sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ==" - }, - "node_modules/typescript": { - "version": "4.8.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz", - "integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/update-browserslist-db": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", - "integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.2.0", - "picocolors": "^1.1.1" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/vite": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.2.2.tgz", - "integrity": "sha512-yW7PeMM+LkDzc7CgJuRLMW2Jz0FxMOsVJ8Lv3gpgW9WLcb9cTW+121UEr1hvmfR7w3SegR5ItvYyzVz1vxNJgQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "esbuild": "^0.25.0", - "postcss": "^8.5.3", - "rollup": "^4.30.1" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22.0.0" - }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - }, - "peerDependencies": { - "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", - "jiti": ">=1.21.0", - "less": "*", - "lightningcss": "^1.21.0", - "sass": "*", - "sass-embedded": "*", - "stylus": "*", - "sugarss": "*", - "terser": "^5.16.0", - "tsx": "^4.8.1", - "yaml": "^2.4.2" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "jiti": { - "optional": true - }, - "less": { - "optional": true - }, - "lightningcss": { - "optional": true - }, - "sass": { - "optional": true - }, - "sass-embedded": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - }, - "tsx": { - "optional": true - }, - "yaml": { - "optional": true - } - } - }, - "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true, - "license": "ISC" - } - }, - "dependencies": { - "@ampproject/remapping": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", - "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", - "dev": true, - "requires": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - } - }, - "@ant-design/colors": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@ant-design/colors/-/colors-6.0.0.tgz", - "integrity": "sha512-qAZRvPzfdWHtfameEGP2Qvuf838NhergR35o+EuVyB5XvSA98xod5r4utvi4TJ3ywmevm290g9nsCG5MryrdWQ==", - "requires": { - "@ctrl/tinycolor": "^3.4.0" - } - }, - "@ant-design/icons": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/@ant-design/icons/-/icons-4.7.0.tgz", - "integrity": "sha512-aoB4Z7JA431rt6d4u+8xcNPPCrdufSRMUOpxa1ab6mz1JCQZOEVolj2WVs/tDFmN62zzK30mNelEsprLYsSF3g==", - "requires": { - "@ant-design/colors": "^6.0.0", - "@ant-design/icons-svg": "^4.2.1", - "@babel/runtime": "^7.11.2", - "classnames": "^2.2.6", - "rc-util": "^5.9.4" - } - }, - "@ant-design/icons-svg": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@ant-design/icons-svg/-/icons-svg-4.2.1.tgz", - "integrity": "sha512-EB0iwlKDGpG93hW8f85CTJTs4SvMX7tt5ceupvhALp1IF44SeUFOMhKUOYqpsoYWQKAOuTRDMqn75rEaKDp0Xw==" - }, - "@ant-design/react-slick": { - "version": "0.29.2", - "resolved": "https://registry.npmjs.org/@ant-design/react-slick/-/react-slick-0.29.2.tgz", - "integrity": "sha512-kgjtKmkGHa19FW21lHnAfyyH9AAoh35pBdcJ53rHmQ3O+cfFHGHnUbj/HFrRNJ5vIts09FKJVAD8RpaC+RaWfA==", - "requires": { - "@babel/runtime": "^7.10.4", - "classnames": "^2.2.5", - "json2mq": "^0.2.0", - "lodash": "^4.17.21", - "resize-observer-polyfill": "^1.5.1" - } - }, - "@babel/code-frame": { - "version": "7.26.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", - "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.25.9", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - } - }, - "@babel/compat-data": { - "version": "7.26.8", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.8.tgz", - "integrity": "sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ==", - "dev": true - }, - "@babel/core": { - "version": "7.26.10", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.10.tgz", - "integrity": "sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ==", - "dev": true, - "requires": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.26.2", - "@babel/generator": "^7.26.10", - "@babel/helper-compilation-targets": "^7.26.5", - "@babel/helper-module-transforms": "^7.26.0", - "@babel/helpers": "^7.26.10", - "@babel/parser": "^7.26.10", - "@babel/template": "^7.26.9", - "@babel/traverse": "^7.26.10", - "@babel/types": "^7.26.10", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - } - }, - "@babel/generator": { - "version": "7.26.10", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.10.tgz", - "integrity": "sha512-rRHT8siFIXQrAYOYqZQVsAr8vJ+cBNqcVAY6m5V8/4QqzaPl+zDBe6cLEPRDuNOUf3ww8RfJVlOyQMoSI+5Ang==", - "dev": true, - "requires": { - "@babel/parser": "^7.26.10", - "@babel/types": "^7.26.10", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^3.0.2" - } - }, - "@babel/helper-compilation-targets": { - "version": "7.26.5", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.26.5.tgz", - "integrity": "sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.26.5", - "@babel/helper-validator-option": "^7.25.9", - "browserslist": "^4.24.0", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - } - }, - "@babel/helper-module-imports": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", - "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", - "dev": true, - "requires": { - "@babel/traverse": "^7.25.9", - "@babel/types": "^7.25.9" - } - }, - "@babel/helper-module-transforms": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz", - "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.25.9", - "@babel/helper-validator-identifier": "^7.25.9", - "@babel/traverse": "^7.25.9" - } - }, - "@babel/helper-plugin-utils": { - "version": "7.26.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.26.5.tgz", - "integrity": "sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==", - "dev": true - }, - "@babel/helper-string-parser": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", - "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", - "dev": true - }, - "@babel/helper-validator-identifier": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", - "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", - "dev": true - }, - "@babel/helper-validator-option": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", - "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", - "dev": true - }, - "@babel/helpers": { - "version": "7.26.10", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.10.tgz", - "integrity": "sha512-UPYc3SauzZ3JGgj87GgZ89JVdC5dj0AoetR5Bw6wj4niittNyFh6+eOGonYvJ1ao6B8lEa3Q3klS7ADZ53bc5g==", - "dev": true, - "requires": { - "@babel/template": "^7.26.9", - "@babel/types": "^7.26.10" - } - }, - "@babel/parser": { - "version": "7.26.10", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.10.tgz", - "integrity": "sha512-6aQR2zGE/QFi8JpDLjUZEPYOs7+mhKXm86VaKFiLP35JQwQb6bwUE+XbvkH0EptsYhbNBSUGaUBLKqxH1xSgsA==", - "dev": true, - "requires": { - "@babel/types": "^7.26.10" - } - }, - "@babel/plugin-transform-react-jsx-self": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.25.9.tgz", - "integrity": "sha512-y8quW6p0WHkEhmErnfe58r7x0A70uKphQm8Sp8cV7tjNQwK56sNVK0M73LK3WuYmsuyrftut4xAkjjgU0twaMg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.25.9" - } - }, - "@babel/plugin-transform-react-jsx-source": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.25.9.tgz", - "integrity": "sha512-+iqjT8xmXhhYv4/uiYd8FNQsraMFZIfxVSqxxVSZP0WbbSAWvBXAul0m/zu+7Vv4O/3WtApy9pmaTMiumEZgfg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.25.9" - } - }, - "@babel/runtime": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", - "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", - "requires": { - "regenerator-runtime": "^0.13.4" - } - }, - "@babel/template": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.26.9.tgz", - "integrity": "sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.26.2", - "@babel/parser": "^7.26.9", - "@babel/types": "^7.26.9" - } - }, - "@babel/traverse": { - "version": "7.26.10", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.10.tgz", - "integrity": "sha512-k8NuDrxr0WrPH5Aupqb2LCVURP/S0vBEn5mK6iH+GIYob66U5EtoZvcdudR2jQ4cmTwhEwW1DLB+Yyas9zjF6A==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.26.2", - "@babel/generator": "^7.26.10", - "@babel/parser": "^7.26.10", - "@babel/template": "^7.26.9", - "@babel/types": "^7.26.10", - "debug": "^4.3.1", - "globals": "^11.1.0" - } - }, - "@babel/types": { - "version": "7.26.10", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.10.tgz", - "integrity": "sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ==", - "dev": true, - "requires": { - "@babel/helper-string-parser": "^7.25.9", - "@babel/helper-validator-identifier": "^7.25.9" - } - }, - "@ctrl/tinycolor": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/@ctrl/tinycolor/-/tinycolor-3.4.1.tgz", - "integrity": "sha512-ej5oVy6lykXsvieQtqZxCOaLT+xD4+QNarq78cIYISHmZXshCvROLudpQN3lfL8G0NL7plMSSK+zlyvCaIJ4Iw==" - }, - "@esbuild/aix-ppc64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.1.tgz", - "integrity": "sha512-kfYGy8IdzTGy+z0vFGvExZtxkFlA4zAxgKEahG9KE1ScBjpQnFsNOX8KTU5ojNru5ed5CVoJYXFtoxaq5nFbjQ==", - "dev": true, - "optional": true - }, - "@esbuild/android-arm": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.1.tgz", - "integrity": "sha512-dp+MshLYux6j/JjdqVLnMglQlFu+MuVeNrmT5nk6q07wNhCdSnB7QZj+7G8VMUGh1q+vj2Bq8kRsuyA00I/k+Q==", - "dev": true, - "optional": true - }, - "@esbuild/android-arm64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.1.tgz", - "integrity": "sha512-50tM0zCJW5kGqgG7fQ7IHvQOcAn9TKiVRuQ/lN0xR+T2lzEFvAi1ZcS8DiksFcEpf1t/GYOeOfCAgDHFpkiSmA==", - "dev": true, - "optional": true - }, - "@esbuild/android-x64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.1.tgz", - "integrity": "sha512-GCj6WfUtNldqUzYkN/ITtlhwQqGWu9S45vUXs7EIYf+7rCiiqH9bCloatO9VhxsL0Pji+PF4Lz2XXCES+Q8hDw==", - "dev": true, - "optional": true - }, - "@esbuild/darwin-arm64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.1.tgz", - "integrity": "sha512-5hEZKPf+nQjYoSr/elb62U19/l1mZDdqidGfmFutVUjjUZrOazAtwK+Kr+3y0C/oeJfLlxo9fXb1w7L+P7E4FQ==", - "dev": true, - "optional": true - }, - "@esbuild/darwin-x64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.1.tgz", - "integrity": "sha512-hxVnwL2Dqs3fM1IWq8Iezh0cX7ZGdVhbTfnOy5uURtao5OIVCEyj9xIzemDi7sRvKsuSdtCAhMKarxqtlyVyfA==", - "dev": true, - "optional": true - }, - "@esbuild/freebsd-arm64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.1.tgz", - "integrity": "sha512-1MrCZs0fZa2g8E+FUo2ipw6jw5qqQiH+tERoS5fAfKnRx6NXH31tXBKI3VpmLijLH6yriMZsxJtaXUyFt/8Y4A==", - "dev": true, - "optional": true - }, - "@esbuild/freebsd-x64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.1.tgz", - "integrity": "sha512-0IZWLiTyz7nm0xuIs0q1Y3QWJC52R8aSXxe40VUxm6BB1RNmkODtW6LHvWRrGiICulcX7ZvyH6h5fqdLu4gkww==", - "dev": true, - "optional": true - }, - "@esbuild/linux-arm": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.1.tgz", - "integrity": "sha512-NdKOhS4u7JhDKw9G3cY6sWqFcnLITn6SqivVArbzIaf3cemShqfLGHYMx8Xlm/lBit3/5d7kXvriTUGa5YViuQ==", - "dev": true, - "optional": true - }, - "@esbuild/linux-arm64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.1.tgz", - "integrity": "sha512-jaN3dHi0/DDPelk0nLcXRm1q7DNJpjXy7yWaWvbfkPvI+7XNSc/lDOnCLN7gzsyzgu6qSAmgSvP9oXAhP973uQ==", - "dev": true, - "optional": true - }, - "@esbuild/linux-ia32": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.1.tgz", - "integrity": "sha512-OJykPaF4v8JidKNGz8c/q1lBO44sQNUQtq1KktJXdBLn1hPod5rE/Hko5ugKKZd+D2+o1a9MFGUEIUwO2YfgkQ==", - "dev": true, - "optional": true - }, - "@esbuild/linux-loong64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.1.tgz", - "integrity": "sha512-nGfornQj4dzcq5Vp835oM/o21UMlXzn79KobKlcs3Wz9smwiifknLy4xDCLUU0BWp7b/houtdrgUz7nOGnfIYg==", - "dev": true, - "optional": true - }, - "@esbuild/linux-mips64el": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.1.tgz", - "integrity": "sha512-1osBbPEFYwIE5IVB/0g2X6i1qInZa1aIoj1TdL4AaAb55xIIgbg8Doq6a5BzYWgr+tEcDzYH67XVnTmUzL+nXg==", - "dev": true, - "optional": true - }, - "@esbuild/linux-ppc64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.1.tgz", - "integrity": "sha512-/6VBJOwUf3TdTvJZ82qF3tbLuWsscd7/1w+D9LH0W/SqUgM5/JJD0lrJ1fVIfZsqB6RFmLCe0Xz3fmZc3WtyVg==", - "dev": true, - "optional": true - }, - "@esbuild/linux-riscv64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.1.tgz", - "integrity": "sha512-nSut/Mx5gnilhcq2yIMLMe3Wl4FK5wx/o0QuuCLMtmJn+WeWYoEGDN1ipcN72g1WHsnIbxGXd4i/MF0gTcuAjQ==", - "dev": true, - "optional": true - }, - "@esbuild/linux-s390x": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.1.tgz", - "integrity": "sha512-cEECeLlJNfT8kZHqLarDBQso9a27o2Zd2AQ8USAEoGtejOrCYHNtKP8XQhMDJMtthdF4GBmjR2au3x1udADQQQ==", - "dev": true, - "optional": true - }, - "@esbuild/linux-x64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.1.tgz", - "integrity": "sha512-xbfUhu/gnvSEg+EGovRc+kjBAkrvtk38RlerAzQxvMzlB4fXpCFCeUAYzJvrnhFtdeyVCDANSjJvOvGYoeKzFA==", - "dev": true, - "optional": true - }, - "@esbuild/netbsd-arm64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.1.tgz", - "integrity": "sha512-O96poM2XGhLtpTh+s4+nP7YCCAfb4tJNRVZHfIE7dgmax+yMP2WgMd2OecBuaATHKTHsLWHQeuaxMRnCsH8+5g==", - "dev": true, - "optional": true - }, - "@esbuild/netbsd-x64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.1.tgz", - "integrity": "sha512-X53z6uXip6KFXBQ+Krbx25XHV/NCbzryM6ehOAeAil7X7oa4XIq+394PWGnwaSQ2WRA0KI6PUO6hTO5zeF5ijA==", - "dev": true, - "optional": true - }, - "@esbuild/openbsd-arm64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.1.tgz", - "integrity": "sha512-Na9T3szbXezdzM/Kfs3GcRQNjHzM6GzFBeU1/6IV/npKP5ORtp9zbQjvkDJ47s6BCgaAZnnnu/cY1x342+MvZg==", - "dev": true, - "optional": true - }, - "@esbuild/openbsd-x64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.1.tgz", - "integrity": "sha512-T3H78X2h1tszfRSf+txbt5aOp/e7TAz3ptVKu9Oyir3IAOFPGV6O9c2naym5TOriy1l0nNf6a4X5UXRZSGX/dw==", - "dev": true, - "optional": true - }, - "@esbuild/sunos-x64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.1.tgz", - "integrity": "sha512-2H3RUvcmULO7dIE5EWJH8eubZAI4xw54H1ilJnRNZdeo8dTADEZ21w6J22XBkXqGJbe0+wnNJtw3UXRoLJnFEg==", - "dev": true, - "optional": true - }, - "@esbuild/win32-arm64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.1.tgz", - "integrity": "sha512-GE7XvrdOzrb+yVKB9KsRMq+7a2U/K5Cf/8grVFRAGJmfADr/e/ODQ134RK2/eeHqYV5eQRFxb1hY7Nr15fv1NQ==", - "dev": true, - "optional": true - }, - "@esbuild/win32-ia32": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.1.tgz", - "integrity": "sha512-uOxSJCIcavSiT6UnBhBzE8wy3n0hOkJsBOzy7HDAuTDE++1DJMRRVCPGisULScHL+a/ZwdXPpXD3IyFKjA7K8A==", - "dev": true, - "optional": true - }, - "@esbuild/win32-x64": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.1.tgz", - "integrity": "sha512-Y1EQdcfwMSeQN/ujR5VayLOJ1BHaK+ssyk0AEzPjC+t1lITgsnccPqFjb6V+LsTp/9Iov4ysfjxLaGJ9RPtkVg==", - "dev": true, - "optional": true - }, - "@jridgewell/gen-mapping": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", - "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", - "dev": true, - "requires": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - } - }, - "@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true - }, - "@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true - }, - "@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", - "dev": true - }, - "@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, - "requires": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "@rollup/rollup-android-arm-eabi": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.36.0.tgz", - "integrity": "sha512-jgrXjjcEwN6XpZXL0HUeOVGfjXhPyxAbbhD0BlXUB+abTOpbPiN5Wb3kOT7yb+uEtATNYF5x5gIfwutmuBA26w==", - "dev": true, - "optional": true - }, - "@rollup/rollup-android-arm64": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.36.0.tgz", - "integrity": "sha512-NyfuLvdPdNUfUNeYKUwPwKsE5SXa2J6bCt2LdB/N+AxShnkpiczi3tcLJrm5mA+eqpy0HmaIY9F6XCa32N5yzg==", - "dev": true, - "optional": true - }, - "@rollup/rollup-darwin-arm64": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.36.0.tgz", - "integrity": "sha512-JQ1Jk5G4bGrD4pWJQzWsD8I1n1mgPXq33+/vP4sk8j/z/C2siRuxZtaUA7yMTf71TCZTZl/4e1bfzwUmFb3+rw==", - "dev": true, - "optional": true - }, - "@rollup/rollup-darwin-x64": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.36.0.tgz", - "integrity": "sha512-6c6wMZa1lrtiRsbDziCmjE53YbTkxMYhhnWnSW8R/yqsM7a6mSJ3uAVT0t8Y/DGt7gxUWYuFM4bwWk9XCJrFKA==", - "dev": true, - "optional": true - }, - "@rollup/rollup-freebsd-arm64": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.36.0.tgz", - "integrity": "sha512-KXVsijKeJXOl8QzXTsA+sHVDsFOmMCdBRgFmBb+mfEb/7geR7+C8ypAml4fquUt14ZyVXaw2o1FWhqAfOvA4sg==", - "dev": true, - "optional": true - }, - "@rollup/rollup-freebsd-x64": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.36.0.tgz", - "integrity": "sha512-dVeWq1ebbvByI+ndz4IJcD4a09RJgRYmLccwlQ8bPd4olz3Y213uf1iwvc7ZaxNn2ab7bjc08PrtBgMu6nb4pQ==", - "dev": true, - "optional": true - }, - "@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.36.0.tgz", - "integrity": "sha512-bvXVU42mOVcF4le6XSjscdXjqx8okv4n5vmwgzcmtvFdifQ5U4dXFYaCB87namDRKlUL9ybVtLQ9ztnawaSzvg==", - "dev": true, - "optional": true - }, - "@rollup/rollup-linux-arm-musleabihf": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.36.0.tgz", - "integrity": "sha512-JFIQrDJYrxOnyDQGYkqnNBtjDwTgbasdbUiQvcU8JmGDfValfH1lNpng+4FWlhaVIR4KPkeddYjsVVbmJYvDcg==", - "dev": true, - "optional": true - }, - "@rollup/rollup-linux-arm64-gnu": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.36.0.tgz", - "integrity": "sha512-KqjYVh3oM1bj//5X7k79PSCZ6CvaVzb7Qs7VMWS+SlWB5M8p3FqufLP9VNp4CazJ0CsPDLwVD9r3vX7Ci4J56A==", - "dev": true, - "optional": true - }, - "@rollup/rollup-linux-arm64-musl": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.36.0.tgz", - "integrity": "sha512-QiGnhScND+mAAtfHqeT+cB1S9yFnNQ/EwCg5yE3MzoaZZnIV0RV9O5alJAoJKX/sBONVKeZdMfO8QSaWEygMhw==", - "dev": true, - "optional": true - }, - "@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.36.0.tgz", - "integrity": "sha512-1ZPyEDWF8phd4FQtTzMh8FQwqzvIjLsl6/84gzUxnMNFBtExBtpL51H67mV9xipuxl1AEAerRBgBwFNpkw8+Lg==", - "dev": true, - "optional": true - }, - "@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.36.0.tgz", - "integrity": "sha512-VMPMEIUpPFKpPI9GZMhJrtu8rxnp6mJR3ZzQPykq4xc2GmdHj3Q4cA+7avMyegXy4n1v+Qynr9fR88BmyO74tg==", - "dev": true, - "optional": true - }, - "@rollup/rollup-linux-riscv64-gnu": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.36.0.tgz", - "integrity": "sha512-ttE6ayb/kHwNRJGYLpuAvB7SMtOeQnVXEIpMtAvx3kepFQeowVED0n1K9nAdraHUPJ5hydEMxBpIR7o4nrm8uA==", - "dev": true, - "optional": true - }, - "@rollup/rollup-linux-s390x-gnu": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.36.0.tgz", - "integrity": "sha512-4a5gf2jpS0AIe7uBjxDeUMNcFmaRTbNv7NxI5xOCs4lhzsVyGR/0qBXduPnoWf6dGC365saTiwag8hP1imTgag==", - "dev": true, - "optional": true - }, - "@rollup/rollup-linux-x64-gnu": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.36.0.tgz", - "integrity": "sha512-5KtoW8UWmwFKQ96aQL3LlRXX16IMwyzMq/jSSVIIyAANiE1doaQsx/KRyhAvpHlPjPiSU/AYX/8m+lQ9VToxFQ==", - "dev": true, - "optional": true - }, - "@rollup/rollup-linux-x64-musl": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.36.0.tgz", - "integrity": "sha512-sycrYZPrv2ag4OCvaN5js+f01eoZ2U+RmT5as8vhxiFz+kxwlHrsxOwKPSA8WyS+Wc6Epid9QeI/IkQ9NkgYyQ==", - "dev": true, - "optional": true - }, - "@rollup/rollup-win32-arm64-msvc": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.36.0.tgz", - "integrity": "sha512-qbqt4N7tokFwwSVlWDsjfoHgviS3n/vZ8LK0h1uLG9TYIRuUTJC88E1xb3LM2iqZ/WTqNQjYrtmtGmrmmawB6A==", - "dev": true, - "optional": true - }, - "@rollup/rollup-win32-ia32-msvc": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.36.0.tgz", - "integrity": "sha512-t+RY0JuRamIocMuQcfwYSOkmdX9dtkr1PbhKW42AMvaDQa+jOdpUYysroTF/nuPpAaQMWp7ye+ndlmmthieJrQ==", - "dev": true, - "optional": true - }, - "@rollup/rollup-win32-x64-msvc": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.36.0.tgz", - "integrity": "sha512-aRXd7tRZkWLqGbChgcMMDEHjOKudo1kChb1Jt1IfR8cY/KIpgNviLeJy5FUb9IpSuQj8dU2fAYNMPW/hLKOSTw==", - "dev": true, - "optional": true - }, - "@types/babel__core": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", - "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", - "dev": true, - "requires": { - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "@types/babel__generator": { - "version": "7.6.8", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", - "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@types/babel__template": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", - "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", - "dev": true, - "requires": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "@types/babel__traverse": { - "version": "7.20.6", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", - "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", - "dev": true, - "requires": { - "@babel/types": "^7.20.7" - } - }, - "@types/estree": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "dev": true - }, - "@types/prop-types": { - "version": "15.7.5", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", - "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==", - "dev": true - }, - "@types/react": { - "version": "18.0.17", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.17.tgz", - "integrity": "sha512-38ETy4tL+rn4uQQi7mB81G7V1g0u2ryquNmsVIOKUAEIDK+3CUjZ6rSRpdvS99dNBnkLFL83qfmtLacGOTIhwQ==", - "dev": true, - "requires": { - "@types/prop-types": "*", - "@types/scheduler": "*", - "csstype": "^3.0.2" - } - }, - "@types/react-dom": { - "version": "18.0.6", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.0.6.tgz", - "integrity": "sha512-/5OFZgfIPSwy+YuIBP/FgJnQnsxhZhjjrnxudMddeblOouIodEQ75X14Rr4wGSG/bknL+Omy9iWlLo1u/9GzAA==", - "dev": true, - "requires": { - "@types/react": "*" - } - }, - "@types/scheduler": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", - "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==", - "dev": true - }, - "@vitejs/plugin-react": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.3.4.tgz", - "integrity": "sha512-SCCPBJtYLdE8PX/7ZQAs1QAZ8Jqwih+0VBLum1EGqmCCQal+MIUqLCzj3ZUy8ufbC0cAM4LRlSTm7IQJwWT4ug==", - "dev": true, - "requires": { - "@babel/core": "^7.26.0", - "@babel/plugin-transform-react-jsx-self": "^7.25.9", - "@babel/plugin-transform-react-jsx-source": "^7.25.9", - "@types/babel__core": "^7.20.5", - "react-refresh": "^0.14.2" - } - }, - "antd": { - "version": "4.22.8", - "resolved": "https://registry.npmjs.org/antd/-/antd-4.22.8.tgz", - "integrity": "sha512-mqHuCg9itZX+z6wk+mvRBcfz/U9iiIXS4LoNkyo8X/UBgdN8CoetFmrdvA1UQy1BuWa0/n62LiS1LatdvoTuHw==", - "requires": { - "@ant-design/colors": "^6.0.0", - "@ant-design/icons": "^4.7.0", - "@ant-design/react-slick": "~0.29.1", - "@babel/runtime": "^7.18.3", - "@ctrl/tinycolor": "^3.4.0", - "classnames": "^2.2.6", - "copy-to-clipboard": "^3.2.0", - "lodash": "^4.17.21", - "memoize-one": "^6.0.0", - "moment": "^2.29.2", - "rc-cascader": "~3.6.0", - "rc-checkbox": "~2.3.0", - "rc-collapse": "~3.3.0", - "rc-dialog": "~8.9.0", - "rc-drawer": "~5.1.0", - "rc-dropdown": "~4.0.0", - "rc-field-form": "~1.27.0", - "rc-image": "~5.7.0", - "rc-input": "~0.0.1-alpha.5", - "rc-input-number": "~7.3.5", - "rc-mentions": "~1.9.1", - "rc-menu": "~9.6.3", - "rc-motion": "^2.6.1", - "rc-notification": "~4.6.0", - "rc-pagination": "~3.1.17", - "rc-picker": "~2.6.10", - "rc-progress": "~3.3.2", - "rc-rate": "~2.9.0", - "rc-resize-observer": "^1.2.0", - "rc-segmented": "~2.1.0", - "rc-select": "~14.1.1", - "rc-slider": "~10.0.0", - "rc-steps": "~4.1.0", - "rc-switch": "~3.2.0", - "rc-table": "~7.25.3", - "rc-tabs": "~11.16.0", - "rc-textarea": "~0.3.0", - "rc-tooltip": "~5.2.0", - "rc-tree": "~5.6.5", - "rc-tree-select": "~5.4.0", - "rc-trigger": "^5.2.10", - "rc-upload": "~4.3.0", - "rc-util": "^5.22.5", - "scroll-into-view-if-needed": "^2.2.25" - } - }, - "array-tree-filter": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-tree-filter/-/array-tree-filter-2.1.0.tgz", - "integrity": "sha512-4ROwICNlNw/Hqa9v+rk5h22KjmzB1JGTMVKP2AKJBOCgb0yL0ASf0+YvCcLNNwquOHNX48jkeZIJ3a+oOQqKcw==" - }, - "async-validator": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/async-validator/-/async-validator-4.2.5.tgz", - "integrity": "sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg==" - }, - "browserslist": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz", - "integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001688", - "electron-to-chromium": "^1.5.73", - "node-releases": "^2.0.19", - "update-browserslist-db": "^1.1.1" - } - }, - "caniuse-lite": { - "version": "1.0.30001706", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001706.tgz", - "integrity": "sha512-3ZczoTApMAZwPKYWmwVbQMFpXBDds3/0VciVoUwPUbldlYyVLmRVuRs/PcUZtHpbLRpzzDvrvnFuREsGt6lUug==", - "dev": true - }, - "classnames": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.1.tgz", - "integrity": "sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA==" - }, - "compute-scroll-into-view": { - "version": "1.0.17", - "resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-1.0.17.tgz", - "integrity": "sha512-j4dx+Fb0URmzbwwMUrhqWM2BEWHdFGx+qZ9qqASHRPqvTYdqvWnHg0H1hIbcyLnvgnoNAVMlwkepyqM3DaIFUg==" - }, - "convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true - }, - "copy-to-clipboard": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.3.2.tgz", - "integrity": "sha512-Vme1Z6RUDzrb6xAI7EZlVZ5uvOk2F//GaxKUxajDqm9LhOVM1inxNAD2vy+UZDYsd0uyA9s7b3/FVZPSxqrCfg==", - "requires": { - "toggle-selection": "^1.0.6" - } - }, - "csstype": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz", - "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==", - "dev": true - }, - "date-fns": { - "version": "2.29.2", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.29.2.tgz", - "integrity": "sha512-0VNbwmWJDS/G3ySwFSJA3ayhbURMTJLtwM2DTxf9CWondCnh6DTNlO9JgRSq6ibf4eD0lfMJNBxUdEAHHix+bA==" - }, - "dayjs": { - "version": "1.11.5", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.5.tgz", - "integrity": "sha512-CAdX5Q3YW3Gclyo5Vpqkgpj8fSdLQcRuzfX6mC6Phy0nfJ0eGYOeS7m4mt2plDWLAtA4TqTakvbboHvUxfe4iA==" - }, - "debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", - "dev": true, - "requires": { - "ms": "^2.1.3" - } - }, - "dom-align": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/dom-align/-/dom-align-1.12.3.tgz", - "integrity": "sha512-Gj9hZN3a07cbR6zviMUBOMPdWxYhbMI+x+WS0NAIu2zFZmbK8ys9R79g+iG9qLnlCwpFoaB+fKy8Pdv470GsPA==" - }, - "electron-to-chromium": { - "version": "1.5.121", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.121.tgz", - "integrity": "sha512-gpIEzIb3uvm6V8IK452TvzOvZ3EAF8D5i11SMUG7BjpF2aalh5KyKX5dO+GDW5m9Qdia1ejLm6WM5NOIOd7sbQ==", - "dev": true - }, - "esbuild": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.1.tgz", - "integrity": "sha512-BGO5LtrGC7vxnqucAe/rmvKdJllfGaYWdyABvyMoXQlfYMb2bbRuReWR5tEGE//4LcNJj9XrkovTqNYRFZHAMQ==", - "dev": true, - "requires": { - "@esbuild/aix-ppc64": "0.25.1", - "@esbuild/android-arm": "0.25.1", - "@esbuild/android-arm64": "0.25.1", - "@esbuild/android-x64": "0.25.1", - "@esbuild/darwin-arm64": "0.25.1", - "@esbuild/darwin-x64": "0.25.1", - "@esbuild/freebsd-arm64": "0.25.1", - "@esbuild/freebsd-x64": "0.25.1", - "@esbuild/linux-arm": "0.25.1", - "@esbuild/linux-arm64": "0.25.1", - "@esbuild/linux-ia32": "0.25.1", - "@esbuild/linux-loong64": "0.25.1", - "@esbuild/linux-mips64el": "0.25.1", - "@esbuild/linux-ppc64": "0.25.1", - "@esbuild/linux-riscv64": "0.25.1", - "@esbuild/linux-s390x": "0.25.1", - "@esbuild/linux-x64": "0.25.1", - "@esbuild/netbsd-arm64": "0.25.1", - "@esbuild/netbsd-x64": "0.25.1", - "@esbuild/openbsd-arm64": "0.25.1", - "@esbuild/openbsd-x64": "0.25.1", - "@esbuild/sunos-x64": "0.25.1", - "@esbuild/win32-arm64": "0.25.1", - "@esbuild/win32-ia32": "0.25.1", - "@esbuild/win32-x64": "0.25.1" - } - }, - "escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true - }, - "fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "optional": true - }, - "gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true - }, - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true - }, - "highlight-words-core": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/highlight-words-core/-/highlight-words-core-1.2.2.tgz", - "integrity": "sha512-BXUKIkUuh6cmmxzi5OIbUJxrG8OAk2MqoL1DtO3Wo9D2faJg2ph5ntyuQeLqaHJmzER6H5tllCDA9ZnNe9BVGg==" - }, - "history": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/history/-/history-5.3.0.tgz", - "integrity": "sha512-ZqaKwjjrAYUYfLG+htGaIIZ4nioX2L70ZUMIFysS3xvBsSG4x/n1V6TXV3N8ZYNuFGlDirFg32T7B6WOUPDYcQ==", - "requires": { - "@babel/runtime": "^7.7.6" - } - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" - }, - "jsesc": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", - "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", - "dev": true - }, - "json2mq": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/json2mq/-/json2mq-0.2.0.tgz", - "integrity": "sha512-SzoRg7ux5DWTII9J2qkrZrqV1gt+rTaoufMxEzXbS26Uid0NwaJd123HcoB80TgubEppxxIGdNxCx50fEoEWQA==", - "requires": { - "string-convert": "^0.2.0" - } - }, - "json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "requires": { - "yallist": "^3.0.2" - } - }, - "memoize-one": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-6.0.0.tgz", - "integrity": "sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw==" - }, - "moment": { - "version": "2.29.4", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", - "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==" - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "nanoid": { - "version": "3.3.11", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", - "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", - "dev": true - }, - "node-releases": { - "version": "2.0.19", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", - "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==" - }, - "picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "dev": true - }, - "postcss": { - "version": "8.5.3", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz", - "integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==", - "dev": true, - "requires": { - "nanoid": "^3.3.8", - "picocolors": "^1.1.1", - "source-map-js": "^1.2.1" - } - }, - "prop-types": { - "version": "15.8.1", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", - "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "requires": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.13.1" - } - }, - "rc-align": { - "version": "4.0.12", - "resolved": "https://registry.npmjs.org/rc-align/-/rc-align-4.0.12.tgz", - "integrity": "sha512-3DuwSJp8iC/dgHzwreOQl52soj40LchlfUHtgACOUtwGuoFIOVh6n/sCpfqCU8kO5+iz6qR0YKvjgB8iPdE3aQ==", - "requires": { - "@babel/runtime": "^7.10.1", - "classnames": "2.x", - "dom-align": "^1.7.0", - "lodash": "^4.17.21", - "rc-util": "^5.3.0", - "resize-observer-polyfill": "^1.5.1" - } - }, - "rc-cascader": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/rc-cascader/-/rc-cascader-3.6.2.tgz", - "integrity": "sha512-sf2otpazlROTzkD3nZVfIzXmfBLiEOBTXA5wxozGXBpS902McDpvF0bdcYBu5hN+rviEAm6Mh9cLXNQ1Ty8wKQ==", - "requires": { - "@babel/runtime": "^7.12.5", - "array-tree-filter": "^2.1.0", - "classnames": "^2.3.1", - "rc-select": "~14.1.0", - "rc-tree": "~5.6.3", - "rc-util": "^5.6.1" - } - }, - "rc-checkbox": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/rc-checkbox/-/rc-checkbox-2.3.2.tgz", - "integrity": "sha512-afVi1FYiGv1U0JlpNH/UaEXdh6WUJjcWokj/nUN2TgG80bfG+MDdbfHKlLcNNba94mbjy2/SXJ1HDgrOkXGAjg==", - "requires": { - "@babel/runtime": "^7.10.1", - "classnames": "^2.2.1" - } - }, - "rc-collapse": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/rc-collapse/-/rc-collapse-3.3.1.tgz", - "integrity": "sha512-cOJfcSe3R8vocrF8T+PgaHDrgeA1tX+lwfhwSj60NX9QVRidsILIbRNDLD6nAzmcvVC5PWiIRiR4S1OobxdhCg==", - "requires": { - "@babel/runtime": "^7.10.1", - "classnames": "2.x", - "rc-motion": "^2.3.4", - "rc-util": "^5.2.1", - "shallowequal": "^1.1.0" - } - }, - "rc-dialog": { - "version": "8.9.0", - "resolved": "https://registry.npmjs.org/rc-dialog/-/rc-dialog-8.9.0.tgz", - "integrity": "sha512-Cp0tbJnrvPchJfnwIvOMWmJ4yjX3HWFatO6oBFD1jx8QkgsQCR0p8nUWAKdd3seLJhEC39/v56kZaEjwp9muoQ==", - "requires": { - "@babel/runtime": "^7.10.1", - "classnames": "^2.2.6", - "rc-motion": "^2.3.0", - "rc-util": "^5.21.0" - } - }, - "rc-drawer": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/rc-drawer/-/rc-drawer-5.1.0.tgz", - "integrity": "sha512-pU3Tsn99pxGdYowXehzZbdDVE+4lDXSGb7p8vA9mSmr569oc2Izh4Zw5vLKSe/Xxn2p5MSNbLVqD4tz+pK6SOw==", - "requires": { - "@babel/runtime": "^7.10.1", - "classnames": "^2.2.6", - "rc-motion": "^2.6.1", - "rc-util": "^5.21.2" - } - }, - "rc-dropdown": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/rc-dropdown/-/rc-dropdown-4.0.1.tgz", - "integrity": "sha512-OdpXuOcme1rm45cR0Jzgfl1otzmU4vuBVb+etXM8vcaULGokAKVpKlw8p6xzspG7jGd/XxShvq+N3VNEfk/l5g==", - "requires": { - "@babel/runtime": "^7.18.3", - "classnames": "^2.2.6", - "rc-trigger": "^5.3.1", - "rc-util": "^5.17.0" - } - }, - "rc-field-form": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/rc-field-form/-/rc-field-form-1.27.1.tgz", - "integrity": "sha512-RShegnwFu6TH8tl2olCxn+B4Wyh5EiQH8c/7wucbkLNyue05YiH5gomUAg1vbZjp71yFKwegClctsEG5CNBWAA==", - "requires": { - "@babel/runtime": "^7.18.0", - "async-validator": "^4.1.0", - "rc-util": "^5.8.0" - } - }, - "rc-image": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/rc-image/-/rc-image-5.7.1.tgz", - "integrity": "sha512-QyMfdhoUfb5W14plqXSisaYwpdstcLYnB0MjX5ccIK2rydQM9sDPuekQWu500DDGR2dBaIF5vx9XbWkNFK17Fg==", - "requires": { - "@babel/runtime": "^7.11.2", - "classnames": "^2.2.6", - "rc-dialog": "~8.9.0", - "rc-util": "^5.0.6" - } - }, - "rc-input": { - "version": "0.0.1-alpha.7", - "resolved": "https://registry.npmjs.org/rc-input/-/rc-input-0.0.1-alpha.7.tgz", - "integrity": "sha512-eozaqpCYWSY5LBMwlHgC01GArkVEP+XlJ84OMvdkwUnJBSv83Yxa15pZpn7vACAj84uDC4xOA2CoFdbLuqB08Q==", - "requires": { - "@babel/runtime": "^7.11.1", - "classnames": "^2.2.1", - "rc-util": "^5.18.1" - } - }, - "rc-input-number": { - "version": "7.3.6", - "resolved": "https://registry.npmjs.org/rc-input-number/-/rc-input-number-7.3.6.tgz", - "integrity": "sha512-Se62oMOBn9HwF/gSag+YtAYyKZsjJzEsqmyAJHAnAvPfjZJOu7dLMlQRwBbTtELbKXM/Y5Fztcq8CW2Y9f49qA==", - "requires": { - "@babel/runtime": "^7.10.1", - "classnames": "^2.2.5", - "rc-util": "^5.23.0" - } - }, - "rc-mentions": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/rc-mentions/-/rc-mentions-1.9.2.tgz", - "integrity": "sha512-uxb/lzNnEGmvraKWNGE6KXMVXvt8RQv9XW8R0Dqi3hYsyPiAZeHRCHQKdLARuk5YBhFhZ6ga55D/8XuY367g3g==", - "requires": { - "@babel/runtime": "^7.10.1", - "classnames": "^2.2.6", - "rc-menu": "~9.6.0", - "rc-textarea": "^0.3.0", - "rc-trigger": "^5.0.4", - "rc-util": "^5.22.5" - } - }, - "rc-menu": { - "version": "9.6.3", - "resolved": "https://registry.npmjs.org/rc-menu/-/rc-menu-9.6.3.tgz", - "integrity": "sha512-KY9QilKWgkJZ0JSpOBgIpQF2wMRRodRxpIMYyIJ3Nd5N6xfVLOxXCxevHcBplt+Ez7MhUF+I03MuAKqWQJLZgw==", - "requires": { - "@babel/runtime": "^7.10.1", - "classnames": "2.x", - "rc-motion": "^2.4.3", - "rc-overflow": "^1.2.0", - "rc-trigger": "^5.1.2", - "rc-util": "^5.12.0", - "shallowequal": "^1.1.0" - } - }, - "rc-motion": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rc-motion/-/rc-motion-2.6.2.tgz", - "integrity": "sha512-4w1FaX3dtV749P8GwfS4fYnFG4Rb9pxvCYPc/b2fw1cmlHJWNNgOFIz7ysiD+eOrzJSvnLJWlNQQncpNMXwwpg==", - "requires": { - "@babel/runtime": "^7.11.1", - "classnames": "^2.2.1", - "rc-util": "^5.21.0" - } - }, - "rc-notification": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/rc-notification/-/rc-notification-4.6.0.tgz", - "integrity": "sha512-xF3MKgIoynzjQAO4lqsoraiFo3UXNYlBfpHs0VWvwF+4pimen9/H1DYLN2mfRWhHovW6gRpla73m2nmyIqAMZQ==", - "requires": { - "@babel/runtime": "^7.10.1", - "classnames": "2.x", - "rc-motion": "^2.2.0", - "rc-util": "^5.20.1" - } - }, - "rc-overflow": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc-overflow/-/rc-overflow-1.2.8.tgz", - "integrity": "sha512-QJ0UItckWPQ37ZL1dMEBAdY1dhfTXFL9k6oTTcyydVwoUNMnMqCGqnRNA98axSr/OeDKqR6DVFyi8eA5RQI/uQ==", - "requires": { - "@babel/runtime": "^7.11.1", - "classnames": "^2.2.1", - "rc-resize-observer": "^1.0.0", - "rc-util": "^5.19.2" - } - }, - "rc-pagination": { - "version": "3.1.17", - "resolved": "https://registry.npmjs.org/rc-pagination/-/rc-pagination-3.1.17.tgz", - "integrity": "sha512-/BQ5UxcBnW28vFAcP2hfh+Xg15W0QZn8TWYwdCApchMH1H0CxiaUUcULP8uXcFM1TygcdKWdt3JqsL9cTAfdkQ==", - "requires": { - "@babel/runtime": "^7.10.1", - "classnames": "^2.2.1" - } - }, - "rc-picker": { - "version": "2.6.10", - "resolved": "https://registry.npmjs.org/rc-picker/-/rc-picker-2.6.10.tgz", - "integrity": "sha512-9wYtw0DFWs9FO92Qh2D76P0iojUr8ZhLOtScUeOit6ks/F+TBLrOC1uze3IOu+u9gbDAjmosNWLKbBzx/Yuv2w==", - "requires": { - "@babel/runtime": "^7.10.1", - "classnames": "^2.2.1", - "date-fns": "2.x", - "dayjs": "1.x", - "moment": "^2.24.0", - "rc-trigger": "^5.0.4", - "rc-util": "^5.4.0", - "shallowequal": "^1.1.0" - } - }, - "rc-progress": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/rc-progress/-/rc-progress-3.3.3.tgz", - "integrity": "sha512-MDVNVHzGanYtRy2KKraEaWeZLri2ZHWIRyaE1a9MQ2MuJ09m+Wxj5cfcaoaR6z5iRpHpA59YeUxAlpML8N4PJw==", - "requires": { - "@babel/runtime": "^7.10.1", - "classnames": "^2.2.6", - "rc-util": "^5.16.1" - } - }, - "rc-rate": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/rc-rate/-/rc-rate-2.9.2.tgz", - "integrity": "sha512-SaiZFyN8pe0Fgphv8t3+kidlej+cq/EALkAJAc3A0w0XcPaH2L1aggM8bhe1u6GAGuQNAoFvTLjw4qLPGRKV5g==", - "requires": { - "@babel/runtime": "^7.10.1", - "classnames": "^2.2.5", - "rc-util": "^5.0.1" - } - }, - "rc-resize-observer": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/rc-resize-observer/-/rc-resize-observer-1.2.0.tgz", - "integrity": "sha512-6W+UzT3PyDM0wVCEHfoW3qTHPTvbdSgiA43buiy8PzmeMnfgnDeb9NjdimMXMl3/TcrvvWl5RRVdp+NqcR47pQ==", - "requires": { - "@babel/runtime": "^7.10.1", - "classnames": "^2.2.1", - "rc-util": "^5.15.0", - "resize-observer-polyfill": "^1.5.1" - } - }, - "rc-segmented": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/rc-segmented/-/rc-segmented-2.1.0.tgz", - "integrity": "sha512-hUlonro+pYoZcwrH6Vm56B2ftLfQh046hrwif/VwLIw1j3zGt52p5mREBwmeVzXnSwgnagpOpfafspzs1asjGw==", - "requires": { - "@babel/runtime": "^7.11.1", - "classnames": "^2.2.1", - "rc-motion": "^2.4.4", - "rc-util": "^5.17.0" - } - }, - "rc-select": { - "version": "14.1.9", - "resolved": "https://registry.npmjs.org/rc-select/-/rc-select-14.1.9.tgz", - "integrity": "sha512-DK01+Q7oCWr5jVPiEp/BTQ8xCB4rI4LfXzZtSmBWJhOMuibyZD1Vlz/DlVKCUFmtBM4SzG4/SltGHoGlcbCqiw==", - "requires": { - "@babel/runtime": "^7.10.1", - "classnames": "2.x", - "rc-motion": "^2.0.1", - "rc-overflow": "^1.0.0", - "rc-trigger": "^5.0.4", - "rc-util": "^5.16.1", - "rc-virtual-list": "^3.2.0" - } - }, - "rc-slider": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/rc-slider/-/rc-slider-10.0.1.tgz", - "integrity": "sha512-igTKF3zBet7oS/3yNiIlmU8KnZ45npmrmHlUUio8PNbIhzMcsh+oE/r2UD42Y6YD2D/s+kzCQkzQrPD6RY435Q==", - "requires": { - "@babel/runtime": "^7.10.1", - "classnames": "^2.2.5", - "rc-util": "^5.18.1", - "shallowequal": "^1.1.0" - } - }, - "rc-steps": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/rc-steps/-/rc-steps-4.1.4.tgz", - "integrity": "sha512-qoCqKZWSpkh/b03ASGx1WhpKnuZcRWmvuW+ZUu4mvMdfvFzVxblTwUM+9aBd0mlEUFmt6GW8FXhMpHkK3Uzp3w==", - "requires": { - "@babel/runtime": "^7.10.2", - "classnames": "^2.2.3", - "rc-util": "^5.0.1" - } - }, - "rc-switch": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/rc-switch/-/rc-switch-3.2.2.tgz", - "integrity": "sha512-+gUJClsZZzvAHGy1vZfnwySxj+MjLlGRyXKXScrtCTcmiYNPzxDFOxdQ/3pK1Kt/0POvwJ/6ALOR8gwdXGhs+A==", - "requires": { - "@babel/runtime": "^7.10.1", - "classnames": "^2.2.1", - "rc-util": "^5.0.1" - } - }, - "rc-table": { - "version": "7.25.3", - "resolved": "https://registry.npmjs.org/rc-table/-/rc-table-7.25.3.tgz", - "integrity": "sha512-McsLJ2rg8EEpRBRYN4Pf9gT7ZNYnjvF9zrBpUBBbUX/fxk+eGi5ff1iPIhMyiHsH71/BmTUzX9nc9XqupD0nMg==", - "requires": { - "@babel/runtime": "^7.10.1", - "classnames": "^2.2.5", - "rc-resize-observer": "^1.1.0", - "rc-util": "^5.22.5", - "shallowequal": "^1.1.0" - } - }, - "rc-tabs": { - "version": "11.16.1", - "resolved": "https://registry.npmjs.org/rc-tabs/-/rc-tabs-11.16.1.tgz", - "integrity": "sha512-bR7Dap23YyfzZQwtKomhiFEFzZuE7WaKWo+ypNRSGB9PDKSc6tM12VP8LWYkvmmQHthgwP0WRN8nFbSJWuqLYw==", - "requires": { - "@babel/runtime": "^7.11.2", - "classnames": "2.x", - "rc-dropdown": "~4.0.0", - "rc-menu": "~9.6.0", - "rc-resize-observer": "^1.0.0", - "rc-util": "^5.5.0" - } - }, - "rc-textarea": { - "version": "0.3.7", - "resolved": "https://registry.npmjs.org/rc-textarea/-/rc-textarea-0.3.7.tgz", - "integrity": "sha512-yCdZ6binKmAQB13hc/oehh0E/QRwoPP1pjF21aHBxlgXO3RzPF6dUu4LG2R4FZ1zx/fQd2L1faktulrXOM/2rw==", - "requires": { - "@babel/runtime": "^7.10.1", - "classnames": "^2.2.1", - "rc-resize-observer": "^1.0.0", - "rc-util": "^5.7.0", - "shallowequal": "^1.1.0" - } - }, - "rc-tooltip": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/rc-tooltip/-/rc-tooltip-5.2.2.tgz", - "integrity": "sha512-jtQzU/18S6EI3lhSGoDYhPqNpWajMtS5VV/ld1LwyfrDByQpYmw/LW6U7oFXXLukjfDHQ7Ju705A82PRNFWYhg==", - "requires": { - "@babel/runtime": "^7.11.2", - "classnames": "^2.3.1", - "rc-trigger": "^5.0.0" - } - }, - "rc-tree": { - "version": "5.6.6", - "resolved": "https://registry.npmjs.org/rc-tree/-/rc-tree-5.6.6.tgz", - "integrity": "sha512-HI/q4D4AHOp48OZcBUvJFWkI5OfnZivvGYI0xzI0dy0Mita2KcTGZv7/Yl6Aq3bL3od3x5AqAXq/7qxR3x4Kkg==", - "requires": { - "@babel/runtime": "^7.10.1", - "classnames": "2.x", - "rc-motion": "^2.0.1", - "rc-util": "^5.16.1", - "rc-virtual-list": "^3.4.8" - } - }, - "rc-tree-select": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/rc-tree-select/-/rc-tree-select-5.4.1.tgz", - "integrity": "sha512-xhXnKP8Stu2Q7wTcjJaSzSOLd4wmFtUZOwmy1cioaWyPbpiKlYdnALXA/9U49HOaV3KFXdRHE9Yi0KYED7yOAQ==", - "requires": { - "@babel/runtime": "^7.10.1", - "classnames": "2.x", - "rc-select": "~14.1.0", - "rc-tree": "~5.6.1", - "rc-util": "^5.16.1" - } - }, - "rc-trigger": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/rc-trigger/-/rc-trigger-5.3.1.tgz", - "integrity": "sha512-5gaFbDkYSefZ14j2AdzucXzlWgU2ri5uEjkHvsf1ynRhdJbKxNOnw4PBZ9+FVULNGFiDzzlVF8RJnR9P/xrnKQ==", - "requires": { - "@babel/runtime": "^7.18.3", - "classnames": "^2.2.6", - "rc-align": "^4.0.0", - "rc-motion": "^2.0.0", - "rc-util": "^5.19.2" - } - }, - "rc-upload": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/rc-upload/-/rc-upload-4.3.4.tgz", - "integrity": "sha512-uVbtHFGNjHG/RyAfm9fluXB6pvArAGyAx8z7XzXXyorEgVIWj6mOlriuDm0XowDHYz4ycNK0nE0oP3cbFnzxiQ==", - "requires": { - "@babel/runtime": "^7.18.3", - "classnames": "^2.2.5", - "rc-util": "^5.2.0" - } - }, - "rc-util": { - "version": "5.23.0", - "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-5.23.0.tgz", - "integrity": "sha512-lgm6diJ/pLgyfoZY59Vz7sW4mSoQCgozqbBye9IJ7/mb5w5h4T7h+i2JpXAx/UBQxscBZe68q0sP7EW+qfkKUg==", - "requires": { - "@babel/runtime": "^7.18.3", - "react-is": "^16.12.0", - "shallowequal": "^1.1.0" - } - }, - "rc-virtual-list": { - "version": "3.4.8", - "resolved": "https://registry.npmjs.org/rc-virtual-list/-/rc-virtual-list-3.4.8.tgz", - "integrity": "sha512-qSN+Rv4i/E7RCTvTMr1uZo7f3crJJg/5DekoCagydo9zsXrxj07zsFSxqizqW+ldGA16lwa8So/bIbV9Ofjddg==", - "requires": { - "classnames": "^2.2.6", - "rc-resize-observer": "^1.0.0", - "rc-util": "^5.15.0" - } - }, - "react": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", - "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", - "requires": { - "loose-envify": "^1.1.0" - } - }, - "react-dom": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", - "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", - "requires": { - "loose-envify": "^1.1.0", - "scheduler": "^0.23.0" - } - }, - "react-highlight-words": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/react-highlight-words/-/react-highlight-words-0.18.0.tgz", - "integrity": "sha512-5z+46eLPjB4JWgOhuQ0E+6iUPTD1U3amiy5KKjzZmeJ5zyvHr91hnzBT3UHya/KlySm5KRTKpYpba9vs67oO2A==", - "requires": { - "highlight-words-core": "^1.2.0", - "memoize-one": "^4.0.0", - "prop-types": "^15.5.8" - }, - "dependencies": { - "memoize-one": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-4.0.3.tgz", - "integrity": "sha512-QmpUu4KqDmX0plH4u+tf0riMc1KHE1+lw95cMrLlXQAFOx/xnBtwhZ52XJxd9X2O6kwKBqX32kmhbhlobD0cuw==" - } - } - }, - "react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" - }, - "react-refresh": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.2.tgz", - "integrity": "sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==", - "dev": true - }, - "react-router": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.3.0.tgz", - "integrity": "sha512-7Wh1DzVQ+tlFjkeo+ujvjSqSJmkt1+8JO+T5xklPlgrh70y7ogx75ODRW0ThWhY7S+6yEDks8TYrtQe/aoboBQ==", - "requires": { - "history": "^5.2.0" - } - }, - "react-router-dom": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.3.0.tgz", - "integrity": "sha512-uaJj7LKytRxZNQV8+RbzJWnJ8K2nPsOOEuX7aQstlMZKQT0164C+X2w6bnkqU3sjtLvpd5ojrezAyfZ1+0sStw==", - "requires": { - "history": "^5.2.0", - "react-router": "6.3.0" - } - }, - "regenerator-runtime": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==" - }, - "resize-observer-polyfill": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz", - "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==" - }, - "rollup": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.36.0.tgz", - "integrity": "sha512-zwATAXNQxUcd40zgtQG0ZafcRK4g004WtEl7kbuhTWPvf07PsfohXl39jVUvPF7jvNAIkKPQ2XrsDlWuxBd++Q==", - "dev": true, - "requires": { - "@rollup/rollup-android-arm-eabi": "4.36.0", - "@rollup/rollup-android-arm64": "4.36.0", - "@rollup/rollup-darwin-arm64": "4.36.0", - "@rollup/rollup-darwin-x64": "4.36.0", - "@rollup/rollup-freebsd-arm64": "4.36.0", - "@rollup/rollup-freebsd-x64": "4.36.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.36.0", - "@rollup/rollup-linux-arm-musleabihf": "4.36.0", - "@rollup/rollup-linux-arm64-gnu": "4.36.0", - "@rollup/rollup-linux-arm64-musl": "4.36.0", - "@rollup/rollup-linux-loongarch64-gnu": "4.36.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.36.0", - "@rollup/rollup-linux-riscv64-gnu": "4.36.0", - "@rollup/rollup-linux-s390x-gnu": "4.36.0", - "@rollup/rollup-linux-x64-gnu": "4.36.0", - "@rollup/rollup-linux-x64-musl": "4.36.0", - "@rollup/rollup-win32-arm64-msvc": "4.36.0", - "@rollup/rollup-win32-ia32-msvc": "4.36.0", - "@rollup/rollup-win32-x64-msvc": "4.36.0", - "@types/estree": "1.0.6", - "fsevents": "~2.3.2" - } - }, - "scheduler": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", - "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", - "requires": { - "loose-envify": "^1.1.0" - } - }, - "scripts": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/scripts/-/scripts-0.1.0.tgz", - "integrity": "sha512-URMy4uj80+USxik0E+P7OeagdYGRM6vJQ+8zADRRNjcoIVdouxB7B60P4G4y20TizSGXdE0nAW5sSM1IIXa3hw==" - }, - "scroll-into-view-if-needed": { - "version": "2.2.29", - "resolved": "https://registry.npmjs.org/scroll-into-view-if-needed/-/scroll-into-view-if-needed-2.2.29.tgz", - "integrity": "sha512-hxpAR6AN+Gh53AdAimHM6C8oTN1ppwVZITihix+WqalywBeFcQ6LdQP5ABNl26nX8GTEL7VT+b8lKpdqq65wXg==", - "requires": { - "compute-scroll-into-view": "^1.0.17" - } - }, - "semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true - }, - "shallowequal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", - "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==" - }, - "source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", - "dev": true - }, - "string-convert": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/string-convert/-/string-convert-0.2.1.tgz", - "integrity": "sha512-u/1tdPl4yQnPBjnVrmdLo9gtuLvELKsAoRapekWggdiQNvvvum+jYF329d84NAa660KQw7pB2n36KrIKVoXa3A==" - }, - "toggle-selection": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/toggle-selection/-/toggle-selection-1.0.6.tgz", - "integrity": "sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ==" - }, - "typescript": { - "version": "4.8.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz", - "integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==", - "dev": true - }, - "update-browserslist-db": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", - "integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==", - "dev": true, - "requires": { - "escalade": "^3.2.0", - "picocolors": "^1.1.1" - } - }, - "vite": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.2.2.tgz", - "integrity": "sha512-yW7PeMM+LkDzc7CgJuRLMW2Jz0FxMOsVJ8Lv3gpgW9WLcb9cTW+121UEr1hvmfR7w3SegR5ItvYyzVz1vxNJgQ==", - "dev": true, - "requires": { - "esbuild": "^0.25.0", - "fsevents": "~2.3.3", - "postcss": "^8.5.3", - "rollup": "^4.30.1" - } - }, - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - } - } -} diff --git a/tests/fuzz/wasm-mutator-fuzz/portal/package.json b/tests/fuzz/wasm-mutator-fuzz/portal/package.json deleted file mode 100644 index 5019af623e..0000000000 --- a/tests/fuzz/wasm-mutator-fuzz/portal/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "my-react", - "private": true, - "version": "0.0.0", - "type": "module", - "scripts": { - "dev": "vite", - "build": "tsc && vite build", - "preview": "vite preview" - }, - "dependencies": { - "@ant-design/icons": "^4.7.0", - "antd": "^4.22.8", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "react-highlight-words": "^0.18.0", - "react-router-dom": "^6.3.0", - "scripts": "^0.1.0" - }, - "devDependencies": { - "@types/react": "^18.0.17", - "@types/react-dom": "^18.0.6", - "@vitejs/plugin-react": "^4.3.4", - "typescript": "^4.6.4", - "vite": "^6.2.2" - } -} diff --git a/tests/fuzz/wasm-mutator-fuzz/portal/public/vite.svg b/tests/fuzz/wasm-mutator-fuzz/portal/public/vite.svg deleted file mode 100644 index e7b8dfb1b2..0000000000 --- a/tests/fuzz/wasm-mutator-fuzz/portal/public/vite.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/tests/fuzz/wasm-mutator-fuzz/portal/src/App.css b/tests/fuzz/wasm-mutator-fuzz/portal/src/App.css deleted file mode 100644 index e02cffe722..0000000000 --- a/tests/fuzz/wasm-mutator-fuzz/portal/src/App.css +++ /dev/null @@ -1,50 +0,0 @@ -#root { - background-color: rgba(230, 240, 240, 0.9); - max-width: 100%; - height: 100%; - margin: 0 auto; - padding: 2rem; - text-align: center; -} - -.logo { - height: 6em; - padding: 1.5em; - will-change: filter; -} -.logo:hover { - filter: drop-shadow(0 0 2em #646cffaa); -} -.logo.react:hover { - filter: drop-shadow(0 0 2em #61dafbaa); -} - -@keyframes logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} - -@media (prefers-reduced-motion: no-preference) { - a:nth-of-type(2) .logo { - animation: logo-spin infinite 20s linear; - } -} - -.card { - padding: 2em; -} - -.read-the-docs { - color: #888; -} - -.col-item-value { - overflow: hidden; - line-height: 35px; - white-space: nowrap; - text-overflow: ellipsis; -} diff --git a/tests/fuzz/wasm-mutator-fuzz/portal/src/App.tsx b/tests/fuzz/wasm-mutator-fuzz/portal/src/App.tsx deleted file mode 100644 index 2579cdc0bc..0000000000 --- a/tests/fuzz/wasm-mutator-fuzz/portal/src/App.tsx +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (C) 2019 Intel Corporation. All rights reserved. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - -import { useEffect, useState } from "react"; -import "./App.css"; - -import CardMenu from "./CardMenu"; -import { Divider, Typography, Col, Row, Button } from "antd"; -import { Empty, Spin } from "antd"; -import Description from "./Descrpition"; -const { Title } = Typography; - -function App() { - const [dataList, setDataList] = useState>([]); - const [results, setResults] = useState({}); - const [id, setId] = useState(); - const [resultReload, setResultReload] = useState(0); - const [tableLoading, setTableLoading] = useState(false); - const [isLoaded, setIsLoaded] = useState(false); - const [result, setResult] = useState({}); - - useEffect(() => { - fetch(import.meta.env.VITE_SERVER_URL + "/get_list") - .then((res) => { - return res.json(); - }) - .then((body) => { - setDataList(body.results); - setIsLoaded(true); - }); - const timer = setInterval(() => { - fetch(import.meta.env.VITE_SERVER_URL + "/get_list") - .then((res) => { - return res.json(); - }) - .then((body) => { - setDataList(body.results); - setIsLoaded(true); - }); - }, 3000); - }, []); - - useEffect(() => { - setTableLoading(true); - fetch(import.meta.env.VITE_SERVER_URL + `/get_list?id=${id}`) - .then((res) => { - return res.json(); - }) - .then((body) => { - setResults(body); - console.log(results); - setTableLoading(false); - }); - }, [id, resultReload]); - const select_uuid = { - res: dataList, - setId, - setResult - }; - - if (!isLoaded) { - return ( -
- -
- ); - } - - if (isLoaded && !dataList) { - return ( -
- -
- ); - } - - return ( -
- -
- WebAssembly Micro Runtime fuzzing test system - -
- - - {/* {dataList && } */} - {} - - - { - - } - - - - - -
- ); -} - -export default App; diff --git a/tests/fuzz/wasm-mutator-fuzz/portal/src/CardMenu.tsx b/tests/fuzz/wasm-mutator-fuzz/portal/src/CardMenu.tsx deleted file mode 100644 index 59b964410b..0000000000 --- a/tests/fuzz/wasm-mutator-fuzz/portal/src/CardMenu.tsx +++ /dev/null @@ -1,551 +0,0 @@ -// Copyright (C) 2019 Intel Corporation. All rights reserved. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - -import { - Button, - Modal, - Table, - Card, - TableColumnsType, - Tooltip, - Tag, - Form, - message, - Input, - Progress -} from "antd"; -import React, { useEffect, useState } from "react"; -import "antd/dist/antd.css"; -import type { ColumnsType } from "antd/es/table"; -import { SyncOutlined, ArrowDownOutlined } from "@ant-design/icons"; -import { useSearchParams } from "react-router-dom"; -const { TextArea } = Input; - -const tabList2 = [ - { - key: "error", - tab: "error" - }, - { - key: "stdout", - tab: "stdout" - }, - { - key: "stderr", - tab: "stderr" - } -]; - -interface ErrorDataType { - id: number; - name: string; - fuzzing_id: number; - data: any; - status: string; - create_time: string; - update_time: string; - comment: any; -} - -const CardMenu: React.FC<{ - result: any; - detail_result: any; - tableLoading: boolean; - resultReload: number; - setResultReload: any; -}> = ({ result, detail_result, tableLoading, resultReload, setResultReload }) => { - const [selectedRowKeys, setSelectedRowKeys] = useState([]); - const [modalVisible, setModalVisible] = useState(false); - const [modal2Visible, setModal2Visible] = useState(false); - const [modal3Visible, setModal3Visible] = useState(false); - const [reloadLoading, setRelLoading] = useState(false); - const [errorTabData, setErrorTabData] = useState(""); - const [downloadLoading, setDownLoading] = useState(false); - - result.results && - (result.results = result.results.map((t: any) => ({ - key: t.id, - ...t - }))); - - const error_columns: ColumnsType = [ - { - title: "ErrorName", - width: "13%", - dataIndex: "name", - render: (value) => { - return ( - -
{value}
-
- ); - } - }, - { - title: "CreateTime", - dataIndex: "create_time", - width: "13%", - render: (value) => { - return ( - -
{value}
-
- ); - } - }, - { - title: "UpdateTime", - dataIndex: "update_time", - width: "13.5%", - render: (value) => { - return ( - -
{value}
-
- ); - } - }, - { - title: "Comment", - dataIndex: "comment", - width: "12%", - render: (value) => { - return ( - -
{value?.comment}
-
- ); - } - }, - { - title: "Assign", - dataIndex: "comment", - width: "9%", - render: (value) => { - return ( - -
{value?.assign}
-
- ); - } - }, - { - title: "Status", - dataIndex: "status", - width: "14%", - filters: [ - { text: "Pending", value: 2 }, - { text: "Error", value: 1 }, - { text: "OK", value: 0 } - ], - onFilter: (value, record) => { - return record.status === value; - }, - render: (value, Object) => { - var colors: string = ""; - var val: string = ""; - if (value === 1) { - colors = "red"; - val = `Error(${Object.name.split("-")[0]})`; - } else if (value === 0) { - colors = "green"; - val = "OK"; - } else if (value === 2) { - colors = ""; - val = "pending"; - } - return ( - <> - {/* */} -
- {val} - {/* - {Object?.wamr_commit} - - - */} -
- - ); - } - }, - { - title: "Action", - dataIndex: "", - // width: "15%", - render: (value, Object) => { - return ( - <> - - - - ); - } - } - ]; - - const onSelectChange = (newSelectedRowKeys: React.Key[]) => { - console.log("selectedRowKeys changed: ", selectedRowKeys); - setSelectedRowKeys(newSelectedRowKeys); - }; - - const start = (repo: string, branch: string, build_args: string) => { - setRelLoading(true); - fetch(import.meta.env.VITE_SERVER_URL + "/error_restart", { - method: "POST", - headers: { - Accept: "application/json", - "Content-Type": "application/json" - }, - body: JSON.stringify({ - id: selectedRowKeys, - repo: repo, - branch: branch, - build_args: build_args - }) - }) - .then((res) => { - return res.json(); - }) - - .then((body) => { - setRelLoading(false); - if (body?.status === 1) { - setResultReload(resultReload + 1); - message.loading("pending"); - } else { - message.error(body?.msg ? body?.msg : "Server Error"); - } - }); - }; - - const rowSelection = { - selectedRowKeys, - onChange: onSelectChange, - getCheckboxProps: (record: ErrorDataType) => ({ - disabled: Number(record.status) === 2 - }) - }; - const hasSelected = selectedRowKeys.length > 0; - const [form] = Form.useForm(); - const set_comment = (comment: string, assign: string) => { - setRelLoading(true); - fetch(import.meta.env.VITE_SERVER_URL + "/set_commend", { - method: "POST", - headers: { - Accept: "application/json", - "Content-Type": "application/json" - }, - - body: JSON.stringify({ - id: selectedRowKeys, - comment: { - comment: comment, - assign: assign - } - }) - }) - .then((res) => { - return res.json(); - }) - .then((body) => { - setRelLoading(false); - if (body?.status === 1) { - setResultReload(resultReload + 1); - message.success("success"); - } else { - message.error("Server Error"); - } - }); - }; - const get_cases = async (response: Response, name: string) => { - try { - if (response.headers.get("content-type") !== "application/json") { - response - .blob() - .then((blob) => { - const a = window.document.createElement("a"); - const downUrl = window.URL.createObjectURL( - new Blob([blob], { type: "multipart/form-data" }) - ); - //定义导出文件的命名 - let filename = name; - if ( - response.headers.get("content-disposition") && - response.headers?.get("content-disposition")?.indexOf("filename=") !== -1 - ) { - filename = - response.headers?.get("content-disposition")?.split("filename=")[1] || name; - a.href = downUrl; - a.download = `${decodeURI(filename.split('"')[1])}` || name; - a.click(); - window.URL.revokeObjectURL(downUrl); - } else { - a.href = downUrl; - a.download = name; - a.click(); - window.URL.revokeObjectURL(downUrl); - } - }) - .catch((error) => { - message.error(error); - }); - } else { - let res = await response.json(); - message.error(res.msg); - } - } catch (err) { - console.log(err); - message.error("Download timeout"); - } - }; - return ( - <> -
- - More} - // tabList={tabList} - loading={tableLoading} - > -
-
- - <> - - <> - - <> -
- - {" "} - {" "} - - } - // onOk={() => setModal3Visible(false)} - onCancel={() => setModal3Visible(false)} - > -
- {errorTabData} -
-
- { - let repo = form.getFieldsValue(["repo", "branch", "build_args"]).repo; - let branch = form.getFieldsValue(["repo", "branch", "build_args"]).branch; - let build_args = form.getFieldsValue(["repo", "branch", "build_args"]).build_args; - if (repo === "" || branch === "") { - message.error("repo and branch cannot be empty"); - return; - } - if (repo === undefined) { - repo = detail_result.repo; - } - if (branch === undefined) { - branch = detail_result.branch; - } - if (build_args === undefined) { - build_args = detail_result.build_args; - } - start(repo, branch, build_args); - - setModalVisible(false); - setSelectedRowKeys([]); - }} - onCancel={() => { - setModalVisible(false); - }} - > -
- -