Skip to content

Commit 98dc115

Browse files
committed
deps: upgrade to Varnish 8.0 and Wasmtime 44
- Switch Varnish from packagecloud/varnish75 to packagecloud/varnish80 - Upgrade Wasmtime C API from v25 to v44.0.0 - Fix hdr_t cast for Varnish 8 API compatibility (proxy_wasm.c) - Simplify CI to single build (remove version matrix) - Update minimum varnishapi requirement to >= 8.0
1 parent 1e79f9e commit 98dc115

6 files changed

Lines changed: 13 additions & 18 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,13 @@ on:
99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
12-
strategy:
13-
matrix:
14-
varnish-version: ['7.5']
15-
wasmtime-version: ['25.0.0']
1612

1713
steps:
1814
- uses: actions/checkout@v4
1915

2016
- name: Build and test in Docker
2117
run: |
2218
docker build \
23-
--build-arg VARNISH_VERSION=${{ matrix.varnish-version }} \
24-
--build-arg WASMTIME_VERSION=${{ matrix.wasmtime-version }} \
19+
--build-arg WASMTIME_VERSION=44.0.0 \
2520
-t vmod-wasm-test .
2621
docker run --rm vmod-wasm-test make check

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ All notable changes to vmod-wasm will be documented in this file.
1010
- `wasm.load(name, path)` — Load `.wasm` modules at VCL init
1111
- `wasm.execute(module, func)` — Call exported Wasm functions from VCL
1212
- `wasm.version()` — Return VMOD version string
13-
- Wasmtime C API v25 integration with engine/linker/store lifecycle
13+
- Wasmtime C API integration with engine/linker/store lifecycle
1414
- Thread-safe module registry (read-write lock, up to 64 modules)
1515

1616
#### Host Functions
@@ -45,7 +45,7 @@ All notable changes to vmod-wasm will be documented in this file.
4545
- Memory allocator protocol via `proxy_on_memory_allocate` export
4646

4747
#### Infrastructure
48-
- Dockerfile with Debian bookworm-slim, Varnish 7.5, Wasmtime 25, Rust
48+
- Dockerfile with Debian bookworm-slim, Varnish 8.0, Wasmtime 44, Rust
4949
- GitHub Actions CI pipeline
5050
- autotools build system (automake/autoconf/libtool)
5151
- 12 VTC tests

Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
FROM debian:bookworm-slim
22

3-
ARG VARNISH_VERSION=7.5
4-
ARG WASMTIME_VERSION=25.0.0
3+
ARG WASMTIME_VERSION=44.0.0
54

65
# Install build dependencies
76
RUN apt-get update && apt-get install -y \
@@ -18,9 +17,10 @@ RUN apt-get update && apt-get install -y \
1817
xz-utils \
1918
&& rm -rf /var/lib/apt/lists/*
2019

21-
# Install Varnish from official repo
22-
RUN curl -fsSL https://packagecloud.io/varnishcache/varnish75/gpgkey | gpg --dearmor -o /usr/share/keyrings/varnish.gpg \
23-
&& echo "deb [signed-by=/usr/share/keyrings/varnish.gpg] https://packagecloud.io/varnishcache/varnish75/debian/ bookworm main" \
20+
# Install Varnish 8.0 from packagecloud
21+
RUN curl -fsSL https://packagecloud.io/varnishcache/varnish80/gpgkey \
22+
| gpg --dearmor -o /usr/share/keyrings/varnish.gpg \
23+
&& echo "deb [signed-by=/usr/share/keyrings/varnish.gpg] https://packagecloud.io/varnishcache/varnish80/debian/ bookworm main" \
2424
> /etc/apt/sources.list.d/varnish.list \
2525
&& apt-get update \
2626
&& apt-get install -y varnish-dev varnish \

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ See [`examples/rust/src/lib.rs`](examples/rust/src/lib.rs) for a complete exampl
9494

9595
### Prerequisites
9696

97-
- Varnish Cache 7.5+ (with dev headers)
98-
- Wasmtime C API v25+
97+
- Varnish Cache 8.0+ (with dev headers)
98+
- Wasmtime C API v44+
9999
- autotools, pkg-config, C compiler
100100

101101
### Build

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ AC_PROG_INSTALL
1919
PKG_PROG_PKG_CONFIG
2020

2121
# Find Varnish
22-
PKG_CHECK_MODULES([VARNISHAPI], [varnishapi >= 7.0])
22+
PKG_CHECK_MODULES([VARNISHAPI], [varnishapi >= 8.0])
2323

2424
# Find vmodtool.py
2525
AC_ARG_VAR([VMODTOOL], [path to vmodtool.py])

src/proxy_wasm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ pw_proxy_get_header_map_value(void *env, wasmtime_caller_t *caller,
293293
hdr_search[0] = (char)i;
294294

295295
val = NULL;
296-
if (!http_GetHdr(hp, hdr_search, &val) || val == NULL) {
296+
if (!http_GetHdr(hp, (hdr_t)hdr_search, &val) || val == NULL) {
297297
results[0].of.i32 = PROXY_NOT_FOUND;
298298
return (NULL);
299299
}
@@ -442,7 +442,7 @@ pw_proxy_remove_header_map_value(void *env, wasmtime_caller_t *caller,
442442
}
443443
hdr_search[0] = (char)i;
444444

445-
http_Unset(hp, hdr_search);
445+
http_Unset(hp, (hdr_t)hdr_search);
446446

447447
results[0].of.i32 = PROXY_OK;
448448
return (NULL);

0 commit comments

Comments
 (0)