Skip to main content

Installing

From crates.io

cargo install trillium-cli

This installs a single binary named trillium. Run trillium --help, or trillium <command> --help, for the full option list.

The default build includes the serve, proxy, client, and bench subcommands, with the rustls TLS backend and HTTP/3 (h3). To build a smaller binary, or to include a non-default subcommand like gateway, select features explicitly:

# just the client, built against the system's native TLS
cargo install trillium-cli --no-default-features --features client,native-tls

# everything, including the non-default subcommands
cargo install trillium-cli --features gateway,grpc,dev-server

Feature flags

Each subcommand is gated behind a Cargo feature, so you only compile what you ship.

FeatureSubcommandDefaultNotes
serveservestatic file server + reverse proxy
proxyproxyreverse / forward proxy with caching
clientclientHTTP client
benchbenchload generator
gatewaygatewayconfig-driven multi-listener server (KDL)
dev-serverdev-serverwatch / rebuild / restart loop (Unix only)
grpcgrpcgenerate Rust modules from .proto files

The non-default features (gateway, dev-server, grpc) are off because they pull in heavier dependencies — a KDL parser, a file watcher, the protobuf toolchain — that the common server/client/bench workflow doesn't need.

TLS backends

The TLS backend is also selectable. Pick exactly one as the default for a build:

FeatureDefaultNotes
rustlspure-Rust TLS; implied by h3
native-tlsthe platform's native TLS (Secure Transport, SChannel, …)
opensslOpenSSL
h3HTTP/3 over QUIC; implies rustls

When several backends are compiled in, the --tls / --client-tls flags choose between them at runtime; the default precedence is rustlsnative-tlsopenssl. The gateway subcommand always uses rustls (and h3 when enabled).

# server + client with OpenSSL instead of rustls, no HTTP/3
cargo install trillium-cli --no-default-features --features serve,client,openssl

Building from source

git clone https://github.com/trillium-rs/trillium-cli
cd trillium-cli
cargo build --release # release builds use fat LTO

The same --features / --no-default-features selection applies:

cargo build --release --features gateway
cargo run -- serve ./public # run a subcommand from the checkout
cargo run --features gateway -- gateway --config gateway.kdl