+1399
-5
Cargo.lock
+1399
-5
Cargo.lock
···
3
3
version = 4
4
4
5
5
[[package]]
6
-
name = "evaltor"
6
+
name = "android_system_properties"
7
+
version = "0.1.5"
8
+
source = "registry+https://github.com/rust-lang/crates.io-index"
9
+
checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
10
+
dependencies = [
11
+
"libc",
12
+
]
13
+
14
+
[[package]]
15
+
name = "arrayvec"
16
+
version = "0.7.6"
17
+
source = "registry+https://github.com/rust-lang/crates.io-index"
18
+
checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50"
19
+
20
+
[[package]]
21
+
name = "autocfg"
22
+
version = "1.5.0"
23
+
source = "registry+https://github.com/rust-lang/crates.io-index"
24
+
checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
25
+
26
+
[[package]]
27
+
name = "base64"
28
+
version = "0.22.1"
29
+
source = "registry+https://github.com/rust-lang/crates.io-index"
30
+
checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
31
+
32
+
[[package]]
33
+
name = "basic-toml"
34
+
version = "0.1.10"
35
+
source = "registry+https://github.com/rust-lang/crates.io-index"
36
+
checksum = "ba62675e8242a4c4e806d12f11d136e626e6c8361d6b829310732241652a178a"
37
+
dependencies = [
38
+
"serde",
39
+
]
40
+
41
+
[[package]]
42
+
name = "bitflags"
43
+
version = "2.10.0"
44
+
source = "registry+https://github.com/rust-lang/crates.io-index"
45
+
checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3"
46
+
47
+
[[package]]
48
+
name = "block-buffer"
49
+
version = "0.10.4"
50
+
source = "registry+https://github.com/rust-lang/crates.io-index"
51
+
checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
52
+
dependencies = [
53
+
"generic-array",
54
+
]
55
+
56
+
[[package]]
57
+
name = "bumpalo"
58
+
version = "3.19.0"
59
+
source = "registry+https://github.com/rust-lang/crates.io-index"
60
+
checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43"
61
+
62
+
[[package]]
63
+
name = "castaway"
64
+
version = "0.2.4"
65
+
source = "registry+https://github.com/rust-lang/crates.io-index"
66
+
checksum = "dec551ab6e7578819132c713a93c022a05d60159dc86e7a7050223577484c55a"
67
+
dependencies = [
68
+
"rustversion",
69
+
]
70
+
71
+
[[package]]
72
+
name = "cc"
73
+
version = "1.2.47"
74
+
source = "registry+https://github.com/rust-lang/crates.io-index"
75
+
checksum = "cd405d82c84ff7f35739f175f67d8b9fb7687a0e84ccdc78bd3568839827cf07"
76
+
dependencies = [
77
+
"find-msvc-tools",
78
+
"shlex",
79
+
]
80
+
81
+
[[package]]
82
+
name = "cfg-if"
83
+
version = "1.0.4"
84
+
source = "registry+https://github.com/rust-lang/crates.io-index"
85
+
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
86
+
87
+
[[package]]
88
+
name = "chrono"
89
+
version = "0.4.42"
90
+
source = "registry+https://github.com/rust-lang/crates.io-index"
91
+
checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2"
92
+
dependencies = [
93
+
"iana-time-zone",
94
+
"num-traits",
95
+
"serde",
96
+
"windows-link",
97
+
]
98
+
99
+
[[package]]
100
+
name = "codespan-reporting"
101
+
version = "0.11.1"
102
+
source = "registry+https://github.com/rust-lang/crates.io-index"
103
+
checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e"
104
+
dependencies = [
105
+
"termcolor",
106
+
"unicode-width",
107
+
]
108
+
109
+
[[package]]
110
+
name = "compact_str"
111
+
version = "0.8.1"
112
+
source = "registry+https://github.com/rust-lang/crates.io-index"
113
+
checksum = "3b79c4069c6cad78e2e0cdfcbd26275770669fb39fd308a752dc110e83b9af32"
114
+
dependencies = [
115
+
"castaway",
116
+
"cfg-if",
117
+
"itoa",
118
+
"rustversion",
119
+
"ryu",
120
+
"serde",
121
+
"static_assertions",
122
+
]
123
+
124
+
[[package]]
125
+
name = "core-foundation-sys"
126
+
version = "0.8.7"
127
+
source = "registry+https://github.com/rust-lang/crates.io-index"
128
+
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
129
+
130
+
[[package]]
131
+
name = "cpufeatures"
132
+
version = "0.2.17"
133
+
source = "registry+https://github.com/rust-lang/crates.io-index"
134
+
checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
135
+
dependencies = [
136
+
"libc",
137
+
]
138
+
139
+
[[package]]
140
+
name = "crypto-common"
141
+
version = "0.1.7"
142
+
source = "registry+https://github.com/rust-lang/crates.io-index"
143
+
checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"
144
+
dependencies = [
145
+
"generic-array",
146
+
"typenum",
147
+
]
148
+
149
+
[[package]]
150
+
name = "darling"
151
+
version = "0.20.11"
152
+
source = "registry+https://github.com/rust-lang/crates.io-index"
153
+
checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee"
154
+
dependencies = [
155
+
"darling_core 0.20.11",
156
+
"darling_macro 0.20.11",
157
+
]
158
+
159
+
[[package]]
160
+
name = "darling"
161
+
version = "0.21.3"
162
+
source = "registry+https://github.com/rust-lang/crates.io-index"
163
+
checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0"
164
+
dependencies = [
165
+
"darling_core 0.21.3",
166
+
"darling_macro 0.21.3",
167
+
]
168
+
169
+
[[package]]
170
+
name = "darling_core"
171
+
version = "0.20.11"
172
+
source = "registry+https://github.com/rust-lang/crates.io-index"
173
+
checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e"
174
+
dependencies = [
175
+
"fnv",
176
+
"ident_case",
177
+
"proc-macro2",
178
+
"quote",
179
+
"strsim",
180
+
"syn",
181
+
]
182
+
183
+
[[package]]
184
+
name = "darling_core"
185
+
version = "0.21.3"
186
+
source = "registry+https://github.com/rust-lang/crates.io-index"
187
+
checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4"
188
+
dependencies = [
189
+
"fnv",
190
+
"ident_case",
191
+
"proc-macro2",
192
+
"quote",
193
+
"strsim",
194
+
"syn",
195
+
]
196
+
197
+
[[package]]
198
+
name = "darling_macro"
199
+
version = "0.20.11"
200
+
source = "registry+https://github.com/rust-lang/crates.io-index"
201
+
checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead"
202
+
dependencies = [
203
+
"darling_core 0.20.11",
204
+
"quote",
205
+
"syn",
206
+
]
207
+
208
+
[[package]]
209
+
name = "darling_macro"
210
+
version = "0.21.3"
211
+
source = "registry+https://github.com/rust-lang/crates.io-index"
212
+
checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81"
213
+
dependencies = [
214
+
"darling_core 0.21.3",
215
+
"quote",
216
+
"syn",
217
+
]
218
+
219
+
[[package]]
220
+
name = "deranged"
221
+
version = "0.5.5"
222
+
source = "registry+https://github.com/rust-lang/crates.io-index"
223
+
checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587"
224
+
dependencies = [
225
+
"powerfmt",
226
+
"serde_core",
227
+
]
228
+
229
+
[[package]]
230
+
name = "digest"
231
+
version = "0.10.7"
232
+
source = "registry+https://github.com/rust-lang/crates.io-index"
233
+
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
234
+
dependencies = [
235
+
"block-buffer",
236
+
"crypto-common",
237
+
]
238
+
239
+
[[package]]
240
+
name = "dirs"
241
+
version = "6.0.0"
242
+
source = "registry+https://github.com/rust-lang/crates.io-index"
243
+
checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e"
244
+
dependencies = [
245
+
"dirs-sys",
246
+
]
247
+
248
+
[[package]]
249
+
name = "dirs-sys"
250
+
version = "0.5.0"
251
+
source = "registry+https://github.com/rust-lang/crates.io-index"
252
+
checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab"
253
+
dependencies = [
254
+
"libc",
255
+
"option-ext",
256
+
"redox_users",
257
+
"windows-sys 0.61.2",
258
+
]
259
+
260
+
[[package]]
261
+
name = "dyn-clone"
262
+
version = "1.0.20"
263
+
source = "registry+https://github.com/rust-lang/crates.io-index"
264
+
checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555"
265
+
266
+
[[package]]
267
+
name = "either"
268
+
version = "1.15.0"
269
+
source = "registry+https://github.com/rust-lang/crates.io-index"
270
+
checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
271
+
272
+
[[package]]
273
+
name = "equivalent"
274
+
version = "1.0.2"
275
+
source = "registry+https://github.com/rust-lang/crates.io-index"
276
+
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
277
+
278
+
[[package]]
279
+
name = "erased-serde"
280
+
version = "0.4.9"
281
+
source = "registry+https://github.com/rust-lang/crates.io-index"
282
+
checksum = "89e8918065695684b2b0702da20382d5ae6065cf3327bc2d6436bd49a71ce9f3"
283
+
dependencies = [
284
+
"serde",
285
+
"serde_core",
286
+
"typeid",
287
+
]
288
+
289
+
[[package]]
290
+
name = "find-msvc-tools"
291
+
version = "0.1.5"
292
+
source = "registry+https://github.com/rust-lang/crates.io-index"
293
+
checksum = "3a3076410a55c90011c298b04d0cfa770b00fa04e1e3c97d3f6c9de105a03844"
294
+
295
+
[[package]]
296
+
name = "fnv"
297
+
version = "1.0.7"
298
+
source = "registry+https://github.com/rust-lang/crates.io-index"
299
+
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
300
+
301
+
[[package]]
302
+
name = "generic-array"
303
+
version = "0.14.7"
304
+
source = "registry+https://github.com/rust-lang/crates.io-index"
305
+
checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
306
+
dependencies = [
307
+
"typenum",
308
+
"version_check",
309
+
]
310
+
311
+
[[package]]
312
+
name = "getrandom"
313
+
version = "0.2.16"
314
+
source = "registry+https://github.com/rust-lang/crates.io-index"
315
+
checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592"
316
+
dependencies = [
317
+
"cfg-if",
318
+
"libc",
319
+
"wasi",
320
+
]
321
+
322
+
[[package]]
323
+
name = "hashbrown"
324
+
version = "0.12.3"
325
+
source = "registry+https://github.com/rust-lang/crates.io-index"
326
+
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
327
+
328
+
[[package]]
329
+
name = "hashbrown"
330
+
version = "0.16.1"
331
+
source = "registry+https://github.com/rust-lang/crates.io-index"
332
+
checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
333
+
334
+
[[package]]
335
+
name = "heck"
336
+
version = "0.4.1"
337
+
source = "registry+https://github.com/rust-lang/crates.io-index"
338
+
checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
339
+
dependencies = [
340
+
"unicode-segmentation",
341
+
]
342
+
343
+
[[package]]
344
+
name = "hex"
345
+
version = "0.4.3"
346
+
source = "registry+https://github.com/rust-lang/crates.io-index"
347
+
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
348
+
349
+
[[package]]
350
+
name = "humansize"
351
+
version = "2.1.3"
352
+
source = "registry+https://github.com/rust-lang/crates.io-index"
353
+
checksum = "6cb51c9a029ddc91b07a787f1d86b53ccfa49b0e86688c946ebe8d3555685dd7"
354
+
dependencies = [
355
+
"libm",
356
+
]
357
+
358
+
[[package]]
359
+
name = "iana-time-zone"
360
+
version = "0.1.64"
361
+
source = "registry+https://github.com/rust-lang/crates.io-index"
362
+
checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb"
363
+
dependencies = [
364
+
"android_system_properties",
365
+
"core-foundation-sys",
366
+
"iana-time-zone-haiku",
367
+
"js-sys",
368
+
"log",
369
+
"wasm-bindgen",
370
+
"windows-core",
371
+
]
372
+
373
+
[[package]]
374
+
name = "iana-time-zone-haiku"
375
+
version = "0.1.2"
376
+
source = "registry+https://github.com/rust-lang/crates.io-index"
377
+
checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
378
+
dependencies = [
379
+
"cc",
380
+
]
381
+
382
+
[[package]]
383
+
name = "ident_case"
384
+
version = "1.0.1"
385
+
source = "registry+https://github.com/rust-lang/crates.io-index"
386
+
checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
387
+
388
+
[[package]]
389
+
name = "indexmap"
390
+
version = "1.9.3"
391
+
source = "registry+https://github.com/rust-lang/crates.io-index"
392
+
checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
393
+
dependencies = [
394
+
"autocfg",
395
+
"hashbrown 0.12.3",
396
+
"serde",
397
+
]
398
+
399
+
[[package]]
400
+
name = "indexmap"
401
+
version = "2.12.1"
402
+
source = "registry+https://github.com/rust-lang/crates.io-index"
403
+
checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2"
404
+
dependencies = [
405
+
"equivalent",
406
+
"hashbrown 0.16.1",
407
+
"serde",
408
+
"serde_core",
409
+
]
410
+
411
+
[[package]]
412
+
name = "itertools"
413
+
version = "0.12.1"
414
+
source = "registry+https://github.com/rust-lang/crates.io-index"
415
+
checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
416
+
dependencies = [
417
+
"either",
418
+
]
419
+
420
+
[[package]]
421
+
name = "itoa"
422
+
version = "1.0.15"
423
+
source = "registry+https://github.com/rust-lang/crates.io-index"
424
+
checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
425
+
426
+
[[package]]
427
+
name = "jiff"
428
+
version = "0.1.29"
429
+
source = "registry+https://github.com/rust-lang/crates.io-index"
430
+
checksum = "c04ef77ae73f3cf50510712722f0c4e8b46f5aaa1bf5ffad2ae213e6495e78e5"
431
+
dependencies = [
432
+
"jiff-tzdb-platform",
433
+
"js-sys",
434
+
"log",
435
+
"portable-atomic",
436
+
"portable-atomic-util",
437
+
"serde",
438
+
"wasm-bindgen",
439
+
"windows-sys 0.59.0",
440
+
]
441
+
442
+
[[package]]
443
+
name = "jiff-tzdb"
444
+
version = "0.1.4"
445
+
source = "registry+https://github.com/rust-lang/crates.io-index"
446
+
checksum = "c1283705eb0a21404d2bfd6eef2a7593d240bc42a0bdb39db0ad6fa2ec026524"
447
+
448
+
[[package]]
449
+
name = "jiff-tzdb-platform"
450
+
version = "0.1.3"
451
+
source = "registry+https://github.com/rust-lang/crates.io-index"
452
+
checksum = "875a5a69ac2bab1a891711cf5eccbec1ce0341ea805560dcd90b7a2e925132e8"
453
+
dependencies = [
454
+
"jiff-tzdb",
455
+
]
456
+
457
+
[[package]]
458
+
name = "js-sys"
459
+
version = "0.3.82"
460
+
source = "registry+https://github.com/rust-lang/crates.io-index"
461
+
checksum = "b011eec8cc36da2aab2d5cff675ec18454fad408585853910a202391cf9f8e65"
462
+
dependencies = [
463
+
"once_cell",
464
+
"wasm-bindgen",
465
+
]
466
+
467
+
[[package]]
468
+
name = "libc"
469
+
version = "0.2.177"
470
+
source = "registry+https://github.com/rust-lang/crates.io-index"
471
+
checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976"
472
+
473
+
[[package]]
474
+
name = "libm"
475
+
version = "0.2.15"
476
+
source = "registry+https://github.com/rust-lang/crates.io-index"
477
+
checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de"
478
+
479
+
[[package]]
480
+
name = "libredox"
481
+
version = "0.1.10"
482
+
source = "registry+https://github.com/rust-lang/crates.io-index"
483
+
checksum = "416f7e718bdb06000964960ffa43b4335ad4012ae8b99060261aa4a8088d5ccb"
484
+
dependencies = [
485
+
"bitflags",
486
+
"libc",
487
+
]
488
+
489
+
[[package]]
490
+
name = "log"
491
+
version = "0.4.28"
492
+
source = "registry+https://github.com/rust-lang/crates.io-index"
493
+
checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432"
494
+
495
+
[[package]]
496
+
name = "memchr"
497
+
version = "2.7.6"
498
+
source = "registry+https://github.com/rust-lang/crates.io-index"
499
+
checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273"
500
+
501
+
[[package]]
502
+
name = "mendeleev"
503
+
version = "0.8.4"
504
+
source = "registry+https://github.com/rust-lang/crates.io-index"
505
+
checksum = "9f4cefcffb9afe2069e74baae496420299bf2a18a7d48b61cfc7482d7355db28"
506
+
dependencies = [
507
+
"serde",
508
+
]
509
+
510
+
[[package]]
511
+
name = "mime"
512
+
version = "0.3.17"
513
+
source = "registry+https://github.com/rust-lang/crates.io-index"
514
+
checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
515
+
516
+
[[package]]
517
+
name = "mime_guess"
518
+
version = "2.0.5"
519
+
source = "registry+https://github.com/rust-lang/crates.io-index"
520
+
checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e"
521
+
dependencies = [
522
+
"mime",
523
+
"unicase",
524
+
]
525
+
526
+
[[package]]
527
+
name = "minimal-lexical"
528
+
version = "0.2.1"
529
+
source = "registry+https://github.com/rust-lang/crates.io-index"
530
+
checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
531
+
532
+
[[package]]
533
+
name = "nom"
534
+
version = "7.1.3"
535
+
source = "registry+https://github.com/rust-lang/crates.io-index"
536
+
checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
537
+
dependencies = [
538
+
"memchr",
539
+
"minimal-lexical",
540
+
]
541
+
542
+
[[package]]
543
+
name = "num-bigint"
544
+
version = "0.4.6"
545
+
source = "registry+https://github.com/rust-lang/crates.io-index"
546
+
checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9"
547
+
dependencies = [
548
+
"num-integer",
549
+
"num-traits",
550
+
]
551
+
552
+
[[package]]
553
+
name = "num-conv"
7
554
version = "0.1.0"
555
+
source = "registry+https://github.com/rust-lang/crates.io-index"
556
+
checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
557
+
558
+
[[package]]
559
+
name = "num-format"
560
+
version = "0.4.4"
561
+
source = "registry+https://github.com/rust-lang/crates.io-index"
562
+
checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3"
8
563
dependencies = [
9
-
"fend-core",
564
+
"arrayvec",
565
+
"itoa",
566
+
]
567
+
568
+
[[package]]
569
+
name = "num-integer"
570
+
version = "0.1.46"
571
+
source = "registry+https://github.com/rust-lang/crates.io-index"
572
+
checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
573
+
dependencies = [
574
+
"num-traits",
575
+
]
576
+
577
+
[[package]]
578
+
name = "num-rational"
579
+
version = "0.4.2"
580
+
source = "registry+https://github.com/rust-lang/crates.io-index"
581
+
checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824"
582
+
dependencies = [
583
+
"num-bigint",
584
+
"num-integer",
585
+
"num-traits",
586
+
]
587
+
588
+
[[package]]
589
+
name = "num-traits"
590
+
version = "0.2.19"
591
+
source = "registry+https://github.com/rust-lang/crates.io-index"
592
+
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
593
+
dependencies = [
594
+
"autocfg",
595
+
]
596
+
597
+
[[package]]
598
+
name = "numbat"
599
+
version = "1.16.0"
600
+
source = "registry+https://github.com/rust-lang/crates.io-index"
601
+
checksum = "5179fd3675cc6b9107c84a6838fdc94a6dfe769a259a9f51cc71f4ef67ffc1e7"
602
+
dependencies = [
603
+
"codespan-reporting",
604
+
"compact_str",
605
+
"heck",
606
+
"indexmap 2.12.1",
607
+
"itertools",
608
+
"jiff",
609
+
"libc",
610
+
"mendeleev",
611
+
"num-format",
612
+
"num-integer",
613
+
"num-rational",
614
+
"num-traits",
615
+
"numbat-exchange-rates",
616
+
"plotly",
617
+
"pretty_dtoa",
618
+
"rand",
619
+
"rust-embed",
620
+
"strfmt",
621
+
"strsim",
622
+
"thiserror 1.0.69",
623
+
"unicode-ident",
624
+
"unicode-width",
625
+
"walkdir",
626
+
]
627
+
628
+
[[package]]
629
+
name = "numbat-exchange-rates"
630
+
version = "0.5.0"
631
+
source = "registry+https://github.com/rust-lang/crates.io-index"
632
+
checksum = "fd1e3c3e4f9f22d0d7cdcb413f01194f6506a302a9029d95deedcd1c25df7718"
633
+
dependencies = [
634
+
"quick-xml",
635
+
]
636
+
637
+
[[package]]
638
+
name = "numbat-typst"
639
+
version = "0.1.0"
640
+
dependencies = [
641
+
"numbat",
10
642
"typst-wasm-protocol",
11
643
]
12
644
13
645
[[package]]
14
-
name = "fend-core"
15
-
version = "1.5.7"
646
+
name = "once_cell"
647
+
version = "1.21.3"
648
+
source = "registry+https://github.com/rust-lang/crates.io-index"
649
+
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
650
+
651
+
[[package]]
652
+
name = "option-ext"
653
+
version = "0.2.0"
654
+
source = "registry+https://github.com/rust-lang/crates.io-index"
655
+
checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
656
+
657
+
[[package]]
658
+
name = "percent-encoding"
659
+
version = "2.3.2"
660
+
source = "registry+https://github.com/rust-lang/crates.io-index"
661
+
checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
662
+
663
+
[[package]]
664
+
name = "plotly"
665
+
version = "0.10.0"
666
+
source = "registry+https://github.com/rust-lang/crates.io-index"
667
+
checksum = "4e1ffd11c8a6ef0b730b9d3e46ad2404f79905825cb20223fa0547434a2dff54"
668
+
dependencies = [
669
+
"dyn-clone",
670
+
"erased-serde",
671
+
"once_cell",
672
+
"plotly_derive",
673
+
"rand",
674
+
"rinja",
675
+
"serde",
676
+
"serde_json",
677
+
"serde_repr",
678
+
"serde_with",
679
+
]
680
+
681
+
[[package]]
682
+
name = "plotly_derive"
683
+
version = "0.10.0"
684
+
source = "registry+https://github.com/rust-lang/crates.io-index"
685
+
checksum = "69e940d8d8db30c6f4cc37dab9aab61f4c9cc1e6efb6d18902ab88fa09c03560"
686
+
dependencies = [
687
+
"darling 0.20.11",
688
+
"proc-macro2",
689
+
"quote",
690
+
"syn",
691
+
]
692
+
693
+
[[package]]
694
+
name = "portable-atomic"
695
+
version = "1.11.1"
696
+
source = "registry+https://github.com/rust-lang/crates.io-index"
697
+
checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483"
698
+
699
+
[[package]]
700
+
name = "portable-atomic-util"
701
+
version = "0.2.4"
16
702
source = "registry+https://github.com/rust-lang/crates.io-index"
17
-
checksum = "3f775cab5068a34b942b110dcb11f42c96d376b681c45e604884da6059cb9d2c"
703
+
checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507"
704
+
dependencies = [
705
+
"portable-atomic",
706
+
]
707
+
708
+
[[package]]
709
+
name = "powerfmt"
710
+
version = "0.2.0"
711
+
source = "registry+https://github.com/rust-lang/crates.io-index"
712
+
checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
713
+
714
+
[[package]]
715
+
name = "ppv-lite86"
716
+
version = "0.2.21"
717
+
source = "registry+https://github.com/rust-lang/crates.io-index"
718
+
checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9"
719
+
dependencies = [
720
+
"zerocopy",
721
+
]
722
+
723
+
[[package]]
724
+
name = "pretty_dtoa"
725
+
version = "0.3.0"
726
+
source = "registry+https://github.com/rust-lang/crates.io-index"
727
+
checksum = "a239bcdfda2c685fda1add3b4695c06225f50075e3cfb5b954e91545587edff2"
728
+
dependencies = [
729
+
"ryu_floating_decimal",
730
+
]
18
731
19
732
[[package]]
20
733
name = "proc-macro2"
···
26
739
]
27
740
28
741
[[package]]
742
+
name = "quick-xml"
743
+
version = "0.31.0"
744
+
source = "registry+https://github.com/rust-lang/crates.io-index"
745
+
checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33"
746
+
dependencies = [
747
+
"memchr",
748
+
]
749
+
750
+
[[package]]
29
751
name = "quote"
30
752
version = "1.0.42"
31
753
source = "registry+https://github.com/rust-lang/crates.io-index"
···
35
757
]
36
758
37
759
[[package]]
760
+
name = "rand"
761
+
version = "0.8.5"
762
+
source = "registry+https://github.com/rust-lang/crates.io-index"
763
+
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
764
+
dependencies = [
765
+
"libc",
766
+
"rand_chacha",
767
+
"rand_core",
768
+
]
769
+
770
+
[[package]]
771
+
name = "rand_chacha"
772
+
version = "0.3.1"
773
+
source = "registry+https://github.com/rust-lang/crates.io-index"
774
+
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
775
+
dependencies = [
776
+
"ppv-lite86",
777
+
"rand_core",
778
+
]
779
+
780
+
[[package]]
781
+
name = "rand_core"
782
+
version = "0.6.4"
783
+
source = "registry+https://github.com/rust-lang/crates.io-index"
784
+
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
785
+
dependencies = [
786
+
"getrandom",
787
+
]
788
+
789
+
[[package]]
790
+
name = "redox_users"
791
+
version = "0.5.2"
792
+
source = "registry+https://github.com/rust-lang/crates.io-index"
793
+
checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac"
794
+
dependencies = [
795
+
"getrandom",
796
+
"libredox",
797
+
"thiserror 2.0.17",
798
+
]
799
+
800
+
[[package]]
801
+
name = "ref-cast"
802
+
version = "1.0.25"
803
+
source = "registry+https://github.com/rust-lang/crates.io-index"
804
+
checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d"
805
+
dependencies = [
806
+
"ref-cast-impl",
807
+
]
808
+
809
+
[[package]]
810
+
name = "ref-cast-impl"
811
+
version = "1.0.25"
812
+
source = "registry+https://github.com/rust-lang/crates.io-index"
813
+
checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da"
814
+
dependencies = [
815
+
"proc-macro2",
816
+
"quote",
817
+
"syn",
818
+
]
819
+
820
+
[[package]]
821
+
name = "rinja"
822
+
version = "0.3.5"
823
+
source = "registry+https://github.com/rust-lang/crates.io-index"
824
+
checksum = "3dc4940d00595430b3d7d5a01f6222b5e5b51395d1120bdb28d854bb8abb17a5"
825
+
dependencies = [
826
+
"humansize",
827
+
"itoa",
828
+
"percent-encoding",
829
+
"rinja_derive",
830
+
"serde",
831
+
"serde_json",
832
+
]
833
+
834
+
[[package]]
835
+
name = "rinja_derive"
836
+
version = "0.3.5"
837
+
source = "registry+https://github.com/rust-lang/crates.io-index"
838
+
checksum = "08d9ed0146aef6e2825f1b1515f074510549efba38d71f4554eec32eb36ba18b"
839
+
dependencies = [
840
+
"basic-toml",
841
+
"memchr",
842
+
"mime",
843
+
"mime_guess",
844
+
"proc-macro2",
845
+
"quote",
846
+
"rinja_parser",
847
+
"rustc-hash",
848
+
"serde",
849
+
"syn",
850
+
]
851
+
852
+
[[package]]
853
+
name = "rinja_parser"
854
+
version = "0.3.5"
855
+
source = "registry+https://github.com/rust-lang/crates.io-index"
856
+
checksum = "93f9a866e2e00a7a1fb27e46e9e324a6f7c0e7edc4543cae1d38f4e4a100c610"
857
+
dependencies = [
858
+
"memchr",
859
+
"nom",
860
+
"serde",
861
+
]
862
+
863
+
[[package]]
864
+
name = "rust-embed"
865
+
version = "8.9.0"
866
+
source = "registry+https://github.com/rust-lang/crates.io-index"
867
+
checksum = "947d7f3fad52b283d261c4c99a084937e2fe492248cb9a68a8435a861b8798ca"
868
+
dependencies = [
869
+
"rust-embed-impl",
870
+
"rust-embed-utils",
871
+
"walkdir",
872
+
]
873
+
874
+
[[package]]
875
+
name = "rust-embed-impl"
876
+
version = "8.9.0"
877
+
source = "registry+https://github.com/rust-lang/crates.io-index"
878
+
checksum = "5fa2c8c9e8711e10f9c4fd2d64317ef13feaab820a4c51541f1a8c8e2e851ab2"
879
+
dependencies = [
880
+
"proc-macro2",
881
+
"quote",
882
+
"rust-embed-utils",
883
+
"shellexpand",
884
+
"syn",
885
+
"walkdir",
886
+
]
887
+
888
+
[[package]]
889
+
name = "rust-embed-utils"
890
+
version = "8.9.0"
891
+
source = "registry+https://github.com/rust-lang/crates.io-index"
892
+
checksum = "60b161f275cb337fe0a44d924a5f4df0ed69c2c39519858f931ce61c779d3475"
893
+
dependencies = [
894
+
"sha2",
895
+
"walkdir",
896
+
]
897
+
898
+
[[package]]
899
+
name = "rustc-hash"
900
+
version = "2.1.1"
901
+
source = "registry+https://github.com/rust-lang/crates.io-index"
902
+
checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d"
903
+
904
+
[[package]]
905
+
name = "rustversion"
906
+
version = "1.0.22"
907
+
source = "registry+https://github.com/rust-lang/crates.io-index"
908
+
checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
909
+
910
+
[[package]]
911
+
name = "ryu"
912
+
version = "1.0.20"
913
+
source = "registry+https://github.com/rust-lang/crates.io-index"
914
+
checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
915
+
916
+
[[package]]
917
+
name = "ryu_floating_decimal"
918
+
version = "0.1.0"
919
+
source = "registry+https://github.com/rust-lang/crates.io-index"
920
+
checksum = "700de91d5fd6091442d00fdd9ee790af6d4f0f480562b0f5a1e8f59e90aafe73"
921
+
922
+
[[package]]
923
+
name = "same-file"
924
+
version = "1.0.6"
925
+
source = "registry+https://github.com/rust-lang/crates.io-index"
926
+
checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
927
+
dependencies = [
928
+
"winapi-util",
929
+
]
930
+
931
+
[[package]]
932
+
name = "schemars"
933
+
version = "0.9.0"
934
+
source = "registry+https://github.com/rust-lang/crates.io-index"
935
+
checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f"
936
+
dependencies = [
937
+
"dyn-clone",
938
+
"ref-cast",
939
+
"serde",
940
+
"serde_json",
941
+
]
942
+
943
+
[[package]]
944
+
name = "schemars"
945
+
version = "1.1.0"
946
+
source = "registry+https://github.com/rust-lang/crates.io-index"
947
+
checksum = "9558e172d4e8533736ba97870c4b2cd63f84b382a3d6eb063da41b91cce17289"
948
+
dependencies = [
949
+
"dyn-clone",
950
+
"ref-cast",
951
+
"serde",
952
+
"serde_json",
953
+
]
954
+
955
+
[[package]]
956
+
name = "serde"
957
+
version = "1.0.228"
958
+
source = "registry+https://github.com/rust-lang/crates.io-index"
959
+
checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
960
+
dependencies = [
961
+
"serde_core",
962
+
"serde_derive",
963
+
]
964
+
965
+
[[package]]
966
+
name = "serde_core"
967
+
version = "1.0.228"
968
+
source = "registry+https://github.com/rust-lang/crates.io-index"
969
+
checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
970
+
dependencies = [
971
+
"serde_derive",
972
+
]
973
+
974
+
[[package]]
975
+
name = "serde_derive"
976
+
version = "1.0.228"
977
+
source = "registry+https://github.com/rust-lang/crates.io-index"
978
+
checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
979
+
dependencies = [
980
+
"proc-macro2",
981
+
"quote",
982
+
"syn",
983
+
]
984
+
985
+
[[package]]
986
+
name = "serde_json"
987
+
version = "1.0.145"
988
+
source = "registry+https://github.com/rust-lang/crates.io-index"
989
+
checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c"
990
+
dependencies = [
991
+
"itoa",
992
+
"memchr",
993
+
"ryu",
994
+
"serde",
995
+
"serde_core",
996
+
]
997
+
998
+
[[package]]
999
+
name = "serde_repr"
1000
+
version = "0.1.20"
1001
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1002
+
checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c"
1003
+
dependencies = [
1004
+
"proc-macro2",
1005
+
"quote",
1006
+
"syn",
1007
+
]
1008
+
1009
+
[[package]]
1010
+
name = "serde_with"
1011
+
version = "3.16.0"
1012
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1013
+
checksum = "10574371d41b0d9b2cff89418eda27da52bcaff2cc8741db26382a77c29131f1"
1014
+
dependencies = [
1015
+
"base64",
1016
+
"chrono",
1017
+
"hex",
1018
+
"indexmap 1.9.3",
1019
+
"indexmap 2.12.1",
1020
+
"schemars 0.9.0",
1021
+
"schemars 1.1.0",
1022
+
"serde_core",
1023
+
"serde_json",
1024
+
"serde_with_macros",
1025
+
"time",
1026
+
]
1027
+
1028
+
[[package]]
1029
+
name = "serde_with_macros"
1030
+
version = "3.16.0"
1031
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1032
+
checksum = "08a72d8216842fdd57820dc78d840bef99248e35fb2554ff923319e60f2d686b"
1033
+
dependencies = [
1034
+
"darling 0.21.3",
1035
+
"proc-macro2",
1036
+
"quote",
1037
+
"syn",
1038
+
]
1039
+
1040
+
[[package]]
1041
+
name = "sha2"
1042
+
version = "0.10.9"
1043
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1044
+
checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
1045
+
dependencies = [
1046
+
"cfg-if",
1047
+
"cpufeatures",
1048
+
"digest",
1049
+
]
1050
+
1051
+
[[package]]
1052
+
name = "shellexpand"
1053
+
version = "3.1.1"
1054
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1055
+
checksum = "8b1fdf65dd6331831494dd616b30351c38e96e45921a27745cf98490458b90bb"
1056
+
dependencies = [
1057
+
"dirs",
1058
+
]
1059
+
1060
+
[[package]]
1061
+
name = "shlex"
1062
+
version = "1.3.0"
1063
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1064
+
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
1065
+
1066
+
[[package]]
1067
+
name = "static_assertions"
1068
+
version = "1.1.0"
1069
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1070
+
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
1071
+
1072
+
[[package]]
1073
+
name = "strfmt"
1074
+
version = "0.2.5"
1075
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1076
+
checksum = "29fdc163db75f7b5ffa3daf0c5a7136fb0d4b2f35523cd1769da05e034159feb"
1077
+
1078
+
[[package]]
1079
+
name = "strsim"
1080
+
version = "0.11.1"
1081
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1082
+
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
1083
+
1084
+
[[package]]
38
1085
name = "syn"
39
1086
version = "2.0.111"
40
1087
source = "registry+https://github.com/rust-lang/crates.io-index"
···
46
1093
]
47
1094
48
1095
[[package]]
1096
+
name = "termcolor"
1097
+
version = "1.4.1"
1098
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1099
+
checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755"
1100
+
dependencies = [
1101
+
"winapi-util",
1102
+
]
1103
+
1104
+
[[package]]
1105
+
name = "thiserror"
1106
+
version = "1.0.69"
1107
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1108
+
checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
1109
+
dependencies = [
1110
+
"thiserror-impl 1.0.69",
1111
+
]
1112
+
1113
+
[[package]]
1114
+
name = "thiserror"
1115
+
version = "2.0.17"
1116
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1117
+
checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8"
1118
+
dependencies = [
1119
+
"thiserror-impl 2.0.17",
1120
+
]
1121
+
1122
+
[[package]]
1123
+
name = "thiserror-impl"
1124
+
version = "1.0.69"
1125
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1126
+
checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
1127
+
dependencies = [
1128
+
"proc-macro2",
1129
+
"quote",
1130
+
"syn",
1131
+
]
1132
+
1133
+
[[package]]
1134
+
name = "thiserror-impl"
1135
+
version = "2.0.17"
1136
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1137
+
checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913"
1138
+
dependencies = [
1139
+
"proc-macro2",
1140
+
"quote",
1141
+
"syn",
1142
+
]
1143
+
1144
+
[[package]]
1145
+
name = "time"
1146
+
version = "0.3.44"
1147
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1148
+
checksum = "91e7d9e3bb61134e77bde20dd4825b97c010155709965fedf0f49bb138e52a9d"
1149
+
dependencies = [
1150
+
"deranged",
1151
+
"itoa",
1152
+
"num-conv",
1153
+
"powerfmt",
1154
+
"serde",
1155
+
"time-core",
1156
+
"time-macros",
1157
+
]
1158
+
1159
+
[[package]]
1160
+
name = "time-core"
1161
+
version = "0.1.6"
1162
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1163
+
checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b"
1164
+
1165
+
[[package]]
1166
+
name = "time-macros"
1167
+
version = "0.2.24"
1168
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1169
+
checksum = "30cfb0125f12d9c277f35663a0a33f8c30190f4e4574868a330595412d34ebf3"
1170
+
dependencies = [
1171
+
"num-conv",
1172
+
"time-core",
1173
+
]
1174
+
1175
+
[[package]]
1176
+
name = "typeid"
1177
+
version = "1.0.3"
1178
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1179
+
checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c"
1180
+
1181
+
[[package]]
1182
+
name = "typenum"
1183
+
version = "1.19.0"
1184
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1185
+
checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb"
1186
+
1187
+
[[package]]
49
1188
name = "typst-wasm-macros"
50
1189
version = "0.0.2"
51
1190
source = "registry+https://github.com/rust-lang/crates.io-index"
···
67
1206
]
68
1207
69
1208
[[package]]
1209
+
name = "unicase"
1210
+
version = "2.8.1"
1211
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1212
+
checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539"
1213
+
1214
+
[[package]]
70
1215
name = "unicode-ident"
71
1216
version = "1.0.22"
72
1217
source = "registry+https://github.com/rust-lang/crates.io-index"
73
1218
checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5"
74
1219
75
1220
[[package]]
1221
+
name = "unicode-segmentation"
1222
+
version = "1.12.0"
1223
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1224
+
checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"
1225
+
1226
+
[[package]]
1227
+
name = "unicode-width"
1228
+
version = "0.1.14"
1229
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1230
+
checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af"
1231
+
1232
+
[[package]]
76
1233
name = "venial"
77
1234
version = "0.6.1"
78
1235
source = "registry+https://github.com/rust-lang/crates.io-index"
···
81
1238
"proc-macro2",
82
1239
"quote",
83
1240
]
1241
+
1242
+
[[package]]
1243
+
name = "version_check"
1244
+
version = "0.9.5"
1245
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1246
+
checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
1247
+
1248
+
[[package]]
1249
+
name = "walkdir"
1250
+
version = "2.5.0"
1251
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1252
+
checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b"
1253
+
dependencies = [
1254
+
"same-file",
1255
+
"winapi-util",
1256
+
]
1257
+
1258
+
[[package]]
1259
+
name = "wasi"
1260
+
version = "0.11.1+wasi-snapshot-preview1"
1261
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1262
+
checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
1263
+
1264
+
[[package]]
1265
+
name = "wasm-bindgen"
1266
+
version = "0.2.105"
1267
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1268
+
checksum = "da95793dfc411fbbd93f5be7715b0578ec61fe87cb1a42b12eb625caa5c5ea60"
1269
+
dependencies = [
1270
+
"cfg-if",
1271
+
"once_cell",
1272
+
"rustversion",
1273
+
"wasm-bindgen-macro",
1274
+
"wasm-bindgen-shared",
1275
+
]
1276
+
1277
+
[[package]]
1278
+
name = "wasm-bindgen-macro"
1279
+
version = "0.2.105"
1280
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1281
+
checksum = "04264334509e04a7bf8690f2384ef5265f05143a4bff3889ab7a3269adab59c2"
1282
+
dependencies = [
1283
+
"quote",
1284
+
"wasm-bindgen-macro-support",
1285
+
]
1286
+
1287
+
[[package]]
1288
+
name = "wasm-bindgen-macro-support"
1289
+
version = "0.2.105"
1290
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1291
+
checksum = "420bc339d9f322e562942d52e115d57e950d12d88983a14c79b86859ee6c7ebc"
1292
+
dependencies = [
1293
+
"bumpalo",
1294
+
"proc-macro2",
1295
+
"quote",
1296
+
"syn",
1297
+
"wasm-bindgen-shared",
1298
+
]
1299
+
1300
+
[[package]]
1301
+
name = "wasm-bindgen-shared"
1302
+
version = "0.2.105"
1303
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1304
+
checksum = "76f218a38c84bcb33c25ec7059b07847d465ce0e0a76b995e134a45adcb6af76"
1305
+
dependencies = [
1306
+
"unicode-ident",
1307
+
]
1308
+
1309
+
[[package]]
1310
+
name = "winapi-util"
1311
+
version = "0.1.11"
1312
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1313
+
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
1314
+
dependencies = [
1315
+
"windows-sys 0.61.2",
1316
+
]
1317
+
1318
+
[[package]]
1319
+
name = "windows-core"
1320
+
version = "0.62.2"
1321
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1322
+
checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb"
1323
+
dependencies = [
1324
+
"windows-implement",
1325
+
"windows-interface",
1326
+
"windows-link",
1327
+
"windows-result",
1328
+
"windows-strings",
1329
+
]
1330
+
1331
+
[[package]]
1332
+
name = "windows-implement"
1333
+
version = "0.60.2"
1334
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1335
+
checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf"
1336
+
dependencies = [
1337
+
"proc-macro2",
1338
+
"quote",
1339
+
"syn",
1340
+
]
1341
+
1342
+
[[package]]
1343
+
name = "windows-interface"
1344
+
version = "0.59.3"
1345
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1346
+
checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358"
1347
+
dependencies = [
1348
+
"proc-macro2",
1349
+
"quote",
1350
+
"syn",
1351
+
]
1352
+
1353
+
[[package]]
1354
+
name = "windows-link"
1355
+
version = "0.2.1"
1356
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1357
+
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
1358
+
1359
+
[[package]]
1360
+
name = "windows-result"
1361
+
version = "0.4.1"
1362
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1363
+
checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5"
1364
+
dependencies = [
1365
+
"windows-link",
1366
+
]
1367
+
1368
+
[[package]]
1369
+
name = "windows-strings"
1370
+
version = "0.5.1"
1371
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1372
+
checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091"
1373
+
dependencies = [
1374
+
"windows-link",
1375
+
]
1376
+
1377
+
[[package]]
1378
+
name = "windows-sys"
1379
+
version = "0.59.0"
1380
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1381
+
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
1382
+
dependencies = [
1383
+
"windows-targets",
1384
+
]
1385
+
1386
+
[[package]]
1387
+
name = "windows-sys"
1388
+
version = "0.61.2"
1389
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1390
+
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
1391
+
dependencies = [
1392
+
"windows-link",
1393
+
]
1394
+
1395
+
[[package]]
1396
+
name = "windows-targets"
1397
+
version = "0.52.6"
1398
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1399
+
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
1400
+
dependencies = [
1401
+
"windows_aarch64_gnullvm",
1402
+
"windows_aarch64_msvc",
1403
+
"windows_i686_gnu",
1404
+
"windows_i686_gnullvm",
1405
+
"windows_i686_msvc",
1406
+
"windows_x86_64_gnu",
1407
+
"windows_x86_64_gnullvm",
1408
+
"windows_x86_64_msvc",
1409
+
]
1410
+
1411
+
[[package]]
1412
+
name = "windows_aarch64_gnullvm"
1413
+
version = "0.52.6"
1414
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1415
+
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
1416
+
1417
+
[[package]]
1418
+
name = "windows_aarch64_msvc"
1419
+
version = "0.52.6"
1420
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1421
+
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
1422
+
1423
+
[[package]]
1424
+
name = "windows_i686_gnu"
1425
+
version = "0.52.6"
1426
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1427
+
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
1428
+
1429
+
[[package]]
1430
+
name = "windows_i686_gnullvm"
1431
+
version = "0.52.6"
1432
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1433
+
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
1434
+
1435
+
[[package]]
1436
+
name = "windows_i686_msvc"
1437
+
version = "0.52.6"
1438
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1439
+
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
1440
+
1441
+
[[package]]
1442
+
name = "windows_x86_64_gnu"
1443
+
version = "0.52.6"
1444
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1445
+
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
1446
+
1447
+
[[package]]
1448
+
name = "windows_x86_64_gnullvm"
1449
+
version = "0.52.6"
1450
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1451
+
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
1452
+
1453
+
[[package]]
1454
+
name = "windows_x86_64_msvc"
1455
+
version = "0.52.6"
1456
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1457
+
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
1458
+
1459
+
[[package]]
1460
+
name = "zerocopy"
1461
+
version = "0.8.30"
1462
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1463
+
checksum = "4ea879c944afe8a2b25fef16bb4ba234f47c694565e97383b36f3a878219065c"
1464
+
dependencies = [
1465
+
"zerocopy-derive",
1466
+
]
1467
+
1468
+
[[package]]
1469
+
name = "zerocopy-derive"
1470
+
version = "0.8.30"
1471
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1472
+
checksum = "cf955aa904d6040f70dc8e9384444cb1030aed272ba3cb09bbc4ab9e7c1f34f5"
1473
+
dependencies = [
1474
+
"proc-macro2",
1475
+
"quote",
1476
+
"syn",
1477
+
]
+7
-2
Cargo.toml
+7
-2
Cargo.toml
···
1
1
[package]
2
-
name = "evaltor"
2
+
name = "numbat-typst"
3
3
version = "0.1.0"
4
4
edition = "2024"
5
5
···
7
7
crate-type = ["cdylib"]
8
8
9
9
[dependencies]
10
-
fend-core = "1.5.7"
10
+
numbat = { version = "1.16.0", default-features = false }
11
11
typst-wasm-protocol = "0.0.2"
12
+
13
+
[profile.release]
14
+
# Tell `rustc` to optimize for small code size.
15
+
opt-level = "s"
16
+
lto = true
-21
LICENSE-MIT
-21
LICENSE-MIT
···
1
-
MIT License
2
-
3
-
Copyright (c) 2025 Vidya Sagar VOBBILISETTI
4
-
5
-
Permission is hereby granted, free of charge, to any person obtaining a copy
6
-
of this software and associated documentation files (the "Software"), to deal
7
-
in the Software without restriction, including without limitation the rights
8
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
-
copies of the Software, and to permit persons to whom the Software is
10
-
furnished to do so, subject to the following conditions:
11
-
12
-
The above copyright notice and this permission notice shall be included in all
13
-
copies or substantial portions of the Software.
14
-
15
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
-
SOFTWARE.
+12
-19
README.md
+12
-19
README.md
···
1
-
# Evaltor: Typst plugin for unit-aware calculations
2
-
3
-
I initially wanted to use [numbat](https://github.com/sharkdp/numbat) but since it requires access to filesystem (which is not allowed in typst), I ended up choosing [fend](https://printfn.github.io/fend) as the backend.
4
-
5
-
If I find `fend` to be limiting, I will try to implement in-memory module importer in `numbat` where all the `nbt` files are imported at compile-time.
1
+
# Typst plugin for [numbat](https://numbat.dev)
6
2
7
3
Built using [typst-wasm](https://github.com/sjfhsjfh/typst-wasm).
8
4
9
-
First compile the rust code to wasm32 using:
5
+
Need to install [wasi-stub](https://github.com/astrale-sharp/wasm-minimal-protocol/tree/master/crates/wasi-stub)
6
+
7
+
First compile the rust code to WASM using:
10
8
11
9
```sh
12
-
rustup target add wasm32-unknown-unknown
13
-
cargo build --release --target wasm32-unknown-unknown
10
+
rustup target add wasm32-wasip1
11
+
cargo build --release --target wasm32-wasip1
12
+
wasi-stub target/wasm32-wasip1/release/numbat_typst.wasm -o target/wasm32-wasip1/release/numbat_typst.wasm
14
13
```
15
14
16
-
Then install the typst package locally using [tlp](https://tangled.org/vidyasagarv.com/tlp) or [utpm](https://github.com/typst-community/utpm):
15
+
Then install the Typst package locally using [tlp](https://tangled.org/vidyasagarv.com/tlp) or utpm:
17
16
18
17
```sh
19
18
tlp init
20
19
```
21
20
22
-
Then you can directly use in typst like:
21
+
Then just load the functions like:
23
22
24
23
```typ
25
-
#import "@local/evaltor:0.1.0": print_eval
26
-
27
-
#print_eval("2 km + 30 m")
24
+
#import "@local/numbat:0.1.0": to_uppercase
28
25
```
29
26
30
-
will produce the output:
27
+
## Sources of inspiration
31
28
32
-
```
33
-
2 km + 30 m = 2.03 km
34
-
```
35
-
36
-
For more details, see [examples.typ](tests/examples.typ) and [fend manual](https://printfn.github.io/fend/documentation/).
29
+
- [metasearch2](https://github.com/mat-1/metasearch2): A cute a light-weight search engine that uses `numbat` to process relevant queries.
+3
bt.sh
+3
bt.sh
+176
-13
src/lib.rs
+176
-13
src/lib.rs
···
1
+
use numbat::{
2
+
InterpreterResult, InterpreterSettings, markup::Markup, pretty_print::PrettyPrint,
3
+
resolver::CodeSource,
4
+
};
1
5
use std::str;
6
+
use std::sync::LazyLock;
2
7
use typst_wasm_protocol::wasm_export;
3
8
9
+
// Calculate using numbat
4
10
#[wasm_export]
5
-
fn fend_evaluate(query: &[u8]) -> Result<String, String> {
6
-
let input = str::from_utf8(query).map_err(|e| format!("UTF-8 error: {}", e))?;
7
-
let mut ctx = fend_core::Context::new();
8
-
let mut result = String::new();
9
-
match fend_core::evaluate(input, &mut ctx) {
10
-
Ok(res) => {
11
-
if !res.output_is_empty() {
12
-
result.push_str(res.get_main_result());
13
-
}
11
+
fn calc(query: &[u8]) -> Result<String, String> {
12
+
let query_str = str::from_utf8(query).map_err(|e| format!("UTF-8 error: {}", e))?;
13
+
let query_str = clean_query(query_str);
14
+
15
+
if !is_potential_request(&query_str) {
16
+
return Err("Not a valid query!".to_string());
17
+
}
18
+
let mut ctx = NUMBAT_CTX.clone();
19
+
let (_, res) = match ctx.interpret_with_settings(
20
+
&mut InterpreterSettings {
21
+
print_fn: Box::new(move |_: &Markup| {}),
22
+
},
23
+
&query_str,
24
+
CodeSource::Text,
25
+
) {
26
+
Ok(r) => r,
27
+
Err(err) => {
28
+
return Err(format!("{}", err));
14
29
}
15
-
Err(msg) => {
16
-
return Err(format!("Error: {msg}"));
17
-
}
30
+
};
31
+
32
+
let result_markup = match res {
33
+
InterpreterResult::Value(val) => val.pretty_print(),
34
+
InterpreterResult::Continue => return Err("Incomplete query".to_string()),
35
+
};
36
+
37
+
let result_str = result_markup.to_string();
38
+
if result_str.trim() == query_str {
39
+
return Err("No result".to_string());
40
+
}
41
+
42
+
Ok(result_str)
43
+
}
44
+
45
+
fn clean_query(query: &str) -> String {
46
+
query.strip_suffix('=').unwrap_or(query).trim().to_string()
47
+
}
48
+
49
+
fn is_potential_request(query: &str) -> bool {
50
+
// allow these short constants, they're fine
51
+
if matches!(query.to_lowercase().as_str(), "pi" | "e" | "c") {
52
+
return true;
53
+
}
54
+
55
+
// at least 3 characters
56
+
if query.len() < 3 {
57
+
return false;
58
+
}
59
+
60
+
// must have numbers
61
+
if !query.chars().any(|c| c.is_numeric()) {
62
+
return false;
63
+
}
64
+
65
+
// if it starts and ends with quotes then the person was just searching in
66
+
// quotes and didn't mean to evaluate a string
67
+
if query.starts_with('"')
68
+
&& query.ends_with('"')
69
+
&& query.chars().filter(|c| *c == '"').count() == 2
70
+
{
71
+
return false;
72
+
}
73
+
74
+
true
75
+
}
76
+
77
+
pub static NUMBAT_CTX: LazyLock<numbat::Context> = LazyLock::new(|| {
78
+
// let _ = ctx.interpret("use prelude", CodeSource::Internal);
79
+
// let _ = ctx.interpret("use units::currencies", CodeSource::Internal);
80
+
81
+
// ctx.load_currency_module_on_demand(true);
82
+
83
+
// a few hardcoded aliases
84
+
// (the lowercase alias code won't work for these because they have prefixes)
85
+
// for (alias, canonical) in &[
86
+
// ("kb", "kB"),
87
+
// ("kib", "KiB"),
88
+
// ("mb", "MB"),
89
+
// ("mib", "MiB"),
90
+
// ("gb", "GB"),
91
+
// ("gib", "GiB"),
92
+
// ("tb", "TB"),
93
+
// ("tib", "TiB"),
94
+
// ("pb", "PB"),
95
+
// ("pib", "PiB"),
96
+
// ] {
97
+
// let _ = ctx.interpret(&format!("let {alias} = {canonical}"), CodeSource::Internal);
98
+
// }
99
+
100
+
// lowercase aliases (so for example usd and USD are the same unit)
101
+
102
+
// let mut unit_names = HashSet::new();
103
+
// for names in ctx.unit_names() {
104
+
// unit_names.extend(names.iter().map(|name| name.to_owned()));
105
+
// }
106
+
107
+
// for name in &unit_names {
108
+
// // taken_unit_names.insert(alias_name);
109
+
// let name_lower = name.to_lowercase();
110
+
// // add every lowercase aliases for every unit as long as that alias isn't
111
+
// // already taken
112
+
// if !unit_names.contains(&name_lower) {
113
+
// let _ = ctx.interpret(&format!("let {name_lower} = {name}"), CodeSource::Internal);
114
+
// }
115
+
// }
116
+
117
+
// numbat::Context::new(numbat::module_importer::BuiltinModuleImporter {})
118
+
numbat::Context::new(numbat::module_importer::BuiltinModuleImporter::default())
119
+
});
120
+
121
+
// Simple string operation function
122
+
#[wasm_export]
123
+
fn to_uppercase(input: &[u8]) -> Vec<u8> {
124
+
let input_str = match str::from_utf8(input) {
125
+
Ok(s) => s,
126
+
Err(_) => return b"Invalid UTF-8 input".to_vec(),
127
+
};
128
+
129
+
input_str.to_uppercase().into_bytes()
130
+
}
131
+
132
+
// Using custom export name
133
+
#[wasm_export(export_rename = "count_chars")]
134
+
fn count_characters(input: &[u8]) -> Vec<u8> {
135
+
let input_str = match str::from_utf8(input) {
136
+
Ok(s) => s,
137
+
Err(_) => return b"Invalid UTF-8 input".to_vec(),
138
+
};
139
+
140
+
format!("Character count: {}", input_str.chars().count()).into_bytes()
141
+
}
142
+
143
+
// Function returning Result type
144
+
#[wasm_export]
145
+
fn divide_numbers(input: &[u8]) -> Result<String, String> {
146
+
let input_str = str::from_utf8(input).map_err(|e| format!("UTF-8 error: {}", e))?;
147
+
148
+
let numbers: Vec<&str> = input_str.split(',').collect();
149
+
if numbers.len() != 2 {
150
+
return Err("Expected two comma-separated numbers".to_string());
18
151
}
19
-
Ok(result.to_string())
152
+
153
+
let a: f64 = numbers[0]
154
+
.trim()
155
+
.parse()
156
+
.map_err(|_| "First value is not a valid number".to_string())?;
157
+
let b: f64 = numbers[1]
158
+
.trim()
159
+
.parse()
160
+
.map_err(|_| "Second value is not a valid number".to_string())?;
161
+
162
+
if b == 0.0 {
163
+
return Err("Cannot divide by zero".to_string());
164
+
}
165
+
166
+
let result = a / b;
167
+
Ok(format!("Result: {:.2}", result))
168
+
}
169
+
170
+
// Function returning Result<String, String> type
171
+
#[wasm_export]
172
+
fn validate_email(input: &[u8]) -> Result<String, String> {
173
+
let email = str::from_utf8(input)
174
+
.map_err(|e| format!("UTF-8 error: {}", e))?
175
+
.trim();
176
+
177
+
// Simple email validation
178
+
if !email.contains('@') || !email.contains('.') {
179
+
return Err("Invalid email format".to_string());
180
+
}
181
+
182
+
Ok("Email is valid".to_string())
20
183
}
+1
-6
src/lib.typ
+1
-6
src/lib.typ
···
1
1
// Should compile numbat_typst.wasm first
2
2
// using:
3
-
#import plugin("../target/wasm32-unknown-unknown/release/evaltor.wasm"):fend_evaluate
4
-
5
-
#let print_eval(input) = {
6
-
let output = str(fend_evaluate(bytes(input)))
7
-
[#input = #output]
8
-
}
3
+
#import plugin("../target/wasm32-wasip1/release/numbat_typst.wasm"): to_uppercase, count_chars, divide_numbers, validate_email, calc
+21
-26
tests/examples.typ
+21
-26
tests/examples.typ
···
1
-
#import "@local/evaltor:0.1.0": print_eval
1
+
#import "@local/numbat:0.1.0": to_uppercase, count_chars, divide_numbers, validate_email, calc
2
2
3
-
#show heading: it => {
4
-
it.body
5
-
v(1pt)
6
-
}
7
-
#set text(size:16pt)
3
+
= Tests
8
4
9
-
= Evaltor: Typst plugin for unit-aware calculations
5
+
Hi there!
10
6
11
-
The function `print_eval` will print the input along with its result, calculated using `fend` backend, which is unit-aware.
7
+
#let input = "Hello, Typst!"
12
8
13
-
Some examples:
9
+
// Call the to_uppercase function
10
+
#let uppercase = str(to_uppercase(bytes(input)))
11
+
Original: #input\
12
+
Uppercase: #uppercase
14
13
15
-
#print_eval("2 km + 30 m")
14
+
// Call the count_chars function (note this is exported with a custom name)
15
+
#let char_count = str(count_chars(bytes(input)))
16
+
#char_count
16
17
17
-
#print_eval("1 ft to cm")
18
-
19
-
#print_eval("5'7\" to cm")
18
+
// Call a function that returns a Result type
19
+
#let division_result = str(divide_numbers(bytes("10,2")))
20
+
#division_result
20
21
21
-
#print_eval("cos (pi/4) + i * (sin (pi/4))")
22
+
// Handle potential errors, uncomment to see the error handling in action
23
+
// #let division_error = divide_numbers(bytes("10,0"))
22
24
23
-
#print_eval("0b1001 + 3")
25
+
// Use a function with Result<String, String> type
26
+
#let email_valid = str(validate_email(bytes("user@example.com")))
27
+
Email validation: #email_valid
24
28
25
-
#print_eval("0xffff to decimal")
26
-
27
-
#print_eval("100 C to F")
28
-
29
-
#print_eval("1 lightyear to parsecs")
30
-
31
-
#print_eval("temperature = 30 °C; temperature to °F")
32
-
33
-
#print_eval("((10um)/(0.334cm) + (0.6mm)/(35.28cm) + (1mm)/(47.57cm) + (0.4mm)/(35.28cm) + (2um)/(3.56cm)) to percent")
34
-
35
-
*Currently, random numbers are not available.*
29
+
#let numbat = str(calc(bytes("2+3")))
30
+
Numbat: #numbat