refactor(deps): swap reqwest for ureq
reqwest with features=["blocking"] still links tokio internally, adding a full async runtime to a binary that runs once and exits. Replace with ureq v3 (synchronous, no tokio dependency) with bundled rustls for TLS. Benefits: - ~90 fewer transitive crates - No system OpenSSL or pkg-config required at build time - Simpler flake.nix: remove openssl, pkg-config, and OPENSSL_* env vars from devShell and package outputs - Aligns the codebase with the ROADMAP decision to keep the binary synchronous throughout
This commit is contained in:
1 parent
c25eefa8a2
commit
9befe4af52
4 files changed
+240
-543
No files matched your search
Generated
+234
-523
File diff suppressed because it is too large.
Load diff
+2
-5
@@ -15,11 +15,8 @@ serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
toml = "0.8"
|
||||
|
||||
# HTTP client — blocking (no async needed for a oneshot binary)
|
||||
reqwest = { version = "0.12", features = ["blocking"], default-features = false }
|
||||
|
||||
# TLS backend — uses the system's OpenSSL
|
||||
reqwest-middleware = { version = "0.4", optional = true } # future: retry middleware
|
||||
# HTTP client — synchronous, no tokio runtime, TLS via bundled rustls
|
||||
ureq = { version = "3", features = ["rustls"] }
|
||||
|
||||
# Error handling
|
||||
thiserror = "2"
|
||||
|
||||
@@ -34,7 +34,7 @@ See [`ROADMAP.md`](./ROADMAP.md) for the full plan.
|
||||
|
||||
## Quick Start (development)
|
||||
|
||||
Prerequisites: Nix with flakes enabled.
|
||||
Prerequisites: Nix with flakes enabled. No system OpenSSL required — TLS is handled by bundled rustls.
|
||||
|
||||
```bash
|
||||
# Enter the development shell (downloads pinned Rust toolchain)
|
||||
|
||||
@@ -26,16 +26,9 @@
|
||||
extensions = [ "rust-src" "rust-analyzer" "clippy" "rustfmt" ];
|
||||
};
|
||||
|
||||
# Shared native build inputs used by both the devShell and the package
|
||||
nativeBuildInputs = with pkgs; [
|
||||
rustToolchain
|
||||
pkg-config
|
||||
];
|
||||
|
||||
# Runtime / link-time dependencies
|
||||
buildInputs = with pkgs; [
|
||||
openssl # reqwest TLS backend
|
||||
];
|
||||
# ureq bundles rustls — no system OpenSSL or pkg-config needed
|
||||
nativeBuildInputs = with pkgs; [ rustToolchain ];
|
||||
buildInputs = [ ];
|
||||
|
||||
in
|
||||
{
|
||||
@@ -58,10 +51,6 @@
|
||||
jq
|
||||
];
|
||||
|
||||
# Point OpenSSL build scripts at the Nix store paths
|
||||
OPENSSL_NO_VENDOR = "1";
|
||||
PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
|
||||
|
||||
shellHook = ''
|
||||
echo ""
|
||||
echo " ddns-monitor dev shell"
|
||||
|
||||
Reference in new issue
Block a user