prehook 0.1.0__tar.gz

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.
@@ -0,0 +1,34 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ concurrency:
9
+ group: ${{ github.workflow }}-${{ github.ref }}
10
+ cancel-in-progress: true
11
+
12
+ jobs:
13
+ lint:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v6
17
+ - uses: dtolnay/rust-toolchain@stable
18
+ with:
19
+ components: clippy, rustfmt
20
+ - uses: Swatinem/rust-cache@v2
21
+ - run: cargo fmt --check
22
+ - run: cargo clippy -- -D warnings
23
+
24
+ test:
25
+ needs: lint
26
+ strategy:
27
+ matrix:
28
+ os: [ubuntu-latest, macos-latest, windows-latest]
29
+ runs-on: ${{ matrix.os }}
30
+ steps:
31
+ - uses: actions/checkout@v6
32
+ - uses: dtolnay/rust-toolchain@stable
33
+ - uses: Swatinem/rust-cache@v2
34
+ - run: cargo test
@@ -0,0 +1,83 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ permissions:
9
+ contents: write
10
+ id-token: write
11
+
12
+ jobs:
13
+ build:
14
+ strategy:
15
+ matrix:
16
+ include:
17
+ - os: ubuntu-latest
18
+ target: x86_64-unknown-linux-gnu
19
+ manylinux: "2_28"
20
+ - os: ubuntu-latest
21
+ target: aarch64-unknown-linux-gnu
22
+ manylinux: "2_28"
23
+ - os: macos-latest
24
+ target: x86_64-apple-darwin
25
+ - os: macos-latest
26
+ target: aarch64-apple-darwin
27
+ - os: windows-latest
28
+ target: x86_64-pc-windows-msvc
29
+ runs-on: ${{ matrix.os }}
30
+ steps:
31
+ - uses: actions/checkout@v6
32
+ - uses: actions/setup-python@v6
33
+ with:
34
+ python-version: "3.12"
35
+ - uses: PyO3/maturin-action@v1
36
+ with:
37
+ target: ${{ matrix.target }}
38
+ args: --release --out dist
39
+ manylinux: ${{ matrix.manylinux || 'auto' }}
40
+ - uses: actions/upload-artifact@v7
41
+ with:
42
+ name: wheels-${{ matrix.target }}
43
+ path: dist/*.whl
44
+
45
+ sdist:
46
+ runs-on: ubuntu-latest
47
+ steps:
48
+ - uses: actions/checkout@v6
49
+ - uses: PyO3/maturin-action@v1
50
+ with:
51
+ command: sdist
52
+ args: --out dist
53
+ - uses: actions/upload-artifact@v7
54
+ with:
55
+ name: sdist
56
+ path: dist/*.tar.gz
57
+
58
+ publish:
59
+ needs: [build, sdist]
60
+ runs-on: ubuntu-latest
61
+ environment: release
62
+ steps:
63
+ - uses: actions/download-artifact@v8
64
+ with:
65
+ path: dist
66
+ merge-multiple: true
67
+ - uses: pypa/gh-action-pypi-publish@release/v1
68
+ with:
69
+ packages-dir: dist/
70
+
71
+ github-release:
72
+ needs: [build, sdist]
73
+ runs-on: ubuntu-latest
74
+ steps:
75
+ - uses: actions/checkout@v6
76
+ - uses: actions/download-artifact@v8
77
+ with:
78
+ path: dist
79
+ merge-multiple: true
80
+ - uses: softprops/action-gh-release@v3
81
+ with:
82
+ files: dist/*
83
+ generate_release_notes: true
@@ -0,0 +1,3 @@
1
+ /target
2
+ dist/
3
+ *.egg-info
@@ -0,0 +1,505 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "anyhow"
7
+ version = "1.0.102"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c"
10
+
11
+ [[package]]
12
+ name = "bitflags"
13
+ version = "2.13.0"
14
+ source = "registry+https://github.com/rust-lang/crates.io-index"
15
+ checksum = "b4388bee8683e3d04af747c73422af53102d2bd24d9eadb6cbc100baef4b43f8"
16
+
17
+ [[package]]
18
+ name = "cfg-if"
19
+ version = "1.0.4"
20
+ source = "registry+https://github.com/rust-lang/crates.io-index"
21
+ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
22
+
23
+ [[package]]
24
+ name = "equivalent"
25
+ version = "1.0.2"
26
+ source = "registry+https://github.com/rust-lang/crates.io-index"
27
+ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
28
+
29
+ [[package]]
30
+ name = "errno"
31
+ version = "0.3.14"
32
+ source = "registry+https://github.com/rust-lang/crates.io-index"
33
+ checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
34
+ dependencies = [
35
+ "libc",
36
+ "windows-sys",
37
+ ]
38
+
39
+ [[package]]
40
+ name = "fastrand"
41
+ version = "2.4.1"
42
+ source = "registry+https://github.com/rust-lang/crates.io-index"
43
+ checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6"
44
+
45
+ [[package]]
46
+ name = "foldhash"
47
+ version = "0.1.5"
48
+ source = "registry+https://github.com/rust-lang/crates.io-index"
49
+ checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
50
+
51
+ [[package]]
52
+ name = "getrandom"
53
+ version = "0.4.2"
54
+ source = "registry+https://github.com/rust-lang/crates.io-index"
55
+ checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555"
56
+ dependencies = [
57
+ "cfg-if",
58
+ "libc",
59
+ "r-efi",
60
+ "wasip2",
61
+ "wasip3",
62
+ ]
63
+
64
+ [[package]]
65
+ name = "hashbrown"
66
+ version = "0.15.5"
67
+ source = "registry+https://github.com/rust-lang/crates.io-index"
68
+ checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1"
69
+ dependencies = [
70
+ "foldhash",
71
+ ]
72
+
73
+ [[package]]
74
+ name = "hashbrown"
75
+ version = "0.17.1"
76
+ source = "registry+https://github.com/rust-lang/crates.io-index"
77
+ checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
78
+
79
+ [[package]]
80
+ name = "heck"
81
+ version = "0.5.0"
82
+ source = "registry+https://github.com/rust-lang/crates.io-index"
83
+ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
84
+
85
+ [[package]]
86
+ name = "id-arena"
87
+ version = "2.3.0"
88
+ source = "registry+https://github.com/rust-lang/crates.io-index"
89
+ checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954"
90
+
91
+ [[package]]
92
+ name = "indexmap"
93
+ version = "2.14.0"
94
+ source = "registry+https://github.com/rust-lang/crates.io-index"
95
+ checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9"
96
+ dependencies = [
97
+ "equivalent",
98
+ "hashbrown 0.17.1",
99
+ "serde",
100
+ "serde_core",
101
+ ]
102
+
103
+ [[package]]
104
+ name = "itoa"
105
+ version = "1.0.18"
106
+ source = "registry+https://github.com/rust-lang/crates.io-index"
107
+ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
108
+
109
+ [[package]]
110
+ name = "leb128fmt"
111
+ version = "0.1.0"
112
+ source = "registry+https://github.com/rust-lang/crates.io-index"
113
+ checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2"
114
+
115
+ [[package]]
116
+ name = "libc"
117
+ version = "0.2.186"
118
+ source = "registry+https://github.com/rust-lang/crates.io-index"
119
+ checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
120
+
121
+ [[package]]
122
+ name = "linux-raw-sys"
123
+ version = "0.12.1"
124
+ source = "registry+https://github.com/rust-lang/crates.io-index"
125
+ checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
126
+
127
+ [[package]]
128
+ name = "log"
129
+ version = "0.4.32"
130
+ source = "registry+https://github.com/rust-lang/crates.io-index"
131
+ checksum = "953f07c43838f8e6f9758cab68bf5bed85465e7587ebe0b823f1bcd81978ad3a"
132
+
133
+ [[package]]
134
+ name = "memchr"
135
+ version = "2.8.2"
136
+ source = "registry+https://github.com/rust-lang/crates.io-index"
137
+ checksum = "88904434abc2901f197fe8cc55f0445e7ded921dba5911dad2e2b39b48e663c4"
138
+
139
+ [[package]]
140
+ name = "once_cell"
141
+ version = "1.21.4"
142
+ source = "registry+https://github.com/rust-lang/crates.io-index"
143
+ checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
144
+
145
+ [[package]]
146
+ name = "prehook"
147
+ version = "0.1.0"
148
+ dependencies = [
149
+ "serde",
150
+ "tempfile",
151
+ "toml",
152
+ ]
153
+
154
+ [[package]]
155
+ name = "prettyplease"
156
+ version = "0.2.37"
157
+ source = "registry+https://github.com/rust-lang/crates.io-index"
158
+ checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b"
159
+ dependencies = [
160
+ "proc-macro2",
161
+ "syn",
162
+ ]
163
+
164
+ [[package]]
165
+ name = "proc-macro2"
166
+ version = "1.0.106"
167
+ source = "registry+https://github.com/rust-lang/crates.io-index"
168
+ checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
169
+ dependencies = [
170
+ "unicode-ident",
171
+ ]
172
+
173
+ [[package]]
174
+ name = "quote"
175
+ version = "1.0.45"
176
+ source = "registry+https://github.com/rust-lang/crates.io-index"
177
+ checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
178
+ dependencies = [
179
+ "proc-macro2",
180
+ ]
181
+
182
+ [[package]]
183
+ name = "r-efi"
184
+ version = "6.0.0"
185
+ source = "registry+https://github.com/rust-lang/crates.io-index"
186
+ checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
187
+
188
+ [[package]]
189
+ name = "rustix"
190
+ version = "1.1.4"
191
+ source = "registry+https://github.com/rust-lang/crates.io-index"
192
+ checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190"
193
+ dependencies = [
194
+ "bitflags",
195
+ "errno",
196
+ "libc",
197
+ "linux-raw-sys",
198
+ "windows-sys",
199
+ ]
200
+
201
+ [[package]]
202
+ name = "semver"
203
+ version = "1.0.28"
204
+ source = "registry+https://github.com/rust-lang/crates.io-index"
205
+ checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd"
206
+
207
+ [[package]]
208
+ name = "serde"
209
+ version = "1.0.228"
210
+ source = "registry+https://github.com/rust-lang/crates.io-index"
211
+ checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
212
+ dependencies = [
213
+ "serde_core",
214
+ "serde_derive",
215
+ ]
216
+
217
+ [[package]]
218
+ name = "serde_core"
219
+ version = "1.0.228"
220
+ source = "registry+https://github.com/rust-lang/crates.io-index"
221
+ checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
222
+ dependencies = [
223
+ "serde_derive",
224
+ ]
225
+
226
+ [[package]]
227
+ name = "serde_derive"
228
+ version = "1.0.228"
229
+ source = "registry+https://github.com/rust-lang/crates.io-index"
230
+ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
231
+ dependencies = [
232
+ "proc-macro2",
233
+ "quote",
234
+ "syn",
235
+ ]
236
+
237
+ [[package]]
238
+ name = "serde_json"
239
+ version = "1.0.150"
240
+ source = "registry+https://github.com/rust-lang/crates.io-index"
241
+ checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9"
242
+ dependencies = [
243
+ "itoa",
244
+ "memchr",
245
+ "serde",
246
+ "serde_core",
247
+ "zmij",
248
+ ]
249
+
250
+ [[package]]
251
+ name = "serde_spanned"
252
+ version = "1.1.1"
253
+ source = "registry+https://github.com/rust-lang/crates.io-index"
254
+ checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26"
255
+ dependencies = [
256
+ "serde_core",
257
+ ]
258
+
259
+ [[package]]
260
+ name = "syn"
261
+ version = "2.0.117"
262
+ source = "registry+https://github.com/rust-lang/crates.io-index"
263
+ checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
264
+ dependencies = [
265
+ "proc-macro2",
266
+ "quote",
267
+ "unicode-ident",
268
+ ]
269
+
270
+ [[package]]
271
+ name = "tempfile"
272
+ version = "3.27.0"
273
+ source = "registry+https://github.com/rust-lang/crates.io-index"
274
+ checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd"
275
+ dependencies = [
276
+ "fastrand",
277
+ "getrandom",
278
+ "once_cell",
279
+ "rustix",
280
+ "windows-sys",
281
+ ]
282
+
283
+ [[package]]
284
+ name = "toml"
285
+ version = "1.1.2+spec-1.1.0"
286
+ source = "registry+https://github.com/rust-lang/crates.io-index"
287
+ checksum = "81f3d15e84cbcd896376e6730314d59fb5a87f31e4b038454184435cd57defee"
288
+ dependencies = [
289
+ "indexmap",
290
+ "serde_core",
291
+ "serde_spanned",
292
+ "toml_datetime",
293
+ "toml_parser",
294
+ "toml_writer",
295
+ "winnow",
296
+ ]
297
+
298
+ [[package]]
299
+ name = "toml_datetime"
300
+ version = "1.1.1+spec-1.1.0"
301
+ source = "registry+https://github.com/rust-lang/crates.io-index"
302
+ checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7"
303
+ dependencies = [
304
+ "serde_core",
305
+ ]
306
+
307
+ [[package]]
308
+ name = "toml_parser"
309
+ version = "1.1.2+spec-1.1.0"
310
+ source = "registry+https://github.com/rust-lang/crates.io-index"
311
+ checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526"
312
+ dependencies = [
313
+ "winnow",
314
+ ]
315
+
316
+ [[package]]
317
+ name = "toml_writer"
318
+ version = "1.1.1+spec-1.1.0"
319
+ source = "registry+https://github.com/rust-lang/crates.io-index"
320
+ checksum = "756daf9b1013ebe47a8776667b466417e2d4c5679d441c26230efd9ef78692db"
321
+
322
+ [[package]]
323
+ name = "unicode-ident"
324
+ version = "1.0.24"
325
+ source = "registry+https://github.com/rust-lang/crates.io-index"
326
+ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
327
+
328
+ [[package]]
329
+ name = "unicode-xid"
330
+ version = "0.2.6"
331
+ source = "registry+https://github.com/rust-lang/crates.io-index"
332
+ checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"
333
+
334
+ [[package]]
335
+ name = "wasip2"
336
+ version = "1.0.4+wasi-0.2.12"
337
+ source = "registry+https://github.com/rust-lang/crates.io-index"
338
+ checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487"
339
+ dependencies = [
340
+ "wit-bindgen 0.57.1",
341
+ ]
342
+
343
+ [[package]]
344
+ name = "wasip3"
345
+ version = "0.4.0+wasi-0.3.0-rc-2026-01-06"
346
+ source = "registry+https://github.com/rust-lang/crates.io-index"
347
+ checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5"
348
+ dependencies = [
349
+ "wit-bindgen 0.51.0",
350
+ ]
351
+
352
+ [[package]]
353
+ name = "wasm-encoder"
354
+ version = "0.244.0"
355
+ source = "registry+https://github.com/rust-lang/crates.io-index"
356
+ checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319"
357
+ dependencies = [
358
+ "leb128fmt",
359
+ "wasmparser",
360
+ ]
361
+
362
+ [[package]]
363
+ name = "wasm-metadata"
364
+ version = "0.244.0"
365
+ source = "registry+https://github.com/rust-lang/crates.io-index"
366
+ checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909"
367
+ dependencies = [
368
+ "anyhow",
369
+ "indexmap",
370
+ "wasm-encoder",
371
+ "wasmparser",
372
+ ]
373
+
374
+ [[package]]
375
+ name = "wasmparser"
376
+ version = "0.244.0"
377
+ source = "registry+https://github.com/rust-lang/crates.io-index"
378
+ checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe"
379
+ dependencies = [
380
+ "bitflags",
381
+ "hashbrown 0.15.5",
382
+ "indexmap",
383
+ "semver",
384
+ ]
385
+
386
+ [[package]]
387
+ name = "windows-link"
388
+ version = "0.2.1"
389
+ source = "registry+https://github.com/rust-lang/crates.io-index"
390
+ checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
391
+
392
+ [[package]]
393
+ name = "windows-sys"
394
+ version = "0.61.2"
395
+ source = "registry+https://github.com/rust-lang/crates.io-index"
396
+ checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
397
+ dependencies = [
398
+ "windows-link",
399
+ ]
400
+
401
+ [[package]]
402
+ name = "winnow"
403
+ version = "1.0.3"
404
+ source = "registry+https://github.com/rust-lang/crates.io-index"
405
+ checksum = "0592e1c9d151f854e6fd382574c3a0855250e1d9b2f99d9281c6e6391af352f1"
406
+
407
+ [[package]]
408
+ name = "wit-bindgen"
409
+ version = "0.51.0"
410
+ source = "registry+https://github.com/rust-lang/crates.io-index"
411
+ checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5"
412
+ dependencies = [
413
+ "wit-bindgen-rust-macro",
414
+ ]
415
+
416
+ [[package]]
417
+ name = "wit-bindgen"
418
+ version = "0.57.1"
419
+ source = "registry+https://github.com/rust-lang/crates.io-index"
420
+ checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e"
421
+
422
+ [[package]]
423
+ name = "wit-bindgen-core"
424
+ version = "0.51.0"
425
+ source = "registry+https://github.com/rust-lang/crates.io-index"
426
+ checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc"
427
+ dependencies = [
428
+ "anyhow",
429
+ "heck",
430
+ "wit-parser",
431
+ ]
432
+
433
+ [[package]]
434
+ name = "wit-bindgen-rust"
435
+ version = "0.51.0"
436
+ source = "registry+https://github.com/rust-lang/crates.io-index"
437
+ checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21"
438
+ dependencies = [
439
+ "anyhow",
440
+ "heck",
441
+ "indexmap",
442
+ "prettyplease",
443
+ "syn",
444
+ "wasm-metadata",
445
+ "wit-bindgen-core",
446
+ "wit-component",
447
+ ]
448
+
449
+ [[package]]
450
+ name = "wit-bindgen-rust-macro"
451
+ version = "0.51.0"
452
+ source = "registry+https://github.com/rust-lang/crates.io-index"
453
+ checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a"
454
+ dependencies = [
455
+ "anyhow",
456
+ "prettyplease",
457
+ "proc-macro2",
458
+ "quote",
459
+ "syn",
460
+ "wit-bindgen-core",
461
+ "wit-bindgen-rust",
462
+ ]
463
+
464
+ [[package]]
465
+ name = "wit-component"
466
+ version = "0.244.0"
467
+ source = "registry+https://github.com/rust-lang/crates.io-index"
468
+ checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2"
469
+ dependencies = [
470
+ "anyhow",
471
+ "bitflags",
472
+ "indexmap",
473
+ "log",
474
+ "serde",
475
+ "serde_derive",
476
+ "serde_json",
477
+ "wasm-encoder",
478
+ "wasm-metadata",
479
+ "wasmparser",
480
+ "wit-parser",
481
+ ]
482
+
483
+ [[package]]
484
+ name = "wit-parser"
485
+ version = "0.244.0"
486
+ source = "registry+https://github.com/rust-lang/crates.io-index"
487
+ checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736"
488
+ dependencies = [
489
+ "anyhow",
490
+ "id-arena",
491
+ "indexmap",
492
+ "log",
493
+ "semver",
494
+ "serde",
495
+ "serde_derive",
496
+ "serde_json",
497
+ "unicode-xid",
498
+ "wasmparser",
499
+ ]
500
+
501
+ [[package]]
502
+ name = "zmij"
503
+ version = "1.0.21"
504
+ source = "registry+https://github.com/rust-lang/crates.io-index"
505
+ checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
@@ -0,0 +1,13 @@
1
+ [package]
2
+ name = "prehook"
3
+ version = "0.1.0"
4
+ edition = "2021"
5
+ readme = "README.md"
6
+
7
+ [dependencies]
8
+ serde = { version = "1", features = ["derive"] }
9
+ toml = "1"
10
+
11
+
12
+ [dev-dependencies]
13
+ tempfile = "3"
prehook-0.1.0/Justfile ADDED
@@ -0,0 +1,40 @@
1
+ build:
2
+ cargo build --release
3
+
4
+ run *args:
5
+ cargo run -- {{args}}
6
+
7
+ check:
8
+ cargo fmt --check
9
+ cargo clippy -- -D warnings
10
+ cargo test
11
+
12
+ test:
13
+ cargo test
14
+
15
+ fmt:
16
+ cargo fmt
17
+
18
+ fix:
19
+ cargo clippy --fix --allow-dirty
20
+
21
+ release version:
22
+ #!/usr/bin/env bash
23
+ set -euo pipefail
24
+ if [[ ! "{{version}}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
25
+ echo "Error: version must be semver (e.g. 0.2.0), got '{{version}}'"
26
+ exit 1
27
+ fi
28
+ if [ -n "$(git status --porcelain)" ]; then
29
+ echo "Error: working tree is dirty. Commit or stash changes first."
30
+ exit 1
31
+ fi
32
+ just check
33
+ sed -i '' 's/^version = ".*"/version = "{{version}}"/' Cargo.toml
34
+ cargo check --quiet 2>/dev/null
35
+ git add Cargo.toml Cargo.lock
36
+ git commit -m "Release v{{version}}"
37
+ git tag "v{{version}}"
38
+ echo ""
39
+ echo "Ready to publish. Run:"
40
+ echo " git push && git push --tags"