Skip to content

Commit edb7f0c

Browse files
Add EdgeZero-backed ts CLI
1 parent 5447648 commit edb7f0c

41 files changed

Lines changed: 5297 additions & 1026 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cargo/config.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
[alias]
22
test_details = ["test", "--target", "aarch64-apple-darwin"]
3+
test_cli_macos = ["test", "--package", "trusted-server-cli", "--target", "aarch64-apple-darwin"]
4+
build_cli_macos = ["build", "--package", "trusted-server-cli", "--target", "aarch64-apple-darwin"]
5+
test_cli_linux = ["test", "--package", "trusted-server-cli", "--target", "x86_64-unknown-linux-gnu"]
6+
build_cli_linux = ["build", "--package", "trusted-server-cli", "--target", "x86_64-unknown-linux-gnu"]
37

48
[build]
59
target = "wasm32-wasip1"

.github/workflows/format.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ jobs:
3535
- name: Run cargo clippy
3636
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
3737

38+
- name: Run host-target CLI clippy
39+
run: cargo clippy --package trusted-server-cli --target x86_64-unknown-linux-gnu --all-targets --all-features -- -D warnings
40+
3841
format-typescript:
3942
runs-on: ubuntu-latest
4043
defaults:

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ jobs:
4949
- name: Run tests
5050
run: cargo test --workspace
5151

52+
- name: Run host-target CLI tests
53+
run: cargo test --package trusted-server-cli --target x86_64-unknown-linux-gnu
54+
5255
- name: Verify Fastly WASM release build
5356
env:
5457
TRUSTED_SERVER__PUBLISHER__ORIGIN_URL: http://127.0.0.1:8080

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
# env
88
.env*
9+
trusted-server.toml
910

1011
# backup
1112
**/*.rs.bk

CLAUDE.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@ real-time bidding integration, and publisher-side JavaScript injection.
1515
crates/
1616
trusted-server-core/ # Core library — shared logic, integrations, HTML processing
1717
trusted-server-adapter-fastly/ # Fastly Compute entry point (wasm32-wasip1 binary)
18+
trusted-server-cli/ # Host-target `ts` operator CLI
1819
trusted-server-js/ # TypeScript/JS build — per-integration IIFE bundles
1920
lib/ # TS source, Vitest tests, esbuild pipeline
2021
```
2122

22-
Supporting files: `fastly.toml`, `trusted-server.toml`, `.env.dev`,
23-
`rust-toolchain.toml`, `CONTRIBUTING.md`.
23+
Supporting files: `edgezero.toml`, `fastly.toml`,
24+
`trusted-server.example.toml`, `.env.dev`, `rust-toolchain.toml`,
25+
`CONTRIBUTING.md`. Operator-owned `trusted-server.toml` files are gitignored.
2426

2527
## Toolchain
2628

@@ -59,6 +61,11 @@ fastly compute publish
5961
# Run all Rust tests (uses viceroy)
6062
cargo test --workspace
6163

64+
# Run host-target CLI tests (workspace default target is wasm32-wasip1)
65+
# Use your host triple, for example x86_64-unknown-linux-gnu on CI/Linux
66+
# or aarch64-apple-darwin on Apple Silicon macOS.
67+
cargo test --package trusted-server-cli --target <host-triple>
68+
6269
# Format
6370
cargo fmt --all -- --check
6471

@@ -266,10 +273,12 @@ IntegrationRegistration::builder(ID)
266273

267274
| File | Purpose |
268275
| --------------------- | ---------------------------------------------------------- |
269-
| `fastly.toml` | Fastly service configuration and build settings |
270-
| `trusted-server.toml` | Application settings (ad servers, KV stores, ID templates) |
271-
| `rust-toolchain.toml` | Pins Rust version to 1.95.0 |
272-
| `.env.dev` | Local development environment variables |
276+
| `edgezero.toml` | EdgeZero app/platform manifest and logical stores |
277+
| `fastly.toml` | Fastly service configuration and build settings |
278+
| `trusted-server.example.toml` | Source-controlled Trusted Server app-config template |
279+
| `trusted-server.toml` | Operator-owned app config; gitignored and pushed with `ts` CLI |
280+
| `rust-toolchain.toml` | Pins Rust version to 1.95.0 |
281+
| `.env.dev` | Local development environment variables |
273282

274283
---
275284

0 commit comments

Comments
 (0)