Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
8ac395a
Add trusted-server-adapter-axum crate skeleton with lib + bin targets
prk-Jr Apr 17, 2026
8f0be1b
Add .gitignore to exclude target/ from axum adapter crate
prk-Jr Apr 17, 2026
0e81b2a
Add Axum platform trait implementations (config/secret/backend/geo/http)
prk-Jr Apr 17, 2026
3a0bcad
Add Axum middleware: FinalizeResponseMiddleware + AuthMiddleware
prk-Jr Apr 17, 2026
450a459
Add Axum app wiring: TrustedServerApp Hooks implementation
prk-Jr Apr 17, 2026
3e3016b
Add Axum adapter integration tests: route parity + middleware
prk-Jr Apr 17, 2026
ec2f5f5
Add CI job for Axum adapter native build and test
prk-Jr Apr 17, 2026
93ec543
Update CLAUDE.md: add Axum adapter to workspace layout and build comm…
prk-Jr Apr 17, 2026
a5a7719
Fix clippy warnings: add #[must_use], Panics doc, replace eprintln wi…
prk-Jr Apr 17, 2026
ba6ca2e
Promote axum adapter to workspace member, remove global wasm32 target
prk-Jr Apr 17, 2026
a783330
Add Axum runtime environment to integration test matrix
prk-Jr Apr 17, 2026
e2b1a61
Remove unused StatusCode import from routes integration test
prk-Jr Apr 17, 2026
8b54aca
Update docs to cover Axum dev server alongside Fastly
prk-Jr Apr 17, 2026
e967133
Reorder local dev options: Fastly first, Axum second
prk-Jr Apr 17, 2026
6059de2
Fix CI: build and pass Axum binary to integration test job
prk-Jr Apr 17, 2026
75fe0d0
fix integration test
prk-Jr Apr 18, 2026
6b6c221
Address PR16 review findings: unused deps, stale lockfile, middleware…
prk-Jr Apr 21, 2026
0a15d1d
Fix fixed-port TIME_WAIT flakiness and add send_async/select divergen…
prk-Jr Apr 21, 2026
a780034
Restore request-scoped Axum HTTP client and fix dynamic-port logging
prk-Jr Apr 22, 2026
0dcc750
Resolve PR review findings
prk-Jr Apr 27, 2026
d3138fd
Merge feature/edgezero-pr15-remove-fastly-core into PR16
prk-Jr Apr 27, 2026
6d1184d
Complete PR15 merge and restructure workspace for mixed-target adapters
prk-Jr Apr 28, 2026
9a0d38c
Set default-members to fastly adapter so Viceroy can locate the binary
prk-Jr Apr 29, 2026
978fbb2
Resolve PR review findings and add startup listen log
prk-Jr May 12, 2026
130de76
Merge feature/edgezero-pr15-remove-fastly-core into PR16
prk-Jr May 12, 2026
314575b
Fix .gitignore comment: attribute .edgezero/ to upstream framework
prk-Jr May 13, 2026
bff1adc
Remove unused backend.rs — duplicate DEFAULT_FIRST_BYTE_TIMEOUT alrea…
prk-Jr May 13, 2026
b4851c4
Fix integration test failure
prk-Jr May 13, 2026
6475490
Resolve PR review findings: Axum fallback method parity and stale cli…
prk-Jr May 14, 2026
f9e46dd
Resolve PR review findings: Axum/Fastly parity and stale docs
prk-Jr May 22, 2026
a6e1073
Resolve PR review findings: Axum/Fastly parity and stale docs
prk-Jr May 23, 2026
746993c
Resolve PR 643 round-2 review findings
prk-Jr May 28, 2026
5f8397c
Merge feature/edgezero-pr15-remove-fastly-core into PR16
prk-Jr May 28, 2026
ed4e225
Fix missing compat::from_fastly_response conversion in edgezero_main
prk-Jr May 28, 2026
e6206a5
Fix dead code and spurious mut from PR15 merge in main.rs
prk-Jr May 28, 2026
1c5882b
Merge feature/edgezero-pr15-remove-fastly-core into PR16 (round 2)
prk-Jr Jun 8, 2026
87bbd25
Remove fastly dependency from core via EcKvStore platform trait
prk-Jr Jun 10, 2026
8841e24
Fix adapter tests broken by strict placeholder-secret validation
prk-Jr Jun 10, 2026
02b0605
Address round-4 review findings on Axum dev server PR
prk-Jr Jun 10, 2026
4a2e113
Update integration-tests lock file after fastly removal from core
prk-Jr Jun 10, 2026
d541bbd
Install wasm32-wasip1 target in test-axum CI job
prk-Jr Jun 10, 2026
47b746e
Merge feature/edgezero-pr15-remove-fastly-core into PR16
prk-Jr Jun 12, 2026
f7e8846
Resolve PR16 round-5 review findings
prk-Jr Jun 12, 2026
4a4b4b9
Add trusted-server-adapter-cloudflare crate (PR 17) (#644)
prk-Jr Jun 17, 2026
486e62d
Resolve PR16 round-6 review nitpicks
prk-Jr Jun 17, 2026
12859d5
Merge feature/edgezero-pr15-remove-fastly-core into PR16
prk-Jr Jun 17, 2026
b391b86
Sync integration-tests lockfile after merging PR15
prk-Jr Jun 17, 2026
a50d293
Merge remote-tracking branch 'origin/feature/edgezero-pr15-remove-fas…
prk-Jr Jun 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 33 additions & 3 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,38 @@
# No global [build] target — the workspace contains adapters for multiple targets:
# trusted-server-adapter-fastly → wasm32-wasip1 (Fastly Compute)
# trusted-server-adapter-axum → native (dev server)
# trusted-server-adapter-cloudflare → wasm32-unknown-unknown (Cloudflare Workers)
#
# All adapters are workspace members so `-p` resolves each.
# default-members = [fastly] — required so Viceroy can locate the binary via `cargo run --bin`.
# Use the aliases below to target each adapter with the correct toolchain.

[alias]
test_details = ["test", "--target", "aarch64-apple-darwin"]
# Fastly adapter + shared crates (wasm32-wasip1 via Viceroy)
# Excludes Axum (native-only) and Cloudflare (wasm32-unknown-unknown, separate job)
test-fastly = ["test", "--workspace", "--exclude", "trusted-server-adapter-axum", "--exclude", "trusted-server-adapter-cloudflare", "--target", "wasm32-wasip1"]
# Axum dev server adapter (native)
test-axum = ["test", "-p", "trusted-server-adapter-axum"]
# Cloudflare adapter (native host; WASM target checked separately in CI)
test-cloudflare = ["test", "-p", "trusted-server-adapter-cloudflare"]
# Cloudflare adapter WASM target check (wasm32-unknown-unknown requires --features cloudflare)
check-cloudflare = ["check", "-p", "trusted-server-adapter-cloudflare", "--target", "wasm32-unknown-unknown", "--features", "cloudflare"]

# Clippy — target-matched to avoid cross-target compile failures
clippy-fastly = ["clippy", "--workspace", "--exclude", "trusted-server-adapter-axum", "--exclude", "trusted-server-adapter-cloudflare", "--all-targets", "--all-features", "--target", "wasm32-wasip1", "--", "-D", "warnings"]
clippy-axum = ["clippy", "-p", "trusted-server-adapter-axum", "--all-targets", "--all-features", "--", "-D", "warnings"]
# No --all-features: the `cloudflare` feature has a compile_error! guard on
# non-wasm32 targets. WASM-feature coverage comes from `cargo check-cloudflare`.
clippy-cloudflare = ["clippy", "-p", "trusted-server-adapter-cloudflare", "--all-targets", "--", "-D", "warnings"]

# Build — target-matched, same split as test/clippy
build-fastly = ["build", "--workspace", "--exclude", "trusted-server-adapter-axum", "--exclude", "trusted-server-adapter-cloudflare", "--target", "wasm32-wasip1"]
build-axum = ["build", "-p", "trusted-server-adapter-axum"]
build-cloudflare = ["build", "-p", "trusted-server-adapter-cloudflare", "--target", "wasm32-unknown-unknown", "--features", "cloudflare"]

[build]
target = "wasm32-wasip1"
# Check — fast compile validation, same split
check-fastly = ["check", "--workspace", "--exclude", "trusted-server-adapter-axum", "--exclude", "trusted-server-adapter-cloudflare", "--target", "wasm32-wasip1"]
check-axum = ["check", "-p", "trusted-server-adapter-axum"]

[target.'cfg(all(target_arch = "wasm32"))']
runner = "viceroy run -C ../../fastly.toml -- "
7 changes: 4 additions & 3 deletions .claude/agents/build-validator.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ Validate that the project builds correctly across all targets.

## Steps

1. **Native build**
1. **Per-target builds** (no global target — fastly is wasm32-wasip1, axum is
native, cloudflare is wasm32-unknown-unknown)

```bash
cargo build --workspace
cargo build-fastly && cargo build-axum && cargo build-cloudflare
```

2. **WASM build** (production target)
Expand All @@ -23,7 +24,7 @@ Validate that the project builds correctly across all targets.
3. **Clippy**

```bash
cargo clippy --workspace --all-targets --all-features -- -D warnings
cargo clippy-fastly && cargo clippy-axum && cargo clippy-cloudflare
```

4. **Format check**
Expand Down
4 changes: 2 additions & 2 deletions .claude/agents/pr-creator.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ Before creating the PR, verify the branch is healthy:

```
cargo fmt --all -- --check
cargo clippy --workspace --all-targets --all-features -- -D warnings
cargo test --workspace
cargo clippy-fastly && cargo clippy-axum
cargo test-fastly && cargo test-axum
cd crates/js/lib && npx vitest run
cd crates/js/lib && npm run format
cd docs && npm run format
Expand Down
2 changes: 1 addition & 1 deletion .claude/agents/pr-reviewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ For each changed file, evaluate:
- Are new code paths tested?
- Are edge cases covered (empty input, max values, error paths)?
- If config-derived regex/pattern compilation changed: are invalid enabled-config startup failures and explicit `enabled = false` bypass cases both covered?
- Rust tests: `cargo test --workspace`
- Rust tests: `cargo test-fastly && cargo test-axum`
- JS tests: `npx vitest run` in `crates/js/lib/`

### 5. Classify findings
Expand Down
4 changes: 2 additions & 2 deletions .claude/agents/verify-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ cargo fmt --all -- --check
### 2. Clippy

```bash
cargo clippy --workspace --all-targets --all-features -- -D warnings
cargo clippy-fastly && cargo clippy-axum
```

### 3. Rust Tests

```bash
cargo test --workspace
cargo test-fastly && cargo test-axum
```

### 4. JS Tests
Expand Down
11 changes: 6 additions & 5 deletions .claude/commands/check-ci.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
Run all CI checks locally, in order. Stop and report if any step fails.

1. `cargo fmt --all -- --check`
2. `cargo clippy --workspace --all-targets --all-features -- -D warnings`
3. `cargo test --workspace`
4. `cd crates/js/lib && npx vitest run`
5. `cd crates/js/lib && npm run format`
6. `cd docs && npm run format`
2. `cargo clippy-fastly && cargo clippy-axum && cargo clippy-cloudflare`
3. `cargo test-fastly && cargo test-axum && cargo test-cloudflare`
4. `cargo check-cloudflare` (wasm32-unknown-unknown target check, mirrors CI)
5. `cd crates/js/lib && npx vitest run`
6. `cd crates/js/lib && npm run format`
7. `cd docs && npm run format`

Report a summary of all results when done.
2 changes: 1 addition & 1 deletion .claude/commands/test-all.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Run the full test suite for both Rust and JavaScript.

```bash
cargo test --workspace
cargo test-fastly && cargo test-axum && cargo test-cloudflare
```

Then run JS tests:
Expand Down
6 changes: 3 additions & 3 deletions .claude/commands/verify.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Full verification: build, test, and lint the entire project.

1. `cargo build --workspace`
1. `cargo build-fastly && cargo build-axum && cargo build-cloudflare`
2. `cargo build --package trusted-server-adapter-fastly --release --target wasm32-wasip1`
3. `cargo fmt --all -- --check`
4. `cargo clippy --workspace --all-targets --all-features -- -D warnings`
5. `cargo test --workspace`
4. `cargo clippy-fastly && cargo clippy-axum && cargo clippy-cloudflare`
5. `cargo test-fastly && cargo test-axum && cargo test-cloudflare`
6. `cd crates/js/lib && npx vitest run`
7. `cd crates/js/lib && npm run format`
8. `cd docs && npm run format`
Expand Down
33 changes: 33 additions & 0 deletions .github/actions/setup-integration-test-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,18 @@ inputs:
description: Build the trusted-server WASM binary for integration tests.
required: false
default: "true"
build-axum:
description: Build the trusted-server-axum native binary for integration tests.
required: false
default: "true"
build-test-images:
description: Build the framework Docker images used by integration tests.
required: false
default: "true"
build-cloudflare:
description: Build the Cloudflare Workers bundle (wasm32-unknown-unknown) for integration tests.
required: false
default: "false"

outputs:
node-version:
Expand Down Expand Up @@ -86,6 +94,16 @@ runs:
TRUSTED_SERVER__PROXY__CERTIFICATE_CHECK: "false"
run: cargo build --package trusted-server-adapter-fastly --release --target wasm32-wasip1

- name: Build Axum native binary
if: ${{ inputs.build-axum == 'true' }}
shell: bash
env:
TRUSTED_SERVER__PUBLISHER__ORIGIN_URL: http://127.0.0.1:${{ inputs.origin-port }}
TRUSTED_SERVER__PUBLISHER__PROXY_SECRET: integration-test-proxy-secret
TRUSTED_SERVER__EDGE_COOKIE__SECRET_KEY: integration-test-secret-key
TRUSTED_SERVER__PROXY__CERTIFICATE_CHECK: "false"
run: cargo build -p trusted-server-adapter-axum

- name: Build WordPress test container
if: ${{ inputs.build-test-images == 'true' }}
shell: bash
Expand All @@ -101,3 +119,18 @@ runs:
--build-arg NODE_VERSION=${{ steps.node-version.outputs.node-version }} \
-t test-nextjs:latest \
crates/integration-tests/fixtures/frameworks/nextjs/

- name: Add wasm32-unknown-unknown target for Cloudflare build
if: ${{ inputs.build-cloudflare == 'true' }}
shell: bash
run: rustup target add wasm32-unknown-unknown

- name: Build Cloudflare Workers bundle
if: ${{ inputs.build-cloudflare == 'true' }}
shell: bash
env:
TRUSTED_SERVER__PUBLISHER__ORIGIN_URL: http://127.0.0.1:${{ inputs.origin-port }}
TRUSTED_SERVER__PUBLISHER__PROXY_SECRET: integration-test-proxy-secret
TRUSTED_SERVER__SYNTHETIC__SECRET_KEY: integration-test-secret-key
TRUSTED_SERVER__PROXY__CERTIFICATE_CHECK: "false"
run: bash crates/trusted-server-adapter-cloudflare/build.sh
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Closes #

<!-- How did you verify this works? Check all that apply -->

- [ ] `cargo test --workspace`
- [ ] `cargo clippy --workspace --all-targets --all-features -- -D warnings`
- [ ] `cargo test-fastly && cargo test-axum`
- [ ] `cargo clippy-fastly && cargo clippy-axum`
- [ ] `cargo fmt --all -- --check`
- [ ] JS tests: `cd crates/js/lib && npx vitest run`
- [ ] JS format: `cd crates/js/lib && npm run format`
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [main]
pull_request:
branches: [main]
branches: [main, "feature/**"]

permissions:
contents: read
Expand Down Expand Up @@ -32,8 +32,14 @@ jobs:
- name: Run cargo fmt
uses: actions-rust-lang/rustfmt@v1

- name: Run cargo clippy
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
- name: Run cargo clippy (Fastly — wasm32-wasip1)
run: cargo clippy-fastly

- name: Run cargo clippy (Axum — native)
run: cargo clippy-axum

- name: Run cargo clippy (Cloudflare — native)
run: cargo clippy-cloudflare

format-typescript:
runs-on: ubuntu-latest
Expand Down
32 changes: 29 additions & 3 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ env:
ORIGIN_PORT: 8888
ARTIFACTS_DIR: /tmp/integration-test-artifacts
WASM_ARTIFACT_PATH: /tmp/integration-test-artifacts/wasm/trusted-server-adapter-fastly.wasm
AXUM_ARTIFACT_PATH: /tmp/integration-test-artifacts/axum/trusted-server-axum
DOCKER_ARTIFACT_PATH: /tmp/integration-test-artifacts/docker/test-images.tar
CF_BUILD_ARTIFACT_PATH: /tmp/integration-test-artifacts/cloudflare/build

jobs:
prepare-artifacts:
Expand All @@ -29,11 +31,14 @@ jobs:
with:
origin-port: ${{ env.ORIGIN_PORT }}
install-viceroy: "false"
build-cloudflare: "true"

- name: Package integration test artifacts
run: |
mkdir -p "$(dirname "$WASM_ARTIFACT_PATH")" "$(dirname "$DOCKER_ARTIFACT_PATH")"
mkdir -p "$(dirname "$WASM_ARTIFACT_PATH")" "$(dirname "$AXUM_ARTIFACT_PATH")" "$(dirname "$DOCKER_ARTIFACT_PATH")" "$CF_BUILD_ARTIFACT_PATH"
cp target/wasm32-wasip1/release/trusted-server-adapter-fastly.wasm "$WASM_ARTIFACT_PATH"
cp target/debug/trusted-server-axum "$AXUM_ARTIFACT_PATH"
cp -r crates/trusted-server-adapter-cloudflare/build/. "$CF_BUILD_ARTIFACT_PATH/"
docker save \
--output "$DOCKER_ARTIFACT_PATH" \
test-wordpress:latest test-nextjs:latest
Expand All @@ -49,7 +54,7 @@ jobs:
name: integration tests
needs: prepare-artifacts
runs-on: ubuntu-latest
timeout-minutes: 15
timeout-minutes: 20
steps:
- uses: actions/checkout@v4

Expand All @@ -61,6 +66,7 @@ jobs:
check-dependency-versions: "false"
install-viceroy: "true"
build-wasm: "false"
build-axum: "false"
build-test-images: "false"

- name: Download integration test artifacts
Expand All @@ -69,17 +75,37 @@ jobs:
name: integration-test-artifacts
path: ${{ env.ARTIFACTS_DIR }}

- name: Make binaries executable
run: chmod +x "$AXUM_ARTIFACT_PATH"

- name: Restore Cloudflare Workers bundle
run: |
mkdir -p crates/trusted-server-adapter-cloudflare/build
cp -r "$CF_BUILD_ARTIFACT_PATH/." crates/trusted-server-adapter-cloudflare/build/

- name: Load integration test Docker images
run: docker load --input "$DOCKER_ARTIFACT_PATH"

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ steps.shared-setup.outputs.node-version }}

- name: Install wrangler
run: npm install -g wrangler

- name: Run integration tests
run: >-
cargo test
--manifest-path crates/integration-tests/Cargo.toml
--target x86_64-unknown-linux-gnu
-- --include-ignored --skip test_wordpress_fastly --skip test_nextjs_fastly --test-threads=1
-- --include-ignored
--skip test_wordpress_fastly --skip test_nextjs_fastly
--test-threads=1
env:
WASM_BINARY_PATH: ${{ env.WASM_ARTIFACT_PATH }}
AXUM_BINARY_PATH: ${{ env.AXUM_ARTIFACT_PATH }}
CLOUDFLARE_WRANGLER_DIR: ${{ github.workspace }}/crates/trusted-server-adapter-cloudflare
INTEGRATION_ORIGIN_PORT: ${{ env.ORIGIN_PORT }}
RUST_LOG: info

Expand Down
57 changes: 55 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
push:
branches: [main]
pull_request:
branches: [main]
branches: [main, "feature/**"]

jobs:
test-rust:
Expand Down Expand Up @@ -49,7 +49,33 @@ jobs:
run: cargo install --git https://github.com/fastly/Viceroy --tag v${{ steps.viceroy-version.outputs.viceroy-version }} viceroy

- name: Run tests
run: cargo test --workspace
run: cargo test-fastly

test-axum:
name: cargo test (axum native)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Retrieve Rust version
id: rust-version
run: echo "rust-version=$(grep '^rust ' .tool-versions | awk '{print $2}')" >> $GITHUB_OUTPUT
shell: bash

- name: Set up Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ steps.rust-version.outputs.rust-version }}
# wasm32-wasip1 is required by the "Verify Fastly WASM release
# build" step below; the axum build and tests are native.
target: wasm32-wasip1
cache-shared-key: cargo-${{ runner.os }}

- name: Build Axum adapter
run: cargo build -p trusted-server-adapter-axum

- name: Run Axum adapter tests
run: cargo test-axum
Comment thread
prk-Jr marked this conversation as resolved.
Comment thread
prk-Jr marked this conversation as resolved.

- name: Verify Fastly WASM release build
Comment thread
prk-Jr marked this conversation as resolved.
env:
Expand All @@ -59,6 +85,33 @@ jobs:
TRUSTED_SERVER__PROXY__CERTIFICATE_CHECK: "false"
run: cargo build --package trusted-server-adapter-fastly --release --target wasm32-wasip1

test-cloudflare:
name: cargo check (cloudflare native + wasm32-unknown-unknown)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Retrieve Rust version
id: rust-version
run: echo "rust-version=$(grep '^rust ' .tool-versions | awk '{print $2}')" >> $GITHUB_OUTPUT
shell: bash

- name: Set up Rust toolchain (native + wasm32-unknown-unknown)
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ steps.rust-version.outputs.rust-version }}
target: wasm32-unknown-unknown
cache-shared-key: cargo-${{ runner.os }}

- name: Check Cloudflare adapter (native host)
run: cargo check -p trusted-server-adapter-cloudflare

- name: Check Cloudflare adapter (wasm32-unknown-unknown)
run: cargo check -p trusted-server-adapter-cloudflare --target wasm32-unknown-unknown --features cloudflare

- name: Run Cloudflare adapter tests (native host)
run: cargo test-cloudflare

test-typescript:
name: vitest
runs-on: ubuntu-latest
Expand Down
Loading
Loading