Files
firezone/rust/Cargo.toml
Thomas Eizinger b7dc897eea refactor(rust): introduce libs/ directory (#10964)
The current Rust workspace isn't as consistent as it could be. To make
navigation a bit easier, we move a few crates around. Generally, we
follow the idea that entry-points should be at the top-level. `rust/`
now looks like this (directories only):

```
.
├── cli             # Firezone CLI
├── client-ffi      # Entry point for Apple & Android
├── gateway         # Gateway
├── gui-client      # GUI client
├── headless-client # Headless client
├── libs            # Library crates
├── relay           # Relay
├── target          # Compile artifacts
├── tests           # Crates for testing
└── tools           # Local tools
```

To further enforce this structure, we also drop the `firezone-` prefix
from all crates that are not top-level binary crates.
2025-11-25 10:59:11 +00:00

283 lines
9.4 KiB
TOML

[workspace]
members = [
"cli",
"client-ffi",
"gateway",
"gui-client/src-admx-macro",
"gui-client/src-tauri",
"headless-client",
"libs/anyhow-ext",
"libs/bin-shared",
"libs/client-shared",
"libs/connlib/bufferpool",
"libs/connlib/dns-over-tcp",
"libs/connlib/dns-types",
"libs/connlib/etherparse-ext",
"libs/connlib/ip-packet",
"libs/connlib/l3-tcp",
"libs/connlib/l3-udp-dns-client",
"libs/connlib/l4-tcp-dns-server",
"libs/connlib/l4-udp-dns-client",
"libs/connlib/l4-udp-dns-server",
"libs/connlib/model",
"libs/connlib/phoenix-channel",
"libs/connlib/snownet",
"libs/connlib/socket-factory",
"libs/connlib/tun",
"libs/connlib/tunnel",
"libs/http-client",
"libs/logging",
"libs/telemetry",
"relay/ebpf-shared",
"relay/ebpf-turn-router",
"relay/server",
"tests/fuzz",
"tests/gui-smoke-test",
"tests/http-test-server",
"tools/uniffi-bindgen",
]
resolver = "2"
[workspace.package]
license = "Apache-2.0"
edition = "2024"
[workspace.dependencies]
admx-macro = { path = "gui-client/src-admx-macro" }
anyhow = { package = "anyhow-ext", path = "libs/anyhow-ext" }
arbitrary = "1.4.2"
arboard = { version = "3.6.1", default-features = false }
async-trait = { version = "0.1", default-features = false }
atomicwrites = "0.4.4"
axum = { version = "0.8.5", default-features = false }
aya = { git = "https://github.com/aya-rs/aya" }
aya-build = { git = "https://github.com/aya-rs/aya" }
aya-ebpf = { git = "https://github.com/aya-rs/aya" }
aya-log = { git = "https://github.com/aya-rs/aya" }
aya-log-ebpf = { git = "https://github.com/aya-rs/aya" }
backoff = { version = "0.4", features = ["tokio"] }
base64 = { version = "0.22.1", default-features = false }
bimap = "0.6"
bin-shared = { path = "libs/bin-shared" }
bnum = "0.13.0"
boringtun = { version = "0.6", default-features = false }
bufferpool = { path = "libs/connlib/bufferpool" }
bytecodec = "0.5.0"
bytes = { version = "1.9.0", default-features = false }
caps = "0.5.6"
chrono = { version = "0.4", default-features = false, features = ["std", "clock", "oldtime", "serde"] }
clap = "4.5.50"
client-shared = { path = "libs/client-shared" }
connlib-model = { path = "libs/connlib/model" }
crossbeam-queue = "0.3.12"
dashmap = "6.1.0"
derive_more = { version = "2.0.1", default-features = false }
difference = "2.0.0"
dirs = "6.0.0"
divan = "0.1.21"
dns-lookup = "3.0"
dns-over-tcp = { path = "libs/connlib/dns-over-tcp" }
dns-types = { path = "libs/connlib/dns-types" }
ebpf-shared = { path = "relay/ebpf-shared" }
either = "1"
etherparse = { version = "0.19", default-features = false }
etherparse-ext = { path = "libs/connlib/etherparse-ext" }
firezone-headless-client = { path = "headless-client" }
firezone-relay = { path = "relay/server" }
flume = { version = "0.11.1", features = ["async"] }
futures = { version = "0.3.31" }
futures-bounded = "0.3.0"
gat-lending-iterator = "0.1.7"
glob = "0.3.3"
hex = "0.4.3"
hex-display = "0.3.0"
hex-literal = "1.0.0"
hickory-resolver = "0.25.2"
hmac = "0.12.1"
http = "1.3.1"
http-body-util = "0.1.3"
http-client = { path = "libs/http-client" }
humantime = "2.3"
hyper = "1.7.0"
hyper-util = "0.1.17"
ip-packet = { path = "libs/connlib/ip-packet" }
ip_network = { version = "0.4", default-features = false }
ip_network_table = { version = "0.2", default-features = false }
itertools = "0.14"
jni = "0.21.1"
keyring = "3.6.3"
known-folders = "1.4.0"
l3-tcp = { path = "libs/connlib/l3-tcp" }
l3-udp-dns-client = { path = "libs/connlib/l3-udp-dns-client" }
l4-tcp-dns-server = { path = "libs/connlib/l4-tcp-dns-server" }
l4-udp-dns-client = { path = "libs/connlib/l4-udp-dns-client" }
l4-udp-dns-server = { path = "libs/connlib/l4-udp-dns-server" }
libc = "0.2.176"
libfuzzer-sys = "0.4"
log = "0.4"
logging = { path = "libs/logging" }
lru = "0.16.1"
mio = "1.1.0"
moka = "0.12.11"
native-dialog = "0.7.0"
netlink-packet-core = "0.8"
netlink-packet-route = "0.25"
network-types = "0.1.0"
nix = "0.30.1"
nu-ansi-term = "0.50"
num_cpus = "1.17.0"
once_cell = "1.21.3"
opentelemetry = "0.30.0"
opentelemetry-otlp = "0.30.0"
opentelemetry-stdout = "0.30.0"
opentelemetry_sdk = "0.30.0"
os_info = { version = "3", default-features = false }
output_vt100 = "0.1"
parking_lot = "0.12.5"
phoenix-channel = { path = "libs/connlib/phoenix-channel" }
png = "0.17.16"
proc-macro2 = "1.0"
proptest = "1.9.0"
proptest-state-machine = "0.6.0"
quinn-udp = { version = "0.5.12", features = ["fast-apple-datapath"] }
quote = "1.0"
rand = "0.8.5"
rand_core = "0.6.4"
rangemap = "1.6.0"
reqwest = { version = "0.12.24", default-features = false }
resolv-conf = "0.7.5"
ringbuffer = "0.16.0"
roxmltree = "0.21"
rpassword = "7.4.0"
rtnetlink = { version = "0.18.1", default-features = false, features = ["tokio_socket"] }
rustls = { version = "0.23.34", default-features = false, features = ["ring"] }
rustls-pki-types = "1.13.0"
sadness-generator = "0.6.0"
sd-notify = "0.4.5" # This is a pure Rust re-implementation, so it isn't vulnerable to CVE-2024-3094
secrecy = "0.10"
semver = "1.0.27"
sentry = { version = "0.45.0", default-features = false }
sentry-tracing = "0.45.0"
serde = "1.0.228"
serde_json = "1.0.145"
serde_variant = "0.1.3"
serde_with = "3.15.0"
sha2 = "0.10.9"
smallvec = "1.15.1"
smbios-lib = "0.9.2"
smoltcp = { version = "0.12", default-features = false }
snownet = { path = "libs/connlib/snownet" }
socket-factory = { path = "libs/connlib/socket-factory" }
socket2 = { version = "0.6" }
specta = "=2.0.0-rc.22"
specta-typescript = "0.0.9"
static_assertions = "1.1.0"
str0m = { version = "0.9.0", default-features = false, features = ["sha1"] }
strum = { version = "0.27.2", features = ["derive"] }
stun_codec = "0.4.0"
subprocess = "0.2.9"
subtle = "2.5.0"
supports-color = "3.0.2"
swift-bridge = "0.1.57"
swift-bridge-build = "0.1.57"
syn = "2.0"
tauri = "2.8.4"
tauri-build = "2.4.0"
tauri-plugin-dialog = "2.4.0"
tauri-plugin-notification = "2.3.1"
tauri-plugin-opener = "2.5.0"
tauri-plugin-shell = "2.3.1"
tauri-runtime = "2.7.1"
tauri-specta = { version = "=2.0.0-rc.21", features = ["derive", "typescript"] }
tauri-utils = "2.2.0"
telemetry = { path = "libs/telemetry" }
tempfile = "3.23.0"
test-case = "3.3.1"
test-strategy = "0.4.3"
thiserror = "2.0.17"
time = "0.3.43"
tokio = "1.48.0"
tokio-rustls = { version = "0.26.4", default-features = false }
tokio-stream = "0.1.17"
tokio-tungstenite = "0.28.0"
tokio-util = "0.7.16"
tracing = { version = "0.1.40" }
tracing-appender = "0.2.3"
tracing-core = "0.1.34"
tracing-journald = "0.3.1"
tracing-log = "0.2.0"
tracing-macros = { git = "https://github.com/tokio-rs/tracing", branch = "v0.1.x" } # Contains `dbg!` but for `tracing`.
tracing-opentelemetry = "0.31.0"
tracing-stackdriver = "0.12.0"
tracing-subscriber = { version = "0.3.20", features = ["parking_lot"] }
trackable = "1.3.0"
tun = { path = "libs/connlib/tun" }
tunnel = { path = "libs/connlib/tunnel" }
uniffi = "0.29.4"
url = "2.5.2"
uuid = "1.18.1"
webpki-roots = "1.0.4"
which = "4.4.2"
windows = "0.61.3"
windows-core = "0.61.1"
windows-implement = "0.60.0"
windows-service = "0.8.0"
winreg = "0.55.0"
zbus = "5.12.0"
zip = { version = "6", default-features = false }
[workspace.lints.clippy]
dbg_macro = "warn"
print_stdout = "warn"
print_stderr = "warn"
unnecessary_wraps = "warn"
unused_async = "warn"
wildcard_enum_match_arm = "warn" # Ensures we match on all combinations of `Poll`, preventing erroneous suspensions.
redundant_else = "warn"
redundant_clone = "warn"
unwrap_in_result = "warn"
unwrap_used = "warn"
too_many_arguments = "allow" # Don't care.
large_enum_variant = "allow" # Don't care.
[workspace.lints.rustdoc]
private-intra-doc-links = "allow" # We don't publish any of our docs but want to catch dead links.
[patch.crates-io]
boringtun = { git = "https://github.com/firezone/boringtun", branch = "master" }
ip_network = { git = "https://github.com/JakubOnderka/ip_network", branch = "master" } # Waiting for release.
ip_network_table = { git = "https://github.com/edmonds/ip_network_table", branch = "some-useful-traits" } # For `Debug` and `Clone`
tracing-stackdriver = { git = "https://github.com/thomaseizinger/tracing-stackdriver", branch = "bump-otel-0.30" } # Waiting for release.
softbuffer = { git = "https://github.com/rust-windowing/softbuffer" } # Waiting for release.
str0m = { git = "https://github.com/algesten/str0m", branch = "main" }
moka = { git = "https://github.com/moka-rs/moka", branch = "main" } # Waiting for release.
quinn-udp = { git = "https://github.com/quinn-rs/quinn", branch = "main" } # Waiting for release.
proptest = { git = "https://github.com/proptest-rs/proptest", branch = "main" } # Waiting for release.
proptest-state-machine = { git = "https://github.com/proptest-rs/proptest", branch = "main" } # Waiting for release.
# Enforce `tracing-macros` to have released `tracing` version.
[patch.'https://github.com/tokio-rs/tracing']
tracing = "0.1.41"
[profile.release]
# Full link-time optimization. Reduces binaries by up to 3x on some platforms.
lto = "fat"
# Increases the compiler's ability to produce smaller, optimized code
# at the expense of compilation time
codegen-units = 1
[profile.release.package.firezone-gui-client]
debug = "full"
split-debuginfo = "packed"
[profile.release.package.ebpf-turn-router]
debug = 2
# Override build settings just for the GUI client, so we get a pdb/dwp
# Cargo ignores profile settings if they're not in the workspace's Cargo.toml
[profile.dev.package.firezone-gui-client]
debug = "full"
split-debuginfo = "packed"