[package]
name = "flytrap"
description = "Query the Fly.io runtime environment"
version = "0.0.3"
edition = "2021"
license = "MIT"
authors = ["Lyra Naeseth <lyra@lyra.codes>"]
repository = "https://github.com/silverlyra/flytrap"
categories = ["api-bindings", "config", "network-programming"]
keywords = ["fly"]
readme = "Readme.md"
[features]
default = ["detect", "dns", "environment", "http", "regions"]
dns = ["dep:futures", "dep:hickory-resolver"]
detect = ["dep:if-addrs"]
environment = []
http = ["dep:headers", "dep:http"]
nightly = ["futures?/unstable", "headers?/nightly"]
regions = [
"dep:enum-map",
"dep:geo-types",
"dep:noisy_float",
"dep:lazy_static",
"dep:tinyvec",
]
serde = [
"dep:serde",
"geo-types?/serde",
"enum-map?/serde",
"noisy_float?/serde",
"tinyvec?/serde",
]
system-resolver = [
"dns",
"hickory-resolver/ipconfig",
"hickory-resolver/resolv-conf",
"hickory-resolver/system-config",
]
[dependencies]
enum-map = { version = "^2.7", optional = true }
futures = { version = "0.3.29", default-features = false, optional = true, features = [
"std",
] }
geo-types = { version = "^0.7", optional = true }
headers = { version = "^0.3", optional = true }
hickory-resolver = { version = "^0.24", optional = true, default-features = false, features = [
"tokio-runtime",
] }
http = { version = "^1.0", optional = true }
if-addrs = { version = "^0.10", optional = true }
lazy_static = { version = "^1.4", optional = true }
noisy_float = { version = "^0.2", optional = true }
serde = { version = "^1.0", optional = true }
thiserror = { version = "^1.0" }
tinyvec = { version = "^1.6", optional = true, default-features = false, features = [
"rustc_1_57",
] }
[dev-dependencies]
axum = { version = "0.6.20", features = ["headers"] }
chrono = { version = "0.4.31", features = ["serde"] }
serde = { version = "1.0.192", features = ["derive"] }
serde_derive = { version = "1.0.192" }
tokio = { version = "1.34.0", features = ["full"] }
[[example]]
name = "server"
required_features = ["detect", "dns", "environment", "http", "regions", "serde"]
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]