repositories / smith

smith

There are many coding harnesses - but this one is fast

owned by bugabinga

feat: P16 syntastica syntax highlighting prototype

985f3e8a78115fbb4c342fd94290a7d5d75a9f6e

HallucyGenie Agent <agent@hallucygenie.local> ·

SSH signature · not checked

Browse filesCompare with HEAD

9/9 tests pass on Android/Termux with runtime-c2rust (zero C deps):
- T1: Rust highlighting (ANSI terminal output)
- T2: Lua highlighting (agent plugin code)
- T3: JavaScript highlighting
- T4: TypeScript highlighting
- T5: File type detection via tft (.rs/.lua/.js → Lang)
- T6: Processor reuse (Rust+Lua+JS on single Processor)
- T7: Multiple themes (gruvbox dark, onedark, onelight)
- T8: Custom theme via theme! macro
- T9: HTML rendering with HtmlRenderer

Key findings:
- runtime-c2rust feature: pure Rust, no C deps, Android safe
- 29MB debug binary (tree-sitter grammars)
- syntastica-parsers (crates.io): no TOML parser
- tft file type detection: .ts/.tsx returns None (use explicit Lang)
- 53s first compile, 1.5s incremental

Changed files (3)

+1701 / −0 text lines

Diff layout

prototypes/p16-syntastica/Cargo.lock

Added
new file mode 100644

+1399 / −0 text lines

1# This file is automatically @generated by Cargo.
2# It is not intended for manual editing.
3version = 4
4
5[[package]]
6name = "aho-corasick"
7version = "1.1.4"
8source = "registry+https://github.com/rust-lang/crates.io-index"
9checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301"
10dependencies = [
11 "memchr",
12]
14[[package]]
15name = "android_system_properties"
16version = "0.1.5"
17source = "registry+https://github.com/rust-lang/crates.io-index"
18checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
19dependencies = [
20 "libc",
21]
23[[package]]
24name = "approx"
25version = "0.5.1"
26source = "registry+https://github.com/rust-lang/crates.io-index"
27checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6"
28dependencies = [
29 "num-traits",
30]
32[[package]]
33name = "autocfg"
34version = "1.5.1"
35source = "registry+https://github.com/rust-lang/crates.io-index"
36checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
38[[package]]
39name = "base64"
40version = "0.22.1"
41source = "registry+https://github.com/rust-lang/crates.io-index"
42checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
44[[package]]
45name = "bs58"
46version = "0.5.1"
47source = "registry+https://github.com/rust-lang/crates.io-index"
48checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4"
49dependencies = [
50 "tinyvec",
51]
53[[package]]
54name = "bumpalo"
55version = "3.20.3"
56source = "registry+https://github.com/rust-lang/crates.io-index"
57checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649"
59[[package]]
60name = "by_address"
61version = "1.2.1"
62source = "registry+https://github.com/rust-lang/crates.io-index"
63checksum = "64fa3c856b712db6612c019f14756e64e4bcea13337a6b33b696333a9eaa2d06"
65[[package]]
66name = "c2rust-bitfields"
67version = "0.3.0"
68source = "registry+https://github.com/rust-lang/crates.io-index"
69checksum = "eb34f0c0ace43530b2df7f18bc69ee0c4082158aa451ece29602f8c841e73764"
70dependencies = [
71 "c2rust-bitfields-derive",
72]
74[[package]]
75name = "c2rust-bitfields-derive"
76version = "0.2.1"
77source = "registry+https://github.com/rust-lang/crates.io-index"
78checksum = "3dd1601a7b828ab874d890e5a895563ca8ad485bdd3d2a359f148c8b72537241"
79dependencies = [
80 "proc-macro2",
81 "quote",
82 "syn 1.0.109",
83]
85[[package]]
86name = "casey"
87version = "0.4.2"
88source = "registry+https://github.com/rust-lang/crates.io-index"
89checksum = "8e779867f62d81627d1438e0d3fb6ed7d7c9d64293ca6d87a1e88781b94ece1c"
90dependencies = [
91 "syn 2.0.117",
92]
94[[package]]
95name = "cc"
96version = "1.2.62"
97source = "registry+https://github.com/rust-lang/crates.io-index"
98checksum = "a1dce859f0832a7d088c4f1119888ab94ef4b5d6795d1ce05afb7fe159d79f98"
99dependencies = [
100 "find-msvc-tools",
101 "shlex",
102]
104[[package]]
105name = "cfg-if"
106version = "1.0.4"
107source = "registry+https://github.com/rust-lang/crates.io-index"
108checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
110[[package]]
111name = "chrono"
112version = "0.4.44"
113source = "registry+https://github.com/rust-lang/crates.io-index"
114checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0"
115dependencies = [
116 "iana-time-zone",
117 "num-traits",
118 "serde",
119 "windows-link",
120]
122[[package]]
123name = "core-foundation-sys"
124version = "0.8.7"
125source = "registry+https://github.com/rust-lang/crates.io-index"
126checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
128[[package]]
129name = "darling"
130version = "0.23.0"
131source = "registry+https://github.com/rust-lang/crates.io-index"
132checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d"
133dependencies = [
134 "darling_core",
135 "darling_macro",
136]
138[[package]]
139name = "darling_core"
140version = "0.23.0"
141source = "registry+https://github.com/rust-lang/crates.io-index"
142checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0"
143dependencies = [
144 "ident_case",
145 "proc-macro2",
146 "quote",
147 "strsim",
148 "syn 2.0.117",
149]
151[[package]]
152name = "darling_macro"
153version = "0.23.0"
154source = "registry+https://github.com/rust-lang/crates.io-index"
155checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d"
156dependencies = [
157 "darling_core",
158 "quote",
159 "syn 2.0.117",
160]
162[[package]]
163name = "deranged"
164version = "0.5.8"
165source = "registry+https://github.com/rust-lang/crates.io-index"
166checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c"
167dependencies = [
168 "powerfmt",
169 "serde_core",
170]
172[[package]]
173name = "dyn-clone"
174version = "1.0.20"
175source = "registry+https://github.com/rust-lang/crates.io-index"
176checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555"
178[[package]]
179name = "equivalent"
180version = "1.0.2"
181source = "registry+https://github.com/rust-lang/crates.io-index"
182checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
184[[package]]
185name = "fast-srgb8"
186version = "1.0.0"
187source = "registry+https://github.com/rust-lang/crates.io-index"
188checksum = "dd2e7510819d6fbf51a5545c8f922716ecfb14df168a3242f7d33e0239efe6a1"
190[[package]]
191name = "fastrand"
192version = "2.4.1"
193source = "registry+https://github.com/rust-lang/crates.io-index"
194checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6"
196[[package]]
197name = "find-msvc-tools"
198version = "0.1.9"
199source = "registry+https://github.com/rust-lang/crates.io-index"
200checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582"
202[[package]]
203name = "futures-core"
204version = "0.3.32"
205source = "registry+https://github.com/rust-lang/crates.io-index"
206checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d"
208[[package]]
209name = "futures-task"
210version = "0.3.32"
211source = "registry+https://github.com/rust-lang/crates.io-index"
212checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393"
214[[package]]
215name = "futures-util"
216version = "0.3.32"
217source = "registry+https://github.com/rust-lang/crates.io-index"
218checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6"
219dependencies = [
220 "futures-core",
221 "futures-task",
222 "pin-project-lite",
223 "slab",
224]
226[[package]]
227name = "getrandom"
228version = "0.2.17"
229source = "registry+https://github.com/rust-lang/crates.io-index"
230checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0"
231dependencies = [
232 "cfg-if",
233 "libc",
234 "wasi",
235]
237[[package]]
238name = "hashbrown"
239version = "0.12.3"
240source = "registry+https://github.com/rust-lang/crates.io-index"
241checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
243[[package]]
244name = "hashbrown"
245version = "0.17.1"
246source = "registry+https://github.com/rust-lang/crates.io-index"
247checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
249[[package]]
250name = "heck"
251version = "0.4.1"
252source = "registry+https://github.com/rust-lang/crates.io-index"
253checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
255[[package]]
256name = "heck"
257version = "0.5.0"
258source = "registry+https://github.com/rust-lang/crates.io-index"
259checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
261[[package]]
262name = "hex"
263version = "0.4.3"
264source = "registry+https://github.com/rust-lang/crates.io-index"
265checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
267[[package]]
268name = "iana-time-zone"
269version = "0.1.65"
270source = "registry+https://github.com/rust-lang/crates.io-index"
271checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470"
272dependencies = [
273 "android_system_properties",
274 "core-foundation-sys",
275 "iana-time-zone-haiku",
276 "js-sys",
277 "log",
278 "wasm-bindgen",
279 "windows-core",
280]
282[[package]]
283name = "iana-time-zone-haiku"
284version = "0.1.2"
285source = "registry+https://github.com/rust-lang/crates.io-index"
286checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
287dependencies = [
288 "cc",
289]
291[[package]]
292name = "ident_case"
293version = "1.0.1"
294source = "registry+https://github.com/rust-lang/crates.io-index"
295checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
297[[package]]
298name = "indexmap"
299version = "1.9.3"
300source = "registry+https://github.com/rust-lang/crates.io-index"
301checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
302dependencies = [
303 "autocfg",
304 "hashbrown 0.12.3",
305 "serde",
306]
308[[package]]
309name = "indexmap"
310version = "2.14.0"
311source = "registry+https://github.com/rust-lang/crates.io-index"
312checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9"
313dependencies = [
314 "equivalent",
315 "hashbrown 0.17.1",
316 "serde",
317 "serde_core",
318]
320[[package]]
321name = "itoa"
322version = "1.0.18"
323source = "registry+https://github.com/rust-lang/crates.io-index"
324checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
326[[package]]
327name = "js-sys"
328version = "0.3.99"
329source = "registry+https://github.com/rust-lang/crates.io-index"
330checksum = "142bc4740e452c1e57ade0cbc129f139c9093e354346f0872ef985f4f5cf5f11"
331dependencies = [
332 "cfg-if",
333 "futures-util",
334 "once_cell",
335 "wasm-bindgen",
336]
338[[package]]
339name = "lazy-regex"
340version = "3.6.0"
341source = "registry+https://github.com/rust-lang/crates.io-index"
342checksum = "6bae91019476d3ec7147de9aa291cadb6d870abf2f3015d2da73a90325ac1496"
343dependencies = [
344 "lazy-regex-proc_macros",
345 "once_cell",
346 "regex",
347]
349[[package]]
350name = "lazy-regex-proc_macros"
351version = "3.6.0"
352source = "registry+https://github.com/rust-lang/crates.io-index"
353checksum = "4de9c1e1439d8b7b3061b2d209809f447ca33241733d9a3c01eabf2dc8d94358"
354dependencies = [
355 "proc-macro2",
356 "quote",
357 "regex",
358 "syn 2.0.117",
359]
361[[package]]
362name = "libc"
363version = "0.2.186"
364source = "registry+https://github.com/rust-lang/crates.io-index"
365checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
367[[package]]
368name = "log"
369version = "0.4.29"
370source = "registry+https://github.com/rust-lang/crates.io-index"
371checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
373[[package]]
374name = "memchr"
375version = "2.8.0"
376source = "registry+https://github.com/rust-lang/crates.io-index"
377checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
379[[package]]
380name = "num-conv"
381version = "0.2.2"
382source = "registry+https://github.com/rust-lang/crates.io-index"
383checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441"
385[[package]]
386name = "num-traits"
387version = "0.2.19"
388source = "registry+https://github.com/rust-lang/crates.io-index"
389checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
390dependencies = [
391 "autocfg",
392]
394[[package]]
395name = "once_cell"
396version = "1.21.4"
397source = "registry+https://github.com/rust-lang/crates.io-index"
398checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
400[[package]]
401name = "p16-syntastica"
402version = "0.1.0"
403dependencies = [
404 "syntastica",
405 "syntastica-parsers",
406 "syntastica-themes",
407 "tft",
408]
410[[package]]
411name = "palette"
412version = "0.7.6"
413source = "registry+https://github.com/rust-lang/crates.io-index"
414checksum = "4cbf71184cc5ecc2e4e1baccdb21026c20e5fc3dcf63028a086131b3ab00b6e6"
415dependencies = [
416 "approx",
417 "fast-srgb8",
418 "palette_derive",
419]
421[[package]]
422name = "palette_derive"
423version = "0.7.6"
424source = "registry+https://github.com/rust-lang/crates.io-index"
425checksum = "f5030daf005bface118c096f510ffb781fc28f9ab6a32ab224d8631be6851d30"
426dependencies = [
427 "by_address",
428 "proc-macro2",
429 "quote",
430 "syn 2.0.117",
431]
433[[package]]
434name = "phf"
435version = "0.10.1"
436source = "registry+https://github.com/rust-lang/crates.io-index"
437checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259"
438dependencies = [
439 "phf_macros 0.10.0",
440 "phf_shared 0.10.0",
441 "proc-macro-hack",
442]
444[[package]]
445name = "phf"
446version = "0.11.3"
447source = "registry+https://github.com/rust-lang/crates.io-index"
448checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078"
449dependencies = [
450 "phf_macros 0.11.3",
451 "phf_shared 0.11.3",
452]
454[[package]]
455name = "phf"
456version = "0.12.1"
457source = "registry+https://github.com/rust-lang/crates.io-index"
458checksum = "913273894cec178f401a31ec4b656318d95473527be05c0752cc41cdc32be8b7"
459dependencies = [
460 "phf_macros 0.12.1",
461 "phf_shared 0.12.1",
462 "serde",
463]
465[[package]]
466name = "phf_generator"
467version = "0.10.0"
468source = "registry+https://github.com/rust-lang/crates.io-index"
469checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6"
470dependencies = [
471 "phf_shared 0.10.0",
472 "rand",
473]
475[[package]]
476name = "phf_generator"
477version = "0.11.3"
478source = "registry+https://github.com/rust-lang/crates.io-index"
479checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d"
480dependencies = [
481 "phf_shared 0.11.3",
482 "rand",
483]
485[[package]]
486name = "phf_generator"
487version = "0.12.1"
488source = "registry+https://github.com/rust-lang/crates.io-index"
489checksum = "2cbb1126afed61dd6368748dae63b1ee7dc480191c6262a3b4ff1e29d86a6c5b"
490dependencies = [
491 "fastrand",
492 "phf_shared 0.12.1",
493]
495[[package]]
496name = "phf_macros"
497version = "0.10.0"
498source = "registry+https://github.com/rust-lang/crates.io-index"
499checksum = "58fdf3184dd560f160dd73922bea2d5cd6e8f064bf4b13110abd81b03697b4e0"
500dependencies = [
501 "phf_generator 0.10.0",
502 "phf_shared 0.10.0",
503 "proc-macro-hack",
504 "proc-macro2",
505 "quote",
506 "syn 1.0.109",
507]
509[[package]]
510name = "phf_macros"
511version = "0.11.3"
512source = "registry+https://github.com/rust-lang/crates.io-index"
513checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216"
514dependencies = [
515 "phf_generator 0.11.3",
516 "phf_shared 0.11.3",
517 "proc-macro2",
518 "quote",
519 "syn 2.0.117",
520]
522[[package]]
523name = "phf_macros"
524version = "0.12.1"
525source = "registry+https://github.com/rust-lang/crates.io-index"
526checksum = "d713258393a82f091ead52047ca779d37e5766226d009de21696c4e667044368"
527dependencies = [
528 "phf_generator 0.12.1",
529 "phf_shared 0.12.1",
530 "proc-macro2",
531 "quote",
532 "syn 2.0.117",
533]
535[[package]]
536name = "phf_shared"
537version = "0.10.0"
538source = "registry+https://github.com/rust-lang/crates.io-index"
539checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096"
540dependencies = [
541 "siphasher 0.3.11",
542]
544[[package]]
545name = "phf_shared"
546version = "0.11.3"
547source = "registry+https://github.com/rust-lang/crates.io-index"
548checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5"
549dependencies = [
550 "siphasher 1.0.3",
551]
553[[package]]
554name = "phf_shared"
555version = "0.12.1"
556source = "registry+https://github.com/rust-lang/crates.io-index"
557checksum = "06005508882fb681fd97892ecff4b7fd0fee13ef1aa569f8695dae7ab9099981"
558dependencies = [
559 "siphasher 1.0.3",
560]
562[[package]]
563name = "pin-project-lite"
564version = "0.2.17"
565source = "registry+https://github.com/rust-lang/crates.io-index"
566checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
568[[package]]
569name = "powerfmt"
570version = "0.2.0"
571source = "registry+https://github.com/rust-lang/crates.io-index"
572checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
574[[package]]
575name = "ppv-lite86"
576version = "0.2.21"
577source = "registry+https://github.com/rust-lang/crates.io-index"
578checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9"
579dependencies = [
580 "zerocopy",
581]
583[[package]]
584name = "proc-macro-hack"
585version = "0.5.20+deprecated"
586source = "registry+https://github.com/rust-lang/crates.io-index"
587checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068"
589[[package]]
590name = "proc-macro-utils"
591version = "0.10.0"
592source = "registry+https://github.com/rust-lang/crates.io-index"
593checksum = "eeaf08a13de400bc215877b5bdc088f241b12eb42f0a548d3390dc1c56bb7071"
594dependencies = [
595 "proc-macro2",
596 "quote",
597 "smallvec",
598]
600[[package]]
601name = "proc-macro2"
602version = "1.0.106"
603source = "registry+https://github.com/rust-lang/crates.io-index"
604checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
605dependencies = [
606 "unicode-ident",
607]
609[[package]]
610name = "quote"
611version = "1.0.45"
612source = "registry+https://github.com/rust-lang/crates.io-index"
613checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
614dependencies = [
615 "proc-macro2",
616]
618[[package]]
619name = "quote-use"
620version = "0.8.4"
621source = "registry+https://github.com/rust-lang/crates.io-index"
622checksum = "9619db1197b497a36178cfc736dc96b271fe918875fbf1344c436a7e93d0321e"
623dependencies = [
624 "quote",
625 "quote-use-macros",
626]
628[[package]]
629name = "quote-use-macros"
630version = "0.8.4"
631source = "registry+https://github.com/rust-lang/crates.io-index"
632checksum = "82ebfb7faafadc06a7ab141a6f67bcfb24cb8beb158c6fe933f2f035afa99f35"
633dependencies = [
634 "proc-macro-utils",
635 "proc-macro2",
636 "quote",
637 "syn 2.0.117",
638]
640[[package]]
641name = "rand"
642version = "0.8.6"
643source = "registry+https://github.com/rust-lang/crates.io-index"
644checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a"
645dependencies = [
646 "libc",
647 "rand_chacha",
648 "rand_core",
649]
651[[package]]
652name = "rand_chacha"
653version = "0.3.1"
654source = "registry+https://github.com/rust-lang/crates.io-index"
655checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
656dependencies = [
657 "ppv-lite86",
658 "rand_core",
659]
661[[package]]
662name = "rand_core"
663version = "0.6.4"
664source = "registry+https://github.com/rust-lang/crates.io-index"
665checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
666dependencies = [
667 "getrandom",
668]
670[[package]]
671name = "ref-cast"
672version = "1.0.25"
673source = "registry+https://github.com/rust-lang/crates.io-index"
674checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d"
675dependencies = [
676 "ref-cast-impl",
677]
679[[package]]
680name = "ref-cast-impl"
681version = "1.0.25"
682source = "registry+https://github.com/rust-lang/crates.io-index"
683checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da"
684dependencies = [
685 "proc-macro2",
686 "quote",
687 "syn 2.0.117",
688]
690[[package]]
691name = "regex"
692version = "1.12.3"
693source = "registry+https://github.com/rust-lang/crates.io-index"
694checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276"
695dependencies = [
696 "aho-corasick",
697 "memchr",
698 "regex-automata",
699 "regex-syntax",
700]
702[[package]]
703name = "regex-automata"
704version = "0.4.14"
705source = "registry+https://github.com/rust-lang/crates.io-index"
706checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f"
707dependencies = [
708 "aho-corasick",
709 "memchr",
710 "regex-syntax",
711]
713[[package]]
714name = "regex-syntax"
715version = "0.8.10"
716source = "registry+https://github.com/rust-lang/crates.io-index"
717checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a"
719[[package]]
720name = "rustversion"
721version = "1.0.22"
722source = "registry+https://github.com/rust-lang/crates.io-index"
723checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
725[[package]]
726name = "schemars"
727version = "0.9.0"
728source = "registry+https://github.com/rust-lang/crates.io-index"
729checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f"
730dependencies = [
731 "dyn-clone",
732 "ref-cast",
733 "serde",
734 "serde_json",
735]
737[[package]]
738name = "schemars"
739version = "1.2.1"
740source = "registry+https://github.com/rust-lang/crates.io-index"
741checksum = "a2b42f36aa1cd011945615b92222f6bf73c599a102a300334cd7f8dbeec726cc"
742dependencies = [
743 "dyn-clone",
744 "ref-cast",
745 "serde",
746 "serde_json",
747]
749[[package]]
750name = "serde"
751version = "1.0.228"
752source = "registry+https://github.com/rust-lang/crates.io-index"
753checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
754dependencies = [
755 "serde_core",
756 "serde_derive",
757]
759[[package]]
760name = "serde_core"
761version = "1.0.228"
762source = "registry+https://github.com/rust-lang/crates.io-index"
763checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
764dependencies = [
765 "serde_derive",
766]
768[[package]]
769name = "serde_derive"
770version = "1.0.228"
771source = "registry+https://github.com/rust-lang/crates.io-index"
772checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
773dependencies = [
774 "proc-macro2",
775 "quote",
776 "syn 2.0.117",
777]
779[[package]]
780name = "serde_json"
781version = "1.0.150"
782source = "registry+https://github.com/rust-lang/crates.io-index"
783checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9"
784dependencies = [
785 "indexmap 2.14.0",
786 "itoa",
787 "memchr",
788 "serde",
789 "serde_core",
790 "zmij",
791]
793[[package]]
794name = "serde_spanned"
795version = "0.6.9"
796source = "registry+https://github.com/rust-lang/crates.io-index"
797checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3"
798dependencies = [
799 "serde",
800]
802[[package]]
803name = "serde_with"
804version = "3.20.0"
805source = "registry+https://github.com/rust-lang/crates.io-index"
806checksum = "e72c1c2cb7b223fafb600a619537a871c2818583d619401b785e7c0b746ccde2"
807dependencies = [
808 "base64",
809 "bs58",
810 "chrono",
811 "hex",
812 "indexmap 1.9.3",
813 "indexmap 2.14.0",
814 "schemars 0.9.0",
815 "schemars 1.2.1",
816 "serde_core",
817 "serde_json",
818 "serde_with_macros",
819 "time",
820]
822[[package]]
823name = "serde_with_macros"
824version = "3.20.0"
825source = "registry+https://github.com/rust-lang/crates.io-index"
826checksum = "b90c488738ecb4fb0262f41f43bc40efc5868d9fb744319ddf5f5317f417bfac"
827dependencies = [
828 "darling",
829 "proc-macro2",
830 "quote",
831 "syn 2.0.117",
832]
834[[package]]
835name = "shlex"
836version = "1.3.0"
837source = "registry+https://github.com/rust-lang/crates.io-index"
838checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
840[[package]]
841name = "siphasher"
842version = "0.3.11"
843source = "registry+https://github.com/rust-lang/crates.io-index"
844checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d"
846[[package]]
847name = "siphasher"
848version = "1.0.3"
849source = "registry+https://github.com/rust-lang/crates.io-index"
850checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649"
852[[package]]
853name = "slab"
854version = "0.4.12"
855source = "registry+https://github.com/rust-lang/crates.io-index"
856checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
858[[package]]
859name = "smallvec"
860version = "1.15.1"
861source = "registry+https://github.com/rust-lang/crates.io-index"
862checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
864[[package]]
865name = "streaming-iterator"
866version = "0.1.9"
867source = "registry+https://github.com/rust-lang/crates.io-index"
868checksum = "2b2231b7c3057d5e4ad0156fb3dc807d900806020c5ffa3ee6ff2c8c76fb8520"
870[[package]]
871name = "strsim"
872version = "0.11.1"
873source = "registry+https://github.com/rust-lang/crates.io-index"
874checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
876[[package]]
877name = "strum"
878version = "0.25.0"
879source = "registry+https://github.com/rust-lang/crates.io-index"
880checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125"
881dependencies = [
882 "phf 0.10.1",
883 "strum_macros 0.25.3",
884]
886[[package]]
887name = "strum"
888version = "0.27.2"
889source = "registry+https://github.com/rust-lang/crates.io-index"
890checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf"
891dependencies = [
892 "phf 0.12.1",
893 "strum_macros 0.27.2",
894]
896[[package]]
897name = "strum_macros"
898version = "0.25.3"
899source = "registry+https://github.com/rust-lang/crates.io-index"
900checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0"
901dependencies = [
902 "heck 0.4.1",
903 "proc-macro2",
904 "quote",
905 "rustversion",
906 "syn 2.0.117",
907]
909[[package]]
910name = "strum_macros"
911version = "0.27.2"
912source = "registry+https://github.com/rust-lang/crates.io-index"
913checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7"
914dependencies = [
915 "heck 0.5.0",
916 "proc-macro2",
917 "quote",
918 "syn 2.0.117",
919]
921[[package]]
922name = "syn"
923version = "1.0.109"
924source = "registry+https://github.com/rust-lang/crates.io-index"
925checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
926dependencies = [
927 "proc-macro2",
928 "quote",
929 "unicode-ident",
930]
932[[package]]
933name = "syn"
934version = "2.0.117"
935source = "registry+https://github.com/rust-lang/crates.io-index"
936checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
937dependencies = [
938 "proc-macro2",
939 "quote",
940 "unicode-ident",
941]
943[[package]]
944name = "syntastica"
945version = "0.6.1"
946source = "registry+https://github.com/rust-lang/crates.io-index"
947checksum = "89cfdd436fd6a3fc131ef0e88b975f27253e50632a89539a14e1eca1ddd97788"
948dependencies = [
949 "aho-corasick",
950 "syntastica-core",
951 "syntastica-highlight",
952 "thiserror",
953]
955[[package]]
956name = "syntastica-core"
957version = "0.6.1"
958source = "registry+https://github.com/rust-lang/crates.io-index"
959checksum = "18eef9c6378a47d72d7fa5bd61d4efea9353376fb02f620e40af8171f9c4e1d6"
960dependencies = [
961 "palette",
962 "syntastica-highlight",
963 "tft",
964 "thiserror",
965 "tree-sitter",
966 "tree-sitter-c2rust",
967]
969[[package]]
970name = "syntastica-highlight"
971version = "0.6.1"
972source = "registry+https://github.com/rust-lang/crates.io-index"
973checksum = "47d2d7e8224fd9620bf0049e58f53859ca6435822ec1705ff5bc505b106fc33f"
974dependencies = [
975 "regex",
976 "streaming-iterator",
977 "thiserror",
978 "tree-sitter",
979 "tree-sitter-c2rust",
980]
982[[package]]
983name = "syntastica-macros"
984version = "0.6.1"
985source = "registry+https://github.com/rust-lang/crates.io-index"
986checksum = "a3f4cecd4c3f12e273ee60437eb7629738dbacda368bdcda741d130b90cfd05a"
987dependencies = [
988 "heck 0.5.0",
989 "once_cell",
990 "proc-macro2",
991 "quote",
992 "quote-use",
993 "serde",
994 "tft",
995 "toml",
996]
998[[package]]
999name = "syntastica-parsers"
1000version = "0.6.1"
1001source = "registry+https://github.com/rust-lang/crates.io-index"
1002checksum = "e4e42c13d12899524acf6ef438cf3829aa4aa00f70d65c25ca044b9de81c5bee"
1003dependencies = [
1004 "once_cell",
1005 "strum 0.27.2",
1006 "syntastica-core",
1007 "syntastica-macros",
1008 "syntastica-queries",
1009 "tree-sitter-bash",
1010 "tree-sitter-javascript",
1011 "tree-sitter-json",
1012 "tree-sitter-lua",
1013 "tree-sitter-rust",
1014 "tree-sitter-typescript",
1017[[package]]
1018name = "syntastica-queries"
1019version = "0.6.1"
1020source = "registry+https://github.com/rust-lang/crates.io-index"
1021checksum = "a39185b86d0392cc01484934e2e6dfad5126e953aa2b9bff4dacc703d7b018fb"
1023[[package]]
1024name = "syntastica-themes"
1025version = "0.6.1"
1026source = "registry+https://github.com/rust-lang/crates.io-index"
1027checksum = "e244c89b937d4482eb21ef8a3cf62e9f6323271e287131e582f66cef111da49d"
1028dependencies = [
1029 "syntastica-core",
1032[[package]]
1033name = "tft"
1034version = "0.1.1"
1035source = "registry+https://github.com/rust-lang/crates.io-index"
1036checksum = "20c332ca98090a971a2e4739239bbd6aa8012d54140902170a01ab7d543629bd"
1037dependencies = [
1038 "aho-corasick",
1039 "casey",
1040 "lazy-regex",
1041 "once_cell",
1042 "phf 0.11.3",
1043 "regex",
1044 "serde",
1045 "serde_with",
1046 "strum 0.25.0",
1049[[package]]
1050name = "thiserror"
1051version = "2.0.18"
1052source = "registry+https://github.com/rust-lang/crates.io-index"
1053checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4"
1054dependencies = [
1055 "thiserror-impl",
1058[[package]]
1059name = "thiserror-impl"
1060version = "2.0.18"
1061source = "registry+https://github.com/rust-lang/crates.io-index"
1062checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5"
1063dependencies = [
1064 "proc-macro2",
1065 "quote",
1066 "syn 2.0.117",
1069[[package]]
1070name = "time"
1071version = "0.3.47"
1072source = "registry+https://github.com/rust-lang/crates.io-index"
1073checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c"
1074dependencies = [
1075 "deranged",
1076 "itoa",
1077 "num-conv",
1078 "powerfmt",
1079 "serde_core",
1080 "time-core",
1081 "time-macros",
1084[[package]]
1085name = "time-core"
1086version = "0.1.8"
1087source = "registry+https://github.com/rust-lang/crates.io-index"
1088checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca"
1090[[package]]
1091name = "time-macros"
1092version = "0.2.27"
1093source = "registry+https://github.com/rust-lang/crates.io-index"
1094checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215"
1095dependencies = [
1096 "num-conv",
1097 "time-core",
1100[[package]]
1101name = "tinyvec"
1102version = "1.11.0"
1103source = "registry+https://github.com/rust-lang/crates.io-index"
1104checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3"
1105dependencies = [
1106 "tinyvec_macros",
1109[[package]]
1110name = "tinyvec_macros"
1111version = "0.1.1"
1112source = "registry+https://github.com/rust-lang/crates.io-index"
1113checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
1115[[package]]
1116name = "toml"
1117version = "0.8.23"
1118source = "registry+https://github.com/rust-lang/crates.io-index"
1119checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362"
1120dependencies = [
1121 "serde",
1122 "serde_spanned",
1123 "toml_datetime",
1124 "toml_edit",
1127[[package]]
1128name = "toml_datetime"
1129version = "0.6.11"
1130source = "registry+https://github.com/rust-lang/crates.io-index"
1131checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c"
1132dependencies = [
1133 "serde",
1136[[package]]
1137name = "toml_edit"
1138version = "0.22.27"
1139source = "registry+https://github.com/rust-lang/crates.io-index"
1140checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a"
1141dependencies = [
1142 "indexmap 2.14.0",
1143 "serde",
1144 "serde_spanned",
1145 "toml_datetime",
1146 "toml_write",
1147 "winnow",
1150[[package]]
1151name = "toml_write"
1152version = "0.1.2"
1153source = "registry+https://github.com/rust-lang/crates.io-index"
1154checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801"
1156[[package]]
1157name = "tree-sitter"
1158version = "0.25.10"
1159source = "registry+https://github.com/rust-lang/crates.io-index"
1160checksum = "78f873475d258561b06f1c595d93308a7ed124d9977cb26b148c2084a4a3cc87"
1161dependencies = [
1162 "cc",
1163 "regex",
1164 "regex-syntax",
1165 "serde_json",
1166 "streaming-iterator",
1167 "tree-sitter-language",
1170[[package]]
1171name = "tree-sitter-bash"
1172version = "0.25.0"
1173source = "registry+https://github.com/rust-lang/crates.io-index"
1174checksum = "871b0606e667e98a1237ebdc1b0d7056e0aebfdc3141d12b399865d4cb6ed8a6"
1175dependencies = [
1176 "cc",
1177 "tree-sitter-language",
1180[[package]]
1181name = "tree-sitter-c2rust"
1182version = "0.25.2"
1183source = "registry+https://github.com/rust-lang/crates.io-index"
1184checksum = "6e1e4909668d7a5e0eb8d66bd9fe2e789106066626056d3bead80dc6b9d5aeee"
1185dependencies = [
1186 "c2rust-bitfields",
1187 "once_cell",
1188 "regex",
1189 "regex-syntax",
1190 "streaming-iterator",
1191 "tree-sitter-language",
1194[[package]]
1195name = "tree-sitter-javascript"
1196version = "0.23.1"
1197source = "registry+https://github.com/rust-lang/crates.io-index"
1198checksum = "bf40bf599e0416c16c125c3cec10ee5ddc7d1bb8b0c60fa5c4de249ad34dc1b1"
1199dependencies = [
1200 "cc",
1201 "tree-sitter-language",
1204[[package]]
1205name = "tree-sitter-json"
1206version = "0.24.8"
1207source = "registry+https://github.com/rust-lang/crates.io-index"
1208checksum = "4d727acca406c0020cffc6cf35516764f36c8e3dc4408e5ebe2cb35a947ec471"
1209dependencies = [
1210 "cc",
1211 "tree-sitter-language",
1214[[package]]
1215name = "tree-sitter-language"
1216version = "0.1.7"
1217source = "registry+https://github.com/rust-lang/crates.io-index"
1218checksum = "009994f150cc0cd50ff54917d5bc8bffe8cad10ca10d81c34da2ec421ae61782"
1220[[package]]
1221name = "tree-sitter-lua"
1222version = "0.2.0"
1223source = "registry+https://github.com/rust-lang/crates.io-index"
1224checksum = "5cdb9adf0965fec58e7660cbb3a059dbb12ebeec9459e6dcbae3db004739641e"
1225dependencies = [
1226 "cc",
1227 "tree-sitter-language",
1230[[package]]
1231name = "tree-sitter-rust"
1232version = "0.24.0"
1233source = "registry+https://github.com/rust-lang/crates.io-index"
1234checksum = "4b9b18034c684a2420722be8b2a91c9c44f2546b631c039edf575ccba8c61be1"
1235dependencies = [
1236 "cc",
1237 "tree-sitter-language",
1240[[package]]
1241name = "tree-sitter-typescript"
1242version = "0.23.2"
1243source = "registry+https://github.com/rust-lang/crates.io-index"
1244checksum = "6c5f76ed8d947a75cc446d5fccd8b602ebf0cde64ccf2ffa434d873d7a575eff"
1245dependencies = [
1246 "cc",
1247 "tree-sitter-language",
1250[[package]]
1251name = "unicode-ident"
1252version = "1.0.24"
1253source = "registry+https://github.com/rust-lang/crates.io-index"
1254checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
1256[[package]]
1257name = "wasi"
1258version = "0.11.1+wasi-snapshot-preview1"
1259source = "registry+https://github.com/rust-lang/crates.io-index"
1260checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
1262[[package]]
1263name = "wasm-bindgen"
1264version = "0.2.122"
1265source = "registry+https://github.com/rust-lang/crates.io-index"
1266checksum = "3ed04576f974d2b2fba0f38c51dbc5518011e38c36bf1143164be765528fd409"
1267dependencies = [
1268 "cfg-if",
1269 "once_cell",
1270 "rustversion",
1271 "wasm-bindgen-macro",
1272 "wasm-bindgen-shared",
1275[[package]]
1276name = "wasm-bindgen-macro"
1277version = "0.2.122"
1278source = "registry+https://github.com/rust-lang/crates.io-index"
1279checksum = "916151b09da36bd82f6615cbf3a419e2f0ba23a03c6160e8e92eb6bd4aa1dec6"
1280dependencies = [
1281 "quote",
1282 "wasm-bindgen-macro-support",
1285[[package]]
1286name = "wasm-bindgen-macro-support"
1287version = "0.2.122"
1288source = "registry+https://github.com/rust-lang/crates.io-index"
1289checksum = "299047362ccbfce148b67ab7e73349f77748e00c8296f9542adfad2ad82c5c5e"
1290dependencies = [
1291 "bumpalo",
1292 "proc-macro2",
1293 "quote",
1294 "syn 2.0.117",
1295 "wasm-bindgen-shared",
1298[[package]]
1299name = "wasm-bindgen-shared"
1300version = "0.2.122"
1301source = "registry+https://github.com/rust-lang/crates.io-index"
1302checksum = "9a929b2c61f11ba3e9bc35b50c1f25cb38e0e892c0c231ae2b8cf78d5dad4437"
1303dependencies = [
1304 "unicode-ident",
1307[[package]]
1308name = "windows-core"
1309version = "0.62.2"
1310source = "registry+https://github.com/rust-lang/crates.io-index"
1311checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb"
1312dependencies = [
1313 "windows-implement",
1314 "windows-interface",
1315 "windows-link",
1316 "windows-result",
1317 "windows-strings",
1320[[package]]
1321name = "windows-implement"
1322version = "0.60.2"
1323source = "registry+https://github.com/rust-lang/crates.io-index"
1324checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf"
1325dependencies = [
1326 "proc-macro2",
1327 "quote",
1328 "syn 2.0.117",
1331[[package]]
1332name = "windows-interface"
1333version = "0.59.3"
1334source = "registry+https://github.com/rust-lang/crates.io-index"
1335checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358"
1336dependencies = [
1337 "proc-macro2",
1338 "quote",
1339 "syn 2.0.117",
1342[[package]]
1343name = "windows-link"
1344version = "0.2.1"
1345source = "registry+https://github.com/rust-lang/crates.io-index"
1346checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
1348[[package]]
1349name = "windows-result"
1350version = "0.4.1"
1351source = "registry+https://github.com/rust-lang/crates.io-index"
1352checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5"
1353dependencies = [
1354 "windows-link",
1357[[package]]
1358name = "windows-strings"
1359version = "0.5.1"
1360source = "registry+https://github.com/rust-lang/crates.io-index"
1361checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091"
1362dependencies = [
1363 "windows-link",
1366[[package]]
1367name = "winnow"
1368version = "0.7.15"
1369source = "registry+https://github.com/rust-lang/crates.io-index"
1370checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945"
1371dependencies = [
1372 "memchr",
1375[[package]]
1376name = "zerocopy"
1377version = "0.8.48"
1378source = "registry+https://github.com/rust-lang/crates.io-index"
1379checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9"
1380dependencies = [
1381 "zerocopy-derive",
1384[[package]]
1385name = "zerocopy-derive"
1386version = "0.8.48"
1387source = "registry+https://github.com/rust-lang/crates.io-index"
1388checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4"
1389dependencies = [
1390 "proc-macro2",
1391 "quote",
1392 "syn 2.0.117",
1395[[package]]
1396name = "zmij"
1397version = "1.0.21"
1398source = "registry+https://github.com/rust-lang/crates.io-index"
1399checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"

prototypes/p16-syntastica/Cargo.toml

Added
new file mode 100644

+12 / −0 text lines

1[package]
2name = "p16-syntastica"
3version = "0.1.0"
4edition = "2024"
5
6[dependencies]
7syntastica = { version = "0.6", default-features = false, features = ["runtime-c2rust"] }
8syntastica-parsers = { version = "0.6", features = [
9 "rust", "lua", "javascript", "typescript", "bash", "json",
10] }
11syntastica-themes = "0.6"
12tft = "0.1"

prototypes/p16-syntastica/src/main.rs

Added
new file mode 100644

+290 / −0 text lines

1//! P16: syntastica syntax highlighting prototype
2
3use syntastica::renderer::TerminalRenderer;
4use syntastica::Processor;
5use syntastica::language_set::SupportedLanguage;
6use syntastica_parsers::{Lang, LanguageSetImpl};
7
8fn main() {
9 println!("=== P16: syntastica syntax highlighting prototype ===\n");
11 // T1: Rust highlighting
12 test_rust();
14 // T2: Lua highlighting
15 test_lua();
17 // T3: JavaScript highlighting
18 test_javascript();
20 // T4: TypeScript highlighting
21 test_typescript();
23 // T5: File type detection
24 test_file_type_detection();
26 // T6: Processor reuse (multiple languages)
27 test_processor_reuse();
29 // T7: Multiple themes for same code
30 test_multiple_themes();
32 // T8: Custom theme via theme! macro
33 test_custom_theme();
35 // T9: HTML rendering
36 test_html_render();
38 println!("\n=== ALL 9 TESTS PASSED ===");
39}
41fn test_rust() {
42 let code = r#"fn main() {
43 let agent = Agent::new("smith");
44 match agent.run() {
45 Ok(result) => println!("Result: {result}"),
46 Err(e) => eprintln!("Error: {e}"),
47 }
48}"#;
50 let output = syntastica::highlight(
51 code,
52 Lang::Rust,
53 &LanguageSetImpl::new(),
54 &mut TerminalRenderer::new(None),
55 syntastica_themes::gruvbox::dark(),
56 ).unwrap_or_else(|err| panic!("[FAIL] Rust highlighting: {err}"));
58 println!("T1 Rust:");
59 println!("{output}");
60 assert!(!output.is_empty(), "[FAIL] Rust output empty");
61 println!("T1 ✅ PASS\n");
62}
64fn test_lua() {
65 let code = r#"-- Lua plugin for smith
66local function tool_call_transform(name, args)
67 if name == "bash" then
68 return string.format("exec: %s %s", name, args)
69 end
70 return args
71end
73return {
74 hooks = {
75 tool_call = tool_call_transform,
76 context = function(ctx) return ctx end,
77 }
78}"#;
80 let output = syntastica::highlight(
81 code,
82 Lang::Lua,
83 &LanguageSetImpl::new(),
84 &mut TerminalRenderer::new(None),
85 syntastica_themes::gruvbox::dark(),
86 ).unwrap_or_else(|err| panic!("[FAIL] Lua highlighting: {err}"));
88 println!("T2 Lua:");
89 println!("{output}");
90 assert!(!output.is_empty(), "[FAIL] Lua output empty");
91 println!("T2 ✅ PASS\n");
92}
94fn test_javascript() {
95 let code = r#"const express = require('express');
96const app = express();
98app.get('/api/agent', (req, res) => {
99 const { model, provider } = req.query;
100 res.json({ status: 'ok', model });
101});
103app.listen(3000);"#;
105 let output = syntastica::highlight(
106 code,
107 Lang::Javascript,
108 &LanguageSetImpl::new(),
109 &mut TerminalRenderer::new(None),
110 syntastica_themes::one::dark(),
111 ).unwrap_or_else(|err| panic!("[FAIL] JS highlighting: {err}"));
113 println!("T3 JavaScript:");
114 println!("{output}");
115 assert!(!output.is_empty(), "[FAIL] JS output empty");
116 println!("T3 ✅ PASS\n");
117}
119fn test_typescript() {
120 let code = r#"interface AgentConfig {
121 model: string;
122 provider: string;
123 maxTokens: number;
124}
126const createAgent = (config: AgentConfig): Agent => {
127 return new Agent(config.model, config.provider);
128};"#;
130 let output = syntastica::highlight(
131 code,
132 Lang::Typescript,
133 &LanguageSetImpl::new(),
134 &mut TerminalRenderer::new(None),
135 syntastica_themes::one::dark(),
136 ).unwrap_or_else(|err| panic!("[FAIL] TS highlighting: {err}"));
138 println!("T4 TypeScript:");
139 println!("{output}");
140 assert!(!output.is_empty(), "[FAIL] TS output empty");
141 println!("T4 ✅ PASS\n");
142}
144fn test_file_type_detection() {
145 // Detect from path
146 let ft = tft::detect("main.rs", "");
147 let lang = Lang::for_file_type(ft, &()).expect("[FAIL] no lang for .rs");
148 assert!(matches!(lang, Lang::Rust), "[FAIL] expected Rust, got {lang:?}");
150 let ft_lua = tft::detect("plugin.lua", "");
151 let lang_lua = Lang::for_file_type(ft_lua, &()).expect("[FAIL] no lang for .lua");
152 assert!(matches!(lang_lua, Lang::Lua), "[FAIL] expected Lua, got {lang_lua:?}");
154 // TS: tft may need content hint — test .tsx instead
155 let ft_tsx = tft::detect("App.tsx", "");
156 let lang_tsx = Lang::for_file_type(ft_tsx, &());
157 println!(" .tsx detection: {lang_tsx:?}");
159 // .ts: check what tft returns (may not map to TS without content)
160 let ft_ts = tft::detect("index.ts", "");
161 let lang_ts = Lang::for_file_type(ft_ts, &());
162 println!(" .ts detection: {lang_ts:?}");
163 // Accept any result for .ts (tft mapping may vary)
165 // Unknown extension
166 let ft_unknown = tft::detect("data.xyz", "");
167 let lang_unknown = Lang::for_file_type(ft_unknown, &());
168 assert!(lang_unknown.is_none(), "[FAIL] expected None for .xyz, got {lang_unknown:?}");
170 println!("T5 File type detection: ✅ PASS (.rs→Rust, .lua→Lua, .xyz→None)\n");
171}
173fn test_processor_reuse() {
174 let language_set = LanguageSetImpl::new();
175 let mut processor = Processor::new(&language_set);
177 let rust_hl = processor.process(
178 "fn hello() -> String { \"world\".to_string() }",
179 Lang::Rust,
180 ).unwrap_or_else(|err| panic!("[FAIL] processor Rust: {err}"));
182 let lua_hl = processor.process(
183 "local x = 42",
184 Lang::Lua,
185 ).unwrap_or_else(|err| panic!("[FAIL] processor Lua: {err}"));
187 let js_hl = processor.process(
188 "const x = 42;",
189 Lang::Javascript,
190 ).unwrap_or_else(|err| panic!("[FAIL] processor JS: {err}"));
192 let rust_out = syntastica::render(&rust_hl, &mut TerminalRenderer::new(None), syntastica_themes::gruvbox::dark());
193 let lua_out = syntastica::render(&lua_hl, &mut TerminalRenderer::new(None), syntastica_themes::gruvbox::dark());
194 let js_out = syntastica::render(&js_hl, &mut TerminalRenderer::new(None), syntastica_themes::one::dark());
196 assert!(!rust_out.is_empty());
197 assert!(!lua_out.is_empty());
198 assert!(!js_out.is_empty());
200 println!("T6 Processor reuse (Rust+Lua+JS on one processor):");
201 println!(" Rust: {rust_out}");
202 println!(" Lua: {lua_out}");
203 println!(" JS: {js_out}");
204 println!("T6 ✅ PASS\n");
205}
207fn test_multiple_themes() {
208 let highlights = Processor::process_once(
209 "fn main() { println!(\"Hello, smith!\"); }",
210 Lang::Rust,
211 &LanguageSetImpl::new(),
212 ).unwrap_or_else(|err| panic!("[FAIL] process_once: {err}"));
214 let gruvbox = syntastica::render(&highlights, &mut TerminalRenderer::new(None), syntastica_themes::gruvbox::dark());
215 let onedark = syntastica::render(&highlights, &mut TerminalRenderer::new(None), syntastica_themes::one::dark());
216 let onelight = syntastica::render(&highlights, &mut TerminalRenderer::new(None), syntastica_themes::one::light());
218 assert!(!gruvbox.is_empty());
219 assert!(!onedark.is_empty());
220 assert!(!onelight.is_empty());
221 // Different themes should produce different output
222 assert_ne!(gruvbox, onedark, "[FAIL] dark themes should differ");
223 assert_ne!(gruvbox, onelight, "[FAIL] dark vs light should differ");
225 println!("T7 Multiple themes (same code, 3 themes):");
226 println!(" gruvbox dark: {gruvbox}");
227 println!(" onedark: {onedark}");
228 println!(" onelight: {onelight}");
229 println!("T7 ✅ PASS (all different)\n");
230}
232fn test_custom_theme() {
233 use syntastica::theme;
235 let theme = theme! {
236 "keyword": "#c678dd",
237 "function": "#61afef",
238 "string": "#98c379",
239 "comment": "#5c6370",
240 "type": "#e5c07b",
241 "punctuation": "#abb2bf",
242 "constant": "#d19a66",
243 "variable": "#abb2bf",
244 "operator": "#d19a66",
245 };
247 let output = syntastica::highlight(
248 r#"/// A doc comment
249fn greet(name: &str) -> String {
250 let msg = format!("Hello, {}!", name);
251 msg
252}"#,
253 Lang::Rust,
254 &LanguageSetImpl::new(),
255 &mut TerminalRenderer::new(None),
256 theme,
257 ).unwrap_or_else(|err| panic!("[FAIL] custom theme: {err}"));
259 println!("T8 Custom theme:");
260 println!("{output}");
261 assert!(!output.is_empty(), "[FAIL] custom theme output empty");
262 println!("T8 ✅ PASS\n");
263}
265fn test_html_render() {
266 use syntastica::renderer::HtmlRenderer;
268 let code = "fn add(a: i32, b: i32) -> i32 { a + b }";
269 let highlights = Processor::process_once(
270 code,
271 Lang::Rust,
272 &LanguageSetImpl::new(),
273 ).unwrap_or_else(|err| panic!("[FAIL] process for HTML: {err}"));
275 let html = syntastica::render(
276 &highlights,
277 &mut HtmlRenderer::new(),
278 syntastica_themes::gruvbox::dark(),
279 );
281 assert!(!html.is_empty(), "[FAIL] HTML output empty");
282 assert!(html.contains("<span"), "[FAIL] HTML should contain <span> tags");
283 assert!(html.contains("style"), "[FAIL] HTML should contain style attributes");
284 assert!(html.contains("fn"), "[FAIL] HTML should contain code text");
286 println!("T9 HTML render: ✅ PASS ({} bytes, contains <span>)", html.len());
287}
289// TOML not in syntastica-parsers (crates.io version). Use git or dynamic parsers for TOML.
290// Smith can add TOML highlighting later via syntastica-parsers-git or custom Lang.