Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 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
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
6 changes: 0 additions & 6 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
[alias]
test_details = ["test", "--target", "aarch64-apple-darwin"]

[build]
target = "wasm32-wasip1"

[target.'cfg(all(target_arch = "wasm32"))']
runner = "viceroy run -C ../../fastly.toml -- "
14 changes: 14 additions & 0 deletions .github/actions/setup-integration-test-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ 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
Expand Down Expand Up @@ -75,6 +79,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__SYNTHETIC__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 Down
8 changes: 7 additions & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ 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

jobs:
Expand All @@ -32,8 +33,9 @@ jobs:

- 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")"
cp target/wasm32-wasip1/release/trusted-server-adapter-fastly.wasm "$WASM_ARTIFACT_PATH"
cp target/debug/trusted-server-axum "$AXUM_ARTIFACT_PATH"
docker save \
--output "$DOCKER_ARTIFACT_PATH" \
test-wordpress:latest test-nextjs:latest
Expand Down Expand Up @@ -69,6 +71,9 @@ jobs:
name: integration-test-artifacts
path: ${{ env.ARTIFACTS_DIR }}

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

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

Expand All @@ -80,6 +85,7 @@ jobs:
-- --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 }}
INTEGRATION_ORIGIN_PORT: ${{ env.ORIGIN_PORT }}
RUST_LOG: info

Expand Down
25 changes: 24 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,30 @@ jobs:
run: cargo install --git https://github.com/fastly/Viceroy viceroy

- name: Run tests
run: cargo test --workspace
run: cargo test --workspace --exclude trusted-server-adapter-axum --target wasm32-wasip1

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 }}
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 -p trusted-server-adapter-axum
Comment thread
prk-Jr marked this conversation as resolved.

test-typescript:
name: vitest
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
/bin
/pkg
/target

# EdgeZero local KV store (created by axum dev server)
.edgezero/
/crates/integration-tests/target

# env
Expand Down
12 changes: 10 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ real-time bidding integration, and publisher-side JavaScript injection.
crates/
trusted-server-core/ # Core library — shared logic, integrations, HTML processing
trusted-server-adapter-fastly/ # Fastly Compute entry point (wasm32-wasip1 binary)
trusted-server-adapter-axum/ # Axum dev server entry point (native binary)
js/ # TypeScript/JS build — per-integration IIFE bundles
lib/ # TS source, Vitest tests, esbuild pipeline
```
Expand Down Expand Up @@ -49,13 +50,20 @@ fastly compute serve

# Deploy to Fastly
fastly compute publish

# Run Axum dev server (native — no Viceroy)
cargo run -p trusted-server-adapter-axum

# Test Axum adapter only
cargo test -p trusted-server-adapter-axum
```

### Testing & Quality

```bash
# Run all Rust tests (uses viceroy)
cargo test --workspace
# Run all Rust tests (Fastly/WASM crates via Viceroy, axum separately)
cargo test --workspace --exclude trusted-server-adapter-axum --target wasm32-wasip1
cargo test -p trusted-server-adapter-axum

# Format
cargo fmt --all -- --check
Expand Down
Loading
Loading