halton 0.2.1.3 → 0.2.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/halton/Cargo.lock +66 -232
- data/ext/halton/Cargo.toml +1 -1
- data/ext/halton/extconf.rb +4 -0
- data/ext/halton/src/lib.rs +12 -11
- data/lib/halton.rb +6 -1
- metadata +37 -9
- data/ext/halton/Rakefile +0 -159
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8115499e016e8c1c3ef1608ac90caed45b48ba7d34a722788b3ae4f550d35db5
|
4
|
+
data.tar.gz: c2e2f8af26707e3b486036c24b82b15df6421caaa03eb35f0cfdaa383dc5c649
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 021dbd5d00a5045f9a02c6b3f09560305468c0f360b16dbd3acb0829db8d848457c685864edbb8427fad1a7e7d3852b242d26dfcf33ddb95bc51dc8c1d90f076
|
7
|
+
data.tar.gz: a6ece029b0b98a9f4ac3f8e8c5dc4cf604d9a13d6d2e5d4de3cdf9376925c6a480ec437635f7b52340df09c57f1f767f65f7171c2a5052a137abd7499c42d843
|
data/ext/halton/Cargo.lock
CHANGED
@@ -4,54 +4,30 @@ version = 3
|
|
4
4
|
|
5
5
|
[[package]]
|
6
6
|
name = "aho-corasick"
|
7
|
-
version = "0.7.
|
7
|
+
version = "0.7.20"
|
8
8
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
9
|
-
checksum = "
|
9
|
+
checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac"
|
10
10
|
dependencies = [
|
11
11
|
"memchr",
|
12
12
|
]
|
13
13
|
|
14
|
-
[[package]]
|
15
|
-
name = "ansi_term"
|
16
|
-
version = "0.12.1"
|
17
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
18
|
-
checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
|
19
|
-
dependencies = [
|
20
|
-
"winapi",
|
21
|
-
]
|
22
|
-
|
23
|
-
[[package]]
|
24
|
-
name = "atty"
|
25
|
-
version = "0.2.14"
|
26
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
27
|
-
checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
|
28
|
-
dependencies = [
|
29
|
-
"hermit-abi",
|
30
|
-
"libc",
|
31
|
-
"winapi",
|
32
|
-
]
|
33
|
-
|
34
14
|
[[package]]
|
35
15
|
name = "bindgen"
|
36
|
-
version = "0.
|
16
|
+
version = "0.60.1"
|
37
17
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
38
|
-
checksum = "
|
18
|
+
checksum = "062dddbc1ba4aca46de6338e2bf87771414c335f7b2f2036e8f3e9befebf88e6"
|
39
19
|
dependencies = [
|
40
20
|
"bitflags",
|
41
21
|
"cexpr",
|
42
22
|
"clang-sys",
|
43
|
-
"clap",
|
44
|
-
"env_logger",
|
45
23
|
"lazy_static",
|
46
24
|
"lazycell",
|
47
|
-
"log",
|
48
25
|
"peeking_take_while",
|
49
26
|
"proc-macro2",
|
50
27
|
"quote",
|
51
28
|
"regex",
|
52
29
|
"rustc-hash",
|
53
30
|
"shlex",
|
54
|
-
"which",
|
55
31
|
]
|
56
32
|
|
57
33
|
[[package]]
|
@@ -77,90 +53,15 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
|
77
53
|
|
78
54
|
[[package]]
|
79
55
|
name = "clang-sys"
|
80
|
-
version = "1.
|
56
|
+
version = "1.4.0"
|
81
57
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
82
|
-
checksum = "
|
58
|
+
checksum = "fa2e27ae6ab525c3d369ded447057bca5438d86dc3a68f6faafb8269ba82ebf3"
|
83
59
|
dependencies = [
|
84
60
|
"glob",
|
85
61
|
"libc",
|
86
62
|
"libloading",
|
87
63
|
]
|
88
64
|
|
89
|
-
[[package]]
|
90
|
-
name = "clap"
|
91
|
-
version = "2.34.0"
|
92
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
93
|
-
checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c"
|
94
|
-
dependencies = [
|
95
|
-
"ansi_term",
|
96
|
-
"atty",
|
97
|
-
"bitflags",
|
98
|
-
"strsim 0.8.0",
|
99
|
-
"textwrap",
|
100
|
-
"unicode-width",
|
101
|
-
"vec_map",
|
102
|
-
]
|
103
|
-
|
104
|
-
[[package]]
|
105
|
-
name = "darling"
|
106
|
-
version = "0.13.1"
|
107
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
108
|
-
checksum = "d0d720b8683f8dd83c65155f0530560cba68cd2bf395f6513a483caee57ff7f4"
|
109
|
-
dependencies = [
|
110
|
-
"darling_core",
|
111
|
-
"darling_macro",
|
112
|
-
]
|
113
|
-
|
114
|
-
[[package]]
|
115
|
-
name = "darling_core"
|
116
|
-
version = "0.13.1"
|
117
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
118
|
-
checksum = "7a340f241d2ceed1deb47ae36c4144b2707ec7dd0b649f894cb39bb595986324"
|
119
|
-
dependencies = [
|
120
|
-
"fnv",
|
121
|
-
"ident_case",
|
122
|
-
"proc-macro2",
|
123
|
-
"quote",
|
124
|
-
"strsim 0.10.0",
|
125
|
-
"syn",
|
126
|
-
]
|
127
|
-
|
128
|
-
[[package]]
|
129
|
-
name = "darling_macro"
|
130
|
-
version = "0.13.1"
|
131
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
132
|
-
checksum = "72c41b3b7352feb3211a0d743dc5700a4e3b60f51bd2b368892d1e0f9a95f44b"
|
133
|
-
dependencies = [
|
134
|
-
"darling_core",
|
135
|
-
"quote",
|
136
|
-
"syn",
|
137
|
-
]
|
138
|
-
|
139
|
-
[[package]]
|
140
|
-
name = "either"
|
141
|
-
version = "1.6.1"
|
142
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
143
|
-
checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
|
144
|
-
|
145
|
-
[[package]]
|
146
|
-
name = "env_logger"
|
147
|
-
version = "0.9.0"
|
148
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
149
|
-
checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3"
|
150
|
-
dependencies = [
|
151
|
-
"atty",
|
152
|
-
"humantime",
|
153
|
-
"log",
|
154
|
-
"regex",
|
155
|
-
"termcolor",
|
156
|
-
]
|
157
|
-
|
158
|
-
[[package]]
|
159
|
-
name = "fnv"
|
160
|
-
version = "1.0.7"
|
161
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
162
|
-
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
|
163
|
-
|
164
65
|
[[package]]
|
165
66
|
name = "glob"
|
166
67
|
version = "0.3.0"
|
@@ -181,27 +82,6 @@ version = "0.2.1"
|
|
181
82
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
182
83
|
checksum = "be629448e3d85a1be12868f190df524655fea8ec3f143e14d803e298f618acae"
|
183
84
|
|
184
|
-
[[package]]
|
185
|
-
name = "hermit-abi"
|
186
|
-
version = "0.1.19"
|
187
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
188
|
-
checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
|
189
|
-
dependencies = [
|
190
|
-
"libc",
|
191
|
-
]
|
192
|
-
|
193
|
-
[[package]]
|
194
|
-
name = "humantime"
|
195
|
-
version = "2.1.0"
|
196
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
197
|
-
checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
|
198
|
-
|
199
|
-
[[package]]
|
200
|
-
name = "ident_case"
|
201
|
-
version = "1.0.1"
|
202
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
203
|
-
checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
|
204
|
-
|
205
85
|
[[package]]
|
206
86
|
name = "lazy_static"
|
207
87
|
version = "1.4.0"
|
@@ -216,46 +96,37 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
|
|
216
96
|
|
217
97
|
[[package]]
|
218
98
|
name = "libc"
|
219
|
-
version = "0.2.
|
99
|
+
version = "0.2.138"
|
220
100
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
221
|
-
checksum = "
|
101
|
+
checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8"
|
222
102
|
|
223
103
|
[[package]]
|
224
104
|
name = "libloading"
|
225
|
-
version = "0.7.
|
105
|
+
version = "0.7.4"
|
226
106
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
227
|
-
checksum = "
|
107
|
+
checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f"
|
228
108
|
dependencies = [
|
229
109
|
"cfg-if",
|
230
110
|
"winapi",
|
231
111
|
]
|
232
112
|
|
233
|
-
[[package]]
|
234
|
-
name = "log"
|
235
|
-
version = "0.4.14"
|
236
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
237
|
-
checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710"
|
238
|
-
dependencies = [
|
239
|
-
"cfg-if",
|
240
|
-
]
|
241
|
-
|
242
113
|
[[package]]
|
243
114
|
name = "magnus"
|
244
|
-
version = "0.3
|
115
|
+
version = "0.4.3"
|
245
116
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
246
|
-
checksum = "
|
117
|
+
checksum = "c7d904f55da4e2b0ac7f133257af80580ff4ca17bcca67f51ea06be46aa634ac"
|
247
118
|
dependencies = [
|
248
|
-
"bindgen",
|
249
119
|
"magnus-macros",
|
120
|
+
"rb-sys",
|
121
|
+
"rb-sys-env",
|
250
122
|
]
|
251
123
|
|
252
124
|
[[package]]
|
253
125
|
name = "magnus-macros"
|
254
|
-
version = "0.
|
126
|
+
version = "0.2.0"
|
255
127
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
256
|
-
checksum = "
|
128
|
+
checksum = "acc8ba6908cb0f67a4e75cb48fc81a1f0e6a6dd1501936e0c9e2c7c8f9f18e05"
|
257
129
|
dependencies = [
|
258
|
-
"darling",
|
259
130
|
"proc-macro2",
|
260
131
|
"quote",
|
261
132
|
"syn",
|
@@ -263,9 +134,9 @@ dependencies = [
|
|
263
134
|
|
264
135
|
[[package]]
|
265
136
|
name = "memchr"
|
266
|
-
version = "2.
|
137
|
+
version = "2.5.0"
|
267
138
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
268
|
-
checksum = "
|
139
|
+
checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
|
269
140
|
|
270
141
|
[[package]]
|
271
142
|
name = "minimal-lexical"
|
@@ -275,13 +146,12 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
|
|
275
146
|
|
276
147
|
[[package]]
|
277
148
|
name = "nom"
|
278
|
-
version = "7.1.
|
149
|
+
version = "7.1.1"
|
279
150
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
280
|
-
checksum = "
|
151
|
+
checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36"
|
281
152
|
dependencies = [
|
282
153
|
"memchr",
|
283
154
|
"minimal-lexical",
|
284
|
-
"version_check",
|
285
155
|
]
|
286
156
|
|
287
157
|
[[package]]
|
@@ -292,27 +162,53 @@ checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
|
|
292
162
|
|
293
163
|
[[package]]
|
294
164
|
name = "proc-macro2"
|
295
|
-
version = "1.0.
|
165
|
+
version = "1.0.47"
|
296
166
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
297
|
-
checksum = "
|
167
|
+
checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725"
|
298
168
|
dependencies = [
|
299
|
-
"unicode-
|
169
|
+
"unicode-ident",
|
300
170
|
]
|
301
171
|
|
302
172
|
[[package]]
|
303
173
|
name = "quote"
|
304
|
-
version = "1.0.
|
174
|
+
version = "1.0.21"
|
305
175
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
306
|
-
checksum = "
|
176
|
+
checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179"
|
307
177
|
dependencies = [
|
308
178
|
"proc-macro2",
|
309
179
|
]
|
310
180
|
|
181
|
+
[[package]]
|
182
|
+
name = "rb-sys"
|
183
|
+
version = "0.9.46"
|
184
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
185
|
+
checksum = "b9f1cfd225389bd9333d93d393d0feeeacd191d97f9b1c881528ac1233c67f0f"
|
186
|
+
dependencies = [
|
187
|
+
"rb-sys-build",
|
188
|
+
]
|
189
|
+
|
190
|
+
[[package]]
|
191
|
+
name = "rb-sys-build"
|
192
|
+
version = "0.9.46"
|
193
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
194
|
+
checksum = "fad39a523a00dc5d4f6dcec077568d985807aa5bd03204a0ddf7c1f36544289c"
|
195
|
+
dependencies = [
|
196
|
+
"bindgen",
|
197
|
+
"regex",
|
198
|
+
"shell-words",
|
199
|
+
]
|
200
|
+
|
201
|
+
[[package]]
|
202
|
+
name = "rb-sys-env"
|
203
|
+
version = "0.1.1"
|
204
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
205
|
+
checksum = "74c38752410925faeb82c400c06ba2fd9ee6aa8f719dd33994c9e53f5242d25f"
|
206
|
+
|
311
207
|
[[package]]
|
312
208
|
name = "regex"
|
313
|
-
version = "1.
|
209
|
+
version = "1.7.0"
|
314
210
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
315
|
-
checksum = "
|
211
|
+
checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a"
|
316
212
|
dependencies = [
|
317
213
|
"aho-corasick",
|
318
214
|
"memchr",
|
@@ -321,9 +217,9 @@ dependencies = [
|
|
321
217
|
|
322
218
|
[[package]]
|
323
219
|
name = "regex-syntax"
|
324
|
-
version = "0.6.
|
220
|
+
version = "0.6.28"
|
325
221
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
326
|
-
checksum = "
|
222
|
+
checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848"
|
327
223
|
|
328
224
|
[[package]]
|
329
225
|
name = "rustc-hash"
|
@@ -332,86 +228,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
332
228
|
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
|
333
229
|
|
334
230
|
[[package]]
|
335
|
-
name = "
|
231
|
+
name = "shell-words"
|
336
232
|
version = "1.1.0"
|
337
233
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
338
|
-
checksum = "
|
339
|
-
|
340
|
-
[[package]]
|
341
|
-
name = "strsim"
|
342
|
-
version = "0.8.0"
|
343
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
344
|
-
checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
|
234
|
+
checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde"
|
345
235
|
|
346
236
|
[[package]]
|
347
|
-
name = "
|
348
|
-
version = "
|
237
|
+
name = "shlex"
|
238
|
+
version = "1.1.0"
|
349
239
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
350
|
-
checksum = "
|
240
|
+
checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3"
|
351
241
|
|
352
242
|
[[package]]
|
353
243
|
name = "syn"
|
354
|
-
version = "1.0.
|
244
|
+
version = "1.0.105"
|
355
245
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
356
|
-
checksum = "
|
246
|
+
checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908"
|
357
247
|
dependencies = [
|
358
248
|
"proc-macro2",
|
359
249
|
"quote",
|
360
|
-
"unicode-
|
250
|
+
"unicode-ident",
|
361
251
|
]
|
362
252
|
|
363
253
|
[[package]]
|
364
|
-
name = "
|
365
|
-
version = "1.
|
254
|
+
name = "unicode-ident"
|
255
|
+
version = "1.0.5"
|
366
256
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
367
|
-
checksum = "
|
368
|
-
dependencies = [
|
369
|
-
"winapi-util",
|
370
|
-
]
|
371
|
-
|
372
|
-
[[package]]
|
373
|
-
name = "textwrap"
|
374
|
-
version = "0.11.0"
|
375
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
376
|
-
checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
|
377
|
-
dependencies = [
|
378
|
-
"unicode-width",
|
379
|
-
]
|
380
|
-
|
381
|
-
[[package]]
|
382
|
-
name = "unicode-width"
|
383
|
-
version = "0.1.9"
|
384
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
385
|
-
checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973"
|
386
|
-
|
387
|
-
[[package]]
|
388
|
-
name = "unicode-xid"
|
389
|
-
version = "0.2.2"
|
390
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
391
|
-
checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
|
392
|
-
|
393
|
-
[[package]]
|
394
|
-
name = "vec_map"
|
395
|
-
version = "0.8.2"
|
396
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
397
|
-
checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
|
398
|
-
|
399
|
-
[[package]]
|
400
|
-
name = "version_check"
|
401
|
-
version = "0.9.4"
|
402
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
403
|
-
checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
|
404
|
-
|
405
|
-
[[package]]
|
406
|
-
name = "which"
|
407
|
-
version = "4.2.4"
|
408
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
409
|
-
checksum = "2a5a7e487e921cf220206864a94a89b6c6905bfc19f1057fa26a4cb360e5c1d2"
|
410
|
-
dependencies = [
|
411
|
-
"either",
|
412
|
-
"lazy_static",
|
413
|
-
"libc",
|
414
|
-
]
|
257
|
+
checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3"
|
415
258
|
|
416
259
|
[[package]]
|
417
260
|
name = "winapi"
|
@@ -429,15 +272,6 @@ version = "0.4.0"
|
|
429
272
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
430
273
|
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
431
274
|
|
432
|
-
[[package]]
|
433
|
-
name = "winapi-util"
|
434
|
-
version = "0.1.5"
|
435
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
436
|
-
checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
|
437
|
-
dependencies = [
|
438
|
-
"winapi",
|
439
|
-
]
|
440
|
-
|
441
275
|
[[package]]
|
442
276
|
name = "winapi-x86_64-pc-windows-gnu"
|
443
277
|
version = "0.4.0"
|
data/ext/halton/Cargo.toml
CHANGED
data/ext/halton/src/lib.rs
CHANGED
@@ -3,6 +3,7 @@ use std::cell::RefCell;
|
|
3
3
|
use magnus::{
|
4
4
|
block::{block_given, Yield, YieldSplat, YieldValues},
|
5
5
|
define_module, exception, function, method,
|
6
|
+
scan_args::check_arity,
|
6
7
|
prelude::*,
|
7
8
|
Error, RArray, Value,
|
8
9
|
};
|
@@ -73,23 +74,23 @@ fn each_triple(
|
|
73
74
|
|
74
75
|
fn each_many(
|
75
76
|
rb_self: Value,
|
76
|
-
|
77
|
+
args: &[Value],
|
77
78
|
) -> Result<YieldSplat<impl Iterator<Item = RArray>>, Error> {
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
)
|
83
|
-
|
79
|
+
check_arity(args.len(), 1..)?;
|
80
|
+
let bases = args
|
81
|
+
.iter()
|
82
|
+
.map(|v| v.try_convert())
|
83
|
+
.collect::<Result<Vec<u8>, _>>()?;
|
84
|
+
|
84
85
|
if !block_given() {
|
85
86
|
return Ok(YieldSplat::Enumerator(
|
86
|
-
rb_self.enumeratorize("each_many",
|
87
|
+
rb_self.enumeratorize("each_many", args),
|
87
88
|
));
|
88
89
|
}
|
89
90
|
let mut seqs = bases
|
90
|
-
.
|
91
|
-
.map(
|
92
|
-
.collect::<
|
91
|
+
.into_iter()
|
92
|
+
.map(halton::Sequence::new)
|
93
|
+
.collect::<Vec<_>>();
|
93
94
|
let mut buffer = Vec::<Value>::with_capacity(seqs.len());
|
94
95
|
Ok(YieldSplat::Iter(std::iter::from_fn(move || {
|
95
96
|
buffer.clear();
|
data/lib/halton.rb
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
begin
|
4
|
+
/(?<ruby_version>\d+\.\d+)/ =~ RUBY_VERSION
|
5
|
+
require_relative "halton/#{ruby_version}/halton"
|
6
|
+
rescue LoadError
|
7
|
+
require_relative "halton/halton"
|
8
|
+
end
|
4
9
|
|
5
10
|
# The Halton module provides methods for generating Halton sequences, a
|
6
11
|
# deterministic low discrepancy sequence that appears to be random. The uniform
|
metadata
CHANGED
@@ -1,29 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: halton
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.1.
|
4
|
+
version: 0.2.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mat Sadler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: rb_sys
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 0.9.46
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.9.46
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake-compiler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
25
39
|
- !ruby/object:Gem::Version
|
26
40
|
version: '1'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: test-unit
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3'
|
27
55
|
description: A module implementing the fast generation of Halton sequences. The method
|
28
56
|
of generation is adapted from "Fast, portable, and reliable algorithm for the calculation
|
29
57
|
of Halton number" by Miroslav Kolář and Seamus F. O'Shea.
|
@@ -31,14 +59,14 @@ email:
|
|
31
59
|
- mat@sourcetagsandcodes.com
|
32
60
|
executables: []
|
33
61
|
extensions:
|
34
|
-
- ext/halton/
|
62
|
+
- ext/halton/extconf.rb
|
35
63
|
extra_rdoc_files:
|
36
64
|
- README.rdoc
|
37
65
|
files:
|
38
66
|
- README.rdoc
|
39
67
|
- ext/halton/Cargo.lock
|
40
68
|
- ext/halton/Cargo.toml
|
41
|
-
- ext/halton/
|
69
|
+
- ext/halton/extconf.rb
|
42
70
|
- ext/halton/src/lib.rs
|
43
71
|
- lib/halton.rb
|
44
72
|
homepage: https://github.com/matsadler/halton-rb
|
@@ -67,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
67
95
|
version: '0'
|
68
96
|
requirements:
|
69
97
|
- Rust >= 1.51.0
|
70
|
-
rubygems_version: 3.
|
98
|
+
rubygems_version: 3.3.26
|
71
99
|
signing_key:
|
72
100
|
specification_version: 4
|
73
101
|
summary: A module for generating Halton sequences
|
data/ext/halton/Rakefile
DELETED
@@ -1,159 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "shellwords"
|
4
|
-
|
5
|
-
class RakeCargoHelper
|
6
|
-
attr_reader :gemname
|
7
|
-
|
8
|
-
def initialize(gemname=File.basename(__dir__))
|
9
|
-
@gemname = gemname
|
10
|
-
end
|
11
|
-
|
12
|
-
def self.command?(name)
|
13
|
-
exts = ENV["PATHEXT"] ? ENV["PATHEXT"].split(";") : [""]
|
14
|
-
ENV["PATH"].split(File::PATH_SEPARATOR).any? do |path|
|
15
|
-
exts.any? do |ext|
|
16
|
-
exe = File.join(path, "#{name}#{ext}")
|
17
|
-
File.executable?(exe) && !File.directory?(exe)
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
def self.rust_toolchain
|
23
|
-
str = `rustc --version --verbose`
|
24
|
-
info = str.lines.map {|l| l.chomp.split(/:\s+/, 2)}.drop(1).to_h
|
25
|
-
info["host"]
|
26
|
-
end
|
27
|
-
|
28
|
-
def self.cargo_target_dir
|
29
|
-
return @cargo_target_dir if defined? @cargo_target_dir
|
30
|
-
|
31
|
-
str = `cargo metadata --format-version 1 --offline --no-deps --quiet`
|
32
|
-
begin
|
33
|
-
require "json"
|
34
|
-
dir = JSON.parse(str)["target_directory"]
|
35
|
-
rescue LoadError # json is usually part of the stdlib, but just in case
|
36
|
-
/"target_directory"\s*:\s*"(?<dir>[^"]*)"/ =~ str
|
37
|
-
end
|
38
|
-
@cargo_target_dir = dir || "target"
|
39
|
-
end
|
40
|
-
|
41
|
-
def self.flags
|
42
|
-
cc_flags = Shellwords.split(RbConfig.expand(RbConfig::MAKEFILE_CONFIG["CC"].dup))
|
43
|
-
|
44
|
-
["-C", "linker=#{cc_flags.shift}",
|
45
|
-
*cc_flags.flat_map {|a| ["-C", "link-arg=#{a}"] },
|
46
|
-
"-L", "native=#{RbConfig::CONFIG["libdir"]}",
|
47
|
-
*dld_flags,
|
48
|
-
*platform_flags]
|
49
|
-
end
|
50
|
-
|
51
|
-
def self.dld_flags
|
52
|
-
Shellwords.split(RbConfig::CONFIG["DLDFLAGS"]).flat_map do |arg|
|
53
|
-
arg = arg.gsub(/\$\((\w+)\)/) do
|
54
|
-
$1 == "DEFFILE" ? nil : RbConfig::CONFIG[name]
|
55
|
-
end.strip
|
56
|
-
next [] if arg.empty?
|
57
|
-
|
58
|
-
transform_flag(arg)
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
|
-
def self.platform_flags
|
63
|
-
return unless RbConfig::CONFIG["target_os"] =~ /mingw/i
|
64
|
-
|
65
|
-
[*Shellwords.split(RbConfig::CONFIG["LIBRUBYARG"]).flat_map {|arg| transform_flag(arg)},
|
66
|
-
"-C", "link-arg=-Wl,--dynamicbase",
|
67
|
-
"-C", "link-arg=-Wl,--disable-auto-image-base",
|
68
|
-
"-C", "link-arg=-static-libgcc"]
|
69
|
-
end
|
70
|
-
|
71
|
-
def self.transform_flag(arg)
|
72
|
-
k, v = arg.split(/(?<=..)/, 2)
|
73
|
-
case k
|
74
|
-
when "-L"
|
75
|
-
[k, "native=#{v}"]
|
76
|
-
when "-l"
|
77
|
-
[k, v]
|
78
|
-
when "-F"
|
79
|
-
["-l", "framework=#{v}"]
|
80
|
-
else
|
81
|
-
["-C", "link_arg=#{k}#{v}"]
|
82
|
-
end
|
83
|
-
end
|
84
|
-
|
85
|
-
def install_dir
|
86
|
-
File.expand_path(File.join("..", "..", "lib", gemname), __dir__)
|
87
|
-
end
|
88
|
-
|
89
|
-
def rust_name
|
90
|
-
prefix = "lib" unless Gem.win_platform?
|
91
|
-
suffix = if RbConfig::CONFIG["target_os"] =~ /darwin/i
|
92
|
-
".dylib"
|
93
|
-
elsif Gem.win_platform?
|
94
|
-
".dll"
|
95
|
-
else
|
96
|
-
".so"
|
97
|
-
end
|
98
|
-
"#{prefix}#{gemname}#{suffix}"
|
99
|
-
end
|
100
|
-
|
101
|
-
def ruby_name
|
102
|
-
"#{gemname}.#{RbConfig::CONFIG["DLEXT"]}"
|
103
|
-
end
|
104
|
-
|
105
|
-
end
|
106
|
-
|
107
|
-
task default: [:install, :clean]
|
108
|
-
|
109
|
-
desc "set dev mode for subsequent task, run like `rake dev install`"
|
110
|
-
task :dev do
|
111
|
-
@dev = true
|
112
|
-
end
|
113
|
-
|
114
|
-
desc "build gem native extension and copy to lib"
|
115
|
-
task install: [:cd, :build] do
|
116
|
-
helper = RakeCargoHelper.new
|
117
|
-
profile_dir = @dev ? "debug" : "release"
|
118
|
-
source = File.join(RakeCargoHelper.cargo_target_dir, profile_dir, helper.rust_name)
|
119
|
-
dest = File.join(helper.install_dir, helper.ruby_name)
|
120
|
-
mkdir_p(helper.install_dir)
|
121
|
-
rm(dest) if File.exist?(dest)
|
122
|
-
cp(source, dest)
|
123
|
-
end
|
124
|
-
|
125
|
-
desc "build gem native extension"
|
126
|
-
task build: [:cargo, :cd] do
|
127
|
-
sh "cargo", "rustc", *(["--locked", "--release"] unless @dev), "--", *RakeCargoHelper.flags
|
128
|
-
end
|
129
|
-
|
130
|
-
desc "clean up release build artifacts"
|
131
|
-
task clean: [:cargo, :cd] do
|
132
|
-
sh "cargo clean --release"
|
133
|
-
end
|
134
|
-
|
135
|
-
desc "clean up build artifacts"
|
136
|
-
task clobber: [:cargo, :cd] do
|
137
|
-
sh "cargo clean"
|
138
|
-
end
|
139
|
-
|
140
|
-
desc "check for cargo"
|
141
|
-
task :cargo do
|
142
|
-
raise <<-MSG unless RakeCargoHelper.command?("cargo")
|
143
|
-
|
144
|
-
This gem requires a Rust compiler and the `cargo' build tool to build the
|
145
|
-
gem's native extension. See https://www.rust-lang.org/tools/install for
|
146
|
-
how to install Rust. `cargo' is usually part of the Rust installation.
|
147
|
-
MSG
|
148
|
-
|
149
|
-
raise <<-MSG if Gem.win_platform? && RakeCargoHelper.rust_toolchain !~ /gnu/
|
150
|
-
|
151
|
-
Found Rust toolchain `#{RakeCargoHelper.rust_toolchain}' but the gem native
|
152
|
-
extension requires the gnu toolchain on Windows.
|
153
|
-
MSG
|
154
|
-
end
|
155
|
-
|
156
|
-
# ensure task is running in the right dir
|
157
|
-
task :cd do
|
158
|
-
cd(__dir__) unless __dir__ == pwd
|
159
|
-
end
|