Skip to content
You're reading the docs for the next release. For the current stable release, see the main docs.

Installation

Each release attaches Linux x86_64 builds of felix-broker and felix-controlplane to its GitHub release and publishes both as container images (see Docker). Everything else, including the demos, the local cluster tool and the clients, builds from source. That takes a Rust toolchain and a few minutes.

To install only the command-line tool, use Homebrew (brew install getfelix/tap/felixctl), cargo or a release archive; see felixctl. The rest of this page builds Felix from source.

  • Operating System: Linux, macOS, or Windows (WSL2 recommended)
  • Rust: 1.97 or later (the repo pins 1.99.1, and rustup fetches it)
  • 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 needs Rust 1.97 or later. The repository pins 1.99.1 in rust-toolchain.toml, and rustup fetches that version the first time you build. 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 (or later)
cargo 1.97 (or later)
Terminal window
git clone https://github.com/GetFelix/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 felix-broker-service --release

Build only the client library:

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

Verify everything is working:

Terminal window
task test

That is what CI runs. Without Task, build the load generator first, because one cluster test runs its prebuilt binary:

Terminal window
cargo build -p felix-loadgen
cargo test --workspace

task test needs no database or container. See Docker or Podman for the tasks that do use one.

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

Terminal window
cargo run -p felix-conformance

It starts a broker in-process, runs the checks against it, and ends with:

== Felix Conformance Runner ==
...
Conformance checks 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
starting a 3-node cluster...
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
placeable: broker-0, broker-1, broker-2
shard ownership:
stream/t1/ns/orders/0 -> broker-2
session /tmp/felix-cluster.json
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 felix-broker-service --features demo --bin pubsub-demo-simple

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

Terminal window
cargo run --release -p felix-broker-service --features demo --bin cache-demo
cargo run --release -p felix-broker-service --features demo --bin latency-demo
cargo run --release -p felix-broker-service --bin durable-restart-demo
cargo run --release -p felix-broker-service --bin queue-semantics-demo
cargo run --release -p felix-broker-service --bin pubsub-demo-notifications
cargo run --release -p felix-broker-service --bin pubsub-demo-orders
cargo run --manifest-path demos/rbac-live/Cargo.toml
cargo run --manifest-path demos/cross_tenant_isolation/Cargo.toml

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

Felix supports optional feature flags:

Enable detailed per-stage timing instrumentation:

Terminal window
cargo build --release -p felix-broker-service --features telemetry

Build every demo binary in the broker service, including the ones behind the demo feature:

Terminal window
cargo build --release -p felix-broker-service --features demo --bins

For high throughput, raise the UDP buffer limits:

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.

Each release signs its SHA256SUMS with Sigstore and attaches the signature as SHA256SUMS.sigstore.json. Download both next to the archive, then check the signature and the archive. Replace <tag> with the release tag, such as v0.7.3.

Terminal window
cosign verify-blob \
--bundle SHA256SUMS.sigstore.json \
--certificate-identity https://github.com/GetFelix/felix/.github/workflows/release.yml@refs/tags/<tag> \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
SHA256SUMS
sha256sum -c SHA256SUMS

The signature is keyless: the certificate names the release workflow run, so there is no key to fetch. Releases before this was added have no bundle.

To check that the x86_64 archive matches the source, see Reproduce a release.

Released images are on GHCR (ghcr.io/getfelix) and pull without credentials. The commands work with Podman as written once docker is replaced with podman, except where Docker or Podman says otherwise.

A broker needs a control plane to talk to and a node credential, so running the broker image on its own does not get you far. Docker Compose wires the images together, and the Quickstart runs that stack with one command. For a local cluster built from source, felix-cluster up is quicker. The broker binds up to four client ports from 5000, so publish the whole range, as the compose file does.

Each release publishes the full version (0.7.3). A release without a pre-release suffix also publishes the minor series (0.7) and latest. Use a full version tag in anything you keep; the other two move. Images are signed by digest. See Kubernetes for the cosign verify invocation.

To build an image from your own tree, use docker/broker.Dockerfile and docker/controlplane.Dockerfile from the repository root.

Every night that main has changed and its CI passed, the same images are published as nightly and nightly-YYYYMMDD:

Terminal window
docker pull ghcr.io/getfelix/felix-broker:nightly
docker pull ghcr.io/getfelix/felix-controlplane:nightly
docker pull ghcr.io/getfelix/felixctl:nightly

The binaries, Python wheels and Node addons are on the nightly pre-release, which is replaced each time. A nightly has passed CI and one publish and subscribe through its images, nothing more. Use it to try what is coming, not in production. Dated tags are kept for about two weeks.

See Docker Compose Guide for orchestrated deployments.

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