From 062dd077e7beadb94b6f0a122b8eec61ab6f9e8c Mon Sep 17 00:00:00 2001 From: Jorrit Salverda Date: Fri, 27 Sep 2024 03:15:18 +0200 Subject: [PATCH] Support worker 0.4.0 (#56) * support worker 0.4.0 * update worker version in example --- .github/workflows/build-worker.yml | 6 +++--- adapter/Cargo.toml | 2 +- example/Cargo.toml | 4 ++-- example/package.json | 2 +- example/wrangler.toml | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-worker.yml b/.github/workflows/build-worker.yml index e71568c..54f804b 100644 --- a/.github/workflows/build-worker.yml +++ b/.github/workflows/build-worker.yml @@ -16,16 +16,16 @@ jobs: node-version-file: '.nvmrc' - name: Install Wrangler - run: npm install -g wrangler@3.52.0 + run: npm install -g wrangler@3.78.7 - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: 1.76.0 + toolchain: 1.81.0 target: wasm32-unknown-unknown override: true - name: Run Wrangler build run: | - cd example && + cd example && npx wrangler publish --dry-run --outdir=dist diff --git a/adapter/Cargo.toml b/adapter/Cargo.toml index feb8034..9247d98 100644 --- a/adapter/Cargo.toml +++ b/adapter/Cargo.toml @@ -16,7 +16,7 @@ crate-type = ["cdylib", "lib"] [dependencies] axum = { version = "^0.7.1", default-features = false } -worker = { version = "^0.2.0" } +worker = { version = "^0.4.0" } axum-wasm-macros = "^0.1.0" futures = "0.3.29" diff --git a/example/Cargo.toml b/example/Cargo.toml index c43c0e4..8838a68 100644 --- a/example/Cargo.toml +++ b/example/Cargo.toml @@ -2,7 +2,7 @@ name = "todo-worker" version = "0.0.0" edition = "2021" -rust-version = "1.70.0" +rust-version = "1.81.0" [lib] crate-type = ["cdylib", "rlib"] @@ -19,7 +19,7 @@ serde_json = "1.0.116" tower-service = "0.3.2" url = "2.5.0" wasm-bindgen-futures = "0.4.34" -worker = "^0.2.0" +worker = "^0.4.0" # The `console_error_panic_hook` crate provides better debugging of panics by # logging them with `console.error`. This is great for development, but requires diff --git a/example/package.json b/example/package.json index 389d826..82113a9 100644 --- a/example/package.json +++ b/example/package.json @@ -8,4 +8,4 @@ "devDependencies": { "wrangler": "^2.0.0" } -} +} \ No newline at end of file diff --git a/example/wrangler.toml b/example/wrangler.toml index b7abb05..03caf1b 100644 --- a/example/wrangler.toml +++ b/example/wrangler.toml @@ -1,11 +1,11 @@ workers_dev = true -compatibility_date = "2023-11-29" +compatibility_date = "2024-09-22" main = "build/worker/shim.mjs" name = "axum-cloudflare-adapter" [vars] -WORKERS_RS_VERSION = "0.1.0" +WORKERS_RS_VERSION = "0.4.0" [build] command = "cargo install -q worker-build && worker-build --release"