Skip to content

Installation

Felix has no binary releases yet — you build from source. This takes a Rust toolchain and a few minutes.

  • Operating System: Linux, macOS, or Windows (WSL2 recommended)
  • Rust: 1.97.1 or later
  • Memory: 4 GB minimum, 8 GB recommended for development
  • Disk: 2 GB for build artifacts
  • Network: For QUIC, ensure UDP traffic is allowed on your firewall

Felix requires Rust 1.97.1 or later. Install using rustup:

Terminal window
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Follow the prompts to complete installation. Then verify:

Terminal window
rustc --version
cargo --version

Expected output:

rustc 1.97.1 (or later)
cargo 1.97.1 (or later)
Terminal window
git clone https://github.com/gabloe/felix.git
cd felix

For development and debugging with full error information:

Terminal window
cargo build --workspace

Binaries will be in target/debug/.

For performance testing and production use:

Terminal window
cargo build --workspace --release

Binaries will be in target/release/.

Build only the broker service:

Terminal window
cargo build -p broker --release

Build only the client library:

Terminal window
cargo build -p felix-client --release

Verify everything is working:

Terminal window
cargo test --workspace

You should see all tests passing:

running 150 tests
...
test result: ok. 150 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

Felix includes a wire protocol conformance runner to validate correct framing and message encoding:

Terminal window
cargo run -p felix-conformance

Expected output:

Running wire protocol conformance tests...
✓ Frame envelope encoding
✓ Publish message encoding
✓ Subscribe message encoding
✓ Event message encoding
✓ Cache operations encoding
All conformance tests passed!

A broker authenticates every connection against a control plane, so it does not run alone. felix-cluster starts a control plane, mints the credentials and brings up the brokers:

Terminal window
cargo run --release -p felix-cluster -- up --nodes 3
cluster up.
control plane http://127.0.0.1:52704
node client metrics
broker-0 127.0.0.1:53348 127.0.0.1:52706
broker-1 127.0.0.1:65027 127.0.0.1:52707
broker-2 127.0.0.1:50410 127.0.0.1:52708
holding the cluster. press Ctrl-C to tear it down.

Every address is chosen free at startup, so nothing collides with what you are already running. The Quickstart goes on to publish and subscribe against it; running brokers yourself is covered there too.

Verify end-to-end functionality with a self-contained demo (no separate broker required):

Terminal window
cargo run --release -p broker --bin pubsub-demo-simple

Other demos you can try (including a control-plane RBAC mutation demo):

Terminal window
cargo run --release -p broker --bin cache-demo
cargo run --release -p broker --bin latency-demo
cargo run --release -p broker --bin pubsub-demo-notifications
cargo run --release -p broker --bin pubsub-demo-orders
cargo run --manifest-path demos/rbac-live/Cargo.toml
cargo run --manifest-path demos/cross_tenant_isolation/Cargo.toml

Note: the cross-tenant isolation demo uses a Postgres-backed control plane.

See the Demos Overview for details and expected output.

Install Task for convenient commands:

macOS/Linux:

Terminal window
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin

Using Homebrew:

Terminal window
brew install go-task/tap/go-task

Then you can use:

Terminal window
task build # Build everything
task test # Run tests
task fmt # Format code
task lint # Run linters

Install additional cargo extensions for development:

Terminal window
# Code coverage
cargo install cargo-llvm-cov
# Security auditing
cargo install cargo-deny --version 0.19.0 --locked
# Benchmarking
cargo install cargo-criterion

Felix supports optional feature flags:

Enable detailed per-stage timing instrumentation:

Terminal window
cargo build --release --features telemetry

Build only what you need:

Terminal window
# Just the broker
cargo build --release -p broker
# Just the client library
cargo build --release -p felix-client

Build all demonstration binaries:

Terminal window
cargo build --release --bins

Felix works best on Linux with modern kernel support for QUIC/UDP optimization:

  • Kernel 5.8+ recommended
  • Increase UDP buffer sizes for high throughput:
Terminal window
sudo sysctl -w net.core.rmem_max=26214400
sudo sysctl -w net.core.wmem_max=26214400

Works well on macOS 11 (Big Sur) and later. No special configuration needed.

Use WSL2 for best compatibility:

  1. Install WSL2: Microsoft Guide
  2. Install Ubuntu or Debian
  3. Follow Linux instructions inside WSL2

Native Windows support is not currently tested.

Released images are on GHCR and pull without credentials:

Terminal window
docker run -p 5000:5000/udp -p 8080:8080 \
-e FELIX_CONTROLPLANE_URL=http://controlplane:8443 \
-e FELIX_NODE_TOKEN_FILE=/etc/felix/node.token \
-v /path/to/node.token:/etc/felix/node.token:ro \
ghcr.io/gabloe/felix-broker:0.5.0

A broker authenticates every client against its tenant’s signing keys, which it fetches from the control plane, and registers itself there so shards can be placed on it — so it needs both a control plane to reach and a node credential to present. Without them it logs broker started and exits on the next line. Docker Compose wires the pair together; for a local cluster with nothing to configure, felix-cluster up is quicker (see the Quickstart).

Each release publishes the full version (0.5.0), the minor series (0.5) and latest. Use a version tag in anything you keep; latest moves. Images are signed by digest — see Kubernetes for the cosign verify invocation.

To build one instead, for a change you have not released:

Terminal window
# Build the broker image
docker build -t felix-broker -f docker/broker.Dockerfile .
# Run what you built
docker run -p 5000:5000/udp -p 8080:8080 felix-broker

The same, for the control plane:

Terminal window
# Or build it: docker build -t felix-controlplane -f docker/controlplane.Dockerfile .
# Run the control plane (example uses a local Postgres)
docker run -p 8443:8443 \
-e FELIX_CONTROLPLANE_POSTGRES_URL=postgres://postgres:postgres@host.docker.internal:55432/postgres \
ghcr.io/gabloe/felix-controlplane:0.5.0

See Docker Compose Guide for orchestrated deployments.

If you see OpenSSL-related build errors:

Terminal window
# Ubuntu/Debian
sudo apt-get install pkg-config libssl-dev
# RHEL/CentOS/Fedora
sudo yum install pkg-config openssl-devel

Use lld for faster linking (optional):

Terminal window
# Install lld
sudo apt-get install lld # Debian/Ubuntu
brew install llvm # macOS
# Configure Rust to use it
mkdir -p .cargo
cat > .cargo/config.toml << EOF
[target.x86_64-unknown-linux-gnu]
linker = "clang"
rustflags = ["-C", "link-arg=-fuse-ld=lld"]
EOF

If the build runs out of memory:

Terminal window
# Reduce parallel jobs
cargo build --release -j 2

Enable incremental compilation for development:

Terminal window
export CARGO_INCREMENTAL=1
cargo build