|
| 1 | +# No global [build] target — the workspace contains adapters for multiple targets: |
| 2 | +# trusted-server-adapter-fastly → wasm32-wasip1 (Fastly Compute) |
| 3 | +# trusted-server-adapter-axum → native (dev server) |
| 4 | +# trusted-server-adapter-cloudflare → wasm32-unknown-unknown (Cloudflare Workers) |
| 5 | +# trusted-server-adapter-spin → wasm32-wasip1 (Fermyon Spin) |
| 6 | +# |
| 7 | +# All adapters are workspace members so `-p` resolves each. |
| 8 | +# default-members = [fastly] — required so Viceroy can locate the binary via `cargo run --bin`. |
| 9 | +# Use the aliases below to target each adapter with the correct toolchain. |
| 10 | + |
1 | 11 | [alias] |
2 | | -test_details = ["test", "--target", "aarch64-apple-darwin"] |
| 12 | +# Fastly adapter + shared crates (wasm32-wasip1 via Viceroy) |
| 13 | +# Excludes Axum (native-only), Cloudflare (wasm32-unknown-unknown), and Spin (separate wasm32-wasip1 job) |
| 14 | +test-fastly = ["test", "--workspace", "--exclude", "trusted-server-adapter-axum", "--exclude", "trusted-server-adapter-cloudflare", "--exclude", "trusted-server-adapter-spin", "--target", "wasm32-wasip1"] |
| 15 | +# Axum dev server adapter (native) |
| 16 | +test-axum = ["test", "-p", "trusted-server-adapter-axum"] |
| 17 | +# Cloudflare adapter (native host; WASM target checked separately in CI) |
| 18 | +test-cloudflare = ["test", "-p", "trusted-server-adapter-cloudflare"] |
| 19 | +# Cloudflare adapter WASM target check (wasm32-unknown-unknown requires --features cloudflare) |
| 20 | +check-cloudflare = ["check", "-p", "trusted-server-adapter-cloudflare", "--target", "wasm32-unknown-unknown", "--features", "cloudflare"] |
| 21 | +# Spin adapter (native host tests; WASM target checked separately with --features spin) |
| 22 | +test-spin = ["test", "-p", "trusted-server-adapter-spin"] |
| 23 | +check-spin = ["check", "-p", "trusted-server-adapter-spin", "--target", "wasm32-wasip1", "--features", "spin"] |
| 24 | + |
| 25 | +# Clippy — target-matched to avoid cross-target compile failures |
| 26 | +clippy-fastly = ["clippy", "--workspace", "--exclude", "trusted-server-adapter-axum", "--exclude", "trusted-server-adapter-cloudflare", "--exclude", "trusted-server-adapter-spin", "--all-targets", "--all-features", "--target", "wasm32-wasip1", "--", "-D", "warnings"] |
| 27 | +clippy-axum = ["clippy", "-p", "trusted-server-adapter-axum", "--all-targets", "--all-features", "--", "-D", "warnings"] |
| 28 | +# No --all-features: the `cloudflare` feature has a compile_error! guard on |
| 29 | +# non-wasm32 targets. WASM-feature coverage comes from `cargo check-cloudflare`. |
| 30 | +clippy-cloudflare = ["clippy", "-p", "trusted-server-adapter-cloudflare", "--all-targets", "--", "-D", "warnings"] |
| 31 | +clippy-spin-native = ["clippy", "-p", "trusted-server-adapter-spin", "--all-targets", "--", "-D", "warnings"] |
| 32 | +clippy-spin-wasm = ["clippy", "-p", "trusted-server-adapter-spin", "--target", "wasm32-wasip1", "--features", "spin", "--lib", "--", "-D", "warnings"] |
| 33 | + |
| 34 | +# Build — target-matched, same split as test/clippy |
| 35 | +build-fastly = ["build", "--workspace", "--exclude", "trusted-server-adapter-axum", "--exclude", "trusted-server-adapter-cloudflare", "--exclude", "trusted-server-adapter-spin", "--target", "wasm32-wasip1"] |
| 36 | +build-axum = ["build", "-p", "trusted-server-adapter-axum"] |
| 37 | +build-cloudflare = ["build", "-p", "trusted-server-adapter-cloudflare", "--target", "wasm32-unknown-unknown", "--features", "cloudflare"] |
3 | 38 |
|
4 | | -[build] |
5 | | -target = "wasm32-wasip1" |
| 39 | +# Check — fast compile validation, same split |
| 40 | +check-fastly = ["check", "--workspace", "--exclude", "trusted-server-adapter-axum", "--exclude", "trusted-server-adapter-cloudflare", "--exclude", "trusted-server-adapter-spin", "--target", "wasm32-wasip1"] |
| 41 | +check-axum = ["check", "-p", "trusted-server-adapter-axum"] |
6 | 42 |
|
7 | 43 | [target.'cfg(all(target_arch = "wasm32"))'] |
8 | 44 | runner = "viceroy run -C ../../fastly.toml -- " |
0 commit comments