From 840a73bb5c8ed09f3ad2fb22cced569ab6706c72 Mon Sep 17 00:00:00 2001 From: Caio Ramos Casimiro Date: Tue, 13 Feb 2024 11:02:05 +0000 Subject: [PATCH] chore(deps) bump Wasmtime to 19.0.0 Signed-off-by: Thibault Charbonnier --- .github/workflows/ci-large.yml | 14 +++++----- .github/workflows/ci.yml | 16 +++++------ Makefile | 2 +- src/wasm/wrt/ngx_wrt.h | 2 +- src/wasm/wrt/ngx_wrt_wasmtime.c | 4 +++ .../directives/008-flag_directive_wasmtime.t | 27 +++++++++++++++---- 6 files changed, 43 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci-large.yml b/.github/workflows/ci-large.yml index d271d3803..6845e6c58 100644 --- a/.github/workflows/ci-large.yml +++ b/.github/workflows/ci-large.yml @@ -26,7 +26,7 @@ jobs: cc: [gcc-12] ngx: [1.25.4] runtime: [wasmtime, wasmer, v8] - wasmtime: [14.0.3] + wasmtime: [19.0.0] wasmer: [3.1.1] v8: [12.0.267.17] ipc: [no_ipc] @@ -41,7 +41,7 @@ jobs: cc: gcc-12 openresty: 1.25.3.1 runtime: wasmtime - wasmtime: 14.0.3 + wasmtime: 19.0.0 ipc: no_ipc ssl: ssl debug: debug @@ -74,7 +74,7 @@ jobs: cc: [gcc-12] ngx: [1.25.4] runtime: [wasmer, wasmtime, v8] - wasmtime: [14.0.3] + wasmtime: [19.0.0] wasmer: [3.1.1] v8: [12.0.267.17] hup: [hup, no_hup] @@ -113,7 +113,7 @@ jobs: cc: [clang-15] openresty: [1.25.3.1] runtime: [wasmtime, wasmer, v8] - wasmtime: [14.0.3] + wasmtime: [19.0.0] wasmer: [3.1.1] v8: [12.0.267.17] ssl: [no_ssl, ssl] @@ -157,7 +157,7 @@ jobs: cc: [clang-13, clang-14, gcc-10, gcc-11] ngx: [1.25.4] runtime: [wasmtime, wasmer, v8] - wasmtime: [14.0.3] + wasmtime: [19.0.0] wasmer: [3.1.1] v8: [12.0.267.17] include: @@ -166,13 +166,13 @@ jobs: cc: clang-15 ngx: 1.21.6 runtime: wasmtime - wasmtime: 14.0.3 + wasmtime: 19.0.0 - label: old_openresty os: ubuntu-latest cc: clang-15 openresty: 1.21.4.2 runtime: wasmtime - wasmtime: 14.0.3 + wasmtime: 19.0.0 uses: ./.github/workflows/job-build-tests.yml with: os: ${{ matrix.os }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cefcb7195..77be0434d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,7 +47,7 @@ jobs: include: # Wasmtime - runtime: wasmtime - wasmtime: 14.0.3 + wasmtime: 19.0.0 os: ubuntu-latest cc: gcc-12 ngx: 1.25.4 @@ -82,7 +82,7 @@ jobs: cc: gcc-12 ngx: 1.25.4 runtime: wasmtime - wasmtime: 14.0.3 + wasmtime: 19.0.0 ipc: no_ipc ssl: ssl debug: debug @@ -104,7 +104,7 @@ jobs: cc: gcc-12 openresty: 1.25.3.1 runtime: wasmtime - wasmtime: 14.0.3 + wasmtime: 19.0.0 ipc: no_ipc ssl: ssl debug: debug @@ -115,7 +115,7 @@ jobs: cc: gcc-12 openresty: 1.25.3.1 runtime: wasmtime - wasmtime: 14.0.3 + wasmtime: 19.0.0 ipc: no_ipc ssl: ssl debug: debug @@ -127,7 +127,7 @@ jobs: cc: gcc-12 ngx: 1.25.4 runtime: wasmtime - wasmtime: 14.0.3 + wasmtime: 19.0.0 ipc: ipc ssl: no_ssl debug: debug @@ -186,7 +186,7 @@ jobs: include: # Wasmtime - runtime: wasmtime - wasmtime: 14.0.3 + wasmtime: 19.0.0 os: ubuntu-22.04 cc: gcc-12 ngx: 1.25.4 @@ -277,7 +277,7 @@ jobs: cc: [clang-15] openresty: [1.25.3.1] runtime: [wasmtime, wasmer, v8] - wasmtime: [14.0.3] + wasmtime: [19.0.0] wasmer: [3.1.1] v8: [12.0.267.17] ssl: [ssl] @@ -329,7 +329,7 @@ jobs: cc: [clang-15, gcc-12] ngx: [1.25.4] runtime: [wasmtime, wasmer, v8] - wasmtime: [14.0.3] + wasmtime: [19.0.0] wasmer: [3.1.1] v8: [12.0.267.17] uses: ./.github/workflows/job-build-tests.yml diff --git a/Makefile b/Makefile index 3f71ecf8d..60f95ba15 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ NGX ?= 1.25.4 OPENSSL ?= 3.2.1 -WASMTIME ?= 14.0.3 +WASMTIME ?= 19.0.0 WASMER ?= 3.1.1 V8 ?= 12.0.267.17 PCRE ?= 8.45 diff --git a/src/wasm/wrt/ngx_wrt.h b/src/wasm/wrt/ngx_wrt.h index 031fe22ab..1700f1f6c 100644 --- a/src/wasm/wrt/ngx_wrt.h +++ b/src/wasm/wrt/ngx_wrt.h @@ -61,7 +61,7 @@ typedef enum { #include #include -#if WASMTIME_VERSION_MAJOR != 14 +#if WASMTIME_VERSION_MAJOR != 19 # error Unsupported Wasmtime version #elif WASMTIME_VERSION_MINOR > 0 # warning Untested Wasmtime version diff --git a/src/wasm/wrt/ngx_wrt_wasmtime.c b/src/wasm/wrt/ngx_wrt_wasmtime.c index e0c46463e..f42ee05fd 100644 --- a/src/wasm/wrt/ngx_wrt_wasmtime.c +++ b/src/wasm/wrt/ngx_wrt_wasmtime.c @@ -742,6 +742,10 @@ static ngx_wrt_flag_handler_t flag_handlers[] = { bool_flag_handler, wasmtime_config_wasm_reference_types_set }, + { ngx_string("wasm_relaxed_simd"), + bool_flag_handler, + wasmtime_config_wasm_relaxed_simd_set }, + { ngx_string("wasm_simd"), bool_flag_handler, wasmtime_config_wasm_simd_set }, diff --git a/t/01-wasm/directives/008-flag_directive_wasmtime.t b/t/01-wasm/directives/008-flag_directive_wasmtime.t index 03bc9de1b..6e69076b6 100644 --- a/t/01-wasm/directives/008-flag_directive_wasmtime.t +++ b/t/01-wasm/directives/008-flag_directive_wasmtime.t @@ -250,15 +250,23 @@ qr/setting flag: "wasm_simd=on"/ === TEST 15: flag directive - wasmtime - wasm_simd - off +Disable both flags to avoid: + "cannot disable the simd proposal but enable the relaxed simd proposal" +Shown twice in logs for master+single procs --- skip_eval: 4: $::nginxV !~ m/wasmtime/ --- main_config wasm { wasmtime { flag wasm_simd off; + flag wasm_relaxed_simd off; } } ---- error_log eval -qr/setting flag: "wasm_simd=off"/ +--- grep_error_log eval: qr/setting flag: ".*?"/ +--- grep_error_log_out +setting flag: "wasm_simd=off" +setting flag: "wasm_relaxed_simd=off" +setting flag: "wasm_simd=off" +setting flag: "wasm_relaxed_simd=off" --- no_error_log [error] [crit] @@ -282,16 +290,25 @@ qr/setting flag: "wasm_bulk_memory=on"/ === TEST 17: flag directive - wasmtime - wasm_bulk_memory - off +Disable all three flags as 'bulk_memory' requires 'threads' and 'reference_types' +Shown twice in logs for master+single procs --- skip_eval: 4: $::nginxV !~ m/wasmtime/ --- main_config wasm { wasmtime { - flag wasm_reference_types off; flag wasm_bulk_memory off; + flag wasm_threads off; + flag wasm_reference_types off; } } ---- error_log eval -qr/setting flag: "wasm_bulk_memory=off"/ +--- grep_error_log eval: qr/setting flag: ".*?"/ +--- grep_error_log_out +setting flag: "wasm_bulk_memory=off" +setting flag: "wasm_threads=off" +setting flag: "wasm_reference_types=off" +setting flag: "wasm_bulk_memory=off" +setting flag: "wasm_threads=off" +setting flag: "wasm_reference_types=off" --- no_error_log [error] [crit]