Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ clippy-spin-native = ["clippy", "-p", "trusted-server-adapter-spin", "--all-targ
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; per-OS target overrides the wasm default) ---
# --- 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", "--"]
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The guide in `docs/guide/` (published at the link below) is the source of truth
| [Getting Started](https://iabtechlab.github.io/trusted-server/guide/getting-started) | Installation and setup |
| [Architecture](https://iabtechlab.github.io/trusted-server/guide/architecture) | System architecture overview |
| [Configuration](https://iabtechlab.github.io/trusted-server/guide/configuration) | Configuration reference |
| [Trusted Server CLI](https://iabtechlab.github.io/trusted-server/guide/cli) | `ts` CLI install and command reference |
| [Integrations](https://iabtechlab.github.io/trusted-server/guide/integrations-overview) | Partner integrations (Prebid, Lockr, etc.) |

## Quick Start
Expand All @@ -27,9 +28,12 @@ cargo build-fastly # Fastly adapter + core (wasm32-wasip1)
cargo build-axum # Axum dev server (native)
cargo build-cloudflare # Cloudflare Workers (wasm32-unknown-unknown)

# Build the host-target CLI
HOST_TARGET="$(rustc -vV | sed -n 's/^host: //p')"
cargo build --package trusted-server-cli --target "$HOST_TARGET"
# Install the host-target CLI for your current platform
cargo install-cli

# If your shell cannot find `ts`, add Cargo's bin directory to PATH
export PATH="$HOME/.cargo/bin:$PATH"
ts --help

# Create local config, then edit placeholders before validation
ts config init
Expand Down
23 changes: 19 additions & 4 deletions docs/guide/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,27 @@ configuration, page audits, and EdgeZero-backed lifecycle commands.

## Install from source

The workspace default target is `wasm32-wasip1`, so build or test the CLI with
your host target:
From the repository root, install the `ts` binary with the workspace Cargo alias:

```bash
HOST_TARGET="$(rustc -vV | sed -n 's/^host: //p')"
cargo build --package trusted-server-cli --target "$HOST_TARGET"
cargo install-cli
```

The alias runs `cargo install --path crates/trusted-server-cli --bin ts --locked --force`.
Because it does not pass an explicit `--target`, Cargo builds the CLI for your
current host platform. The binary is installed into Cargo's bin directory,
usually `~/.cargo/bin`; make sure that directory is on your `PATH`.

For example, add Cargo's bin directory to your current shell session:

```bash
export PATH="$HOME/.cargo/bin:$PATH"
```

Verify the install:

```bash
ts --help
```

## Common workflow
Expand Down
14 changes: 14 additions & 0 deletions docs/guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,20 @@ git clone https://github.com/IABTechLab/trusted-server.git
cd trusted-server
```

### Install the CLI

Install the `ts` operator CLI for your current platform:

```bash
cargo install-cli

# If your shell cannot find `ts`, add Cargo's bin directory to PATH
export PATH="$HOME/.cargo/bin:$PATH"
ts --help
```

See [Trusted Server CLI](/guide/cli) for command details.

## Local Development

Trusted Server supports two local development modes:
Expand Down
Loading