mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-03-21 22:42:06 +00:00
Our logging library, `tracing` supports structured logging. This is useful because it preserves the more than just the string representation of a value and thus allows the active logging backend(s) to capture more information for a particular value. In the case of errors, this is especially useful because it allows us to capture the sources of a particular error. Unfortunately, recording an error as a tracing value is a bit cumbersome because `tracing::Value` is only implemented for `&dyn std::error::Error`. Casting an error to this is quite verbose. To make it easier, we introduce two utility functions in `firezone-logging`: - `std_dyn_err` - `anyhow_dyn_err` Tracking errors as correct `tracing::Value`s will be especially helpful once we enable Sentry's `tracing` integration: https://docs.rs/sentry-tracing/latest/sentry_tracing/#tracking-errors
72 lines
2.2 KiB
TOML
72 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"
|
|
git-version = "0.3.9"
|
|
ip_network = { version = "0.4", default-features = false, features = ["serde"] }
|
|
socket-factory = { workspace = true }
|
|
thiserror = "1.0.63"
|
|
tokio = { workspace = true, features = ["io-util", "net", "rt", "sync"] }
|
|
tracing = { workspace = true }
|
|
tun = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
hex-literal = "0.4.1"
|
|
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
|