lz4_flex 1.0.0 → 1.1.1

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: '0759a785da9bfce484174c96f8f3319e72c16b90208af9fa3ea40f50cec9c599'
4
- data.tar.gz: 8e2fb1b9b4571c27977ea87ce74a868e136aa89e735163e92230bb16b9f63f51
3
+ metadata.gz: 5ac7566387aa94aa20b81fd38599febb528a9e2e19125562a93a0e579eada41f
4
+ data.tar.gz: 51902e5dd93fa3582a1fd22691ead062a9f8da7683125ea89d77a167807a3c3a
5
5
  SHA512:
6
- metadata.gz: eb5754e96a032b38cae64f21d966030d732efb5d6cd7b8d0396b809581b13ed634d4cb08b2478ee04b4d1ab054c3d8b9a6dd6d0455cd67db76ec85c7f65bada3
7
- data.tar.gz: 70a5bbba2ce392e25bff7c89e19c34d68d8ded22cde978cda5a6fd77e135a0b7cbeea02c4059cdee079abc94c18f172eb27b4f02b7468a6fbe39ac175b909216
6
+ metadata.gz: 7df2be2da98e4c52b51c60e0eef0c8fff662ece612cd320f66b2d72b105aa690d7ac3d82b454a25f7cd70a01cd3786fcf17d694a13181cea2edd9cfaf6f4f9aa
7
+ data.tar.gz: 4890a99e04d5017e2059efaf2e7d3bcec2311af0b335f316a8aa41231c7c13527fefcb7a79c1aab34a505682480aa188e390c216fa1d7a0afaedc8e0814894f3
data/Cargo.lock CHANGED
@@ -4,9 +4,9 @@ version = 4
4
4
 
5
5
  [[package]]
6
6
  name = "aho-corasick"
7
- version = "1.1.3"
7
+ version = "1.1.4"
8
8
  source = "registry+https://github.com/rust-lang/crates.io-index"
9
- checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
9
+ checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301"
10
10
  dependencies = [
11
11
  "memchr",
12
12
  ]
@@ -20,12 +20,6 @@ dependencies = [
20
20
  "critical-section",
21
21
  ]
22
22
 
23
- [[package]]
24
- name = "autocfg"
25
- version = "1.4.0"
26
- source = "registry+https://github.com/rust-lang/crates.io-index"
27
- checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
28
-
29
23
  [[package]]
30
24
  name = "bindgen"
31
25
  version = "0.69.5"
@@ -48,9 +42,9 @@ dependencies = [
48
42
 
49
43
  [[package]]
50
44
  name = "bitflags"
51
- version = "2.7.0"
45
+ version = "2.10.0"
52
46
  source = "registry+https://github.com/rust-lang/crates.io-index"
53
- checksum = "1be3f42a67d6d345ecd59f675f3f012d6974981560836e938c22b424b85ce1be"
47
+ checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3"
54
48
 
55
49
  [[package]]
56
50
  name = "byteorder"
@@ -69,9 +63,9 @@ dependencies = [
69
63
 
70
64
  [[package]]
71
65
  name = "cfg-if"
72
- version = "1.0.0"
66
+ version = "1.0.4"
73
67
  source = "registry+https://github.com/rust-lang/crates.io-index"
74
- checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
68
+ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
75
69
 
76
70
  [[package]]
77
71
  name = "clang-sys"
@@ -86,9 +80,12 @@ dependencies = [
86
80
 
87
81
  [[package]]
88
82
  name = "cobs"
89
- version = "0.2.3"
83
+ version = "0.3.0"
90
84
  source = "registry+https://github.com/rust-lang/crates.io-index"
91
- checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15"
85
+ checksum = "0fa961b519f0b462e3a3b4a34b64d119eeaca1d59af726fe450bbba07a9fc0a1"
86
+ dependencies = [
87
+ "thiserror",
88
+ ]
92
89
 
93
90
  [[package]]
94
91
  name = "critical-section"
@@ -98,15 +95,15 @@ checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b"
98
95
 
99
96
  [[package]]
100
97
  name = "either"
101
- version = "1.13.0"
98
+ version = "1.15.0"
102
99
  source = "registry+https://github.com/rust-lang/crates.io-index"
103
- checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
100
+ checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
104
101
 
105
102
  [[package]]
106
103
  name = "glob"
107
- version = "0.3.2"
104
+ version = "0.3.3"
108
105
  source = "registry+https://github.com/rust-lang/crates.io-index"
109
- checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2"
106
+ checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280"
110
107
 
111
108
  [[package]]
112
109
  name = "hash32"
@@ -154,35 +151,34 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
154
151
 
155
152
  [[package]]
156
153
  name = "libc"
157
- version = "0.2.169"
154
+ version = "0.2.180"
158
155
  source = "registry+https://github.com/rust-lang/crates.io-index"
159
- checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
156
+ checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc"
160
157
 
161
158
  [[package]]
162
159
  name = "libloading"
163
- version = "0.8.6"
160
+ version = "0.8.9"
164
161
  source = "registry+https://github.com/rust-lang/crates.io-index"
165
- checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34"
162
+ checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55"
166
163
  dependencies = [
167
164
  "cfg-if",
168
- "windows-targets",
165
+ "windows-link",
169
166
  ]
170
167
 
171
168
  [[package]]
172
169
  name = "lock_api"
173
- version = "0.4.12"
170
+ version = "0.4.14"
174
171
  source = "registry+https://github.com/rust-lang/crates.io-index"
175
- checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17"
172
+ checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965"
176
173
  dependencies = [
177
- "autocfg",
178
174
  "scopeguard",
179
175
  ]
180
176
 
181
177
  [[package]]
182
178
  name = "lz4_flex"
183
- version = "0.11.3"
179
+ version = "0.12.0"
184
180
  source = "registry+https://github.com/rust-lang/crates.io-index"
185
- checksum = "75761162ae2b0e580d7e7c390558127e5f01b4194debd6221fd8c207fc80e3f5"
181
+ checksum = "ab6473172471198271ff72e9379150e9dfd70d8e533e0752a27e515b48dd375e"
186
182
  dependencies = [
187
183
  "twox-hash",
188
184
  ]
@@ -195,28 +191,28 @@ dependencies = [
195
191
  "magnus",
196
192
  "postcard",
197
193
  "rb-sys",
198
- "rb-sys-env 0.2.1",
194
+ "rb-sys-env",
199
195
  "serde",
200
196
  "static_assertions",
201
197
  ]
202
198
 
203
199
  [[package]]
204
200
  name = "magnus"
205
- version = "0.7.1"
201
+ version = "0.8.2"
206
202
  source = "registry+https://github.com/rust-lang/crates.io-index"
207
- checksum = "3d87ae53030f3a22e83879e666cb94e58a7bdf31706878a0ba48752994146dab"
203
+ checksum = "3b36a5b126bbe97eb0d02d07acfeb327036c6319fd816139a49824a83b7f9012"
208
204
  dependencies = [
209
205
  "magnus-macros",
210
206
  "rb-sys",
211
- "rb-sys-env 0.1.2",
207
+ "rb-sys-env",
212
208
  "seq-macro",
213
209
  ]
214
210
 
215
211
  [[package]]
216
212
  name = "magnus-macros"
217
- version = "0.6.0"
213
+ version = "0.8.0"
218
214
  source = "registry+https://github.com/rust-lang/crates.io-index"
219
- checksum = "5968c820e2960565f647819f5928a42d6e874551cab9d88d75e3e0660d7f71e3"
215
+ checksum = "47607461fd8e1513cb4f2076c197d8092d921a1ea75bd08af97398f593751892"
220
216
  dependencies = [
221
217
  "proc-macro2",
222
218
  "quote",
@@ -225,9 +221,9 @@ dependencies = [
225
221
 
226
222
  [[package]]
227
223
  name = "memchr"
228
- version = "2.7.4"
224
+ version = "2.7.6"
229
225
  source = "registry+https://github.com/rust-lang/crates.io-index"
230
- checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
226
+ checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273"
231
227
 
232
228
  [[package]]
233
229
  name = "minimal-lexical"
@@ -247,9 +243,9 @@ dependencies = [
247
243
 
248
244
  [[package]]
249
245
  name = "postcard"
250
- version = "1.1.1"
246
+ version = "1.1.3"
251
247
  source = "registry+https://github.com/rust-lang/crates.io-index"
252
- checksum = "170a2601f67cc9dba8edd8c4870b15f71a6a2dc196daec8c83f72b59dff628a8"
248
+ checksum = "6764c3b5dd454e283a30e6dfe78e9b31096d9e32036b5d1eaac7a6119ccb9a24"
253
249
  dependencies = [
254
250
  "cobs",
255
251
  "heapless",
@@ -258,36 +254,36 @@ dependencies = [
258
254
 
259
255
  [[package]]
260
256
  name = "proc-macro2"
261
- version = "1.0.93"
257
+ version = "1.0.105"
262
258
  source = "registry+https://github.com/rust-lang/crates.io-index"
263
- checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99"
259
+ checksum = "535d180e0ecab6268a3e718bb9fd44db66bbbc256257165fc699dadf70d16fe7"
264
260
  dependencies = [
265
261
  "unicode-ident",
266
262
  ]
267
263
 
268
264
  [[package]]
269
265
  name = "quote"
270
- version = "1.0.38"
266
+ version = "1.0.43"
271
267
  source = "registry+https://github.com/rust-lang/crates.io-index"
272
- checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
268
+ checksum = "dc74d9a594b72ae6656596548f56f667211f8a97b3d4c3d467150794690dc40a"
273
269
  dependencies = [
274
270
  "proc-macro2",
275
271
  ]
276
272
 
277
273
  [[package]]
278
274
  name = "rb-sys"
279
- version = "0.9.107"
275
+ version = "0.9.124"
280
276
  source = "registry+https://github.com/rust-lang/crates.io-index"
281
- checksum = "56aaf81d9efc195606456e91896297ee5ab2002381539f8ed1ba6b4f2e467f3b"
277
+ checksum = "c85c4188462601e2aa1469def389c17228566f82ea72f137ed096f21591bc489"
282
278
  dependencies = [
283
279
  "rb-sys-build",
284
280
  ]
285
281
 
286
282
  [[package]]
287
283
  name = "rb-sys-build"
288
- version = "0.9.107"
284
+ version = "0.9.124"
289
285
  source = "registry+https://github.com/rust-lang/crates.io-index"
290
- checksum = "035b513baded6df2b90a8559efb1973c47ba42e16c21c5f0863dd2aa4dbd6abe"
286
+ checksum = "568068db4102230882e6d4ae8de6632e224ca75fe5970f6e026a04e91ed635d3"
291
287
  dependencies = [
292
288
  "bindgen",
293
289
  "lazy_static",
@@ -300,21 +296,15 @@ dependencies = [
300
296
 
301
297
  [[package]]
302
298
  name = "rb-sys-env"
303
- version = "0.1.2"
304
- source = "registry+https://github.com/rust-lang/crates.io-index"
305
- checksum = "a35802679f07360454b418a5d1735c89716bde01d35b1560fc953c1415a0b3bb"
306
-
307
- [[package]]
308
- name = "rb-sys-env"
309
- version = "0.2.1"
299
+ version = "0.2.3"
310
300
  source = "registry+https://github.com/rust-lang/crates.io-index"
311
- checksum = "5b0412803f8fea126e8f500d8eb6d5394a983517888a790254f4190e9b16a7a5"
301
+ checksum = "cca7ad6a7e21e72151d56fe2495a259b5670e204c3adac41ee7ef676ea08117a"
312
302
 
313
303
  [[package]]
314
304
  name = "regex"
315
- version = "1.11.1"
305
+ version = "1.12.2"
316
306
  source = "registry+https://github.com/rust-lang/crates.io-index"
317
- checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
307
+ checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4"
318
308
  dependencies = [
319
309
  "aho-corasick",
320
310
  "memchr",
@@ -324,9 +314,9 @@ dependencies = [
324
314
 
325
315
  [[package]]
326
316
  name = "regex-automata"
327
- version = "0.4.9"
317
+ version = "0.4.13"
328
318
  source = "registry+https://github.com/rust-lang/crates.io-index"
329
- checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
319
+ checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c"
330
320
  dependencies = [
331
321
  "aho-corasick",
332
322
  "memchr",
@@ -335,9 +325,9 @@ dependencies = [
335
325
 
336
326
  [[package]]
337
327
  name = "regex-syntax"
338
- version = "0.8.5"
328
+ version = "0.8.8"
339
329
  source = "registry+https://github.com/rust-lang/crates.io-index"
340
- checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
330
+ checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58"
341
331
 
342
332
  [[package]]
343
333
  name = "rustc-hash"
@@ -362,30 +352,40 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
362
352
 
363
353
  [[package]]
364
354
  name = "semver"
365
- version = "1.0.24"
355
+ version = "1.0.27"
366
356
  source = "registry+https://github.com/rust-lang/crates.io-index"
367
- checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba"
357
+ checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2"
368
358
 
369
359
  [[package]]
370
360
  name = "seq-macro"
371
- version = "0.3.5"
361
+ version = "0.3.6"
372
362
  source = "registry+https://github.com/rust-lang/crates.io-index"
373
- checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4"
363
+ checksum = "1bc711410fbe7399f390ca1c3b60ad0f53f80e95c5eb935e52268a0e2cd49acc"
374
364
 
375
365
  [[package]]
376
366
  name = "serde"
377
- version = "1.0.217"
367
+ version = "1.0.228"
378
368
  source = "registry+https://github.com/rust-lang/crates.io-index"
379
- checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70"
369
+ checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
370
+ dependencies = [
371
+ "serde_core",
372
+ "serde_derive",
373
+ ]
374
+
375
+ [[package]]
376
+ name = "serde_core"
377
+ version = "1.0.228"
378
+ source = "registry+https://github.com/rust-lang/crates.io-index"
379
+ checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
380
380
  dependencies = [
381
381
  "serde_derive",
382
382
  ]
383
383
 
384
384
  [[package]]
385
385
  name = "serde_derive"
386
- version = "1.0.217"
386
+ version = "1.0.228"
387
387
  source = "registry+https://github.com/rust-lang/crates.io-index"
388
- checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0"
388
+ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
389
389
  dependencies = [
390
390
  "proc-macro2",
391
391
  "quote",
@@ -394,9 +394,9 @@ dependencies = [
394
394
 
395
395
  [[package]]
396
396
  name = "shell-words"
397
- version = "1.1.0"
397
+ version = "1.1.1"
398
398
  source = "registry+https://github.com/rust-lang/crates.io-index"
399
- checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde"
399
+ checksum = "dc6fe69c597f9c37bfeeeeeb33da3530379845f10be461a66d16d03eca2ded77"
400
400
 
401
401
  [[package]]
402
402
  name = "shlex"
@@ -415,9 +415,9 @@ dependencies = [
415
415
 
416
416
  [[package]]
417
417
  name = "stable_deref_trait"
418
- version = "1.2.0"
418
+ version = "1.2.1"
419
419
  source = "registry+https://github.com/rust-lang/crates.io-index"
420
- checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
420
+ checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
421
421
 
422
422
  [[package]]
423
423
  name = "static_assertions"
@@ -427,9 +427,9 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
427
427
 
428
428
  [[package]]
429
429
  name = "syn"
430
- version = "2.0.96"
430
+ version = "2.0.114"
431
431
  source = "registry+https://github.com/rust-lang/crates.io-index"
432
- checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80"
432
+ checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a"
433
433
  dependencies = [
434
434
  "proc-macro2",
435
435
  "quote",
@@ -437,81 +437,39 @@ dependencies = [
437
437
  ]
438
438
 
439
439
  [[package]]
440
- name = "twox-hash"
441
- version = "1.6.3"
440
+ name = "thiserror"
441
+ version = "2.0.18"
442
442
  source = "registry+https://github.com/rust-lang/crates.io-index"
443
- checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675"
443
+ checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4"
444
444
  dependencies = [
445
- "cfg-if",
446
- "static_assertions",
445
+ "thiserror-impl",
447
446
  ]
448
447
 
449
448
  [[package]]
450
- name = "unicode-ident"
451
- version = "1.0.14"
449
+ name = "thiserror-impl"
450
+ version = "2.0.18"
452
451
  source = "registry+https://github.com/rust-lang/crates.io-index"
453
- checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
454
-
455
- [[package]]
456
- name = "windows-targets"
457
- version = "0.52.6"
458
- source = "registry+https://github.com/rust-lang/crates.io-index"
459
- checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
452
+ checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5"
460
453
  dependencies = [
461
- "windows_aarch64_gnullvm",
462
- "windows_aarch64_msvc",
463
- "windows_i686_gnu",
464
- "windows_i686_gnullvm",
465
- "windows_i686_msvc",
466
- "windows_x86_64_gnu",
467
- "windows_x86_64_gnullvm",
468
- "windows_x86_64_msvc",
454
+ "proc-macro2",
455
+ "quote",
456
+ "syn",
469
457
  ]
470
458
 
471
459
  [[package]]
472
- name = "windows_aarch64_gnullvm"
473
- version = "0.52.6"
474
- source = "registry+https://github.com/rust-lang/crates.io-index"
475
- checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
476
-
477
- [[package]]
478
- name = "windows_aarch64_msvc"
479
- version = "0.52.6"
480
- source = "registry+https://github.com/rust-lang/crates.io-index"
481
- checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
482
-
483
- [[package]]
484
- name = "windows_i686_gnu"
485
- version = "0.52.6"
486
- source = "registry+https://github.com/rust-lang/crates.io-index"
487
- checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
488
-
489
- [[package]]
490
- name = "windows_i686_gnullvm"
491
- version = "0.52.6"
492
- source = "registry+https://github.com/rust-lang/crates.io-index"
493
- checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
494
-
495
- [[package]]
496
- name = "windows_i686_msvc"
497
- version = "0.52.6"
498
- source = "registry+https://github.com/rust-lang/crates.io-index"
499
- checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
500
-
501
- [[package]]
502
- name = "windows_x86_64_gnu"
503
- version = "0.52.6"
460
+ name = "twox-hash"
461
+ version = "2.1.2"
504
462
  source = "registry+https://github.com/rust-lang/crates.io-index"
505
- checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
463
+ checksum = "9ea3136b675547379c4bd395ca6b938e5ad3c3d20fad76e7fe85f9e0d011419c"
506
464
 
507
465
  [[package]]
508
- name = "windows_x86_64_gnullvm"
509
- version = "0.52.6"
466
+ name = "unicode-ident"
467
+ version = "1.0.22"
510
468
  source = "registry+https://github.com/rust-lang/crates.io-index"
511
- checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
469
+ checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5"
512
470
 
513
471
  [[package]]
514
- name = "windows_x86_64_msvc"
515
- version = "0.52.6"
472
+ name = "windows-link"
473
+ version = "0.2.1"
516
474
  source = "registry+https://github.com/rust-lang/crates.io-index"
517
- checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
475
+ checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
@@ -5,17 +5,18 @@ edition = "2021"
5
5
  authors = ["Ian Ker-Seymer <ian.kerseymer@shopify.com>"]
6
6
  license = "MIT"
7
7
  publish = false
8
+ rust-version = "1.81.0"
8
9
 
9
10
  [lib]
10
11
  crate-type = ["cdylib"]
11
12
 
12
13
  [dependencies]
13
- lz4_flex = { version = "0.11.3", default-features = true }
14
- magnus = { version = "0.7.1", features = ["rb-sys"] }
15
- postcard = "1.0.10"
16
- rb-sys = { version = "0.9.101", features = ["stable-api-compiled-fallback"] }
17
- serde = { version = "1.0.210", features = ["derive"] }
14
+ lz4_flex = { version = "0.12.0", default-features = true }
15
+ magnus = { version = "0.8.2", features = ["rb-sys"] }
16
+ postcard = "1.1.3"
17
+ rb-sys = { version = "0.9.124", features = ["stable-api-compiled-fallback"] }
18
+ serde = { version = "1.0.219", features = ["derive"] }
18
19
  static_assertions = "1.1.0"
19
20
 
20
21
  [build-dependencies]
21
- rb-sys-env = "*"
22
+ rb-sys-env = "0.2.3"
@@ -3,14 +3,13 @@ use std::{cell::Cell, ffi::c_void, marker::PhantomData, mem::MaybeUninit, ptr::n
3
3
 
4
4
  use magnus::{
5
5
  encoding::{EncodingCapable, Index},
6
- exception::type_error,
7
6
  rb_sys::AsRawValue,
8
7
  value::ReprValue,
9
8
  Error, RString, Ruby, TryConvert, Value,
10
9
  };
11
10
  use rb_sys::{
12
11
  rb_gc_guard, rb_str_locktmp, rb_str_modify_expand, rb_str_set_len, rb_str_unlocktmp,
13
- rb_thread_call_without_gvl, RSTRING_PTR,
12
+ rb_thread_call_without_gvl, stable_api, StableApiDefinition, RSTRING_PTR,
14
13
  };
15
14
 
16
15
  use crate::base_error_class;
@@ -72,42 +71,61 @@ impl TryFrom<RString> for Encoding {
72
71
  }
73
72
 
74
73
  #[derive(Debug)]
75
- pub struct LockedRString<'a>(pub(crate) RString, PhantomData<&'a ()>);
74
+ pub struct LockedRString<'a> {
75
+ string: RString,
76
+ locked: bool,
77
+ _phantom: PhantomData<&'a ()>,
78
+ }
76
79
 
77
80
  impl<'a> LockedRString<'a> {
78
81
  pub(crate) fn new(string: RString) -> Self {
79
- unsafe { rb_str_locktmp(string.as_raw()) };
82
+ let api = stable_api::get_default();
83
+ let is_frozen = unsafe { api.frozen_p(string.as_raw()) };
84
+
85
+ if !is_frozen {
86
+ unsafe { rb_str_locktmp(string.as_raw()) };
87
+ }
80
88
 
81
- Self(string, PhantomData)
89
+ Self {
90
+ string,
91
+ locked: !is_frozen,
92
+ _phantom: PhantomData,
93
+ }
82
94
  }
83
95
 
84
96
  pub(crate) fn as_slice(&self) -> &'a [u8] {
85
97
  unsafe {
86
- std::slice::from_raw_parts(RSTRING_PTR(self.0.as_raw()) as *const u8, self.0.len())
98
+ std::slice::from_raw_parts(
99
+ RSTRING_PTR(self.string.as_raw()) as *const u8,
100
+ self.string.len(),
101
+ )
87
102
  }
88
103
  }
89
104
 
90
105
  pub(crate) fn len(&self) -> usize {
91
- self.0.len()
106
+ self.string.len()
92
107
  }
93
108
 
94
109
  pub(crate) fn encoding(&self) -> Result<Encoding, Error> {
95
- Encoding::try_from(self.0)
110
+ Encoding::try_from(self.string)
96
111
  }
97
112
  }
98
113
 
99
114
  impl Drop for LockedRString<'_> {
100
115
  fn drop(&mut self) {
101
- unsafe { rb_str_unlocktmp(self.0.as_raw()) };
116
+ if self.locked {
117
+ unsafe { rb_str_unlocktmp(self.string.as_raw()) };
118
+ }
102
119
  // Keep the value alive while we hold this RString
103
- let _ = rb_gc_guard!(self.0.as_raw());
120
+ let _ = rb_gc_guard!(self.string.as_raw());
104
121
  }
105
122
  }
106
123
 
107
124
  impl TryConvert for LockedRString<'_> {
108
125
  fn try_convert(val: Value) -> Result<Self, magnus::Error> {
126
+ let ruby = unsafe { Ruby::get_unchecked() };
109
127
  let rstring: RString = RString::from_value(val).ok_or(magnus::Error::new(
110
- type_error(),
128
+ ruby.exception_type_error(),
111
129
  format!("expected String, got {}", val.class()),
112
130
  ))?;
113
131
  Ok(Self::new(rstring))
@@ -125,7 +143,8 @@ pub struct RStringMut<'a> {
125
143
 
126
144
  impl<'a> RStringMut<'a> {
127
145
  pub(crate) fn buf_new(size: usize) -> Self {
128
- let string = RString::buf_new(size);
146
+ let ruby = unsafe { Ruby::get_unchecked() };
147
+ let string = ruby.str_buf_new(size as _);
129
148
  Self {
130
149
  inner: string,
131
150
  capa: Cell::new(size),
@@ -6,7 +6,6 @@ pub(crate) use header::*;
6
6
  pub(crate) use helpers::*;
7
7
 
8
8
  use magnus::{
9
- exception::standard_error,
10
9
  function,
11
10
  prelude::*,
12
11
  value::{InnerValue, Lazy},
@@ -19,7 +18,7 @@ pub(crate) fn base_error_class() -> ExceptionClass {
19
18
  static BASE_ERROR_CLASS: Lazy<ExceptionClass> = Lazy::new(|ruby| {
20
19
  MODULE_ROOT
21
20
  .get_inner_with(ruby)
22
- .define_error("Error", standard_error())
21
+ .define_error("Error", ruby.exception_standard_error())
23
22
  .unwrap()
24
23
  });
25
24
  unsafe { BASE_ERROR_CLASS.get_inner_with(&Ruby::get_unchecked()) }
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Lz4Flex
5
- VERSION = "1.0.0"
5
+ VERSION = "1.1.1"
6
6
  end
metadata CHANGED
@@ -1,28 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lz4_flex
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify Engineering
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-01-11 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rb_sys
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
- - - ">="
16
+ - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: '0'
18
+ version: 0.9.124
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
- - - ">="
23
+ - - "~>"
24
24
  - !ruby/object:Gem::Version
25
- version: '0'
25
+ version: 0.9.124
26
26
  description: A modern LZ4 compression library for Ruby, leveraging the power of the
27
27
  [`lz4_flex`](https://github.com/PSeitz/lz4_flex) Rust crate. This library provides
28
28
  a pure Rust implementation of the LZ4 algorithm, ensuring high performance and safety.
@@ -68,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
70
  requirements: []
71
- rubygems_version: 3.6.2
71
+ rubygems_version: 3.6.7
72
72
  specification_version: 4
73
73
  summary: A modern LZ4 compression library for Ruby, leveraging the `lz4_flex` Rust
74
74
  crate.