wreq 1.2.2 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 847301c3eef022dc8dbdc25f84308f03ef73ac06f366caea11ecad0df51c8342
4
- data.tar.gz: 6ec2ed9471e605f58546a9deeba976ccc4984a1b3c2372e3f9d2e85fdd3d3f94
3
+ metadata.gz: c9d5e7cd20693fbde055ccefc33ed364f51680a341c9145babecc973c5d032ce
4
+ data.tar.gz: 4a63a9aeed17a700cf5a3e232f5e4ac8a68bc7f0fcac62ee45090eeb39eca25b
5
5
  SHA512:
6
- metadata.gz: 5bbebe9ab0ad0119019d95d15c37266fff1d22832f0beaf8f576ceb461bcb7129da8c617c17dbac0c1b918f5cf992b52c1d14ea140b9753a573dde3c9ee959a2
7
- data.tar.gz: 7baa2818b2a41af307f1152c4a4608ab7b3d2d3d921b29e50f4587637838318808b0153d80fdb9f4761a3454d42c3f51101d09c06f679f5583d8c733f39b73b5
6
+ metadata.gz: ab248c204f472afce85d089be910951c43be6721c555ac37b6483a0468627540aed426265e6594fe5f5e406a32190b5c3d869c93e7a129904cc4fede55e8213a
7
+ data.tar.gz: e8ffccc605771de7b765647d1373a5cc8e0d8577ad301951981a90fd517b6674ea15c01e003d71a4e23e60ab2543569781c3796a276eb7b8c9b8e1a17abb3900
data/Cargo.lock CHANGED
@@ -25,9 +25,9 @@ checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3"
25
25
 
26
26
  [[package]]
27
27
  name = "alloc-stdlib"
28
- version = "0.2.2"
28
+ version = "0.2.4"
29
29
  source = "registry+https://github.com/rust-lang/crates.io-index"
30
- checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece"
30
+ checksum = "0e76a019e91224d279006ff972f1e984179a6e9feb050adba6ce8274aef23195"
31
31
  dependencies = [
32
32
  "alloc-no-stdlib",
33
33
  ]
@@ -40,9 +40,9 @@ checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
40
40
 
41
41
  [[package]]
42
42
  name = "arc-swap"
43
- version = "1.9.1"
43
+ version = "1.9.2"
44
44
  source = "registry+https://github.com/rust-lang/crates.io-index"
45
- checksum = "6a3a1fd6f75306b68087b831f025c712524bcb19aad54e557b1129cfa0a2b207"
45
+ checksum = "c049c0be4daef0b145cb3555416b3b8ef5b7888a38aea1a3a155801fe7b0810b"
46
46
  dependencies = [
47
47
  "rustversion",
48
48
  ]
@@ -91,9 +91,9 @@ checksum = "b4388bee8683e3d04af747c73422af53102d2bd24d9eadb6cbc100baef4b43f8"
91
91
 
92
92
  [[package]]
93
93
  name = "brotli"
94
- version = "8.0.3"
94
+ version = "8.0.4"
95
95
  source = "registry+https://github.com/rust-lang/crates.io-index"
96
- checksum = "8119e4516436f5708bbc474a9d395bf12f1b5395e93a92a56e647ac3388c8610"
96
+ checksum = "5cc91aac060a7a1e25823bdccbfb6af1875b88f17c6daac97894eed8207166b3"
97
97
  dependencies = [
98
98
  "alloc-no-stdlib",
99
99
  "alloc-stdlib",
@@ -102,9 +102,9 @@ dependencies = [
102
102
 
103
103
  [[package]]
104
104
  name = "brotli-decompressor"
105
- version = "5.0.1"
105
+ version = "5.0.3"
106
106
  source = "registry+https://github.com/rust-lang/crates.io-index"
107
- checksum = "5962523e1b92ce1b5e793d9169b9943eece10d39f62550bc04bb605d75b94924"
107
+ checksum = "3a32acac15fe1967bc3986b2a6347dffc965602354ea6f450ad07e8bfd253583"
108
108
  dependencies = [
109
109
  "alloc-no-stdlib",
110
110
  "alloc-stdlib",
@@ -137,15 +137,15 @@ dependencies = [
137
137
 
138
138
  [[package]]
139
139
  name = "bytes"
140
- version = "1.11.1"
140
+ version = "1.12.0"
141
141
  source = "registry+https://github.com/rust-lang/crates.io-index"
142
- checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33"
142
+ checksum = "8ae3f5d315924270530207e2a68396c3cc547f6dca3fbdca317cfb1a51edb593"
143
143
 
144
144
  [[package]]
145
145
  name = "cc"
146
- version = "1.2.63"
146
+ version = "1.2.66"
147
147
  source = "registry+https://github.com/rust-lang/crates.io-index"
148
- checksum = "556e016178bb5662a08681bbe0f00f8e17631781a4dfc8c45e466e4b185ec27f"
148
+ checksum = "f5d6cac793997bd970000024b2934968efe83b382de4fdcf4fcb46b6ee4ad996"
149
149
  dependencies = [
150
150
  "find-msvc-tools",
151
151
  "jobserver",
@@ -415,14 +415,13 @@ dependencies = [
415
415
 
416
416
  [[package]]
417
417
  name = "getrandom"
418
- version = "0.3.4"
418
+ version = "0.4.3"
419
419
  source = "registry+https://github.com/rust-lang/crates.io-index"
420
- checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
420
+ checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099"
421
421
  dependencies = [
422
422
  "cfg-if",
423
423
  "libc",
424
424
  "r-efi",
425
- "wasip2",
426
425
  ]
427
426
 
428
427
  [[package]]
@@ -477,9 +476,9 @@ dependencies = [
477
476
 
478
477
  [[package]]
479
478
  name = "http2"
480
- version = "0.5.18"
479
+ version = "0.5.19"
481
480
  source = "registry+https://github.com/rust-lang/crates.io-index"
482
- checksum = "9d8c910a959d6fd27dd6f8fdb26509ac0f6561465cc8c5f875d45a203ab97911"
481
+ checksum = "39fa01ed3820381df693c455ba2109d229c0cb02c95a51108ef45ddd758d91b9"
483
482
  dependencies = [
484
483
  "atomic-waker",
485
484
  "bytes",
@@ -637,9 +636,9 @@ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
637
636
 
638
637
  [[package]]
639
638
  name = "jobserver"
640
- version = "0.1.34"
639
+ version = "0.1.35"
641
640
  source = "registry+https://github.com/rust-lang/crates.io-index"
642
- checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33"
641
+ checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3"
643
642
  dependencies = [
644
643
  "getrandom",
645
644
  "libc",
@@ -717,9 +716,9 @@ dependencies = [
717
716
 
718
717
  [[package]]
719
718
  name = "memchr"
720
- version = "2.8.1"
719
+ version = "2.8.3"
721
720
  source = "registry+https://github.com/rust-lang/crates.io-index"
722
- checksum = "6b947ae49db0d222b1dbc6b113ce7248a3fc3a6ca21b696717bfc000ba4484d8"
721
+ checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
723
722
 
724
723
  [[package]]
725
724
  name = "mime"
@@ -848,18 +847,18 @@ dependencies = [
848
847
 
849
848
  [[package]]
850
849
  name = "quote"
851
- version = "1.0.45"
850
+ version = "1.0.46"
852
851
  source = "registry+https://github.com/rust-lang/crates.io-index"
853
- checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
852
+ checksum = "dfbc457d0c7a0759a614551b11a6409e5951f6c7537be1f1b7682b9ae9230368"
854
853
  dependencies = [
855
854
  "proc-macro2",
856
855
  ]
857
856
 
858
857
  [[package]]
859
858
  name = "r-efi"
860
- version = "5.3.0"
859
+ version = "6.0.0"
861
860
  source = "registry+https://github.com/rust-lang/crates.io-index"
862
- checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
861
+ checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
863
862
 
864
863
  [[package]]
865
864
  name = "rb-sys"
@@ -931,27 +930,21 @@ checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
931
930
 
932
931
  [[package]]
933
932
  name = "rustc-hash"
934
- version = "2.1.2"
933
+ version = "2.1.3"
935
934
  source = "registry+https://github.com/rust-lang/crates.io-index"
936
- checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe"
935
+ checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d"
937
936
 
938
937
  [[package]]
939
938
  name = "rustls-pki-types"
940
- version = "1.14.1"
939
+ version = "1.15.0"
941
940
  source = "registry+https://github.com/rust-lang/crates.io-index"
942
- checksum = "30a7197ae7eb376e574fe940d068c30fe0462554a3ddbe4eca7838e049c937a9"
941
+ checksum = "764899a24af3980067ee14bc143654f297b22eaebfe3c7b6b211920a5a59b046"
943
942
 
944
943
  [[package]]
945
944
  name = "rustversion"
946
- version = "1.0.22"
947
- source = "registry+https://github.com/rust-lang/crates.io-index"
948
- checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
949
-
950
- [[package]]
951
- name = "ryu"
952
945
  version = "1.0.23"
953
946
  source = "registry+https://github.com/rust-lang/crates.io-index"
954
- checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f"
947
+ checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f"
955
948
 
956
949
  [[package]]
957
950
  name = "scopeguard"
@@ -997,15 +990,15 @@ dependencies = [
997
990
 
998
991
  [[package]]
999
992
  name = "serde_html_form"
1000
- version = "0.4.0"
993
+ version = "0.4.1"
1001
994
  source = "registry+https://github.com/rust-lang/crates.io-index"
1002
- checksum = "0946d52b4b7e28823148aebbeceb901012c595ad737920d504fa8634bb099e6f"
995
+ checksum = "8f0346d7a342ab90f405cfc08f25d15075f944f42fcabbc5eac923829fa6d228"
1003
996
  dependencies = [
1004
997
  "form_urlencoded",
1005
998
  "indexmap",
1006
999
  "itoa",
1007
- "ryu",
1008
1000
  "serde_core",
1001
+ "zmij",
1009
1002
  ]
1010
1003
 
1011
1004
  [[package]]
@@ -1074,9 +1067,9 @@ checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
1074
1067
 
1075
1068
  [[package]]
1076
1069
  name = "smallvec"
1077
- version = "1.15.1"
1070
+ version = "1.15.2"
1078
1071
  source = "registry+https://github.com/rust-lang/crates.io-index"
1079
- checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
1072
+ checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90"
1080
1073
 
1081
1074
  [[package]]
1082
1075
  name = "socket2"
@@ -1096,9 +1089,9 @@ checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
1096
1089
 
1097
1090
  [[package]]
1098
1091
  name = "syn"
1099
- version = "2.0.117"
1092
+ version = "2.0.118"
1100
1093
  source = "registry+https://github.com/rust-lang/crates.io-index"
1101
- checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
1094
+ checksum = "1b9ae57f904213ebb649ce6895b8a66c66f0203b9319718f69a5612a065b1422"
1102
1095
  dependencies = [
1103
1096
  "proc-macro2",
1104
1097
  "quote",
@@ -1394,20 +1387,11 @@ version = "0.11.1+wasi-snapshot-preview1"
1394
1387
  source = "registry+https://github.com/rust-lang/crates.io-index"
1395
1388
  checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
1396
1389
 
1397
- [[package]]
1398
- name = "wasip2"
1399
- version = "1.0.1+wasi-0.2.4"
1400
- source = "registry+https://github.com/rust-lang/crates.io-index"
1401
- checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7"
1402
- dependencies = [
1403
- "wit-bindgen",
1404
- ]
1405
-
1406
1390
  [[package]]
1407
1391
  name = "webpki-root-certs"
1408
- version = "1.0.7"
1392
+ version = "1.0.8"
1409
1393
  source = "registry+https://github.com/rust-lang/crates.io-index"
1410
- checksum = "f31141ce3fc3e300ae89b78c0dd67f9708061d1d2eda54b8209346fd6be9a92c"
1394
+ checksum = "0d46a5a140e6f7afeccd8eae97eff335163939eac8b929834875168b29b3d267"
1411
1395
  dependencies = [
1412
1396
  "rustls-pki-types",
1413
1397
  ]
@@ -1478,12 +1462,6 @@ dependencies = [
1478
1462
  "windows-link",
1479
1463
  ]
1480
1464
 
1481
- [[package]]
1482
- name = "wit-bindgen"
1483
- version = "0.46.0"
1484
- source = "registry+https://github.com/rust-lang/crates.io-index"
1485
- checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59"
1486
-
1487
1465
  [[package]]
1488
1466
  name = "wreq"
1489
1467
  version = "6.0.0-rc.29"
@@ -1559,7 +1537,7 @@ dependencies = [
1559
1537
 
1560
1538
  [[package]]
1561
1539
  name = "wreq-ruby"
1562
- version = "1.2.2"
1540
+ version = "1.2.3"
1563
1541
  dependencies = [
1564
1542
  "arc-swap",
1565
1543
  "bytes",
@@ -1580,9 +1558,9 @@ dependencies = [
1580
1558
 
1581
1559
  [[package]]
1582
1560
  name = "wreq-util"
1583
- version = "3.0.0-rc.12"
1561
+ version = "3.0.0-rc.14"
1584
1562
  source = "registry+https://github.com/rust-lang/crates.io-index"
1585
- checksum = "baa5d2ab72139256916ca352a3d05c53d74e1dd360052eb5ba7691033c417c65"
1563
+ checksum = "1d8d73c75be86fbde675988dbe5cb15f02567025c13f6ffab910361ad1ba6c89"
1586
1564
  dependencies = [
1587
1565
  "brotli",
1588
1566
  "flate2",
data/Cargo.toml CHANGED
@@ -6,7 +6,7 @@ homepage = "https://github.com/SearchApi/wreq-ruby"
6
6
  repository = "https://github.com/SearchApi/wreq-ruby"
7
7
  edition = "2024"
8
8
  rust-version = "1.85"
9
- version = "1.2.2"
9
+ version = "1.2.3"
10
10
 
11
11
  [lib]
12
12
  crate-type = ["cdylib"]
data/Gemfile CHANGED
@@ -8,6 +8,7 @@ group :development, :test do
8
8
  gem "rb_sys", "~> 0.9.110" # for Makefile generation in extconf.rb
9
9
  gem "rake-compiler", "~> 1.2.9" # to build a debug build
10
10
  gem "minitest", "~> 6.0" # test library
11
+ gem "minitest-retry", "~> 0.3", require: false # retry flaky network tests
11
12
  gem "activesupport", "~> 8.0.1" # testing support
12
13
  gem "standard", "~> 1.52" # linter with pre-specified rules
13
14
  gem "redcarpet", "~> 3.6" # for documentation markdown parsing
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # wreq-ruby
2
2
 
3
3
  [![CI](https://github.com/SearchApi/wreq-ruby/actions/workflows/ci.yml/badge.svg)](https://github.com/SearchApi/wreq-ruby/actions/workflows/ci.yml)
4
+ ![GitHub License](https://img.shields.io/github/license/SearchApi/wreq-ruby)
4
5
  [![Gem Version](https://badge.fury.io/rb/wreq.svg)](https://rubygems.org/gems/wreq)
5
6
 
6
7
  An easy and powerful Ruby HTTP client with advanced browser fingerprinting that accurately emulates **Chrome**, **Edge**, **Firefox**, **Safari**, **Opera**, and **OkHttp**, with precise **TLS/HTTP2** signatures, and powered by [wreq](https://github.com/0x676e67/wreq).
@@ -31,8 +32,10 @@ gem "wreq"
31
32
  ```
32
33
 
33
34
  Pre-compiled native gems are available for:
35
+
34
36
  - Linux (x86_64, aarch64)
35
37
  - macOS (arm64)
38
+ - Windows (x86_64)
36
39
 
37
40
  ## Example
38
41
 
@@ -88,11 +91,11 @@ Most browser device models share identical TLS and HTTP/2 configurations, differ
88
91
 
89
92
  | **Browser** | **Versions** |
90
93
  | ----------- | ------------ |
91
- | **Chrome** | `Chrome100`, `Chrome101`, `Chrome104`, `Chrome105`, `Chrome106`, `Chrome107`, `Chrome108`, `Chrome109`, `Chrome110`, `Chrome114`, `Chrome116`, `Chrome117`, `Chrome118`, `Chrome119`, `Chrome120`, `Chrome123`, `Chrome124`, `Chrome126`, `Chrome127`, `Chrome128`, `Chrome129`, `Chrome130`, `Chrome131`, `Chrome132`, `Chrome133`, `Chrome134`, `Chrome135`, `Chrome136`, `Chrome137`, `Chrome138`, `Chrome139`, `Chrome140`, `Chrome141`, `Chrome142`, `Chrome143`, `Chrome144`, `Chrome145`, `Chrome146`, `Chrome147` |
92
- | **Edge** | `Edge101`, `Edge122`, `Edge127`, `Edge131`, `Edge134`, `Edge135`, `Edge136`, `Edge137`, `Edge138`, `Edge139`, `Edge140`, `Edge141`, `Edge142`, `Edge143`, `Edge144`, `Edge145`, `Edge146`, `Edge147` |
93
- | **Firefox** | `Firefox109`, `Firefox117`, `Firefox128`, `Firefox133`, `Firefox135`, `FirefoxPrivate135`, `FirefoxAndroid135`, `Firefox136`, `FirefoxPrivate136`, `Firefox139`, `Firefox142`, `Firefox143`, `Firefox144`, `Firefox145`, `Firefox146`, `Firefox147`, `Firefox148`, `Firefox149` |
94
+ | **Chrome** | `Chrome100`, `Chrome101`, `Chrome104`, `Chrome105`, `Chrome106`, `Chrome107`, `Chrome108`, `Chrome109`, `Chrome110`, `Chrome114`, `Chrome116`, `Chrome117`, `Chrome118`, `Chrome119`, `Chrome120`, `Chrome123`, `Chrome124`, `Chrome126`, `Chrome127`, `Chrome128`, `Chrome129`, `Chrome130`, `Chrome131`, `Chrome132`, `Chrome133`, `Chrome134`, `Chrome135`, `Chrome136`, `Chrome137`, `Chrome138`, `Chrome139`, `Chrome140`, `Chrome141`, `Chrome142`, `Chrome143`, `Chrome144`, `Chrome145`, `Chrome146`, `Chrome147`, `Chrome148`, `Chrome149` |
95
+ | **Edge** | `Edge101`, `Edge122`, `Edge127`, `Edge131`, `Edge134`, `Edge135`, `Edge136`, `Edge137`, `Edge138`, `Edge139`, `Edge140`, `Edge141`, `Edge142`, `Edge143`, `Edge144`, `Edge145`, `Edge146`, `Edge147`, `Edge148` |
96
+ | **Firefox** | `Firefox109`, `Firefox117`, `Firefox128`, `Firefox133`, `Firefox135`, `FirefoxPrivate135`, `FirefoxAndroid135`, `Firefox136`, `FirefoxPrivate136`, `Firefox139`, `Firefox142`, `Firefox143`, `Firefox144`, `Firefox145`, `Firefox146`, `Firefox147`, `Firefox148`, `Firefox149`, `Firefox150`, `Firefox151` |
94
97
  | **Safari** | `Safari15_3`, `Safari15_5`, `Safari15_6_1`, `Safari16`, `Safari16_5`, `Safari17_0`, `Safari17_2_1`, `Safari17_4_1`, `Safari17_5`, `Safari17_6`, `Safari18`, `Safari18_2`, `Safari18_3`, `Safari18_3_1`, `Safari18_5`, `Safari26`, `Safari26_1`, `Safari26_2`, `SafariIos16_5`, `SafariIos17_2`, `SafariIos17_4_1`, `SafariIos18_1_1`, `SafariIos26`, `SafariIos26_2`, `SafariIPad18`, `SafariIPad26`, `SafariIpad26_2` |
95
- | **OkHttp** | `OkHttp3_9`, `OkHttp3_11`, `OkHttp3_13`, `OkHttp3_14`, `OkHttp4_9`, `OkHttp4_10`, `OkHttp4_12`, `OkHttp5` |
98
+ | **OkHttp** | `Opera116`, `Opera117`, `Opera118`, `Opera119`, `Opera120`, `Opera121`, `Opera122`, `Opera123`, `Opera124`, `Opera125`, `Opera126`, `Opera127`, `Opera128`, `Opera129`, `Opera130` |
96
99
  | **Opera** | `Opera116`, `Opera117`, `Opera118`, `Opera119` |
97
100
 
98
101
  </details>
data/build.rs CHANGED
@@ -5,5 +5,12 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
5
5
  // This is not a requirement, but it is a convenient if you want to use
6
6
  // `cargo test`, etc.
7
7
  let _ = rb_sys_env::activate()?;
8
+
9
+ if std::env::var("CARGO_CFG_TARGET_OS").as_deref() == Ok("windows")
10
+ && std::env::var("CARGO_CFG_TARGET_ENV").as_deref() == Ok("gnu")
11
+ {
12
+ println!("cargo:rustc-link-arg-cdylib=-Wl,--wrap=Sleep");
13
+ }
14
+
8
15
  Ok(())
9
16
  }
@@ -0,0 +1,70 @@
1
+ # Windows GNU Tokio multi-thread crash
2
+
3
+ ## Summary
4
+
5
+ On RubyInstaller GNU/UCRT, Tokio's multi-thread runtime could crash when the
6
+ native extension was loaded by Ruby. The issue was not Tokio's scheduler logic
7
+ itself. It came from Windows symbol resolution while linking the Ruby extension.
8
+
9
+ ## Root cause
10
+
11
+ RubyInstaller GNU/UCRT exports a Ruby-aware `Sleep` symbol from
12
+ `x64-ucrt-ruby400.dll`.
13
+
14
+ When the extension is linked with GNU ld, an unqualified `Sleep` reference can
15
+ bind to Ruby's `Sleep` instead of `KERNEL32!Sleep`. Tokio's multi-thread runtime
16
+ creates native worker threads that are not Ruby-managed threads. If one of those
17
+ threads calls Ruby's `Sleep`, Ruby expects Ruby thread-local state to exist, but
18
+ that TLS slot is empty on the Tokio worker thread. This can crash with an access
19
+ violation or Ruby VM bug report.
20
+
21
+ The local investigation found the fault inside:
22
+
23
+ ```text
24
+ x64-ucrt-ruby400.dll!Sleep + 0x40
25
+ ```
26
+
27
+ The import table also showed the bad binding:
28
+
29
+ ```text
30
+ DLL Name: x64-ucrt-ruby400.dll
31
+ Sleep
32
+ ```
33
+
34
+ ## Fix
35
+
36
+ For `x86_64-pc-windows-gnu`, the build now wraps `Sleep` at link time:
37
+
38
+ ```text
39
+ -Wl,--wrap=Sleep
40
+ ```
41
+
42
+ The wrapper lives in `src/arch.rs` and forwards calls to `KERNEL32!SleepEx`.
43
+ This keeps Tokio's worker threads on the real Windows API path while preserving
44
+ Tokio's multi-thread runtime and Ruby GVL release behavior.
45
+
46
+ After the fix, the import table shows:
47
+
48
+ ```text
49
+ DLL Name: KERNEL32.dll
50
+ Sleep
51
+ SleepEx
52
+ ```
53
+
54
+ ## Notes
55
+
56
+ `windows-sys` raw-dylib was also tested. It is not enough on its own because the
57
+ problematic `Sleep` reference can come from Rust std, MinGW, or pthread-related
58
+ linking paths, not only from `windows-sys`.
59
+
60
+ Verified with:
61
+
62
+ ```powershell
63
+ .\script\build_windows_gnu.ps1 -SkipBundleInstall -SkipToolInstall -RunTests
64
+ ```
65
+
66
+ Result:
67
+
68
+ ```text
69
+ 160 runs, 775 assertions, 0 failures, 0 errors
70
+ ```
@@ -57,6 +57,7 @@ module Wreq
57
57
  Chrome146 = nil
58
58
  Chrome147 = nil
59
59
  Chrome148 = nil
60
+ Chrome149 = nil
60
61
 
61
62
  Edge101 = nil
62
63
  Edge122 = nil