Skip to main content

max / pom

Switch reqwest to rustls-tls, fix deploy mkdir ordering Cross-compile for Linux targets fails with native-tls (needs OpenSSL headers). rustls-tls is self-contained. Also move mkdir /etc/pom before scp in deploy script. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author: Max J. <87768334+MaxJMath@users.noreply.github.com> · 2026-03-10 03:19 UTC
Commit: a75999e2cee6bc9c30bea6fc2dfc73522015a87d
Parent: 0d08f70
3 files changed, +111 insertions, -210 deletions
M Cargo.lock +108 -208
@@ -77,12 +77,6 @@ dependencies = [
77 77 ]
78 78
79 79 [[package]]
80 - name = "anyhow"
81 - version = "1.0.102"
82 - source = "registry+https://github.com/rust-lang/crates.io-index"
83 - checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c"
84 -
85 - [[package]]
86 80 name = "atoi"
87 81 version = "2.0.0"
88 82 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -174,6 +168,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
174 168 checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
175 169
176 170 [[package]]
171 + name = "cfg_aliases"
172 + version = "0.2.1"
173 + source = "registry+https://github.com/rust-lang/crates.io-index"
174 + checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
175 +
176 + [[package]]
177 177 name = "chrono"
178 178 version = "0.4.44"
179 179 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -249,26 +249,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
249 249 checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8"
250 250
251 251 [[package]]
252 - name = "core-foundation"
253 - version = "0.9.4"
254 - source = "registry+https://github.com/rust-lang/crates.io-index"
255 - checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f"
256 - dependencies = [
257 - "core-foundation-sys",
258 - "libc",
259 - ]
260 -
261 - [[package]]
262 - name = "core-foundation"
263 - version = "0.10.1"
264 - source = "registry+https://github.com/rust-lang/crates.io-index"
265 - checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6"
266 - dependencies = [
267 - "core-foundation-sys",
268 - "libc",
269 - ]
270 -
271 - [[package]]
272 252 name = "core-foundation-sys"
273 253 version = "0.8.7"
274 254 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -400,15 +380,6 @@ dependencies = [
400 380 ]
401 381
402 382 [[package]]
403 - name = "encoding_rs"
404 - version = "0.8.35"
405 - source = "registry+https://github.com/rust-lang/crates.io-index"
406 - checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3"
407 - dependencies = [
408 - "cfg-if",
409 - ]
410 -
411 - [[package]]
412 383 name = "equivalent"
413 384 version = "1.0.2"
414 385 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -447,12 +418,6 @@ dependencies = [
447 418 ]
448 419
449 420 [[package]]
450 - name = "fastrand"
451 - version = "2.3.0"
452 - source = "registry+https://github.com/rust-lang/crates.io-index"
453 - checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
454 -
455 - [[package]]
456 421 name = "find-msvc-tools"
457 422 version = "0.1.9"
458 423 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -470,33 +435,12 @@ dependencies = [
470 435 ]
471 436
472 437 [[package]]
473 - name = "fnv"
474 - version = "1.0.7"
475 - source = "registry+https://github.com/rust-lang/crates.io-index"
476 - checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
477 -
478 - [[package]]
479 438 name = "foldhash"
480 439 version = "0.1.5"
481 440 source = "registry+https://github.com/rust-lang/crates.io-index"
482 441 checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
483 442
484 443 [[package]]
485 - name = "foreign-types"
486 - version = "0.3.2"
487 - source = "registry+https://github.com/rust-lang/crates.io-index"
488 - checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
489 - dependencies = [
490 - "foreign-types-shared",
491 - ]
492 -
493 - [[package]]
494 - name = "foreign-types-shared"
495 - version = "0.1.1"
496 - source = "registry+https://github.com/rust-lang/crates.io-index"
497 - checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
498 -
499 - [[package]]
500 444 name = "form_urlencoded"
501 445 version = "1.2.2"
502 446 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -621,40 +565,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
621 565 checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0"
622 566 dependencies = [
623 567 "cfg-if",
568 + "js-sys",
624 569 "libc",
625 570 "wasi",
571 + "wasm-bindgen",
626 572 ]
627 573
628 574 [[package]]
629 575 name = "getrandom"
630 - version = "0.4.2"
576 + version = "0.3.4"
631 577 source = "registry+https://github.com/rust-lang/crates.io-index"
632 - checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555"
578 + checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
633 579 dependencies = [
634 580 "cfg-if",
581 + "js-sys",
635 582 "libc",
636 583 "r-efi",
637 584 "wasip2",
638 - "wasip3",
639 - ]
640 -
641 - [[package]]
642 - name = "h2"
643 - version = "0.4.13"
644 - source = "registry+https://github.com/rust-lang/crates.io-index"
645 - checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54"
646 - dependencies = [
647 - "atomic-waker",
648 - "bytes",
649 - "fnv",
650 - "futures-core",
651 - "futures-sink",
652 - "http",
653 - "indexmap",
654 - "slab",
655 - "tokio",
656 - "tokio-util",
657 - "tracing",
585 + "wasm-bindgen",
658 586 ]
659 587
660 588 [[package]]
@@ -771,7 +699,6 @@ dependencies = [
771 699 "bytes",
772 700 "futures-channel",
773 701 "futures-core",
774 - "h2",
775 702 "http",
776 703 "http-body",
777 704 "httparse",
@@ -797,22 +724,7 @@ dependencies = [
797 724 "tokio",
798 725 "tokio-rustls",
799 726 "tower-service",
800 - ]
801 -
802 - [[package]]
803 - name = "hyper-tls"
804 - version = "0.6.0"
805 - source = "registry+https://github.com/rust-lang/crates.io-index"
806 - checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0"
807 - dependencies = [
808 - "bytes",
809 - "http-body-util",
810 - "hyper",
811 - "hyper-util",
812 - "native-tls",
813 - "tokio",
814 - "tokio-native-tls",
815 - "tower-service",
727 + "webpki-roots",
816 728 ]
817 729
818 730 [[package]]
@@ -833,11 +745,9 @@ dependencies = [
833 745 "percent-encoding",
834 746 "pin-project-lite",
835 747 "socket2",
836 - "system-configuration",
837 748 "tokio",
838 749 "tower-service",
839 750 "tracing",
840 - "windows-registry",
841 751 ]
842 752
843 753 [[package]]
@@ -946,12 +856,6 @@ dependencies = [
946 856 ]
947 857
948 858 [[package]]
949 - name = "id-arena"
950 - version = "2.3.0"
951 - source = "registry+https://github.com/rust-lang/crates.io-index"
952 - checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954"
953 -
954 - [[package]]
955 859 name = "idna"
956 860 version = "1.1.0"
957 861 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -980,8 +884,6 @@ checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017"
980 884 dependencies = [
981 885 "equivalent",
982 886 "hashbrown 0.16.1",
983 - "serde",
984 - "serde_core",
985 887 ]
986 888
987 889 [[package]]
@@ -1032,12 +934,6 @@ dependencies = [
1032 934 ]
1033 935
1034 936 [[package]]
1035 - name = "leb128fmt"
1036 - version = "0.1.0"
1037 - source = "registry+https://github.com/rust-lang/crates.io-index"
1038 - checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2"
1039 -
1040 - [[package]]
1041 937 name = "libc"
1042 938 version = "0.2.183"
1043 939 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1073,12 +969,6 @@ dependencies = [
1073 969 ]
1074 970
1075 971 [[package]]
1076 - name = "linux-raw-sys"
1077 - version = "0.12.1"
1078 - source = "registry+https://github.com/rust-lang/crates.io-index"
1079 - checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
1080 -
1081 - [[package]]
1082 972 name = "litemap"
1083 973 version = "0.8.1"
1084 974 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1100,6 +990,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1100 990 checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
1101 991
1102 992 [[package]]
993 + name = "lru-slab"
994 + version = "0.1.2"
995 + source = "registry+https://github.com/rust-lang/crates.io-index"
996 + checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154"
997 +
998 + [[package]]
1103 999 name = "matchers"
1104 1000 version = "0.2.0"
1105 1001 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1125,12 +1021,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1125 1021 checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
1126 1022
1127 1023 [[package]]
1128 - name = "mime"
1129 - version = "0.3.17"
1130 - source = "registry+https://github.com/rust-lang/crates.io-index"
1131 - checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
1132 -
1133 - [[package]]
1134 1024 name = "mio"
1135 1025 version = "1.1.1"
1136 1026 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1142,23 +1032,6 @@ dependencies = [
1142 1032 ]
1143 1033
1144 1034 [[package]]
1145 - name = "native-tls"
1146 - version = "0.2.18"
1147 - source = "registry+https://github.com/rust-lang/crates.io-index"
1148 - checksum = "465500e14ea162429d264d44189adc38b199b62b1c21eea9f69e4b73cb03bbf2"
1149 - dependencies = [
1150 - "libc",
1151 - "log",
1152 - "openssl",
1153 - "openssl-probe",
1154 - "openssl-sys",
1155 - "schannel",
1156 - "security-framework",
1157 - "security-framework-sys",
1158 - "tempfile",
1159 - ]
1160 -
1161 - [[package]]
1162 1035 name = "nu-ansi-term"
1163 1036 version = "0.50.3"
1164 1037 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1178,7 +1051,7 @@ dependencies = [
1178 1051 "num-integer",
1179 1052 "num-iter",
1180 1053 "num-traits",
1181 - "rand",
1054 + "rand 0.8.5",
1182 1055 "smallvec",
1183 1056 "zeroize",
1184 1057 ]
@@ -1226,50 +1099,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1226 1099 checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
1227 1100
1228 1101 [[package]]
1229 - name = "openssl"
1230 - version = "0.10.75"
1231 - source = "registry+https://github.com/rust-lang/crates.io-index"
1232 - checksum = "08838db121398ad17ab8531ce9de97b244589089e290a384c900cb9ff7434328"
1233 - dependencies = [
1234 - "bitflags",
1235 - "cfg-if",
1236 - "foreign-types",
1237 - "libc",
1238 - "once_cell",
1239 - "openssl-macros",
1240 - "openssl-sys",
1241 - ]
1242 -
1243 - [[package]]
1244 - name = "openssl-macros"
1245 - version = "0.1.1"
1246 - source = "registry+https://github.com/rust-lang/crates.io-index"
1247 - checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
1248 - dependencies = [
1249 - "proc-macro2",
1250 - "quote",
1251 - "syn",
1252 - ]
1253 -
1254 - [[package]]
1255 - name = "openssl-probe"
1256 - version = "0.2.1"
1257 - source = "registry+https://github.com/rust-lang/crates.io-index"
1258 - checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe"
1259 -
1260 - [[package]]
1261 - name = "openssl-sys"
1262 - version = "0.9.111"
1263 - source = "registry+https://github.com/rust-lang/crates.io-index"
1264 - checksum = "82cab2d520aa75e3c58898289429321eb788c3106963d0dc886ec7a5f4adc321"
1265 - dependencies = [
1266 - "cc",
1267 - "libc",
1268 - "pkg-config",
1269 - "vcpkg",
1270 - ]
1271 -
1272 - [[package]]
1273 1102 name = "option-ext"
1274 1103 version = "0.2.0"
1275 1104 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1408,22 +1237,67 @@ dependencies = [
1408 1237 ]
1409 1238
1410 1239 [[package]]
1411 - name = "prettyplease"
1412 - version = "0.2.37"
1240 + name = "proc-macro2"
1241 + version = "1.0.106"
1413 1242 source = "registry+https://github.com/rust-lang/crates.io-index"
1414 - checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b"
1243 + checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
1415 1244 dependencies = [
1416 - "proc-macro2",
1417 - "syn",
1245 + "unicode-ident",
1418 1246 ]
1419 1247
1420 1248 [[package]]
1421 - name = "proc-macro2"
1422 - version = "1.0.106"
1249 + name = "quinn"
1250 + version = "0.11.9"
1423 1251 source = "registry+https://github.com/rust-lang/crates.io-index"
1424 - checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
1252 + checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20"
1425 1253 dependencies = [
1426 - "unicode-ident",
1254 + "bytes",
1255 + "cfg_aliases",
1256 + "pin-project-lite",
1257 + "quinn-proto",
1258 + "quinn-udp",
1259 + "rustc-hash",
1260 + "rustls",
1261 + "socket2",
1262 + "thiserror",
1263 + "tokio",
1264 + "tracing",
1265 + "web-time",
1266 + ]
1267 +
1268 + [[package]]
1269 + name = "quinn-proto"
1270 + version = "0.11.14"
1271 + source = "registry+https://github.com/rust-lang/crates.io-index"
1272 + checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098"
1273 + dependencies = [
1274 + "bytes",
1275 + "getrandom 0.3.4",
1276 + "lru-slab",
1277 + "rand 0.9.2",
1278 + "ring",
1279 + "rustc-hash",
1280 + "rustls",
1281 + "rustls-pki-types",
1282 + "slab",
1283 + "thiserror",
1284 + "tinyvec",
1285 + "tracing",
1286 + "web-time",
1287 + ]
1288 +
1289 + [[package]]
1290 + name = "quinn-udp"
1291 + version = "0.5.14"
1292 + source = "registry+https://github.com/rust-lang/crates.io-index"
1293 + checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd"
1294 + dependencies = [
1295 + "cfg_aliases",
1296 + "libc",
1297 + "once_cell",
1298 + "socket2",
1299 + "tracing",
1300 + "windows-sys 0.52.0",
1427 1301 ]
1428 1302
1429 1303 [[package]]
@@ -1437,9 +1311,9 @@ dependencies = [
1437 1311
1438 1312 [[package]]
1439 1313 name = "r-efi"
1440 - version = "6.0.0"
1314 + version = "5.3.0"
1441 1315 source = "registry+https://github.com/rust-lang/crates.io-index"
1442 - checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
1316 + checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
1443 1317
1444 1318 [[package]]
1445 1319 name = "rand"
@@ -1448,8 +1322,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1448 1322 checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
1449 1323 dependencies = [
1450 1324 "libc",
1451 - "rand_chacha",
1452 - "rand_core",
1325 + "rand_chacha 0.3.1",
1326 + "rand_core 0.6.4",
1327 + ]
1328 +
1329 + [[package]]
1330 + name = "rand"
1331 + version = "0.9.2"
1332 + source = "registry+https://github.com/rust-lang/crates.io-index"
1333 + checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1"
1334 + dependencies = [
1335 + "rand_chacha 0.9.0",
1336 + "rand_core 0.9.5",
1453 1337 ]
1454 1338
1455 1339 [[package]]
@@ -1459,7 +1343,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1459 1343 checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
1460 1344 dependencies = [
1461 1345 "ppv-lite86",
1462 - "rand_core",
1346 + "rand_core 0.6.4",
1347 + ]
1348 +
1349 + [[package]]
1350 + name = "rand_chacha"
1351 + version = "0.9.0"
1352 + source = "registry+https://github.com/rust-lang/crates.io-index"
1353 + checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb"
1354 + dependencies = [
1355 + "ppv-lite86",
1356 + "rand_core 0.9.5",
1463 1357 ]
1464 1358
1465 1359 [[package]]
@@ -1472,6 +1366,15 @@ dependencies = [
1472 1366 ]
1473 1367
1474 1368 [[package]]
1369 + name = "rand_core"
1370 + version = "0.9.5"
1371 + source = "registry+https://github.com/rust-lang/crates.io-index"
1372 + checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c"
1373 + dependencies = [
1374 + "getrandom 0.3.4",
1375 + ]
1376 +
1377 + [[package]]
1475 1378 name = "redox_syscall"
1476 1379 version = "0.5.18"
1477 1380 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1525,29 +1428,26 @@ checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147"
1525 1428 dependencies = [
1526 1429 "base64 0.22.1",
1527 1430 "bytes",
1528 - "encoding_rs",
1529 1431 "futures-core",
1530 - "h2",
1531 1432 "http",
1532 1433 "http-body",
1533 1434 "http-body-util",
1534 1435 "hyper",
1535 1436 "hyper-rustls",
1536 - "hyper-tls",
1537 1437 "hyper-util",
1538 1438 "js-sys",
Lines truncated
M Cargo.toml +1 -1
@@ -22,7 +22,7 @@ clap = { version = "4", features = ["derive"] }
22 22 tokio = { version = "1", features = ["rt-multi-thread", "macros", "io-std", "io-util", "process", "signal"] }
23 23
24 24 # HTTP client
25 - reqwest = { version = "0.12", features = ["json"] }
25 + reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }
26 26
27 27 # Database
28 28 sqlx = { version = "0.8", features = ["runtime-tokio", "sqlite"] }
@@ -32,11 +32,12 @@ deploy_target() {
32 32 local binary="$PROJECT_DIR/target/$target/release/pom"
33 33
34 34 echo "=== Deploying to $name ($host) ==="
35 + ssh "$host" "mkdir -p /etc/pom"
35 36 scp "$binary" "$host:/usr/local/bin/pom"
36 37 scp "$PROJECT_DIR/pom.toml" "$host:/etc/pom/pom.toml"
37 38 scp "$SCRIPT_DIR/pom.service" "$host:/etc/systemd/system/pom.service"
38 39
39 - ssh "$host" "mkdir -p /etc/pom && systemctl daemon-reload && systemctl enable pom && systemctl restart pom"
40 + ssh "$host" "systemctl daemon-reload && systemctl enable pom && systemctl restart pom"
40 41
41 42 echo "=== $name: deployed ==="
42 43 ssh "$host" "systemctl status pom --no-pager"