Files
firezone/rust/bin-shared/Cargo.toml
Thomas Eizinger 48ba2869a8 chore(rust): ban the use of .unwrap except in tests (#7319)
Using the clippy lint `unwrap_used`, we can automatically lint against
all uses of `.unwrap()` on `Result` and `Option`. This turns up quite a
few results actually. In most cases, they are invariants that can't
actually be hit. For these, we change them to `Option`. In other cases,
they can actually be hit. For example, if the user supplies an invalid
log-filter.

Activating this lint ensures the compiler will yell at us every time we
use `.unwrap` to double-check whether we do indeed want to panic here.

Resolves: #7292.
2024-11-13 03:59:22 +00:00

71 lines
2.2 KiB
TOML

[package]
name = "firezone-bin-shared"
version = "0.1.0"
edition = "2021"
description = "Firezone-specific modules shared between binaries."
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
anyhow = "1.0.82"
axum = { version = "0.7.7", default-features = false, features = ["http1", "tokio"] }
clap = { version = "4.5.19", features = ["derive", "env"] }
firezone-logging = { workspace = true }
futures = "0.3"
hex-literal = "0.4.1"
ip_network = { version = "0.4", default-features = false, features = ["serde"] }
socket-factory = { workspace = true }
thiserror = "1.0.68"
tokio = { workspace = true, features = ["io-util", "net", "rt", "sync"] }
tracing = { workspace = true }
tun = { workspace = true }
[dev-dependencies]
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
[target.'cfg(target_os = "linux")'.dependencies]
libc = "0.2"
netlink-packet-core = { version = "0.7", default-features = false }
netlink-packet-route = { version = "0.19", default-features = false }
nix = { version = "0.29.0", features = ["socket"] }
rtnetlink = { workspace = true }
zbus = "4.4" # Can't use `zbus`'s `tokio` feature here, or it will break toast popups all the way over in `gui-client`.
[target.'cfg(windows)'.dependencies]
known-folders = "1.2.0"
ring = "0.17"
uuid = { version = "1.10.0", features = ["v4"] }
windows-core = "0.58.0"
windows-implement = "0.58.0"
wintun = "0.5.0"
winreg = "0.52.0"
[target.'cfg(windows)'.dependencies.windows]
version = "0.58.0"
features = [
# For implementing COM interfaces
"implement",
"Win32_Foundation",
# For listening for network change events
"Win32_Networking_NetworkListManager",
"Win32_NetworkManagement_IpHelper",
"Win32_NetworkManagement_Ndis",
"Win32_Networking_WinSock",
"Win32_Security",
# COM is needed to listen for network change events
"Win32_System_Com",
# Needed to listen for system DNS changes
"Win32_System_Registry",
"Win32_System_Threading",
]
[target.'cfg(windows)'.dev-dependencies]
ip-packet = { workspace = true }
tokio = { workspace = true, features = ["net", "time"] }
[lints]
workspace = true
[[bench]]
name = "tunnel"
harness = false