From 270de1de9cce8d788c9f3c0cc4a6b598feca6587 Mon Sep 17 00:00:00 2001 From: Julian Montes de Oca Date: Wed, 15 Jan 2025 14:37:53 -0300 Subject: [PATCH 1/2] Update WasmEdge version to 0.14.1 across all configurations and docs --- .github/workflows/ci-build.yml | 10 +++---- .github/workflows/release.yml | 10 +++---- Cargo.toml | 4 +-- README.md | 4 +-- moly-runner/src/main.rs | 30 +++++++++---------- .../before-packaging-command/src/main.rs | 8 ++--- 6 files changed, 33 insertions(+), 33 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index ff406e8e..21320d53 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -35,7 +35,7 @@ jobs: - name: Install WasmEdge run: | - curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install_v2.sh | bash -s -- --version=0.14.0 + curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install_v2.sh | bash -s -- --version=0.14.1 source $HOME/.wasmedge/env - name: Install dependencies run: | @@ -69,7 +69,7 @@ jobs: - name: Install WasmEdge run: | - curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install_v2.sh | bash -s -- --version=0.14.0 + curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install_v2.sh | bash -s -- --version=0.14.1 source $HOME/.wasmedge/env - name: Install Rust-stable @@ -92,7 +92,7 @@ jobs: matrix: rust: [1.79] env: - WASMEDGE_DIR: ${{ github.workspace }}\WasmEdge-0.14.0-Windows + WASMEDGE_DIR: ${{ github.workspace }}\WasmEdge-0.14.1-Windows steps: - name: Display ENV run: | @@ -104,8 +104,8 @@ jobs: - name: Download WasmEdge run: | $ProgressPreference = 'SilentlyContinue' - Invoke-WebRequest -Uri "https://github.com/WasmEdge/WasmEdge/releases/download/0.14.0/WasmEdge-0.14.0-windows.zip" -OutFile "WasmEdge-0.14.0-windows.zip" - Expand-Archive -LiteralPath "WasmEdge-0.14.0-windows.zip" -DestinationPath ${{ github.workspace }} + Invoke-WebRequest -Uri "https://github.com/WasmEdge/WasmEdge/releases/download/0.14.1/WasmEdge-0.14.1-windows.zip" -OutFile "WasmEdge-0.14.1-windows.zip" + Expand-Archive -LiteralPath "WasmEdge-0.14.1-windows.zip" -DestinationPath ${{ github.workspace }} tree /F ${{ github.workspace }}\WasmEdge - name: Set up Windows 10 SDK diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b9ebea95..c56ef39d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,7 +41,7 @@ jobs: - name: Install WasmEdge run: | - curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install_v2.sh | bash -s -- --version=0.14.0 + curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install_v2.sh | bash -s -- --version=0.14.1 source $HOME/.wasmedge/env - name: Install dependencies run: | @@ -87,7 +87,7 @@ jobs: - name: Install WasmEdge run: | - curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install_v2.sh | bash -s -- --version=0.14.0 + curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install_v2.sh | bash -s -- --version=0.14.1 source $HOME/.wasmedge/env - name: Install Rust-stable @@ -119,7 +119,7 @@ jobs: matrix: rust: [1.79] env: - WASMEDGE_DIR: ${{ github.workspace }}\WasmEdge-0.14.0-Windows + WASMEDGE_DIR: ${{ github.workspace }}\WasmEdge-0.14.1-Windows steps: - name: Display ENV run: | @@ -131,8 +131,8 @@ jobs: - name: Download WasmEdge run: | $ProgressPreference = 'SilentlyContinue' - Invoke-WebRequest -Uri "https://github.com/WasmEdge/WasmEdge/releases/download/0.14.0/WasmEdge-0.14.0-windows.zip" -OutFile "WasmEdge-0.14.0-windows.zip" - Expand-Archive -LiteralPath "WasmEdge-0.14.0-windows.zip" -DestinationPath ${{ github.workspace }} + Invoke-WebRequest -Uri "https://github.com/WasmEdge/WasmEdge/releases/download/0.14.1/WasmEdge-0.14.1-windows.zip" -OutFile "WasmEdge-0.14.1-windows.zip" + Expand-Archive -LiteralPath "WasmEdge-0.14.1-windows.zip" -DestinationPath ${{ github.workspace }} tree /F ${{ github.workspace }}\WasmEdge - name: Set up Windows 10 SDK diff --git a/Cargo.toml b/Cargo.toml index 76751194..60116633 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -137,8 +137,8 @@ bins = ["/usr/bin/curl"] [package.metadata.packager.macos] minimum_system_version = "11.0" frameworks = [ - "./wasmedge/WasmEdge-0.14.0-Darwin/lib/libwasmedge.0.dylib", - "./wasmedge/WasmEdge-0.14.0-Darwin/plugin/libwasmedgePluginWasiNN.dylib", + "./wasmedge/WasmEdge-0.14.1-Darwin/lib/libwasmedge.0.dylib", + "./wasmedge/WasmEdge-0.14.1-Darwin/plugin/libwasmedgePluginWasiNN.dylib", ] diff --git a/README.md b/README.md index bd064b40..91e1ea84 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ git clone https://github.com/moxin-org/moly.git Install the required WasmEdge WASM runtime (or use [`moly-runner`](#tip-use-moly-runner-for-easy-setup)): ```sh -curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install_v2.sh | bash -s -- --version=0.14.0 +curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install_v2.sh | bash -s -- --version=0.14.1 source $HOME/.wasmedge/env ``` @@ -58,7 +58,7 @@ cargo run --release Install the required WasmEdge WASM runtime (or use [`moly-runner`](#tip-use-moly-runner-for-easy-setup)): ```sh -curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install_v2.sh | bash -s -- --version=0.14.0 +curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install_v2.sh | bash -s -- --version=0.14.1 source $HOME/.wasmedge/env ``` diff --git a/moly-runner/src/main.rs b/moly-runner/src/main.rs index ada4c8f6..d885dd42 100644 --- a/moly-runner/src/main.rs +++ b/moly-runner/src/main.rs @@ -82,7 +82,7 @@ const WASMEDGE_ROOT_DIR_NAME: &str = { ".wasmedge" } #[cfg(windows)] { - "WasmEdge-0.14.0-Windows" + "WasmEdge-0.14.1-Windows" } }; @@ -159,24 +159,24 @@ fn wasmedge_wasi_nn_plugin_url() -> (&'static str, &'static str) { // Currently, WasmEdge's b3499 release only provides a CUDA 12 build for Windows. if matches!(get_cuda_version(), Some(CudaVersion::V12)) { return ( - "https://github.com/second-state/WASI-NN-GGML-PLUGIN-REGISTRY/releases/download/b3499/WasmEdge-plugin-wasi_nn-ggml-cuda-0.14.0-windows_x86_64.zip", - "WasmEdge-plugin-wasi_nn-ggml-cuda-0.14.0-windows_x86_64", + "https://github.com/second-state/WASI-NN-GGML-PLUGIN-REGISTRY/releases/download/b3499/WasmEdge-plugin-wasi_nn-ggml-cuda-0.14.1-windows_x86_64.zip", + "WasmEdge-plugin-wasi_nn-ggml-cuda-0.14.1-windows_x86_64", ); } #[cfg(target_arch = "x86_64")] if is_x86_feature_detected!("avx512f") { return ( - "https://github.com/second-state/WASI-NN-GGML-PLUGIN-REGISTRY/releases/download/b3499/WasmEdge-plugin-wasi_nn-ggml-0.14.0-windows_x86_64.zip", - "WasmEdge-plugin-wasi_nn-ggml-0.14.0-windows_x86_64", + "https://github.com/second-state/WASI-NN-GGML-PLUGIN-REGISTRY/releases/download/b3499/WasmEdge-plugin-wasi_nn-ggml-0.14.1-windows_x86_64.zip", + "WasmEdge-plugin-wasi_nn-ggml-0.14.1-windows_x86_64", ); } // Currently, the only other option is the no-AVX build, which still requires SSE4.2 or SSE4a. // When WasmEdge releases additional builds, we can add them here. ( - "https://github.com/second-state/WASI-NN-GGML-PLUGIN-REGISTRY/releases/download/b3499/WasmEdge-plugin-wasi_nn-ggml-noavx-0.14.0-windows_x86_64.zip", - "WasmEdge-plugin-wasi_nn-ggml-noavx-0.14.0-windows_x86_64", + "https://github.com/second-state/WASI-NN-GGML-PLUGIN-REGISTRY/releases/download/b3499/WasmEdge-plugin-wasi_nn-ggml-noavx-0.14.1-windows_x86_64.zip", + "WasmEdge-plugin-wasi_nn-ggml-noavx-0.14.1-windows_x86_64", ) } @@ -356,7 +356,7 @@ fn find_wasmedge_dylibs_in_dir>(wasmedge_root_dir: P) -> Option<( #[cfg(any(target_os = "linux", target_os = "macos"))] fn install_wasmedge>(install_path: P) -> Result { use std::process::Stdio; - println!("Downloading WasmEdge 0.14.0 from GitHub; installing to {}", install_path.as_ref().display()); + println!("Downloading WasmEdge 0.14.1 from GitHub; installing to {}", install_path.as_ref().display()); let temp_dir = std::env::temp_dir(); let curl_script_cmd = Command::new("curl") .stdout(Stdio::piped()) @@ -371,7 +371,7 @@ fn install_wasmedge>(install_path: P) -> Result>(install_path: P) -> Result>(install_path_ref: P) -> Result { let install_path = install_path_ref.as_ref(); - println!("Downloading WasmEdge 0.14.0 from GitHub; installing to {}", install_path.display()); + println!("Downloading WasmEdge 0.14.1 from GitHub; installing to {}", install_path.display()); - // Currently we hardcode the URL for the v0.14.0 release of WasmEdge for windows. - const WASMEDGE_0_14_0_WINDOWS_URL: &'static str = "https://github.com/WasmEdge/WasmEdge/releases/download/0.14.0/WasmEdge-0.14.0-windows.zip"; + // Currently we hardcode the URL for the v0.14.1 release of WasmEdge for windows. + const WASMEDGE_0_14_0_WINDOWS_URL: &'static str = "https://github.com/WasmEdge/WasmEdge/releases/download/0.14.1/WasmEdge-0.14.1-windows.zip"; let (wasi_nn_plugin_url, wasi_nn_dir_name) = wasmedge_wasi_nn_plugin_url(); println!(" --> Using WASI-NN plugin at: {wasi_nn_plugin_url}"); let install_wasmedge_ps1 = format!( r#" $ProgressPreference = 'SilentlyContinue' ## makes downloads much faster - Invoke-WebRequest -Uri "{WASMEDGE_0_14_0_WINDOWS_URL}" -OutFile "$env:TEMP\WasmEdge-0.14.0-windows.zip" - Expand-Archive -Force -Path "$env:TEMP\WasmEdge-0.14.0-windows.zip" -DestinationPath "{}" + Invoke-WebRequest -Uri "{WASMEDGE_0_14_0_WINDOWS_URL}" -OutFile "$env:TEMP\WasmEdge-0.14.1-windows.zip" + Expand-Archive -Force -Path "$env:TEMP\WasmEdge-0.14.1-windows.zip" -DestinationPath "{}" Invoke-WebRequest -Uri "{wasi_nn_plugin_url}" -OutFile "$env:TEMP\{wasi_nn_dir_name}.zip" Expand-Archive -Force -Path "$env:TEMP\{wasi_nn_dir_name}.zip" -DestinationPath "$env:TEMP\{wasi_nn_dir_name}" @@ -598,7 +598,7 @@ fn run_moly() -> std::io::Result<()> { /// Checks that the current CPU supports AVX512, or either SSE4.2 or SSE4a, -/// at least one of which is required by the current builds of WasmEdge 0.14.0 on Windows. +/// at least one of which is required by the current builds of WasmEdge 0.14.1 on Windows. /// /// This only checks x86_64 platforms, and does nothing on other platforms. fn assert_cpu_features() { diff --git a/packaging/before-packaging-command/src/main.rs b/packaging/before-packaging-command/src/main.rs index f8d5165c..fdcdad75 100644 --- a/packaging/before-packaging-command/src/main.rs +++ b/packaging/before-packaging-command/src/main.rs @@ -163,9 +163,9 @@ fn before_packaging(host_os: &str) -> std::io::Result<()> { /// This function effectively runs the following shell commands: /// ```sh /// mkdir -p ./wasmedge \ -/// && curl -sfL --show-error https://github.com/WasmEdge/WasmEdge/releases/download/0.14.0/WasmEdge-0.14.0-darwin_arm64.tar.gz | bsdtar -xf- -C ./wasmedge \ -/// && mkdir -p ./wasmedge/WasmEdge-0.14.0-Darwin/plugin \ -/// && curl -sf --location --progress-bar --show-error https://github.com/WasmEdge/WasmEdge/releases/download/0.14.0/WasmEdge-plugin-wasi_nn-ggml-0.14.0-darwin_arm64.tar.gz | bsdtar -xf- -C ./wasmedge/WasmEdge-0.14.0-Darwin/plugin; \ +/// && curl -sfL --show-error https://github.com/WasmEdge/WasmEdge/releases/download/0.14.1/WasmEdge-0.14.1-darwin_arm64.tar.gz | bsdtar -xf- -C ./wasmedge \ +/// && mkdir -p ./wasmedge/WasmEdge-0.14.1-Darwin/plugin \ +/// && curl -sf --location --progress-bar --show-error https://github.com/WasmEdge/WasmEdge/releases/download/0.14.1/WasmEdge-plugin-wasi_nn-ggml-0.14.1-darwin_arm64.tar.gz | bsdtar -xf- -C ./wasmedge/WasmEdge-0.14.1-Darwin/plugin; \ /// ``` fn download_wasmedge_macos(version: &str) -> std::io::Result<()> { // Command 1: Create the destination directory. @@ -214,7 +214,7 @@ fn download_wasmedge_macos(version: &str) -> std::io::Result<()> { } // Command 3: Create the plugin destination directory. - let plugin_dest_dir = dest_dir.join("WasmEdge-0.14.0-Darwin").join("plugin"); + let plugin_dest_dir = dest_dir.join("WasmEdge-0.14.1-Darwin").join("plugin"); fs::create_dir_all(&plugin_dest_dir)?; // Command 4: Download and extract the Wasi-NN plugin. From 877539d4cadcd011d70fec16c549068bfac5805f Mon Sep 17 00:00:00 2001 From: Julian Montes de Oca Date: Wed, 15 Jan 2025 16:14:42 -0300 Subject: [PATCH 2/2] Revert Windows wasn_nn plugin URLs to v0.14.0 --- moly-runner/src/main.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/moly-runner/src/main.rs b/moly-runner/src/main.rs index d885dd42..71b03a9a 100644 --- a/moly-runner/src/main.rs +++ b/moly-runner/src/main.rs @@ -159,24 +159,24 @@ fn wasmedge_wasi_nn_plugin_url() -> (&'static str, &'static str) { // Currently, WasmEdge's b3499 release only provides a CUDA 12 build for Windows. if matches!(get_cuda_version(), Some(CudaVersion::V12)) { return ( - "https://github.com/second-state/WASI-NN-GGML-PLUGIN-REGISTRY/releases/download/b3499/WasmEdge-plugin-wasi_nn-ggml-cuda-0.14.1-windows_x86_64.zip", - "WasmEdge-plugin-wasi_nn-ggml-cuda-0.14.1-windows_x86_64", + "https://github.com/second-state/WASI-NN-GGML-PLUGIN-REGISTRY/releases/download/b3499/WasmEdge-plugin-wasi_nn-ggml-cuda-0.14.0-windows_x86_64.zip", + "WasmEdge-plugin-wasi_nn-ggml-cuda-0.14.0-windows_x86_64", ); } #[cfg(target_arch = "x86_64")] if is_x86_feature_detected!("avx512f") { return ( - "https://github.com/second-state/WASI-NN-GGML-PLUGIN-REGISTRY/releases/download/b3499/WasmEdge-plugin-wasi_nn-ggml-0.14.1-windows_x86_64.zip", - "WasmEdge-plugin-wasi_nn-ggml-0.14.1-windows_x86_64", + "https://github.com/second-state/WASI-NN-GGML-PLUGIN-REGISTRY/releases/download/b3499/WasmEdge-plugin-wasi_nn-ggml-0.14.0-windows_x86_64.zip", + "WasmEdge-plugin-wasi_nn-ggml-0.14.0-windows_x86_64", ); } // Currently, the only other option is the no-AVX build, which still requires SSE4.2 or SSE4a. // When WasmEdge releases additional builds, we can add them here. ( - "https://github.com/second-state/WASI-NN-GGML-PLUGIN-REGISTRY/releases/download/b3499/WasmEdge-plugin-wasi_nn-ggml-noavx-0.14.1-windows_x86_64.zip", - "WasmEdge-plugin-wasi_nn-ggml-noavx-0.14.1-windows_x86_64", + "https://github.com/second-state/WASI-NN-GGML-PLUGIN-REGISTRY/releases/download/b3499/WasmEdge-plugin-wasi_nn-ggml-noavx-0.14.0-windows_x86_64.zip", + "WasmEdge-plugin-wasi_nn-ggml-noavx-0.14.0-windows_x86_64", ) }