-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathconfig.toml
More file actions
63 lines (56 loc) · 4.72 KB
/
Copy pathconfig.toml
File metadata and controls
63 lines (56 loc) · 4.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# 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)
# trusted-server-adapter-spin → wasm32-wasip1 (Fermyon Spin)
# trusted-server-cli → native (operator CLI)
#
# All adapters are workspace members so `-p` resolves each.
# default-members = [fastly] — required so Viceroy can locate the binary via `cargo run --bin`.
# The aliases below are grouped by adapter; each targets its adapter with the
# correct toolchain (build / check / test / clippy).
[alias]
# Generic: native test with an explicit host target.
test_details = ["test", "--target", "aarch64-apple-darwin"]
# --- Fastly adapter (wasm32-wasip1, run via Viceroy) ---
# Whitelist the wasm-buildable crates (the Fastly adapter + the shared crates it
# builds/tests on wasm) rather than blacklisting every native crate — so adding a
# native crate needs no change here. Axum (native), Cloudflare
# (wasm32-unknown-unknown), Spin, the CLI (native), and integration-tests
# (native) are simply not listed.
build-fastly = ["build", "-p", "trusted-server-core", "-p", "trusted-server-adapter-fastly", "-p", "trusted-server-js", "-p", "trusted-server-openrtb", "--target", "wasm32-wasip1"]
check-fastly = ["check", "-p", "trusted-server-core", "-p", "trusted-server-adapter-fastly", "-p", "trusted-server-js", "-p", "trusted-server-openrtb", "--target", "wasm32-wasip1"]
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"]
test-fastly = ["test", "-p", "trusted-server-core", "-p", "trusted-server-adapter-fastly", "-p", "trusted-server-js", "-p", "trusted-server-openrtb", "--target", "wasm32-wasip1"]
# --- Axum adapter (native dev server) ---
build-axum = ["build", "-p", "trusted-server-adapter-axum"]
check-axum = ["check", "-p", "trusted-server-adapter-axum"]
clippy-axum = ["clippy", "-p", "trusted-server-adapter-axum", "--all-targets", "--all-features", "--", "-D", "warnings"]
test-axum = ["test", "-p", "trusted-server-adapter-axum"]
# --- Cloudflare adapter (native host + wasm32-unknown-unknown) ---
# Build/check target the WASM runtime (requires the `cloudflare` feature);
# tests run on the native host; clippy covers both native test code and the
# production WASM feature.
build-cloudflare = ["build", "-p", "trusted-server-adapter-cloudflare", "--target", "wasm32-unknown-unknown", "--features", "cloudflare"]
check-cloudflare = ["check", "-p", "trusted-server-adapter-cloudflare", "--target", "wasm32-unknown-unknown", "--features", "cloudflare"]
# No --all-features: the `cloudflare` feature has a compile_error! guard on
# non-wasm32 targets.
clippy-cloudflare = ["clippy", "-p", "trusted-server-adapter-cloudflare", "--all-targets", "--", "-D", "warnings"]
clippy-cloudflare-wasm = ["clippy", "-p", "trusted-server-adapter-cloudflare", "--target", "wasm32-unknown-unknown", "--features", "cloudflare", "--lib", "--", "-D", "warnings"]
test-cloudflare = ["test", "-p", "trusted-server-adapter-cloudflare"]
# --- Spin adapter (native host tests + wasm32-wasip1 target) ---
check-spin = ["check", "-p", "trusted-server-adapter-spin", "--target", "wasm32-wasip1", "--features", "spin"]
clippy-spin-native = ["clippy", "-p", "trusted-server-adapter-spin", "--all-targets", "--", "-D", "warnings"]
clippy-spin-wasm = ["clippy", "-p", "trusted-server-adapter-spin", "--target", "wasm32-wasip1", "--features", "spin", "--lib", "--", "-D", "warnings"]
test-spin = ["test", "-p", "trusted-server-adapter-spin"]
# --- ts operator CLI (native host; install uses the current host platform) ---
install-cli = ["install", "--path", "crates/trusted-server-cli", "--bin", "ts", "--locked", "--force"]
build_cli_linux = ["build", "--package", "trusted-server-cli", "--target", "x86_64-unknown-linux-gnu"]
build_cli_macos = ["build", "--package", "trusted-server-cli", "--target", "aarch64-apple-darwin"]
run_cli_linux = ["run", "--package", "trusted-server-cli", "--target", "x86_64-unknown-linux-gnu", "--"]
run_cli_macos = ["run", "--package", "trusted-server-cli", "--target", "aarch64-apple-darwin", "--"]
test_cli_linux = ["test", "--package", "trusted-server-cli", "--target", "x86_64-unknown-linux-gnu"]
test_cli_macos = ["test", "--package", "trusted-server-cli", "--target", "aarch64-apple-darwin"]
# When a wasm binary IS built, run it under Viceroy.
[target.'cfg(all(target_arch = "wasm32"))']
runner = "viceroy run -C ../../fastly.toml -- "