[Rust Frontend] Switch `rustls` to `native-tls`/OpenSSL (#46696)
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Bugen Zhao committed
Jun 26, 2026 at 08:19 UTC
ae7c8ec223e4d6bdfdaed6c8bb58e54b44d4ccaf
8 files changed
+89
-441
.buildkite/scripts/run-rust-frontend-cargo-ci.sh
+18
@@ -90,6 +90,16 @@ install_cargo_sort() {
90
cargo binstall --no-confirm cargo-sort
91
}
92
93
+install_cargo_deny() {
94
+ if command -v cargo-deny >/dev/null 2>&1; then
95
+ return
96
+ fi
97
+
98
+ log_section "Installing cargo-deny"
99
+ install_cargo_binstall
100
+ cargo binstall --no-confirm cargo-deny
101
+}
102
+
103
install_cargo_nextest() {
104
if command -v cargo-nextest >/dev/null 2>&1; then
105
return
@@ -142,6 +152,7 @@ PY
152
153
run_style_clippy() {
154
install_cargo_sort
155
+ install_cargo_deny
156
157
log_section "Checking Rust formatting"
158
cargo fmt --manifest-path rust/Cargo.toml --all -- --check
@@ -149,6 +160,13 @@ run_style_clippy() {
160
log_section "Checking Cargo.toml ordering"
161
cargo sort --workspace --check rust
162
163
+ log_section "Checking Rust dependency bans"
164
+ cargo deny \
165
+ --manifest-path rust/Cargo.toml \
166
+ check \
167
+ --config rust/deny.toml \
168
+ bans
169
+
170
log_section "Running clippy"
171
cargo clippy \
172
--manifest-path rust/Cargo.toml \
rust/Cargo.lock
+21
-417
@@ -454,12 +454,6 @@ version = "0.22.1"
454
source = "registry+https://github.com/rust-lang/crates.io-index"
455
checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
456
457
-[[package]]
458
-name = "base64ct"
459
-version = "1.8.3"
460
-source = "registry+https://github.com/rust-lang/crates.io-index"
461
-checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06"
462
-
457
[[package]]
458
name = "bit-set"
459
version = "0.5.3"
@@ -631,12 +625,6 @@ version = "1.0.4"
625
source = "registry+https://github.com/rust-lang/crates.io-index"
626
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
627
634
-[[package]]
635
-name = "cfg_aliases"
636
-version = "0.2.1"
637
-source = "registry+https://github.com/rust-lang/crates.io-index"
638
-checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
639
-
628
[[package]]
629
name = "chrono"
630
version = "0.4.44"
@@ -754,19 +742,6 @@ dependencies = [
742
"crossbeam-utils",
743
]
744
757
-[[package]]
758
-name = "console"
759
-version = "0.15.11"
760
-source = "registry+https://github.com/rust-lang/crates.io-index"
761
-checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8"
762
-dependencies = [
763
- "encode_unicode",
764
- "libc",
765
- "once_cell",
766
- "unicode-width",
767
- "windows-sys 0.59.0",
768
-]
769
-
745
[[package]]
746
name = "console"
747
version = "0.16.2"
@@ -786,35 +761,6 @@ version = "0.4.2"
761
source = "registry+https://github.com/rust-lang/crates.io-index"
762
checksum = "3d52eff69cd5e647efe296129160853a42795992097e8af39800e1060caeea9b"
763
789
-[[package]]
790
-name = "cookie"
791
-version = "0.18.1"
792
-source = "registry+https://github.com/rust-lang/crates.io-index"
793
-checksum = "4ddef33a339a91ea89fb53151bd0a4689cfce27055c291dfa69945475d22c747"
794
-dependencies = [
795
- "percent-encoding",
796
- "time",
797
- "version_check",
798
-]
799
-
800
-[[package]]
801
-name = "cookie_store"
802
-version = "0.22.1"
803
-source = "registry+https://github.com/rust-lang/crates.io-index"
804
-checksum = "15b2c103cf610ec6cae3da84a766285b42fd16aad564758459e6ecf128c75206"
805
-dependencies = [
806
- "cookie",
807
- "document-features",
808
- "idna",
809
- "indexmap 2.13.0",
810
- "log",
811
- "serde",
812
- "serde_derive",
813
- "serde_json",
814
- "time",
815
- "url",
816
-]
817
-
764
[[package]]
765
name = "core-foundation"
766
version = "0.9.4"
@@ -1038,16 +984,6 @@ dependencies = [
984
"serde",
985
]
986
1041
-[[package]]
1042
-name = "der"
1043
-version = "0.8.0"
1044
-source = "registry+https://github.com/rust-lang/crates.io-index"
1045
-checksum = "71fd89660b2dc699704064e59e9dba0147b903e85319429e131620d022be411b"
1046
-dependencies = [
1047
- "pem-rfc7468",
1048
- "zeroize",
1049
-]
1050
-
987
[[package]]
988
name = "deranged"
989
version = "0.5.8"
@@ -1393,13 +1329,12 @@ dependencies = [
1329
1330
[[package]]
1331
name = "fastokens"
1396
-version = "0.2.0"
1332
+version = "0.2.1"
1333
source = "registry+https://github.com/rust-lang/crates.io-index"
1398
-checksum = "796a262ed47d1458a4b40d0ed831c927e6f54d5b9c1de2683bb4ac9b04f4c7cc"
1334
+checksum = "8728655e193e0d08d7a95d63cf1fdb9b768d282cab0a112ecb006615bae9f067"
1335
dependencies = [
1336
"daachorse",
1337
"fancy-regex 0.17.0",
1402
- "hf-hub 0.4.3",
1338
"icu_normalizer",
1339
"memchr",
1340
"pcre2",
@@ -1643,10 +1578,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1578
checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0"
1579
dependencies = [
1580
"cfg-if",
1646
- "js-sys",
1581
"libc",
1582
"wasi",
1649
- "wasm-bindgen",
1583
]
1584
1585
[[package]]
@@ -1765,26 +1698,6 @@ version = "0.4.3"
1698
source = "registry+https://github.com/rust-lang/crates.io-index"
1699
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
1700
1768
-[[package]]
1769
-name = "hf-hub"
1770
-version = "0.4.3"
1771
-source = "registry+https://github.com/rust-lang/crates.io-index"
1772
-checksum = "629d8f3bbeda9d148036d6b0de0a3ab947abd08ce90626327fc3547a49d59d97"
1773
-dependencies = [
1774
- "dirs",
1775
- "http",
1776
- "indicatif 0.17.11",
1777
- "libc",
1778
- "log",
1779
- "rand 0.9.2",
1780
- "reqwest",
1781
- "serde",
1782
- "serde_json",
1783
- "thiserror 2.0.18",
1784
- "ureq 2.12.1",
1785
- "windows-sys 0.60.2",
1786
-]
1787
-
1701
[[package]]
1702
name = "hf-hub"
1703
version = "0.5.0"
@@ -1793,11 +1706,9 @@ checksum = "aef3982638978efa195ff11b305f51f1f22f4f0a6cabee7af79b383ebee6a213"
1706
dependencies = [
1707
"dirs",
1708
"futures",
1796
- "http",
1797
- "indicatif 0.18.4",
1709
+ "indicatif",
1710
"libc",
1711
"log",
1800
- "native-tls",
1712
"num_cpus",
1713
"rand 0.9.2",
1714
"reqwest",
@@ -1805,7 +1716,6 @@ dependencies = [
1716
"serde_json",
1717
"thiserror 2.0.18",
1718
"tokio",
1808
- "ureq 3.3.0",
1719
"windows-sys 0.61.2",
1720
]
1721
@@ -1902,12 +1812,10 @@ dependencies = [
1812
"hyper",
1813
"hyper-util",
1814
"rustls",
1905
- "rustls-native-certs",
1815
"rustls-pki-types",
1816
"tokio",
1817
"tokio-rustls",
1818
"tower-service",
1910
- "webpki-roots 1.0.6",
1819
]
1820
1821
[[package]]
@@ -2168,26 +2076,13 @@ dependencies = [
2076
"serde_core",
2077
]
2078
2171
-[[package]]
2172
-name = "indicatif"
2173
-version = "0.17.11"
2174
-source = "registry+https://github.com/rust-lang/crates.io-index"
2175
-checksum = "183b3088984b400f4cfac3620d5e076c84da5364016b4f49473de574b2586235"
2176
-dependencies = [
2177
- "console 0.15.11",
2178
- "number_prefix",
2179
- "portable-atomic",
2180
- "unicode-width",
2181
- "web-time",
2182
-]
2183
-
2079
[[package]]
2080
name = "indicatif"
2081
version = "0.18.4"
2082
source = "registry+https://github.com/rust-lang/crates.io-index"
2083
checksum = "25470f23803092da7d239834776d653104d551bc4d7eacaf31e6837854b8e9eb"
2084
dependencies = [
2190
- "console 0.16.2",
2085
+ "console",
2086
"portable-atomic",
2087
"unicode-width",
2088
"unit-prefix",
@@ -2421,7 +2316,7 @@ checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092"
2316
[[package]]
2317
name = "llm-multimodal"
2318
version = "1.5.0"
2424
-source = "git+https://github.com/vllm-project/llm-multimodal?rev=5b558989844d1c7af3e43d0f604069ffd9c06320#5b558989844d1c7af3e43d0f604069ffd9c06320"
2319
+source = "git+https://github.com/vllm-project/llm-multimodal?rev=046b669bd1c4faa2a7e05344d8cbf7b2befb37d5#046b669bd1c4faa2a7e05344d8cbf7b2befb37d5"
2320
dependencies = [
2321
"base64 0.22.1",
2322
"blake3",
@@ -2462,12 +2357,6 @@ dependencies = [
2357
"imgref",
2358
]
2359
2465
-[[package]]
2466
-name = "lru-slab"
2467
-version = "0.1.2"
2468
-source = "registry+https://github.com/rust-lang/crates.io-index"
2469
-checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154"
2470
-
2360
[[package]]
2361
name = "macro_rules_attribute"
2362
version = "0.2.2"
@@ -2881,12 +2770,6 @@ dependencies = [
2770
"libc",
2771
]
2772
2884
-[[package]]
2885
-name = "number_prefix"
2886
-version = "0.4.0"
2887
-source = "registry+https://github.com/rust-lang/crates.io-index"
2888
-checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3"
2889
-
2773
[[package]]
2774
name = "once_cell"
2775
version = "1.21.3"
@@ -2930,8 +2813,7 @@ checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e"
2813
[[package]]
2814
name = "openai-harmony"
2815
version = "0.0.8"
2933
-source = "registry+https://github.com/rust-lang/crates.io-index"
2934
-checksum = "e77e82af451fc95deeb728a40b84db8ee82d341e136c268de415123a560b9b72"
2816
+source = "git+https://github.com/Inferact/openai-harmony?rev=cfbadbc66f3158692bfeefa961e363aa7a6b9708#cfbadbc66f3158692bfeefa961e363aa7a6b9708"
2817
dependencies = [
2818
"anyhow",
2819
"base64 0.22.1",
@@ -3093,15 +2975,6 @@ dependencies = [
2975
"pkg-config",
2976
]
2977
3096
-[[package]]
3097
-name = "pem-rfc7468"
3098
-version = "1.0.0"
3099
-source = "registry+https://github.com/rust-lang/crates.io-index"
3100
-checksum = "a6305423e0e7738146434843d1694d621cce767262b2a86910beab705e4493d9"
3101
-dependencies = [
3102
- "base64ct",
3103
-]
3104
-
2978
[[package]]
2979
name = "percent-encoding"
2980
version = "2.3.2"
@@ -3553,61 +3426,6 @@ version = "2.0.1"
3426
source = "registry+https://github.com/rust-lang/crates.io-index"
3427
checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3"
3428
3556
-[[package]]
3557
-name = "quinn"
3558
-version = "0.11.9"
3559
-source = "registry+https://github.com/rust-lang/crates.io-index"
3560
-checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20"
3561
-dependencies = [
3562
- "bytes",
3563
- "cfg_aliases",
3564
- "pin-project-lite",
3565
- "quinn-proto",
3566
- "quinn-udp",
3567
- "rustc-hash 2.1.1",
3568
- "rustls",
3569
- "socket2",
3570
- "thiserror 2.0.18",
3571
- "tokio",
3572
- "tracing",
3573
- "web-time",
3574
-]
3575
-
3576
-[[package]]
3577
-name = "quinn-proto"
3578
-version = "0.11.14"
3579
-source = "registry+https://github.com/rust-lang/crates.io-index"
3580
-checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098"
3581
-dependencies = [
3582
- "bytes",
3583
- "getrandom 0.3.4",
3584
- "lru-slab",
3585
- "rand 0.9.2",
3586
- "ring",
3587
- "rustc-hash 2.1.1",
3588
- "rustls",
3589
- "rustls-pki-types",
3590
- "slab",
3591
- "thiserror 2.0.18",
3592
- "tinyvec",
3593
- "tracing",
3594
- "web-time",
3595
-]
3596
-
3597
-[[package]]
3598
-name = "quinn-udp"
3599
-version = "0.5.14"
3600
-source = "registry+https://github.com/rust-lang/crates.io-index"
3601
-checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd"
3602
-dependencies = [
3603
- "cfg_aliases",
3604
- "libc",
3605
- "once_cell",
3606
- "socket2",
3607
- "tracing",
3608
- "windows-sys 0.60.2",
3609
-]
3610
-
3429
[[package]]
3430
name = "quote"
3431
version = "1.0.45"
@@ -3880,9 +3698,6 @@ dependencies = [
3698
"native-tls",
3699
"percent-encoding",
3700
"pin-project-lite",
3883
- "quinn",
3884
- "rustls",
3885
- "rustls-native-certs",
3701
"rustls-pki-types",
3702
"serde",
3703
"serde_json",
@@ -3890,7 +3705,6 @@ dependencies = [
3705
"sync_wrapper",
3706
"tokio",
3707
"tokio-native-tls",
3893
- "tokio-rustls",
3708
"tokio-util",
3709
"tower",
3710
"tower-http",
@@ -3900,7 +3714,6 @@ dependencies = [
3714
"wasm-bindgen-futures",
3715
"wasm-streams",
3716
"web-sys",
3903
- "webpki-roots 1.0.6",
3717
]
3718
3719
[[package]]
@@ -4039,34 +3852,19 @@ version = "0.23.37"
3852
source = "registry+https://github.com/rust-lang/crates.io-index"
3853
checksum = "758025cb5fccfd3bc2fd74708fd4682be41d99e5dff73c377c0646c6012c73a4"
3854
dependencies = [
4042
- "log",
3855
"once_cell",
4044
- "ring",
3856
"rustls-pki-types",
3857
"rustls-webpki",
3858
"subtle",
3859
"zeroize",
3860
]
3861
4051
-[[package]]
4052
-name = "rustls-native-certs"
4053
-version = "0.8.3"
4054
-source = "registry+https://github.com/rust-lang/crates.io-index"
4055
-checksum = "612460d5f7bea540c490b2b6395d8e34a953e52b491accd6c86c8164c5932a63"
4056
-dependencies = [
4057
- "openssl-probe",
4058
- "rustls-pki-types",
4059
- "schannel",
4060
- "security-framework",
4061
-]
4062
-
3862
[[package]]
3863
name = "rustls-pki-types"
3864
version = "1.14.0"
3865
source = "registry+https://github.com/rust-lang/crates.io-index"
3866
checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd"
3867
dependencies = [
4069
- "web-time",
3868
"zeroize",
3869
]
3870
@@ -4600,17 +4398,6 @@ dependencies = [
4398
"windows-sys 0.61.2",
4399
]
4400
4603
-[[package]]
4604
-name = "socks"
4605
-version = "0.3.4"
4606
-source = "registry+https://github.com/rust-lang/crates.io-index"
4607
-checksum = "f0c3dbbd9ae980613c6dd8e28a9407b50509d3803b57624d5dfe8315218cd58b"
4608
-dependencies = [
4609
- "byteorder",
4610
- "libc",
4611
- "winapi",
4612
-]
4613
-
4401
[[package]]
4402
name = "spm_precompiled"
4403
version = "0.1.4"
@@ -4976,21 +4763,6 @@ dependencies = [
4763
"serde_json",
4764
]
4765
4979
-[[package]]
4980
-name = "tinyvec"
4981
-version = "1.11.0"
4982
-source = "registry+https://github.com/rust-lang/crates.io-index"
4983
-checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3"
4984
-dependencies = [
4985
- "tinyvec_macros",
4986
-]
4987
-
4988
-[[package]]
4989
-name = "tinyvec_macros"
4990
-version = "0.1.1"
4991
-source = "registry+https://github.com/rust-lang/crates.io-index"
4992
-checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
4993
-
4766
[[package]]
4767
name = "tokenizers"
4768
version = "0.22.2"
@@ -5004,7 +4776,7 @@ dependencies = [
4776
"derive_builder",
4777
"esaxx-rs",
4778
"getrandom 0.3.4",
5007
- "indicatif 0.18.4",
4779
+ "indicatif",
4780
"itertools 0.14.0",
4781
"log",
4782
"macro_rules_attribute",
@@ -5529,61 +5301,6 @@ version = "0.9.0"
5301
source = "registry+https://github.com/rust-lang/crates.io-index"
5302
checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
5303
5532
-[[package]]
5533
-name = "ureq"
5534
-version = "2.12.1"
5535
-source = "registry+https://github.com/rust-lang/crates.io-index"
5536
-checksum = "02d1a66277ed75f640d608235660df48c8e3c19f3b4edb6a263315626cc3c01d"
5537
-dependencies = [
5538
- "base64 0.22.1",
5539
- "flate2",
5540
- "log",
5541
- "once_cell",
5542
- "rustls",
5543
- "rustls-pki-types",
5544
- "serde",
5545
- "serde_json",
5546
- "socks",
5547
- "url",
5548
- "webpki-roots 0.26.11",
5549
-]
5550
-
5551
-[[package]]
5552
-name = "ureq"
5553
-version = "3.3.0"
5554
-source = "registry+https://github.com/rust-lang/crates.io-index"
5555
-checksum = "dea7109cdcd5864d4eeb1b58a1648dc9bf520360d7af16ec26d0a9354bafcfc0"
5556
-dependencies = [
5557
- "base64 0.22.1",
5558
- "cookie_store",
5559
- "der",
5560
- "flate2",
5561
- "log",
5562
- "native-tls",
5563
- "percent-encoding",
5564
- "rustls",
5565
- "rustls-pki-types",
5566
- "serde",
5567
- "serde_json",
5568
- "socks",
5569
- "ureq-proto",
5570
- "utf8-zero",
5571
- "webpki-root-certs",
5572
- "webpki-roots 1.0.6",
5573
-]
5574
-
5575
-[[package]]
5576
-name = "ureq-proto"
5577
-version = "0.6.0"
5578
-source = "registry+https://github.com/rust-lang/crates.io-index"
5579
-checksum = "e994ba84b0bd1b1b0cf92878b7ef898a5c1760108fe7b6010327e274917a808c"
5580
-dependencies = [
5581
- "base64 0.22.1",
5582
- "http",
5583
- "httparse",
5584
- "log",
5585
-]
5586
-
5304
[[package]]
5305
name = "url"
5306
version = "2.5.8"
@@ -5608,12 +5325,6 @@ version = "1.0.5"
5325
source = "registry+https://github.com/rust-lang/crates.io-index"
5326
checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246"
5327
5611
-[[package]]
5612
-name = "utf8-zero"
5613
-version = "0.8.1"
5614
-source = "registry+https://github.com/rust-lang/crates.io-index"
5615
-checksum = "b8c0a043c9540bae7c578c88f91dda8bd82e59ae27c21baca69c8b191aaf5a6e"
5616
-
5328
[[package]]
5329
name = "utf8_iter"
5330
version = "1.0.4"
@@ -5951,8 +5662,9 @@ dependencies = [
5662
"enum-as-inner",
5663
"expect-test",
5664
"futures",
5954
- "hf-hub 0.5.0",
5665
+ "hf-hub",
5666
"itertools 0.14.0",
5667
+ "reqwest",
5668
"serde",
5669
"serde_json",
5670
"serde_with",
@@ -5975,7 +5687,8 @@ dependencies = [
5687
"base64 0.22.1",
5688
"criterion",
5689
"fastokens",
5978
- "hf-hub 0.5.0",
5690
+ "hf-hub",
5691
+ "reqwest",
5692
"riptoken",
5693
"rustc-hash 1.1.0",
5694
"serde",
@@ -5986,6 +5699,7 @@ dependencies = [
5699
"thiserror-ext",
5700
"tiktoken-rs 0.9.1",
5701
"tokenizers",
5702
+ "tokio",
5703
"tracing",
5704
]
5705
@@ -6169,33 +5883,6 @@ dependencies = [
5883
"wasm-bindgen",
5884
]
5885
6172
-[[package]]
6173
-name = "webpki-root-certs"
6174
-version = "1.0.6"
6175
-source = "registry+https://github.com/rust-lang/crates.io-index"
6176
-checksum = "804f18a4ac2676ffb4e8b5b5fa9ae38af06df08162314f96a68d2a363e21a8ca"
6177
-dependencies = [
6178
- "rustls-pki-types",
6179
-]
6180
-
6181
-[[package]]
6182
-name = "webpki-roots"
6183
-version = "0.26.11"
6184
-source = "registry+https://github.com/rust-lang/crates.io-index"
6185
-checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9"
6186
-dependencies = [
6187
- "webpki-roots 1.0.6",
6188
-]
6189
-
6190
-[[package]]
6191
-name = "webpki-roots"
6192
-version = "1.0.6"
6193
-source = "registry+https://github.com/rust-lang/crates.io-index"
6194
-checksum = "22cfaf3c063993ff62e73cb4311efde4db1efb31ab78a3e5c457939ad5cc0bed"
6195
-dependencies = [
6196
- "rustls-pki-types",
6197
-]
6198
-
5886
[[package]]
5887
name = "weezl"
5888
version = "0.1.12"
@@ -6320,25 +6007,7 @@ version = "0.52.0"
6007
source = "registry+https://github.com/rust-lang/crates.io-index"
6008
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
6009
dependencies = [
6323
- "windows-targets 0.52.6",
6324
-]
6325
-
6326
-[[package]]
6327
-name = "windows-sys"
6328
-version = "0.59.0"
6329
-source = "registry+https://github.com/rust-lang/crates.io-index"
6330
-checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
6331
-dependencies = [
6332
- "windows-targets 0.52.6",
6333
-]
6334
-
6335
-[[package]]
6336
-name = "windows-sys"
6337
-version = "0.60.2"
6338
-source = "registry+https://github.com/rust-lang/crates.io-index"
6339
-checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb"
6340
-dependencies = [
6341
- "windows-targets 0.53.5",
6010
+ "windows-targets",
6011
]
6012
6013
[[package]]
@@ -6356,31 +6025,14 @@ version = "0.52.6"
6025
source = "registry+https://github.com/rust-lang/crates.io-index"
6026
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
6027
dependencies = [
6359
- "windows_aarch64_gnullvm 0.52.6",
6360
- "windows_aarch64_msvc 0.52.6",
6361
- "windows_i686_gnu 0.52.6",
6362
- "windows_i686_gnullvm 0.52.6",
6363
- "windows_i686_msvc 0.52.6",
6364
- "windows_x86_64_gnu 0.52.6",
6365
- "windows_x86_64_gnullvm 0.52.6",
6366
- "windows_x86_64_msvc 0.52.6",
6367
-]
6368
-
6369
-[[package]]
6370
-name = "windows-targets"
6371
-version = "0.53.5"
6372
-source = "registry+https://github.com/rust-lang/crates.io-index"
6373
-checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3"
6374
-dependencies = [
6375
- "windows-link",
6376
- "windows_aarch64_gnullvm 0.53.1",
6377
- "windows_aarch64_msvc 0.53.1",
6378
- "windows_i686_gnu 0.53.1",
6379
- "windows_i686_gnullvm 0.53.1",
6380
- "windows_i686_msvc 0.53.1",
6381
- "windows_x86_64_gnu 0.53.1",
6382
- "windows_x86_64_gnullvm 0.53.1",
6383
- "windows_x86_64_msvc 0.53.1",
6028
+ "windows_aarch64_gnullvm",
6029
+ "windows_aarch64_msvc",
6030
+ "windows_i686_gnu",
6031
+ "windows_i686_gnullvm",
6032
+ "windows_i686_msvc",
6033
+ "windows_x86_64_gnu",
6034
+ "windows_x86_64_gnullvm",
6035
+ "windows_x86_64_msvc",
6036
]
6037
6038
[[package]]
@@ -6389,96 +6041,48 @@ version = "0.52.6"
6041
source = "registry+https://github.com/rust-lang/crates.io-index"
6042
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
6043
6392
-[[package]]
6393
-name = "windows_aarch64_gnullvm"
6394
-version = "0.53.1"
6395
-source = "registry+https://github.com/rust-lang/crates.io-index"
6396
-checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53"
6397
-
6044
[[package]]
6045
name = "windows_aarch64_msvc"
6046
version = "0.52.6"
6047
source = "registry+https://github.com/rust-lang/crates.io-index"
6048
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
6049
6404
-[[package]]
6405
-name = "windows_aarch64_msvc"
6406
-version = "0.53.1"
6407
-source = "registry+https://github.com/rust-lang/crates.io-index"
6408
-checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006"
6409
-
6050
[[package]]
6051
name = "windows_i686_gnu"
6052
version = "0.52.6"
6053
source = "registry+https://github.com/rust-lang/crates.io-index"
6054
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
6055
6416
-[[package]]
6417
-name = "windows_i686_gnu"
6418
-version = "0.53.1"
6419
-source = "registry+https://github.com/rust-lang/crates.io-index"
6420
-checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3"
6421
-
6056
[[package]]
6057
name = "windows_i686_gnullvm"
6058
version = "0.52.6"
6059
source = "registry+https://github.com/rust-lang/crates.io-index"
6060
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
6061
6428
-[[package]]
6429
-name = "windows_i686_gnullvm"
6430
-version = "0.53.1"
6431
-source = "registry+https://github.com/rust-lang/crates.io-index"
6432
-checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c"
6433
-
6062
[[package]]
6063
name = "windows_i686_msvc"
6064
version = "0.52.6"
6065
source = "registry+https://github.com/rust-lang/crates.io-index"
6066
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
6067
6440
-[[package]]
6441
-name = "windows_i686_msvc"
6442
-version = "0.53.1"
6443
-source = "registry+https://github.com/rust-lang/crates.io-index"
6444
-checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2"
6445
-
6068
[[package]]
6069
name = "windows_x86_64_gnu"
6070
version = "0.52.6"
6071
source = "registry+https://github.com/rust-lang/crates.io-index"
6072
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
6073
6452
-[[package]]
6453
-name = "windows_x86_64_gnu"
6454
-version = "0.53.1"
6455
-source = "registry+https://github.com/rust-lang/crates.io-index"
6456
-checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499"
6457
-
6074
[[package]]
6075
name = "windows_x86_64_gnullvm"
6076
version = "0.52.6"
6077
source = "registry+https://github.com/rust-lang/crates.io-index"
6078
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
6079
6464
-[[package]]
6465
-name = "windows_x86_64_gnullvm"
6466
-version = "0.53.1"
6467
-source = "registry+https://github.com/rust-lang/crates.io-index"
6468
-checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1"
6469
-
6080
[[package]]
6081
name = "windows_x86_64_msvc"
6082
version = "0.52.6"
6083
source = "registry+https://github.com/rust-lang/crates.io-index"
6084
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
6085
6476
-[[package]]
6477
-name = "windows_x86_64_msvc"
6478
-version = "0.53.1"
6479
-source = "registry+https://github.com/rust-lang/crates.io-index"
6480
-checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650"
6481
-
6086
[[package]]
6087
name = "winnow"
6088
version = "1.0.2"
rust/Cargo.toml
+6
-6
@@ -23,7 +23,7 @@ license = "Apache-2.0"
23
[workspace.dependencies]
24
anyhow = "1.0.100"
25
arc-swap = "1.9.0"
26
-async-openai = "0.33.1"
26
+async-openai = { version = "0.33.1", default-features = false, features = ["native-tls"] }
27
async-trait = "0.1.89"
28
asynk-strim-attr = "0.1.0"
29
axum = "0.8.8"
@@ -37,22 +37,22 @@ easy-ext = "1.0.3"
37
educe = "0.6.0"
38
enum-as-inner = "0.7.0"
39
expect-test = "1.5.1"
40
-fastokens = "0.2.0"
40
+fastokens = { version = "0.2.1", default-features = false }
41
futures = "0.3.31"
42
half = { version = "2.7.1", features = ["bytemuck"] }
43
hex = "0.4.3"
44
-hf-hub = { version = "0.5.0", features = ["tokio"] }
44
+hf-hub = { version = "0.5.0", default-features = false, features = ["tokio"] }
45
http-body = "1.0.1"
46
indexmap = "2.13.0"
47
itertools = "0.14.0"
48
libc = "0.2.177"
49
-llm-multimodal = { git = "https://github.com/vllm-project/llm-multimodal", rev = "5b558989844d1c7af3e43d0f604069ffd9c06320" }
49
+llm-multimodal = { git = "https://github.com/vllm-project/llm-multimodal", rev = "046b669bd1c4faa2a7e05344d8cbf7b2befb37d5" }
50
mimalloc = "0.1.52"
51
minijinja = { version = "2.0", features = ["unstable_machinery", "json", "builtins", "loader", "loop_controls", "preserve_order"] }
52
minijinja-contrib = { version = "2.0", features = ["pycompat"] }
53
native-tls-vendored = { package = "native-tls", version = "0.2.18", features = ["vendored"] }
54
ndarray = { version = "0.16.1", features = ["serde"] }
55
-openai-harmony = "0.0.8"
55
+openai-harmony = { git = "https://github.com/Inferact/openai-harmony", rev = "cfbadbc66f3158692bfeefa961e363aa7a6b9708", default-features = false, features = ["native-tls"] }
56
openai-protocol = "1.6.0"
57
parking_lot = "0.12.5"
58
paste = "1.0.15"
@@ -64,7 +64,7 @@ pyo3 = "0.28.3"
64
pythonize = "0.28.0"
65
rand = "0.9.2"
66
reasoning-parser = "1.2.2"
67
-reqwest = { version = "0.12.8", default-features = false, features = ["rustls-tls"] }
67
+reqwest = { version = "0.12.8", default-features = false, features = ["native-tls"] }
68
riptoken = { version = "0.3.0", default-features = false }
69
rmp-serde = "1.3.1"
70
rmpv = { version = "1.3.1", features = ["with-serde"] }
rust/deny.toml
new
+15
@@ -0,0 +1,15 @@
1
+[bans]
2
+multiple-versions = "allow"
3
+
4
+deny = [
5
+ # TLS / crypto provider
6
+ # We prefer the system's TLS (e.g. OpenSSL) over Rust implementations.
7
+ { name = "rustls" },
8
+ { name = "ring" },
9
+ { name = "aws-lc-rs" },
10
+ { name = "aws-lc-sys" },
11
+ { name = "s2n-tls" },
12
+ { name = "s2n-tls-sys" },
13
+ { name = "boring" },
14
+ { name = "boring-sys" },
15
+]
rust/src/text/Cargo.toml
+1
@@ -12,6 +12,7 @@ enum-as-inner.workspace = true
12
futures.workspace = true
13
hf-hub.workspace = true
14
itertools.workspace = true
15
+reqwest.workspace = true
16
serde.workspace = true
17
serde_json.workspace = true
18
serde_with.workspace = true
rust/src/tokenizer/Cargo.toml
+2
@@ -21,7 +21,9 @@ tracing.workspace = true
21
[dev-dependencies]
22
criterion.workspace = true
23
hf-hub.workspace = true
24
+reqwest.workspace = true
25
tempfile.workspace = true
26
+tokio.workspace = true
27
28
[[bench]]
29
name = "hf"
rust/src/tokenizer/benches/hf.rs
+12
-8
@@ -1,5 +1,6 @@
1
use criterion::{Criterion, Throughput, black_box, criterion_group, criterion_main};
2
-use hf_hub::api::sync::ApiBuilder;
2
+use hf_hub::api::tokio::ApiBuilder;
3
+use tokio::runtime::Runtime;
4
use vllm_tokenizer::{HuggingFaceTokenizer, Tokenizer};
5
6
const MODEL_ID: &str = "Qwen/Qwen3.5-0.8B";
@@ -55,13 +56,16 @@ impl BenchFixture {
56
}
57
58
fn tokenizer_json() -> std::path::PathBuf {
58
- ApiBuilder::from_env()
59
- .with_progress(false)
60
- .build()
61
- .expect("build hf-hub api")
62
- .model(MODEL_ID.to_string())
63
- .get("tokenizer.json")
64
- .expect("fetch tokenizer.json from hf-hub")
59
+ Runtime::new().expect("build tokio runtime").block_on(async {
60
+ ApiBuilder::from_env()
61
+ .with_progress(false)
62
+ .build()
63
+ .expect("build hf-hub api")
64
+ .model(MODEL_ID.to_string())
65
+ .get("tokenizer.json")
66
+ .await
67
+ .expect("fetch tokenizer.json from hf-hub")
68
+ })
69
}
70
71
fn bench_encode(c: &mut Criterion) {
rust/src/tokenizer/benches/tiktoken.rs
+14
-10
@@ -1,5 +1,6 @@
1
use criterion::{Criterion, Throughput, black_box, criterion_group, criterion_main};
2
-use hf_hub::api::sync::ApiBuilder;
2
+use hf_hub::api::tokio::ApiBuilder;
3
+use tokio::runtime::Runtime;
4
use vllm_tokenizer::{TiktokenTokenizer, Tokenizer};
5
6
const MODEL_ID: &str = "moonshotai/Kimi-K2.5";
@@ -52,15 +53,18 @@ impl BenchFixture {
53
}
54
55
fn tiktoken_model() -> std::path::PathBuf {
55
- let repo = ApiBuilder::from_env()
56
- .with_progress(false)
57
- .build()
58
- .expect("build hf-hub api")
59
- .model(MODEL_ID.to_string());
60
- repo.get("config.json").expect("fetch config.json from hf-hub");
61
- repo.get("tokenizer_config.json")
62
- .expect("fetch tokenizer_config.json from hf-hub");
63
- repo.get("tiktoken.model").expect("fetch tiktoken.model from hf-hub")
56
+ Runtime::new().expect("build tokio runtime").block_on(async {
57
+ let repo = ApiBuilder::from_env()
58
+ .with_progress(false)
59
+ .build()
60
+ .expect("build hf-hub api")
61
+ .model(MODEL_ID.to_string());
62
+ repo.get("config.json").await.expect("fetch config.json from hf-hub");
63
+ repo.get("tokenizer_config.json")
64
+ .await
65
+ .expect("fetch tokenizer_config.json from hf-hub");
66
+ repo.get("tiktoken.model").await.expect("fetch tiktoken.model from hf-hub")
67
+ })
68
}
69
70
fn bench_encode(c: &mut Criterion) {