|
7 | 7 | # |
8 | 8 | # All adapters are workspace members so `-p` resolves each. |
9 | 9 | # default-members = [fastly] — required so Viceroy can locate the binary via `cargo run --bin`. |
10 | | -# Use the aliases below to target each adapter with the correct toolchain. |
| 10 | +# The aliases below are grouped by adapter; each targets its adapter with the |
| 11 | +# correct toolchain (build / check / test / clippy). |
11 | 12 |
|
12 | 13 | [alias] |
| 14 | +# Generic: native test with an explicit host target. |
13 | 15 | test_details = ["test", "--target", "aarch64-apple-darwin"] |
14 | | -test_cli_macos = ["test", "--package", "trusted-server-cli", "--target", "aarch64-apple-darwin"] |
15 | | -build_cli_macos = ["build", "--package", "trusted-server-cli", "--target", "aarch64-apple-darwin"] |
16 | | -test_cli_linux = ["test", "--package", "trusted-server-cli", "--target", "x86_64-unknown-linux-gnu"] |
17 | | -build_cli_linux = ["build", "--package", "trusted-server-cli", "--target", "x86_64-unknown-linux-gnu"] |
18 | | -# Fastly adapter + shared crates (wasm32-wasip1 via Viceroy) |
19 | | -# Excludes Axum (native-only), Cloudflare (wasm32-unknown-unknown), and Spin (separate wasm32-wasip1 job) |
20 | | -test-fastly = ["test", "--workspace", "--exclude", "trusted-server-adapter-axum", "--exclude", "trusted-server-adapter-cloudflare", "--exclude", "trusted-server-adapter-spin", "--target", "wasm32-wasip1"] |
21 | | -# Axum dev server adapter (native) |
22 | | -test-axum = ["test", "-p", "trusted-server-adapter-axum"] |
23 | | -# Cloudflare adapter (native host; WASM target checked separately in CI) |
24 | | -test-cloudflare = ["test", "-p", "trusted-server-adapter-cloudflare"] |
25 | | -# Cloudflare adapter WASM target check (wasm32-unknown-unknown requires --features cloudflare) |
26 | | -check-cloudflare = ["check", "-p", "trusted-server-adapter-cloudflare", "--target", "wasm32-unknown-unknown", "--features", "cloudflare"] |
27 | | -# Spin adapter (native host tests; WASM target checked separately with --features spin) |
28 | | -test-spin = ["test", "-p", "trusted-server-adapter-spin"] |
29 | | -check-spin = ["check", "-p", "trusted-server-adapter-spin", "--target", "wasm32-wasip1", "--features", "spin"] |
30 | 16 |
|
31 | | -# Clippy — target-matched to avoid cross-target compile failures |
32 | | -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"] |
| 17 | +# --- Fastly adapter (wasm32-wasip1, run via Viceroy) --- |
| 18 | +# Whitelist the wasm-buildable crates (the Fastly adapter + the shared crates it |
| 19 | +# builds/tests on wasm) rather than blacklisting every native crate — so adding a |
| 20 | +# native crate needs no change here. Axum (native), Cloudflare |
| 21 | +# (wasm32-unknown-unknown), Spin, the CLI (native), and integration-tests |
| 22 | +# (native) are simply not listed. |
| 23 | +build-fastly = ["build", "-p", "trusted-server-core", "-p", "trusted-server-adapter-fastly", "-p", "trusted-server-js", "-p", "trusted-server-openrtb", "--target", "wasm32-wasip1"] |
| 24 | +check-fastly = ["check", "-p", "trusted-server-core", "-p", "trusted-server-adapter-fastly", "-p", "trusted-server-js", "-p", "trusted-server-openrtb", "--target", "wasm32-wasip1"] |
| 25 | +clippy-fastly = ["clippy", "-p", "trusted-server-core", "-p", "trusted-server-adapter-fastly", "-p", "trusted-server-js", "-p", "trusted-server-openrtb", "--all-targets", "--all-features", "--target", "wasm32-wasip1", "--", "-D", "warnings"] |
| 26 | +test-fastly = ["test", "-p", "trusted-server-core", "-p", "trusted-server-adapter-fastly", "-p", "trusted-server-js", "-p", "trusted-server-openrtb", "--target", "wasm32-wasip1"] |
| 27 | + |
| 28 | +# --- Axum adapter (native dev server) --- |
| 29 | +build-axum = ["build", "-p", "trusted-server-adapter-axum"] |
| 30 | +check-axum = ["check", "-p", "trusted-server-adapter-axum"] |
33 | 31 | clippy-axum = ["clippy", "-p", "trusted-server-adapter-axum", "--all-targets", "--all-features", "--", "-D", "warnings"] |
| 32 | +test-axum = ["test", "-p", "trusted-server-adapter-axum"] |
| 33 | + |
| 34 | +# --- Cloudflare adapter (native host + wasm32-unknown-unknown) --- |
| 35 | +# Build/check target the WASM runtime (requires the `cloudflare` feature); |
| 36 | +# tests and clippy run on the native host. |
| 37 | +build-cloudflare = ["build", "-p", "trusted-server-adapter-cloudflare", "--target", "wasm32-unknown-unknown", "--features", "cloudflare"] |
| 38 | +check-cloudflare = ["check", "-p", "trusted-server-adapter-cloudflare", "--target", "wasm32-unknown-unknown", "--features", "cloudflare"] |
34 | 39 | # No --all-features: the `cloudflare` feature has a compile_error! guard on |
35 | 40 | # non-wasm32 targets. WASM-feature coverage comes from `cargo check-cloudflare`. |
36 | 41 | clippy-cloudflare = ["clippy", "-p", "trusted-server-adapter-cloudflare", "--all-targets", "--", "-D", "warnings"] |
| 42 | +test-cloudflare = ["test", "-p", "trusted-server-adapter-cloudflare"] |
| 43 | + |
| 44 | +# --- Spin adapter (native host tests + wasm32-wasip1 target) --- |
| 45 | +check-spin = ["check", "-p", "trusted-server-adapter-spin", "--target", "wasm32-wasip1", "--features", "spin"] |
37 | 46 | clippy-spin-native = ["clippy", "-p", "trusted-server-adapter-spin", "--all-targets", "--", "-D", "warnings"] |
38 | 47 | clippy-spin-wasm = ["clippy", "-p", "trusted-server-adapter-spin", "--target", "wasm32-wasip1", "--features", "spin", "--lib", "--", "-D", "warnings"] |
| 48 | +test-spin = ["test", "-p", "trusted-server-adapter-spin"] |
39 | 49 |
|
40 | | -# Build — target-matched, same split as test/clippy |
41 | | -build-fastly = ["build", "--workspace", "--exclude", "trusted-server-adapter-axum", "--exclude", "trusted-server-adapter-cloudflare", "--exclude", "trusted-server-adapter-spin", "--target", "wasm32-wasip1"] |
42 | | -build-axum = ["build", "-p", "trusted-server-adapter-axum"] |
43 | | -build-cloudflare = ["build", "-p", "trusted-server-adapter-cloudflare", "--target", "wasm32-unknown-unknown", "--features", "cloudflare"] |
44 | | - |
45 | | -# Check — fast compile validation, same split |
46 | | -check-fastly = ["check", "--workspace", "--exclude", "trusted-server-adapter-axum", "--exclude", "trusted-server-adapter-cloudflare", "--exclude", "trusted-server-adapter-spin", "--target", "wasm32-wasip1"] |
47 | | -check-axum = ["check", "-p", "trusted-server-adapter-axum"] |
| 50 | +# --- ts operator CLI (native host; per-OS target overrides the wasm default) --- |
| 51 | +build_cli_linux = ["build", "--package", "trusted-server-cli", "--target", "x86_64-unknown-linux-gnu"] |
| 52 | +build_cli_macos = ["build", "--package", "trusted-server-cli", "--target", "aarch64-apple-darwin"] |
| 53 | +run_cli_linux = ["run", "--package", "trusted-server-cli", "--target", "x86_64-unknown-linux-gnu", "--"] |
| 54 | +run_cli_macos = ["run", "--package", "trusted-server-cli", "--target", "aarch64-apple-darwin", "--"] |
| 55 | +test_cli_linux = ["test", "--package", "trusted-server-cli", "--target", "x86_64-unknown-linux-gnu"] |
| 56 | +test_cli_macos = ["test", "--package", "trusted-server-cli", "--target", "aarch64-apple-darwin"] |
48 | 57 |
|
| 58 | +# When a wasm binary IS built, run it under Viceroy. |
49 | 59 | [target.'cfg(all(target_arch = "wasm32"))'] |
50 | 60 | runner = "viceroy run -C ../../fastly.toml -- " |
0 commit comments