repositories / smith

smith

There are many coding harnesses - but this one is fast

owned by bugabinga

pup -> archunit

5c9519c38adfc66144fc95e67bfd33ceaeb0eb94

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (14)

+1794 / −78 text lines

Diff layout

.system/RULES.md

Modified

+1 / −1 text lines

4646- `#![forbid(unsafe_code)]` in library crates.
4747- `smith-cli` unsafe only for OS terminal manipulation, with safe wrapper, `// SAFETY:`, and tests.
4848- Public docs required.
49- fmt, clippy, tests, docs, audit, arch, pup gate CI.
49- fmt, clippy, tests, docs, audit, arch, and architecture-test gates in CI.
5151## Architecture

Cargo.lock

Modified

+1368 / −9 text lines

22# It is not intended for manual editing.
33version = 4
5[[package]]
6name = "addr2line"
7version = "0.26.1"
8source = "registry+https://github.com/rust-lang/crates.io-index"
9checksum = "59317f77929f0e679d39364702289274de2f0f0b22cbf50b2b8cff2169a0b27a"
10dependencies = [
11 "gimli",
12]
514[[package]]
615name = "aho-corasick"
716version = "1.1.5"
1120 "memchr",
23[[package]]
24name = "allocator-api2"
25version = "0.2.21"
26source = "registry+https://github.com/rust-lang/crates.io-index"
27checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
29[[package]]
30name = "ambient-authority"
31version = "0.0.2"
32source = "registry+https://github.com/rust-lang/crates.io-index"
33checksum = "e9d4ee0d472d1cd2e28c97dfa124b3d8d992e10eb0a035f33f5d12e3a177ba3b"
1435[[package]]
1536name = "anes"
1637version = "0.1.6"
6788 "windows-sys 0.61.2",
91[[package]]
92name = "anyhow"
93version = "1.0.104"
94source = "registry+https://github.com/rust-lang/crates.io-index"
95checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470"
97[[package]]
98name = "arbitrary"
99version = "1.4.2"
100source = "registry+https://github.com/rust-lang/crates.io-index"
101checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1"
103[[package]]
104name = "archunit"
105version = "0.0.1"
106source = "registry+https://github.com/rust-lang/crates.io-index"
107checksum = "5938e45665a7cee4212d0a7043ea68929d13355269d08e36366bcac2a43b6996"
108dependencies = [
109 "cargo_metadata",
110 "proc-macro2",
111 "regex",
112 "serde_json",
113 "syn 2.0.119",
114 "thiserror 2.0.21",
115]
70117[[package]]
71118name = "assert_cmd"
72119version = "2.2.2"
82129 "wait-timeout",
132[[package]]
133name = "async-trait"
134version = "0.1.92"
135source = "registry+https://github.com/rust-lang/crates.io-index"
136checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667"
137dependencies = [
138 "proc-macro2",
139 "quote",
140 "syn 3.0.6",
141]
85143[[package]]
86144name = "atomic-waker"
87145version = "1.1.2"
112170source = "registry+https://github.com/rust-lang/crates.io-index"
113171checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06"
173[[package]]
174name = "block-buffer"
175version = "0.10.4"
176source = "registry+https://github.com/rust-lang/crates.io-index"
177checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
178dependencies = [
179 "generic-array",
180]
115182[[package]]
116183name = "bstr"
117184version = "1.13.1"
128195version = "3.20.3"
129196source = "registry+https://github.com/rust-lang/crates.io-index"
130197checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649"
198dependencies = [
199 "allocator-api2",
200]
132202[[package]]
133203name = "bytes"
135205source = "registry+https://github.com/rust-lang/crates.io-index"
136206checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04"
208[[package]]
209name = "camino"
210version = "1.2.6"
211source = "registry+https://github.com/rust-lang/crates.io-index"
212checksum = "bbbad30e4b4c14a39e3cc8aed085a12a327257c316619c93581e017bc52be591"
213dependencies = [
214 "serde_core",
215]
217[[package]]
218name = "cap-primitives"
219version = "4.0.3"
220source = "registry+https://github.com/rust-lang/crates.io-index"
221checksum = "8b5f74729fd2f44701d1a8eb47e906cdb3ccd9ec0f02baad85a744b791940b18"
222dependencies = [
223 "ambient-authority",
224 "fs-set-times",
225 "io-extras",
226 "io-lifetimes 3.0.1",
227 "ipnet",
228 "maybe-owned",
229 "rustix",
230 "rustix-linux-procfs",
231 "windows-sys 0.61.2",
232 "winx",
233]
235[[package]]
236name = "cargo-platform"
237version = "0.2.0"
238source = "registry+https://github.com/rust-lang/crates.io-index"
239checksum = "84982c6c0ae343635a3a4ee6dedef965513735c8b183caa7289fa6e27399ebd4"
240dependencies = [
241 "serde",
242]
244[[package]]
245name = "cargo-util-schemas"
246version = "0.2.0"
247source = "registry+https://github.com/rust-lang/crates.io-index"
248checksum = "e63d2780ac94487eb9f1fea7b0d56300abc9eb488800854ca217f102f5caccca"
249dependencies = [
250 "semver",
251 "serde",
252 "serde-untagged",
253 "serde-value",
254 "thiserror 1.0.69",
255 "toml",
256 "unicode-xid",
257 "url",
258]
260[[package]]
261name = "cargo_metadata"
262version = "0.20.0"
263source = "registry+https://github.com/rust-lang/crates.io-index"
264checksum = "4f7835cfc6135093070e95eb2b53e5d9b5c403dc3a6be6040ee026270aa82502"
265dependencies = [
266 "camino",
267 "cargo-platform",
268 "cargo-util-schemas",
269 "semver",
270 "serde",
271 "serde_json",
272 "thiserror 2.0.21",
273]
138275[[package]]
139276name = "cast"
140277version = "0.3.0"
170307checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06"
171308dependencies = [
172309 "cfg-if",
173 "cpufeatures",
310 "cpufeatures 0.3.1",
174311 "rand_core",
241378source = "registry+https://github.com/rust-lang/crates.io-index"
242379checksum = "1c133bc6a41be0d194c306b5506d15e6feeea7b1d6604bd3f8310dfb2ca96486"
381[[package]]
382name = "cobs"
383version = "0.3.0"
384source = "registry+https://github.com/rust-lang/crates.io-index"
385checksum = "0fa961b519f0b462e3a3b4a34b64d119eeaca1d59af726fe450bbba07a9fc0a1"
386dependencies = [
387 "thiserror 2.0.21",
388]
244390[[package]]
245391name = "colorchoice"
246392version = "1.0.5"
247393source = "registry+https://github.com/rust-lang/crates.io-index"
248394checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570"
396[[package]]
397name = "core_detect"
398version = "1.0.0"
399source = "registry+https://github.com/rust-lang/crates.io-index"
400checksum = "7f8f80099a98041a3d1622845c271458a2d73e688351bf3cb999266764b81d48"
402[[package]]
403name = "cpp_demangle"
404version = "0.5.1"
405source = "registry+https://github.com/rust-lang/crates.io-index"
406checksum = "0667304c32ea56cb4cd6d2d7c0cfe9a2f8041229db8c033af7f8d69492429def"
407dependencies = [
408 "cfg-if",
409]
411[[package]]
412name = "cpufeatures"
413version = "0.2.17"
414source = "registry+https://github.com/rust-lang/crates.io-index"
415checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
416dependencies = [
417 "libc",
418]
250420[[package]]
251421name = "cpufeatures"
252422version = "0.3.1"
256426 "libc",
429[[package]]
430name = "cranelift-assembler-x64"
431version = "0.136.1"
432source = "registry+https://github.com/rust-lang/crates.io-index"
433checksum = "c8a495ae3e4d638712a0c0378719e526e448d04d7ebbbe1745712e12c5feb4c3"
434dependencies = [
435 "cranelift-assembler-x64-meta",
436]
438[[package]]
439name = "cranelift-assembler-x64-meta"
440version = "0.136.1"
441source = "registry+https://github.com/rust-lang/crates.io-index"
442checksum = "4eb2e299e844a27d799f43988e4415a37696fdb738cb463312ef5d06cae15b2a"
443dependencies = [
444 "cranelift-srcgen",
445]
447[[package]]
448name = "cranelift-bforest"
449version = "0.136.1"
450source = "registry+https://github.com/rust-lang/crates.io-index"
451checksum = "f4710c34489bc844e45c1c0005d3e44d3d2b29cee77187507ba8d0bb400c621f"
452dependencies = [
453 "cranelift-entity",
454 "wasmtime-internal-core",
455]
457[[package]]
458name = "cranelift-bitset"
459version = "0.136.1"
460source = "registry+https://github.com/rust-lang/crates.io-index"
461checksum = "76b63a4b0cfea80610150fffda11b1a9c3dc5a835403d9f381bf7d1a2874b4d7"
462dependencies = [
463 "serde",
464 "serde_derive",
465 "wasmtime-internal-core",
466]
468[[package]]
469name = "cranelift-codegen"
470version = "0.136.1"
471source = "registry+https://github.com/rust-lang/crates.io-index"
472checksum = "e1af881f3b3392433e6f4f9b172b8d99270c538db4effea62b28bc48f02f0833"
473dependencies = [
474 "bumpalo",
475 "cranelift-assembler-x64",
476 "cranelift-bforest",
477 "cranelift-bitset",
478 "cranelift-codegen-meta",
479 "cranelift-codegen-shared",
480 "cranelift-control",
481 "cranelift-entity",
482 "cranelift-isle",
483 "gimli",
484 "hashbrown 0.17.1",
485 "libm",
486 "log",
487 "postcard",
488 "pulley-interpreter",
489 "regalloc2",
490 "rustc-hash",
491 "serde",
492 "serde_derive",
493 "sha2",
494 "smallvec",
495 "target-lexicon",
496 "wasmtime-internal-core",
497]
499[[package]]
500name = "cranelift-codegen-meta"
501version = "0.136.1"
502source = "registry+https://github.com/rust-lang/crates.io-index"
503checksum = "24ce99c30dc7a692294613241119eea0de3c3cb4cf10ac2570ed72adf9a8c2eb"
504dependencies = [
505 "cranelift-assembler-x64-meta",
506 "cranelift-codegen-shared",
507 "cranelift-srcgen",
508 "heck",
509 "pulley-interpreter",
510]
512[[package]]
513name = "cranelift-codegen-shared"
514version = "0.136.1"
515source = "registry+https://github.com/rust-lang/crates.io-index"
516checksum = "34c2a529b638d95c347c2337403dacec86197ad6503cedc63caf53466ae5c4de"
518[[package]]
519name = "cranelift-control"
520version = "0.136.1"
521source = "registry+https://github.com/rust-lang/crates.io-index"
522checksum = "570eb4e02cca190896beb3c8a0a67583dca8b6965517a9f3e04cc89e17c9a986"
523dependencies = [
524 "arbitrary",
525]
527[[package]]
528name = "cranelift-entity"
529version = "0.136.1"
530source = "registry+https://github.com/rust-lang/crates.io-index"
531checksum = "e73c65538d460b1062cb9a97428ee6bb4b616f5cb17be3b3ac0a3e4f1f789166"
532dependencies = [
533 "cranelift-bitset",
534 "serde",
535 "serde_derive",
536 "wasmtime-internal-core",
537]
539[[package]]
540name = "cranelift-frontend"
541version = "0.136.1"
542source = "registry+https://github.com/rust-lang/crates.io-index"
543checksum = "5ed70ab5849184973c42b57366f57611dc81c3e355d5b612c68a2900bea92242"
544dependencies = [
545 "cranelift-codegen",
546 "hashbrown 0.17.1",
547 "log",
548 "smallvec",
549 "target-lexicon",
550]
552[[package]]
553name = "cranelift-isle"
554version = "0.136.1"
555source = "registry+https://github.com/rust-lang/crates.io-index"
556checksum = "379f10a451c9b1bf4f59e4ce38061c53ca2454783041a3c1fafa6deef3c37108"
558[[package]]
559name = "cranelift-native"
560version = "0.136.1"
561source = "registry+https://github.com/rust-lang/crates.io-index"
562checksum = "4f496865b1a14bc85bcc9fb51a9539ca93b1d1f44fb92bd6a091fba02d6ab4a7"
563dependencies = [
564 "cranelift-codegen",
565 "libc",
566 "target-lexicon",
567]
569[[package]]
570name = "cranelift-srcgen"
571version = "0.136.1"
572source = "registry+https://github.com/rust-lang/crates.io-index"
573checksum = "89643801d9192df80c294f174d5fe0416395e7edb0bb3024784ba10fc933e76f"
575[[package]]
576name = "crc32fast"
577version = "1.5.2"
578source = "registry+https://github.com/rust-lang/crates.io-index"
579checksum = "01a7799fd6b852db0e61728dde9a204c423b44d689dbd432522543614b490e78"
580dependencies = [
581 "cfg-if",
582]
259584[[package]]
260585name = "criterion"
261586version = "0.5.1"
269594 "criterion-plot",
270595 "futures",
271596 "is-terminal",
272 "itertools",
597 "itertools 0.10.5",
273598 "num-traits",
274599 "once_cell",
275600 "oorandom",
291616checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1"
292617dependencies = [
293618 "cast",
294 "itertools",
619 "itertools 0.10.5",
297622[[package]]
325650source = "registry+https://github.com/rust-lang/crates.io-index"
326651checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5"
653[[package]]
654name = "crypto-common"
655version = "0.1.7"
656source = "registry+https://github.com/rust-lang/crates.io-index"
657checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"
658dependencies = [
659 "generic-array",
660 "typenum",
661]
328663[[package]]
329664name = "difflib"
330665version = "0.4.0"
331666source = "registry+https://github.com/rust-lang/crates.io-index"
332667checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8"
669[[package]]
670name = "digest"
671version = "0.10.7"
672source = "registry+https://github.com/rust-lang/crates.io-index"
673checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
674dependencies = [
675 "block-buffer",
676 "crypto-common",
677]
334679[[package]]
335680name = "dirs"
336681version = "5.0.1"
369714source = "registry+https://github.com/rust-lang/crates.io-index"
370715checksum = "252afb9ae5eaa683babdc6a068b3f5726eb19e05070c731f9b2a23a7c3e8ed34"
717[[package]]
718name = "embedded-io"
719version = "0.4.0"
720source = "registry+https://github.com/rust-lang/crates.io-index"
721checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced"
723[[package]]
724name = "embedded-io"
725version = "0.6.1"
726source = "registry+https://github.com/rust-lang/crates.io-index"
727checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d"
729[[package]]
730name = "encoding_rs"
731version = "0.8.42"
732source = "registry+https://github.com/rust-lang/crates.io-index"
733checksum = "8e985e0451871ad22fb8d2b6b076e2028a502a0d3950998c2c5c0a4f9b5d9679"
734dependencies = [
735 "cfg-if",
736 "core_detect",
737 "multiversion_no_op",
738 "rustversion",
739 "scopeguard",
740 "simdutf8",
741]
372743[[package]]
373744name = "equivalent"
374745version = "1.0.2"
375746source = "registry+https://github.com/rust-lang/crates.io-index"
376747checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
749[[package]]
750name = "erased-serde"
751version = "0.4.10"
752source = "registry+https://github.com/rust-lang/crates.io-index"
753checksum = "d2add8a07dd6a8d93ff627029c51de145e12686fbc36ecb298ac22e74cf02dec"
754dependencies = [
755 "serde",
756 "serde_core",
757 "typeid",
758]
760[[package]]
761name = "errno"
762version = "0.3.14"
763source = "registry+https://github.com/rust-lang/crates.io-index"
764checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
765dependencies = [
766 "libc",
767 "windows-sys 0.61.2",
768]
378770[[package]]
379771name = "find-msvc-tools"
380772version = "0.1.14"
390782 "num-traits",
785[[package]]
786name = "fnv"
787version = "1.0.7"
788source = "registry+https://github.com/rust-lang/crates.io-index"
789checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
791[[package]]
792name = "foldhash"
793version = "0.2.0"
794source = "registry+https://github.com/rust-lang/crates.io-index"
795checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
393797[[package]]
394798name = "form_urlencoded"
395799version = "1.2.2"
399803 "percent-encoding",
806[[package]]
807name = "fs-set-times"
808version = "0.20.3"
809source = "registry+https://github.com/rust-lang/crates.io-index"
810checksum = "94e7099f6313ecacbe1256e8ff9d617b75d1bcb16a6fddef94866d225a01a14a"
811dependencies = [
812 "io-lifetimes 2.0.4",
813 "rustix",
814 "windows-sys 0.59.0",
815]
402817[[package]]
403818name = "fs2"
404819version = "0.4.3"
497912 "slab",
915[[package]]
916name = "generic-array"
917version = "0.14.7"
918source = "registry+https://github.com/rust-lang/crates.io-index"
919checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
920dependencies = [
921 "typenum",
922 "version_check",
923]
500925[[package]]
501926name = "getrandom"
502927version = "0.2.17"
524949 "wasm-bindgen",
952[[package]]
953name = "gimli"
954version = "0.33.0"
955source = "registry+https://github.com/rust-lang/crates.io-index"
956checksum = "0bf7f043f89559805f8c7cacc432749b2fa0d0a0a9ee46ce47164ed5ba7f126c"
957dependencies = [
958 "fnv",
959 "hashbrown 0.16.1",
960 "indexmap",
961 "stable_deref_trait",
962]
527964[[package]]
528965name = "globset"
529966version = "0.4.20"
548985 "zerocopy",
988[[package]]
989name = "hashbrown"
990version = "0.16.1"
991source = "registry+https://github.com/rust-lang/crates.io-index"
992checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
551994[[package]]
552995name = "hashbrown"
553996version = "0.17.1"
554997source = "registry+https://github.com/rust-lang/crates.io-index"
555998checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
999dependencies = [
1000 "foldhash",
1001 "serde",
1002 "serde_core",
5571005[[package]]
5581006name = "heck"
7481196 "zerovec",
1199[[package]]
1200name = "id-arena"
1201version = "2.3.0"
1202source = "registry+https://github.com/rust-lang/crates.io-index"
1203checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954"
7511205[[package]]
7521206name = "idna"
7531207version = "1.1.0"
7921246checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855"
7931247dependencies = [
7941248 "equivalent",
795 "hashbrown",
1249 "hashbrown 0.17.1",
1250 "serde",
1251 "serde_core",
1254[[package]]
1255name = "io-extras"
1256version = "0.19.0"
1257source = "registry+https://github.com/rust-lang/crates.io-index"
1258checksum = "20fd6de4ccfcc187e38bc21cfa543cb5a302cb86a8b114eb7f0bf0dc9f8ac00f"
1259dependencies = [
1260 "io-lifetimes 3.0.1",
1261 "windows-sys 0.60.2",
1264[[package]]
1265name = "io-lifetimes"
1266version = "2.0.4"
1267source = "registry+https://github.com/rust-lang/crates.io-index"
1268checksum = "06432fb54d3be7964ecd3649233cddf80db2832f47fec34c01f65b3d9d774983"
1270[[package]]
1271name = "io-lifetimes"
1272version = "3.0.1"
1273source = "registry+https://github.com/rust-lang/crates.io-index"
1274checksum = "2f0fb0570afe1fed943c5c3d4102d5358592d8625fda6a0007fdbe65a92fba96"
7981276[[package]]
7991277name = "ipnet"
8001278version = "2.12.2"
8271305 "either",
1308[[package]]
1309name = "itertools"
1310version = "0.14.0"
1311source = "registry+https://github.com/rust-lang/crates.io-index"
1312checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285"
1313dependencies = [
1314 "either",
8301317[[package]]
8311318name = "itoa"
8321319version = "1.0.18"
8441331 "wasm-bindgen",
1334[[package]]
1335name = "leb128fmt"
1336version = "0.1.0"
1337source = "registry+https://github.com/rust-lang/crates.io-index"
1338checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2"
8471340[[package]]
8481341name = "libc"
8491342version = "0.2.189"
8501343source = "registry+https://github.com/rust-lang/crates.io-index"
8511344checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
1346[[package]]
1347name = "libm"
1348version = "0.2.16"
1349source = "registry+https://github.com/rust-lang/crates.io-index"
1350checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981"
8531352[[package]]
8541353name = "libredox"
8551354version = "0.1.25"
8591358 "libc",
1361[[package]]
1362name = "linux-raw-sys"
1363version = "0.12.1"
1364source = "registry+https://github.com/rust-lang/crates.io-index"
1365checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
8621367[[package]]
8631368name = "litemap"
8641369version = "0.8.3"
8771382source = "registry+https://github.com/rust-lang/crates.io-index"
8781383checksum = "4050469837a6ff301cd14c1f8f24f88549e6d548f24f64e2148eb0f72cebc51f"
1385[[package]]
1386name = "mach2"
1387version = "0.6.0"
1388source = "registry+https://github.com/rust-lang/crates.io-index"
1389checksum = "dae608c151f68243f2b000364e1f7b186d9c29845f7d2d85bd31b9ad77ad552b"
1391[[package]]
1392name = "maybe-owned"
1393version = "0.3.4"
1394source = "registry+https://github.com/rust-lang/crates.io-index"
1395checksum = "4facc753ae494aeb6e3c22f839b158aebd4f9270f55cd3c79906c45476c47ab4"
8801397[[package]]
8811398name = "memchr"
8821399version = "2.8.3"
8831400source = "registry+https://github.com/rust-lang/crates.io-index"
8841401checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
1403[[package]]
1404name = "memfd"
1405version = "0.6.6"
1406source = "registry+https://github.com/rust-lang/crates.io-index"
1407checksum = "57804b2c9b69967f1536a56f86297e367a33b19e98852ed624b84551cdbc0d90"
1408dependencies = [
1409 "rustix",
8861412[[package]]
8871413name = "mio"
8881414version = "1.2.3"
8941420 "windows-sys 0.61.2",
1423[[package]]
1424name = "multiversion_no_op"
1425version = "1.0.0"
1426source = "registry+https://github.com/rust-lang/crates.io-index"
1427checksum = "743fb55ba31b18fb1ecef6bdc9aa2743314978ac084044301a7eee33fb99a20d"
8971429[[package]]
8981430name = "nix"
8991431version = "0.29.0"
9211453 "autocfg",
1456[[package]]
1457name = "object"
1458version = "0.40.0"
1459source = "registry+https://github.com/rust-lang/crates.io-index"
1460checksum = "dd229a0361b9d0d4396176e02d65897f487eebeab7caa6d443855ee152ca0b9c"
1461dependencies = [
1462 "crc32fast",
1463 "hashbrown 0.17.1",
1464 "indexmap",
1465 "memchr",
9241468[[package]]
9251469name = "once_cell"
9261470version = "1.21.4"
9451489source = "registry+https://github.com/rust-lang/crates.io-index"
9461490checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
1492[[package]]
1493name = "ordered-float"
1494version = "2.10.1"
1495source = "registry+https://github.com/rust-lang/crates.io-index"
1496checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c"
1497dependencies = [
1498 "num-traits",
9481501[[package]]
9491502name = "percent-encoding"
9501503version = "2.3.2"
9851538 "plotters-backend",
1541[[package]]
1542name = "postcard"
1543version = "1.1.3"
1544source = "registry+https://github.com/rust-lang/crates.io-index"
1545checksum = "6764c3b5dd454e283a30e6dfe78e9b31096d9e32036b5d1eaac7a6119ccb9a24"
1546dependencies = [
1547 "cobs",
1548 "embedded-io 0.4.0",
1549 "embedded-io 0.6.1",
1550 "serde",
9881553[[package]]
9891554name = "potential_utf"
9901555version = "0.1.6"
10241589 "termtree",
1592[[package]]
1593name = "prettyplease"
1594version = "0.3.0"
1595source = "registry+https://github.com/rust-lang/crates.io-index"
1596checksum = "2bfe0f4c752e450fc2faf62654f1c134747922825d5b04ca717b8874f41a40c0"
1597dependencies = [
1598 "proc-macro2",
1599 "syn 3.0.6",
10271602[[package]]
10281603name = "proc-macro2"
10291604version = "1.0.107"
10331608 "unicode-ident",
1611[[package]]
1612name = "pulley-interpreter"
1613version = "49.0.1"
1614source = "registry+https://github.com/rust-lang/crates.io-index"
1615checksum = "0091857bc410bd7117eb6ac042ced7714c69f994a8b9c2ae30add2f73e3a25ac"
1616dependencies = [
1617 "cranelift-bitset",
1618 "log",
1619 "pulley-macros",
1620 "wasmtime-internal-core",
1623[[package]]
1624name = "pulley-macros"
1625version = "49.0.1"
1626source = "registry+https://github.com/rust-lang/crates.io-index"
1627checksum = "8798ebc6bf0ef227e204fa3fad05b04970599a85f456fd28365450fd679b2600"
1628dependencies = [
1629 "proc-macro2",
1630 "quote",
1631 "syn 2.0.119",
10361634[[package]]
10371635name = "quinn"
10381636version = "0.11.12"
11611759 "thiserror 1.0.69",
1762[[package]]
1763name = "regalloc2"
1764version = "0.15.2"
1765source = "registry+https://github.com/rust-lang/crates.io-index"
1766checksum = "757712e8e61590d6d4f5d563483755538b5aa13467837a3b41cd9832509a7f85"
1767dependencies = [
1768 "allocator-api2",
1769 "bumpalo",
1770 "hashbrown 0.17.1",
1771 "log",
1772 "rustc-hash",
1773 "serde",
1774 "smallvec",
11641777[[package]]
11651778name = "regex"
11661779version = "1.13.1"
12461859 "windows-sys 0.52.0",
1862[[package]]
1863name = "rustc-demangle"
1864version = "0.1.28"
1865source = "registry+https://github.com/rust-lang/crates.io-index"
1866checksum = "b74b56ffa8bb2830709a538c2cbcae9aa062db0d2a42563bfb09bdaae44020eb"
12491868[[package]]
12501869name = "rustc-hash"
12511870version = "2.1.3"
12521871source = "registry+https://github.com/rust-lang/crates.io-index"
12531872checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d"
1874[[package]]
1875name = "rustix"
1876version = "1.1.5"
1877source = "registry+https://github.com/rust-lang/crates.io-index"
1878checksum = "891efababe418670775f199f0d233d84843c227a0949a883ce15b37c78d6629d"
1879dependencies = [
1880 "bitflags",
1881 "errno",
1882 "libc",
1883 "linux-raw-sys",
1884 "windows-sys 0.61.2",
1887[[package]]
1888name = "rustix-linux-procfs"
1889version = "0.1.1"
1890source = "registry+https://github.com/rust-lang/crates.io-index"
1891checksum = "2fc84bf7e9aa16c4f2c758f27412dc9841341e16aa682d9c7ac308fe3ee12056"
1892dependencies = [
1893 "once_cell",
1894 "rustix",
12551897[[package]]
12561898name = "rustls"
12571899version = "0.23.45"
13081950 "winapi-util",
1953[[package]]
1954name = "scopeguard"
1955version = "1.2.0"
1956source = "registry+https://github.com/rust-lang/crates.io-index"
1957checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
1959[[package]]
1960name = "semver"
1961version = "1.0.28"
1962source = "registry+https://github.com/rust-lang/crates.io-index"
1963checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd"
1964dependencies = [
1965 "serde",
1966 "serde_core",
13111969[[package]]
13121970name = "serde"
13131971version = "1.0.229"
13181976 "serde_derive",
1979[[package]]
1980name = "serde-untagged"
1981version = "0.1.9"
1982source = "registry+https://github.com/rust-lang/crates.io-index"
1983checksum = "f9faf48a4a2d2693be24c6289dbe26552776eb7737074e6722891fadbe6c5058"
1984dependencies = [
1985 "erased-serde",
1986 "serde",
1987 "serde_core",
1988 "typeid",
1991[[package]]
1992name = "serde-value"
1993version = "0.7.0"
1994source = "registry+https://github.com/rust-lang/crates.io-index"
1995checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c"
1996dependencies = [
1997 "ordered-float",
1998 "serde",
13212001[[package]]
13222002name = "serde_core"
13232003version = "1.0.229"
13522032 "zmij",
2035[[package]]
2036name = "serde_spanned"
2037version = "0.6.9"
2038source = "registry+https://github.com/rust-lang/crates.io-index"
2039checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3"
2040dependencies = [
2041 "serde",
13552044[[package]]
13562045name = "serde_urlencoded"
13572046version = "0.7.1"
13642053 "serde",
2056[[package]]
2057name = "sha2"
2058version = "0.10.9"
2059source = "registry+https://github.com/rust-lang/crates.io-index"
2060checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
2061dependencies = [
2062 "cfg-if",
2063 "cpufeatures 0.2.17",
2064 "digest",
13672067[[package]]
13682068name = "shlex"
13692069version = "2.0.1"
13702070source = "registry+https://github.com/rust-lang/crates.io-index"
13712071checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba"
2073[[package]]
2074name = "simdutf8"
2075version = "0.1.5"
2076source = "registry+https://github.com/rust-lang/crates.io-index"
2077checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e"
13732079[[package]]
13742080name = "slab"
13752081version = "0.4.12"
13812087version = "1.16.2"
13822088source = "registry+https://github.com/rust-lang/crates.io-index"
13832089checksum = "f9395f0f0eee849a9b707b2f06bb92a6a422090e2123bb2ef8e87a0e61892a8e"
2090dependencies = [
2091 "serde",
13852094[[package]]
13862095name = "smith"
14092118name = "smith-cli"
14102119version = "0.1.0"
14112120dependencies = [
2121 "archunit",
14122122 "assert_cmd",
14132123 "clap",
14142124 "predicates",
14422152 "smith",
14432153 "smith-ai",
14442154 "smith-core",
2155 "wasmtime",
2156 "wasmtime-wasi",
2159[[package]]
2160name = "smith-plugin-echo"
2161version = "0.1.0"
2162dependencies = [
2163 "wit-bindgen",
14472166[[package]]
15332252 "syn 3.0.6",
2255[[package]]
2256name = "target-lexicon"
2257version = "0.13.5"
2258source = "registry+https://github.com/rust-lang/crates.io-index"
2259checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
2261[[package]]
2262name = "termcolor"
2263version = "1.4.1"
2264source = "registry+https://github.com/rust-lang/crates.io-index"
2265checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755"
2266dependencies = [
2267 "winapi-util",
15362270[[package]]
15372271name = "termtree"
15382272version = "0.5.1"
16422376 "tokio",
2379[[package]]
2380name = "toml"
2381version = "0.8.23"
2382source = "registry+https://github.com/rust-lang/crates.io-index"
2383checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362"
2384dependencies = [
2385 "serde",
2386 "serde_spanned",
2387 "toml_datetime",
2388 "toml_edit",
2391[[package]]
2392name = "toml_datetime"
2393version = "0.6.11"
2394source = "registry+https://github.com/rust-lang/crates.io-index"
2395checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c"
2396dependencies = [
2397 "serde",
2400[[package]]
2401name = "toml_edit"
2402version = "0.22.27"
2403source = "registry+https://github.com/rust-lang/crates.io-index"
2404checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a"
2405dependencies = [
2406 "indexmap",
2407 "serde",
2408 "serde_spanned",
2409 "toml_datetime",
2410 "toml_write",
2411 "winnow",
2414[[package]]
2415name = "toml_write"
2416version = "0.1.2"
2417source = "registry+https://github.com/rust-lang/crates.io-index"
2418checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801"
16452420[[package]]
16462421name = "tower"
16472422version = "0.5.3"
16942469checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100"
16952470dependencies = [
16962471 "pin-project-lite",
2472 "tracing-attributes",
16972473 "tracing-core",
2476[[package]]
2477name = "tracing-attributes"
2478version = "0.1.31"
2479source = "registry+https://github.com/rust-lang/crates.io-index"
2480checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da"
2481dependencies = [
2482 "proc-macro2",
2483 "quote",
2484 "syn 2.0.119",
17002487[[package]]
17012488name = "tracing-core"
17022489version = "0.1.36"
17122499source = "registry+https://github.com/rust-lang/crates.io-index"
17132500checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
2502[[package]]
2503name = "typeid"
2504version = "1.0.3"
2505source = "registry+https://github.com/rust-lang/crates.io-index"
2506checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c"
2508[[package]]
2509name = "typenum"
2510version = "1.20.1"
2511source = "registry+https://github.com/rust-lang/crates.io-index"
2512checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20"
17152514[[package]]
17162515name = "unicode-ident"
17172516version = "1.0.26"
17182517source = "registry+https://github.com/rust-lang/crates.io-index"
17192518checksum = "d245f478577f809a851594d02313b640fb437e0bb33866753cff937863096954"
2520[[package]]
2521name = "unicode-xid"
2522version = "0.2.6"
2523source = "registry+https://github.com/rust-lang/crates.io-index"
2524checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"
17212526[[package]]
17222527name = "untrusted"
17232528version = "0.9.0"
17602565 "wasm-bindgen",
2568[[package]]
2569name = "version_check"
2570version = "0.9.5"
2571source = "registry+https://github.com/rust-lang/crates.io-index"
2572checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
17632574[[package]]
17642575name = "wait-timeout"
17652576version = "0.2.1"
18502661 "unicode-ident",
2664[[package]]
2665name = "wasm-encoder"
2666version = "0.258.0"
2667source = "registry+https://github.com/rust-lang/crates.io-index"
2668checksum = "e974fe6821a8cf64575d51ea2194e2c8f77e7b66e9afe7419ce8a97f9ee0d251"
2669dependencies = [
2670 "leb128fmt",
2671 "wasmparser 0.258.0",
2674[[package]]
2675name = "wasm-encoder"
2676version = "0.259.0"
2677source = "registry+https://github.com/rust-lang/crates.io-index"
2678checksum = "b1d0246511d901aacf25d2dc9111f0054947de5e093fe662099e709ff7530dc3"
2679dependencies = [
2680 "leb128fmt",
2681 "wasmparser 0.259.0",
2684[[package]]
2685name = "wasm-metadata"
2686version = "0.258.0"
2687source = "registry+https://github.com/rust-lang/crates.io-index"
2688checksum = "18a11585adb92fe9b55ad1d760e8d8fb5d87e0d2e303cb8eed57f078d54293a2"
2689dependencies = [
2690 "anyhow",
2691 "indexmap",
2692 "wasm-encoder 0.258.0",
2693 "wasmparser 0.258.0",
2696[[package]]
2697name = "wasm-metadata"
2698version = "0.259.0"
2699source = "registry+https://github.com/rust-lang/crates.io-index"
2700checksum = "4e7bf119eb01f4a246864c10bd87c8f26c566350abb25aa4d5273c415bbab338"
2701dependencies = [
2702 "anyhow",
2703 "indexmap",
2704 "wasm-encoder 0.259.0",
2705 "wasmparser 0.259.0",
18532708[[package]]
18542709name = "wasm-streams"
18552710version = "0.4.2"
18632718 "web-sys",
2721[[package]]
2722name = "wasmparser"
2723version = "0.258.0"
2724source = "registry+https://github.com/rust-lang/crates.io-index"
2725checksum = "d9a61719f93a87b16d325921e251800c4833f8fab50fa21c7de73aed50086313"
2726dependencies = [
2727 "bitflags",
2728 "hashbrown 0.17.1",
2729 "indexmap",
2730 "semver",
2731 "serde",
2734[[package]]
2735name = "wasmparser"
2736version = "0.259.0"
2737source = "registry+https://github.com/rust-lang/crates.io-index"
2738checksum = "0f7c12eac7bb587801590f6a67ff0bc84d0748513864b71108e4b311cc3df694"
2739dependencies = [
2740 "bitflags",
2741 "hashbrown 0.17.1",
2742 "indexmap",
2743 "semver",
2746[[package]]
2747name = "wasmprinter"
2748version = "0.258.0"
2749source = "registry+https://github.com/rust-lang/crates.io-index"
2750checksum = "3a65e30fb2cd3cc5cb7761a6064787b2abf017e6566d8d0dedf2bb7f55ad5383"
2751dependencies = [
2752 "anyhow",
2753 "termcolor",
2754 "wasmparser 0.258.0",
2757[[package]]
2758name = "wasmtime"
2759version = "49.0.1"
2760source = "registry+https://github.com/rust-lang/crates.io-index"
2761checksum = "942ddd2fc5800ec01d4b11c28ad62ab00517dcd416aff728f7d73fddf75872c1"
2762dependencies = [
2763 "addr2line",
2764 "async-trait",
2765 "bitflags",
2766 "bumpalo",
2767 "cc",
2768 "encoding_rs",
2769 "futures",
2770 "libc",
2771 "log",
2772 "mach2",
2773 "memfd",
2774 "object",
2775 "once_cell",
2776 "postcard",
2777 "pulley-interpreter",
2778 "rustix",
2779 "semver",
2780 "serde",
2781 "serde_derive",
2782 "smallvec",
2783 "target-lexicon",
2784 "wasmparser 0.258.0",
2785 "wasmtime-environ",
2786 "wasmtime-internal-component-macro",
2787 "wasmtime-internal-component-util",
2788 "wasmtime-internal-core",
2789 "wasmtime-internal-cranelift",
2790 "wasmtime-internal-fiber",
2791 "wasmtime-internal-jit-debug",
2792 "wasmtime-internal-jit-icache-coherence",
2793 "wasmtime-internal-unwinder",
2794 "wasmtime-internal-versioned-export-macros",
2795 "windows-sys 0.61.2",
2798[[package]]
2799name = "wasmtime-environ"
2800version = "49.0.1"
2801source = "registry+https://github.com/rust-lang/crates.io-index"
2802checksum = "98f2ca21b23a51c1b1944297e9671a628c368e92aa6250e4c38f48e2dc251f0c"
2803dependencies = [
2804 "anyhow",
2805 "cpp_demangle",
2806 "cranelift-bforest",
2807 "cranelift-bitset",
2808 "cranelift-entity",
2809 "gimli",
2810 "hashbrown 0.17.1",
2811 "indexmap",
2812 "log",
2813 "object",
2814 "postcard",
2815 "rustc-demangle",
2816 "semver",
2817 "serde",
2818 "serde_derive",
2819 "sha2",
2820 "smallvec",
2821 "target-lexicon",
2822 "wasm-encoder 0.258.0",
2823 "wasmparser 0.258.0",
2824 "wasmprinter",
2825 "wasmtime-internal-component-util",
2826 "wasmtime-internal-core",
2829[[package]]
2830name = "wasmtime-internal-component-macro"
2831version = "49.0.1"
2832source = "registry+https://github.com/rust-lang/crates.io-index"
2833checksum = "92c42f95d879875994319bd6689b17570e68aebd1a17e0dc54430928ed0699b5"
2834dependencies = [
2835 "anyhow",
2836 "proc-macro2",
2837 "quote",
2838 "syn 2.0.119",
2839 "wasmtime-internal-component-util",
2840 "wasmtime-internal-wit-bindgen",
2841 "wit-parser 0.258.0",
2844[[package]]
2845name = "wasmtime-internal-component-util"
2846version = "49.0.1"
2847source = "registry+https://github.com/rust-lang/crates.io-index"
2848checksum = "294c7f12f062ceb148cd26c77170ff739552db76d1f203f6127f249684988a70"
2850[[package]]
2851name = "wasmtime-internal-core"
2852version = "49.0.1"
2853source = "registry+https://github.com/rust-lang/crates.io-index"
2854checksum = "64b67114739063bb72bb8ed2b4994b8b22809d354432db68553ad529850f9536"
2855dependencies = [
2856 "hashbrown 0.17.1",
2857 "libm",
2858 "serde",
2861[[package]]
2862name = "wasmtime-internal-cranelift"
2863version = "49.0.1"
2864source = "registry+https://github.com/rust-lang/crates.io-index"
2865checksum = "b7d19868a30cc20df6f6648c9a4b3f700fcd1ddd0a63af9a98cb75f2b58dc874"
2866dependencies = [
2867 "cranelift-codegen",
2868 "cranelift-control",
2869 "cranelift-entity",
2870 "cranelift-frontend",
2871 "cranelift-native",
2872 "gimli",
2873 "itertools 0.14.0",
2874 "log",
2875 "object",
2876 "pulley-interpreter",
2877 "smallvec",
2878 "target-lexicon",
2879 "thiserror 2.0.21",
2880 "wasmparser 0.258.0",
2881 "wasmtime-environ",
2882 "wasmtime-internal-core",
2883 "wasmtime-internal-unwinder",
2884 "wasmtime-internal-versioned-export-macros",
2887[[package]]
2888name = "wasmtime-internal-fiber"
2889version = "49.0.1"
2890source = "registry+https://github.com/rust-lang/crates.io-index"
2891checksum = "4f1999aee268c3f625666b12ba0ded55a6ac2c800b60b426af7d164d63411908"
2892dependencies = [
2893 "cc",
2894 "libc",
2895 "rustix",
2896 "wasmtime-environ",
2897 "wasmtime-internal-versioned-export-macros",
2898 "windows-sys 0.61.2",
2901[[package]]
2902name = "wasmtime-internal-jit-debug"
2903version = "49.0.1"
2904source = "registry+https://github.com/rust-lang/crates.io-index"
2905checksum = "33ca2499301c6f11cc9eb42c2beafc8efae396ae4cb91077e3ac080dc5d765e4"
2906dependencies = [
2907 "cc",
2908 "wasmtime-internal-versioned-export-macros",
2911[[package]]
2912name = "wasmtime-internal-jit-icache-coherence"
2913version = "49.0.1"
2914source = "registry+https://github.com/rust-lang/crates.io-index"
2915checksum = "7162d829c56265e183d23b17d67afc5c6876433daaed54c137388a8078a1bb6b"
2916dependencies = [
2917 "libc",
2918 "wasmtime-internal-core",
2919 "windows-sys 0.61.2",
2922[[package]]
2923name = "wasmtime-internal-unwinder"
2924version = "49.0.1"
2925source = "registry+https://github.com/rust-lang/crates.io-index"
2926checksum = "4e167cf144f3cee40838f7663e3a589f93bba65151efa084a2d58b2bd47469f1"
2927dependencies = [
2928 "cranelift-codegen",
2929 "log",
2930 "object",
2931 "wasmtime-environ",
2934[[package]]
2935name = "wasmtime-internal-versioned-export-macros"
2936version = "49.0.1"
2937source = "registry+https://github.com/rust-lang/crates.io-index"
2938checksum = "8d09e038ad69c741dae29da4606ccfc0df66f156e62cb7f0664c8d7d1272a36d"
2939dependencies = [
2940 "proc-macro2",
2941 "quote",
2942 "syn 2.0.119",
2945[[package]]
2946name = "wasmtime-internal-wit-bindgen"
2947version = "49.0.1"
2948source = "registry+https://github.com/rust-lang/crates.io-index"
2949checksum = "c63d97a742fc9b415dad7ed2ac33ddb8fe6c5413fcd0c7ee58907f2ab6f9a430"
2950dependencies = [
2951 "anyhow",
2952 "bitflags",
2953 "heck",
2954 "indexmap",
2955 "wit-component 0.258.0",
2956 "wit-parser 0.258.0",
2959[[package]]
2960name = "wasmtime-wasi"
2961version = "49.0.1"
2962source = "registry+https://github.com/rust-lang/crates.io-index"
2963checksum = "ce11727cb331abeaace3681a4b072e4fe04818d7b99786d183b318671f9e4e0e"
2964dependencies = [
2965 "async-trait",
2966 "bitflags",
2967 "bytes",
2968 "cap-primitives",
2969 "futures",
2970 "rand",
2971 "rustix",
2972 "rustix-linux-procfs",
2973 "thiserror 2.0.21",
2974 "tokio",
2975 "tracing",
2976 "url",
2977 "wasmtime",
2978 "wasmtime-wasi-io",
2979 "windows-sys 0.61.2",
2980 "winx",
2983[[package]]
2984name = "wasmtime-wasi-io"
2985version = "49.0.1"
2986source = "registry+https://github.com/rust-lang/crates.io-index"
2987checksum = "35f5ed8d710d8daf71cb4742c6b90c1fd121acb62b6848556eb4e0661cbd28bd"
2988dependencies = [
2989 "async-trait",
2990 "bytes",
2991 "futures",
2992 "tracing",
2993 "wasmtime",
18662996[[package]]
18672997name = "web-sys"
18682998version = "0.3.106"
19473077 "windows-targets 0.52.6",
3080[[package]]
3081name = "windows-sys"
3082version = "0.59.0"
3083source = "registry+https://github.com/rust-lang/crates.io-index"
3084checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
3085dependencies = [
3086 "windows-targets 0.52.6",
3089[[package]]
3090name = "windows-sys"
3091version = "0.60.2"
3092source = "registry+https://github.com/rust-lang/crates.io-index"
3093checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb"
3094dependencies = [
3095 "windows-targets 0.53.5",
19503098[[package]]
19513099name = "windows-sys"
19523100version = "0.61.2"
19803128 "windows_aarch64_gnullvm 0.52.6",
19813129 "windows_aarch64_msvc 0.52.6",
19823130 "windows_i686_gnu 0.52.6",
1983 "windows_i686_gnullvm",
3131 "windows_i686_gnullvm 0.52.6",
19843132 "windows_i686_msvc 0.52.6",
19853133 "windows_x86_64_gnu 0.52.6",
19863134 "windows_x86_64_gnullvm 0.52.6",
19873135 "windows_x86_64_msvc 0.52.6",
3138[[package]]
3139name = "windows-targets"
3140version = "0.53.5"
3141source = "registry+https://github.com/rust-lang/crates.io-index"
3142checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3"
3143dependencies = [
3144 "windows-link",
3145 "windows_aarch64_gnullvm 0.53.1",
3146 "windows_aarch64_msvc 0.53.1",
3147 "windows_i686_gnu 0.53.1",
3148 "windows_i686_gnullvm 0.53.1",
3149 "windows_i686_msvc 0.53.1",
3150 "windows_x86_64_gnu 0.53.1",
3151 "windows_x86_64_gnullvm 0.53.1",
3152 "windows_x86_64_msvc 0.53.1",
19903155[[package]]
19913156name = "windows_aarch64_gnullvm"
19923157version = "0.48.5"
19993164source = "registry+https://github.com/rust-lang/crates.io-index"
20003165checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
3167[[package]]
3168name = "windows_aarch64_gnullvm"
3169version = "0.53.1"
3170source = "registry+https://github.com/rust-lang/crates.io-index"
3171checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53"
20023173[[package]]
20033174name = "windows_aarch64_msvc"
20043175version = "0.48.5"
20113182source = "registry+https://github.com/rust-lang/crates.io-index"
20123183checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
3185[[package]]
3186name = "windows_aarch64_msvc"
3187version = "0.53.1"
3188source = "registry+https://github.com/rust-lang/crates.io-index"
3189checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006"
20143191[[package]]
20153192name = "windows_i686_gnu"
20163193version = "0.48.5"
20233200source = "registry+https://github.com/rust-lang/crates.io-index"
20243201checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
3203[[package]]
3204name = "windows_i686_gnu"
3205version = "0.53.1"
3206source = "registry+https://github.com/rust-lang/crates.io-index"
3207checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3"
20263209[[package]]
20273210name = "windows_i686_gnullvm"
20283211version = "0.52.6"
20293212source = "registry+https://github.com/rust-lang/crates.io-index"
20303213checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
3215[[package]]
3216name = "windows_i686_gnullvm"
3217version = "0.53.1"
3218source = "registry+https://github.com/rust-lang/crates.io-index"
3219checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c"
20323221[[package]]
20333222name = "windows_i686_msvc"
20343223version = "0.48.5"
20413230source = "registry+https://github.com/rust-lang/crates.io-index"
20423231checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
3233[[package]]
3234name = "windows_i686_msvc"
3235version = "0.53.1"
3236source = "registry+https://github.com/rust-lang/crates.io-index"
3237checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2"
20443239[[package]]
20453240name = "windows_x86_64_gnu"
20463241version = "0.48.5"
20533248source = "registry+https://github.com/rust-lang/crates.io-index"
20543249checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
3251[[package]]
3252name = "windows_x86_64_gnu"
3253version = "0.53.1"
3254source = "registry+https://github.com/rust-lang/crates.io-index"
3255checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499"
20563257[[package]]
20573258name = "windows_x86_64_gnullvm"
20583259version = "0.48.5"
20653266source = "registry+https://github.com/rust-lang/crates.io-index"
20663267checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
3269[[package]]
3270name = "windows_x86_64_gnullvm"
3271version = "0.53.1"
3272source = "registry+https://github.com/rust-lang/crates.io-index"
3273checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1"
20683275[[package]]
20693276name = "windows_x86_64_msvc"
20703277version = "0.48.5"
20773284source = "registry+https://github.com/rust-lang/crates.io-index"
20783285checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
3287[[package]]
3288name = "windows_x86_64_msvc"
3289version = "0.53.1"
3290source = "registry+https://github.com/rust-lang/crates.io-index"
3291checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650"
3293[[package]]
3294name = "winnow"
3295version = "0.7.15"
3296source = "registry+https://github.com/rust-lang/crates.io-index"
3297checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945"
3298dependencies = [
3299 "memchr",
3302[[package]]
3303name = "winx"
3304version = "0.36.4"
3305source = "registry+https://github.com/rust-lang/crates.io-index"
3306checksum = "3f3fd376f71958b862e7afb20cfe5a22830e1963462f3a17f49d82a6c1d1f42d"
3307dependencies = [
3308 "bitflags",
3309 "windows-sys 0.59.0",
3312[[package]]
3313name = "wit-bindgen"
3314version = "0.62.0"
3315source = "registry+https://github.com/rust-lang/crates.io-index"
3316checksum = "53cb4b5556c3a791e86838ea287782bdafa704d55b0e68b5b81a3a16b9ea5f4b"
3317dependencies = [
3318 "wit-bindgen-rust-macro",
3321[[package]]
3322name = "wit-bindgen-core"
3323version = "0.62.0"
3324source = "registry+https://github.com/rust-lang/crates.io-index"
3325checksum = "72ad22a37ecbc0e1fdca34d2b670ba41368cb0920735643e00fdf39a16ee5431"
3326dependencies = [
3327 "anyhow",
3328 "heck",
3329 "wit-parser 0.259.0",
3332[[package]]
3333name = "wit-bindgen-rust"
3334version = "0.62.0"
3335source = "registry+https://github.com/rust-lang/crates.io-index"
3336checksum = "84ba5213d4332c260a0d4e69e34b0f7e4b85ddae10b6ebfbac00d9c185ba628a"
3337dependencies = [
3338 "anyhow",
3339 "heck",
3340 "indexmap",
3341 "prettyplease",
3342 "syn 3.0.6",
3343 "wasm-metadata 0.259.0",
3344 "wit-bindgen-core",
3345 "wit-component 0.259.0",
3348[[package]]
3349name = "wit-bindgen-rust-macro"
3350version = "0.62.0"
3351source = "registry+https://github.com/rust-lang/crates.io-index"
3352checksum = "8f19d63da8e478a370ef8192d90ccb517965b7747d6b46cd2d831dd0ef4d2541"
3353dependencies = [
3354 "anyhow",
3355 "prettyplease",
3356 "proc-macro2",
3357 "quote",
3358 "syn 3.0.6",
3359 "wit-bindgen-core",
3360 "wit-bindgen-rust",
3363[[package]]
3364name = "wit-component"
3365version = "0.258.0"
3366source = "registry+https://github.com/rust-lang/crates.io-index"
3367checksum = "481b5c47b2ecce0389b5e08a05557d6a190c9cd761773b8880a8017ee04dc7ef"
3368dependencies = [
3369 "anyhow",
3370 "bitflags",
3371 "indexmap",
3372 "log",
3373 "serde",
3374 "serde_derive",
3375 "serde_json",
3376 "wasm-encoder 0.258.0",
3377 "wasm-metadata 0.258.0",
3378 "wasmparser 0.258.0",
3379 "wit-parser 0.258.0",
3382[[package]]
3383name = "wit-component"
3384version = "0.259.0"
3385source = "registry+https://github.com/rust-lang/crates.io-index"
3386checksum = "092f783dee3253265fcde131475055f8c275ac0176a9c0396db1dc7b5544bfb4"
3387dependencies = [
3388 "anyhow",
3389 "bitflags",
3390 "indexmap",
3391 "log",
3392 "serde",
3393 "serde_derive",
3394 "serde_json",
3395 "wasm-encoder 0.259.0",
3396 "wasm-metadata 0.259.0",
3397 "wasmparser 0.259.0",
3398 "wit-parser 0.259.0",
3401[[package]]
3402name = "wit-parser"
3403version = "0.258.0"
3404source = "registry+https://github.com/rust-lang/crates.io-index"
3405checksum = "ff4daaa3cd97ae49ecd0a99dc009d453f93e0f083dd3be38c0f24a83a93e37ac"
3406dependencies = [
3407 "anyhow",
3408 "hashbrown 0.17.1",
3409 "id-arena",
3410 "indexmap",
3411 "log",
3412 "semver",
3413 "serde",
3414 "serde_derive",
3415 "serde_json",
3416 "unicode-ident",
3417 "wasmparser 0.258.0",
3420[[package]]
3421name = "wit-parser"
3422version = "0.259.0"
3423source = "registry+https://github.com/rust-lang/crates.io-index"
3424checksum = "6390f4f02493ce678d509c859cf1698e38929fb75c8012a6ee2f7d6b6cb66cd7"
3425dependencies = [
3426 "anyhow",
3427 "hashbrown 0.17.1",
3428 "id-arena",
3429 "indexmap",
3430 "log",
3431 "semver",
3432 "serde",
3433 "serde_derive",
3434 "serde_json",
3435 "unicode-ident",
3436 "wasmparser 0.259.0",
20803439[[package]]
20813440name = "writeable"
20823441version = "0.6.4"
21133472[[package]]
21143473name = "zerocopy"
2115version = "0.8.58"
3474version = "0.8.59"
21163475source = "registry+https://github.com/rust-lang/crates.io-index"
2117checksum = "c17e8fafad82b542ff3717217ecdc736231b59e387768c9630123b4ce4d2db44"
3476checksum = "6df92bf3d9227be3d53173901ddbffac2babc27ae50f397776ffd6dc33f800cb"
21183477dependencies = [
21193478 "zerocopy-derive",
21223481[[package]]
21233482name = "zerocopy-derive"
2124version = "0.8.58"
3483version = "0.8.59"
21253484source = "registry+https://github.com/rust-lang/crates.io-index"
2126checksum = "595f56e044df4f46a0c9a626f65c3d99eb8488f7e8a8baa12dd76326d9710bf2"
3485checksum = "ac4f328cf2f05d084e496c3e9c3f33ed0a183656a16e1fcec4d464d8373aec82"
21273486dependencies = [
21283487 "proc-macro2",
21293488 "quote",

Cargo.toml

Modified

+11 / −0 text lines

88 "smith-rpc",
99 "smith-harness",
1010 "smith-cli",
11 "plugins/echo",
1112 "xtask",
1314resolver = "3"
4243 "rustls-tls",
4344] } # smith-ai, http stack
4445ciborium = "0.2" # smith-core, cbor session codec
46wasmtime = { version = "49", default-features = false, features = [
47 "runtime",
48 "component-model",
49 "cranelift",
50 "demangle",
51] } # smith-harness, wasm plugin engine
52wasmtime-wasi = { version = "49", default-features = false, features = [
53 "p2",
54] } # smith-harness, scoped wasi:io/poll linking
4555tracing-subscriber = { version = "0.3", features = ["env-filter"] } # smith-cli, log output
4656similar = "2" # diff
4757ignore = "0.4" # search stack
7787# dev
7888insta = "1"
89archunit = "0.0.1"
7990assert_cmd = "2"
8091predicates = "3"
8192assert_fs = "1"

plugins/echo/Cargo.toml

Added
new file mode 100644

+12 / −0 text lines

1[package]
2name = "smith-plugin-echo"
3edition.workspace = true
4version.workspace = true
5license.workspace = true
6
7[lib]
8path = "src/lib.rs"
9crate-type = ["cdylib"]
11[dependencies]
12wit-bindgen = { version = "0.62", default-features = false, features = ["macros"] }

plugins/echo/src/lib.rs

Added
new file mode 100644

+31 / −0 text lines

1//! Reference system plugin: one echo tool over the smith:plugin world.
2#![expect(missing_docs, reason = "wit-bindgen generates the world surface")]
3#![expect(clippy::pedantic, reason = "wit-bindgen generates the world surface")]
4
5wit_bindgen::generate!({
6 path: "../../wit/smith-plugin.wit",
7 world: "plugin-world",
8});
9
10use exports::smith::plugin::plugin::{Guest, ToolDeclaration};
12struct EchoPlugin;
14impl Guest for EchoPlugin {
15 fn declare_tools() -> Vec<ToolDeclaration> {
16 vec![ToolDeclaration {
17 name: "echo".to_string(),
18 description: "Echoes the input string back verbatim.".to_string(),
19 }]
20 }
22 fn invoke(name: String, input_json: String) -> Result<String, String> {
23 if name == "echo" {
24 Ok(input_json)
25 } else {
26 Err(format!("unknown tool: {name}"))
27 }
28 }
29}
31export!(EchoPlugin);

smith-cli/Cargo.toml

Modified

+1 / −0 text lines

1717serde_json = { workspace = true }
1919[dev-dependencies]
20archunit = { workspace = true }
2021assert_cmd = { workspace = true }
2122predicates = { workspace = true }

smith-cli/tests/architecture.rs

Added
new file mode 100644

+72 / −0 text lines

1//! Workspace architecture law, expressed as source-level tests.
2//!
3//! Mirrors the manifest gate in xtask and adds what manifests cannot see:
4//! source dependency graphs and engine-ownership boundaries.
5
6use archunit::{assert_passes, project_files};
7
8macro_rules! boundary {
9 ($name:ident, $from:expr, $to:expr) => {
10 #[test]
11 fn $name() {
12 let rule = project_files()
13 .in_path(concat!($from, "/src/**"))
14 .should_not()
15 .depend_on_files()
16 .in_path(concat!($to, "/src/**"));
17 assert_passes!(rule);
18 }
19 };
20}
22boundary!(smith_is_foundational, "smith", "smith-core");
23boundary!(smith_never_ai, "smith", "smith-ai");
24boundary!(smith_never_ui, "smith", "smith-ui");
25boundary!(smith_never_tui, "smith", "smith-tui");
26boundary!(smith_never_rpc, "smith", "smith-rpc");
27boundary!(smith_never_harness, "smith", "smith-harness");
28boundary!(smith_never_cli, "smith", "smith-cli");
30boundary!(core_never_ai, "smith-core", "smith-ai");
31boundary!(core_never_ui, "smith-core", "smith-ui");
32boundary!(core_never_tui, "smith-core", "smith-tui");
33boundary!(core_never_rpc, "smith-core", "smith-rpc");
34boundary!(core_never_harness, "smith-core", "smith-harness");
35boundary!(core_never_cli, "smith-core", "smith-cli");
37boundary!(ai_never_core, "smith-ai", "smith-core");
38boundary!(ai_never_ui, "smith-ai", "smith-ui");
39boundary!(ai_never_tui, "smith-ai", "smith-tui");
40boundary!(ai_never_rpc, "smith-ai", "smith-rpc");
41boundary!(ai_never_harness, "smith-ai", "smith-harness");
42boundary!(ai_never_cli, "smith-ai", "smith-cli");
44boundary!(ui_never_core, "smith-ui", "smith-core");
45boundary!(ui_never_ai, "smith-ui", "smith-ai");
46boundary!(ui_never_tui, "smith-ui", "smith-tui");
47boundary!(ui_never_rpc, "smith-ui", "smith-rpc");
48boundary!(ui_never_harness, "smith-ui", "smith-harness");
49boundary!(ui_never_cli, "smith-ui", "smith-cli");
51boundary!(tui_never_core, "smith-tui", "smith-core");
52boundary!(tui_never_ai, "smith-tui", "smith-ai");
53boundary!(tui_never_rpc, "smith-tui", "smith-rpc");
54boundary!(tui_never_harness, "smith-tui", "smith-harness");
55boundary!(tui_never_cli, "smith-tui", "smith-cli");
57boundary!(rpc_never_ai, "smith-rpc", "smith-ai");
58boundary!(rpc_never_ui, "smith-rpc", "smith-ui");
59boundary!(rpc_never_tui, "smith-rpc", "smith-tui");
60boundary!(rpc_never_harness, "smith-rpc", "smith-harness");
61boundary!(rpc_never_cli, "smith-rpc", "smith-cli");
63#[test]
64fn wasmtime_lives_only_in_harness() {
65 let rule = project_files()
66 .in_path("smith-core/src/**")
67 .should_not()
68 .depend_on_external_modules()
69 .matching("wasmtime")
70 .matching("wasmtime-wasi");
71 assert_passes!(rule);
72}

smith-harness/Cargo.toml

Modified

+2 / −0 text lines

1111smith = { path = "../smith", version = "0.1.0" }
1212smith-core = { path = "../smith-core", version = "0.1.0" }
1313smith-ai = { path = "../smith-ai", version = "0.1.0" }
14wasmtime = { workspace = true }
15wasmtime-wasi = { workspace = true }
1416futures = { workspace = true }
1517reqwest = { workspace = true }

smith-harness/src/lib.rs

Modified

+1 / −0 text lines

1111pub mod http;
1212pub mod runtime;
13pub mod wasm;
1415pub use runtime::{RuntimeConfig, RuntimeProvider, build_agent};
1516pub use smith_ai::auth::{AuthStore, credential_env_var};

smith-harness/src/wasm.rs

Added
new file mode 100644

+205 / −0 text lines

1//! Wasm plugin host: deterministic engine, artifact validation,
2//! transactional load, and fuel with memory ceilings.
3//!
4//! The engine serves every plugin identically; embedded and user plugins
5//! load through this one path with no privilege difference.
6
7use ::smith::error::{ProviderFault, Result, SmithError};
8use std::path::Path;
9use wasmtime::component::{Component, Linker};
10use wasmtime::{Config, Engine, Store, component::ResourceTable};
12#[allow(missing_docs, reason = "generated bindings carry no doc comments")]
13pub mod bindings {
14 wasmtime::component::bindgen!({
15 path: "../wit/smith-plugin.wit",
16 world: "plugin-world",
17 });
18}
20use self::bindings::PluginWorld;
21use self::bindings::exports::smith::plugin::plugin::ToolDeclaration;
22use self::bindings::smith::plugin::tooling::Host as ToolingHost;
24/// Deterministic engine configuration per `SMH-SPEC-WASM0001`.
25pub struct PluginEngine {
26 engine: Engine,
27}
29impl PluginEngine {
30 /// Build the deterministic engine: NaN canonicalization on, fuel on,
31 /// backtraces off.
32 ///
33 /// # Errors
34 ///
35 /// Returns a plugin fault when the engine cannot be configured.
36 pub fn new() -> Result<Self> {
37 let mut config = Config::new();
38 config.cranelift_nan_canonicalization(true);
39 config.consume_fuel(true);
40 config.wasm_backtrace_max_frames(std::num::NonZeroUsize::new(1));
41 let engine =
42 Engine::new(&config).map_err(|e| plugin_fault(format!("engine config failed: {e}")))?;
43 Ok(Self { engine })
44 }
46 /// Validate one artifact against the world; a rejected artifact never
47 /// instantiates.
48 ///
49 /// # Errors
50 ///
51 /// Returns a plugin fault naming the validation stage and cause.
52 pub fn validate(&self, artifact: &Path) -> Result<Component> {
53 Component::from_file(&self.engine, artifact)
54 .map_err(|e| plugin_fault(format!("validation failed: {e}")))
55 }
57 /// The shared engine behind every plugin.
58 #[must_use]
59 pub const fn engine(&self) -> &Engine {
60 &self.engine
61 }
62}
64/// One instantiated plugin: pinned store, fuel budget, and bindings.
65pub struct PluginInstance {
66 store: Store<PluginHostState>,
67 bindings: PluginWorld,
68}
70/// Per-plugin runtime ceilings.
71#[derive(Clone, Copy, Debug)]
72pub struct PluginCeilings {
73 /// Memory ceiling in bytes.
74 pub memory_bytes: usize,
75 /// Fuel budget per call.
76 pub fuel: u64,
77}
79impl Default for PluginCeilings {
80 fn default() -> Self {
81 Self {
82 memory_bytes: 64 * 1024 * 1024,
83 fuel: 10_000_000_000,
84 }
85 }
86}
88struct PluginHostState {
89 table: ResourceTable,
90 wasi: wasmtime_wasi::WasiCtx,
91 ceilings: PluginCeilings,
92}
94impl PluginHostState {
95 fn limits(&mut self) -> &mut dyn wasmtime::ResourceLimiter {
96 &mut self.ceilings
97 }
98}
100impl wasmtime::ResourceLimiter for PluginCeilings {
101 fn memory_growing(
102 &mut self,
103 _current: usize,
104 desired: usize,
105 _maximum: Option<usize>,
106 ) -> wasmtime::Result<bool> {
107 Ok(desired <= self.memory_bytes)
108 }
110 fn table_growing(
111 &mut self,
112 _current: usize,
113 desired: usize,
114 _maximum: Option<usize>,
115 ) -> wasmtime::Result<bool> {
116 Ok(desired <= 10_000)
117 }
118}
120impl PluginInstance {
121 /// Validate, instantiate, and pin one plugin atomically.
122 ///
123 /// # Errors
124 ///
125 /// Returns a plugin fault naming the failed lifecycle stage.
126 pub fn load(engine: &PluginEngine, artifact: &Path) -> Result<Self> {
127 let component = engine.validate(artifact)?;
128 let mut store = Store::new(
129 engine.engine(),
130 PluginHostState {
131 table: ResourceTable::new(),
132 wasi: wasmtime_wasi::WasiCtxBuilder::new().build(),
133 ceilings: PluginCeilings::default(),
134 },
135 );
136 store.limiter(PluginHostState::limits);
137 store
138 .set_fuel(PluginCeilings::default().fuel)
139 .map_err(|e| plugin_fault(format!("fuel setup failed: {e}")))?;
140 let mut linker: Linker<PluginHostState> = Linker::new(engine.engine());
141 wasmtime_wasi::p2::add_to_linker_sync::<PluginHostState>(&mut linker)
142 .map_err(|e| plugin_fault(format!("wasi linking failed: {e}")))?;
143 PluginWorld::add_to_linker::<PluginHostState, PluginHasSelf>(&mut linker, |state| state)
144 .map_err(|e| plugin_fault(format!("linker setup failed: {e}")))?;
145 let bindings = PluginWorld::instantiate(&mut store, &component, &linker)
146 .map_err(|e| plugin_fault(format!("instantiation failed: {e}")))?;
147 Ok(Self { store, bindings })
148 }
150 /// The declared tool set; runs the declaration pass.
151 ///
152 /// # Errors
153 ///
154 /// Returns a plugin fault on trap, fuel exhaustion, or conversion
155 /// failure.
156 pub fn declare_tools(&mut self) -> Result<Vec<ToolDeclaration>> {
157 let interface = self
158 .bindings
159 .smith_plugin_plugin()
160 .call_declare_tools(&mut self.store)
161 .map_err(|e| plugin_fault(format!("declaration failed: {e}")))?;
162 Ok(interface)
163 }
165 /// Invoke one declared tool by name.
166 ///
167 /// # Errors
168 ///
169 /// Returns a plugin fault on trap, fuel exhaustion, or a guest error;
170 /// guest errors carry the plugin's own message.
171 pub fn invoke(&mut self, name: &str, input_json: &str) -> Result<String> {
172 let outcome = self
173 .bindings
174 .smith_plugin_plugin()
175 .call_invoke(&mut self.store, name, input_json)
176 .map_err(|e| plugin_fault(format!("invoke failed: {e}")))?;
177 outcome.map_err(|message| plugin_fault(format!("plugin error: {message}")))
178 }
179}
181fn plugin_fault(message: impl Into<String>) -> SmithError {
182 SmithError::Provider {
183 fault: ProviderFault::Plugin {
184 message: message.into(),
185 },
186 }
187}
189/// Self-referential data marker for linker setup.
190struct PluginHasSelf;
192impl wasmtime::component::HasData for PluginHasSelf {
193 type Data<'a> = &'a mut PluginHostState;
194}
196impl ToolingHost for PluginHostState {}
198impl wasmtime_wasi::WasiView for PluginHostState {
199 fn ctx(&mut self) -> wasmtime_wasi::WasiCtxView<'_> {
200 wasmtime_wasi::WasiCtxView {
201 ctx: &mut self.wasi,
202 table: &mut self.table,
203 }
204 }
205}

smith-harness/tests/wasm_host.rs

Added
new file mode 100644

+55 / −0 text lines

1//! Wasm host lifecycle: validate, instantiate, declare, invoke, fuel.
2
3#![expect(clippy::unwrap_used, reason = "integration tests assert on outcomes")]
4#![expect(clippy::panic, reason = "integration tests assert on outcomes")]
5
6use smith_harness::wasm::{PluginEngine, PluginInstance};
7
8/// Build the echo artifact, returning its path.
9fn echo_artifact() -> std::path::PathBuf {
10 let status = std::process::Command::new("cargo")
11 .args([
12 "build",
13 "-p",
14 "smith-plugin-echo",
15 "--target",
16 "wasm32-wasip2",
17 ])
18 .status()
19 .unwrap();
20 assert!(status.success(), "echo plugin build failed");
21 let manifest = std::env::var("CARGO_MANIFEST_DIR").unwrap();
22 std::path::Path::new(&manifest).join("../target/wasm32-wasip2/debug/smith_plugin_echo.wasm")
23}
25#[test]
26fn echo_plugin_loads_declares_and_invokes() {
27 let artifact = echo_artifact();
28 let engine = PluginEngine::new().unwrap();
29 let mut instance = PluginInstance::load(&engine, &artifact).unwrap();
31 let tools = instance.declare_tools().unwrap();
32 assert_eq!(tools.len(), 1);
33 assert_eq!(tools[0].name, "echo");
35 let echoed = instance.invoke("echo", "{\"text\":\"hi\"}").unwrap();
36 assert_eq!(echoed, "{\"text\":\"hi\"}");
38 let rejected = match instance.invoke("nope", "{}") {
39 Err(error) => error,
40 Ok(value) => panic!("expected plugin error, got {value}"),
41 };
42 assert!(rejected.to_string().contains("unknown tool: nope"));
43}
45#[test]
46fn invalid_artifact_fails_validation() {
47 let junk = std::env::temp_dir().join(format!("smith_junk_{}.wasm", std::process::id()));
48 std::fs::write(&junk, b"not a component").unwrap();
49 let engine = PluginEngine::new().unwrap();
50 let Err(error) = PluginInstance::load(&engine, &junk) else {
51 panic!("expected validation failure")
52 };
53 assert!(error.to_string().contains("validation failed"));
54 let _ = std::fs::remove_file(&junk);
55}

smith/src/error.rs

Modified

+7 / −0 text lines

@@ -119,6 +119,11 @@ ProviderFault
119119 },
120120 /// The stream ended without a terminal outcome.
121121 Incomplete,
122 /// A plugin lifecycle or runtime failure, named by stage.
123 Plugin {
124 /// Lifecycle stage and cause.
125 message: String,
126 },
124129impl ProviderFault {
133138 Self::Overloaded { .. } => "PROVIDER_OVERLOADED",
134139 Self::Protocol { .. } => "PROVIDER_PROTOCOL",
135140 Self::Incomplete => "PROVIDER_INCOMPLETE",
141 Self::Plugin { .. } => "PROVIDER_PLUGIN",
136142 }
137143 }
161167 Self::Authentication { message } => write!(f, "authentication: {message}"),
162168 Self::Overloaded { message } => write!(f, "overloaded: {message}"),
163169 Self::Protocol { message } => write!(f, "protocol: {message}"),
170 Self::Plugin { message } => write!(f, "plugin: {message}"),
164171 Self::Incomplete => write!(f, "stream ended without a terminal outcome"),
165172 }
166173 }

wit/smith-plugin.wit

Added
new file mode 100644

+23 / −0 text lines

1package smith:plugin@0.1.0;
2
3interface tooling {
4 record tool-declaration {
5 name: string,
6 description: string,
7 }
8}
9
10interface plugin {
11 use tooling.{tool-declaration};
13 /// Static declaration pass: runs at instantiation, before publication,
14 /// and may not perform host effects.
15 declare-tools: func() -> list<tool-declaration>;
17 /// Invoke one declared tool by name; input and output are canonical JSON.
18 invoke: func(name: string, input-json: string) -> result<string, string>;
19}
21world plugin-world {
22 export plugin;
23}

xtask/src/main.rs

Modified

+5 / −68 text lines

1818};
2020const HELP: &str = concat!(
21 "usage: cargo x <check|lint|fmt|test|doc|arch|pup|audit|bootstrap>\n",
21 "usage: cargo x <check|lint|fmt|test|doc|arch|audit|bootstrap>\n",
2222 " cargo x dev [args...] build and launch the dev smith binary\n",
2323);
25/// Nightly toolchain pinned for the cargo-pup architecture gate.
26const PINNED_NIGHTLY: &str = "+nightly-2026-01-22";
28/// Version of `cargo_pup` used by the architecture gate.
29const PUP_VERSION: &str = "0.1.8";
3125/// Version of `cargo-nextest` used by the test gate.
3226const NEXTEST_VERSION: &str = "0.9.146";
6862 Some("test") => cargo_nextest(),
6963 Some("doc") => cargo(&["doc", "--workspace", "--no-deps"]),
7064 Some("arch") => arch(),
71 Some("pup") => cargo_pup(),
7265 Some("audit") => audit(),
7366 Some("bootstrap") => bootstrap(),
7467 _ => fail(HELP),
8174 cargo_fmt,
8275 cargo_clippy,
8376 arch,
84 cargo_pup,
8577 cargo_nextest,
8678 cargo_doc,
8779 cargo_machete,
158150 }
161fn cargo_pup() -> ExitCode {
162 cargo(&[PINNED_NIGHTLY, "pup"])
163}
165153fn cargo_machete() -> ExitCode {
166154 let installed = tool_present_bin("cargo-machete", MACHETE_VERSION, || {
167155 cargo(&[
205193/// Install the external gate tools that Cargo cannot ship.
206194///
207/// `cargo-nextest` arrives as a prebuilt binary through `cargo-binstall`;
208/// `cargo_pup` has no published binaries, so it is built from source on the
209/// pinned nightly with its rustc-dev dependency, which `rustup component
210/// add` provides. Both steps are idempotent.
195/// `cargo-nextest` arrives as a prebuilt binary through `cargo-binstall`.
196/// The step is idempotent.
211197fn bootstrap() -> ExitCode {
212 let steps: [Step; 6] = [
198 let steps: [Step; 5] = [
213199 install_binstall,
214200 install_nextest,
215 install_pup,
216201 install_machete,
217202 install_deny,
218203 install_audit,
260245 "--version",
261246 BINSTALL_VERSION,
262247 // Freeze binstall's own dependency graph for the same reason
263 // as cargo_pup: crates.io drift cannot break the gate.
248 // crates.io drift cannot break the gate.
264249 "--locked",
265250 ])
266251 })
276261 })
279fn add_pup_components() -> ExitCode {
280 run(
281 "rustup",
282 &[
283 "component",
284 "add",
285 "--toolchain",
286 PINNED_NIGHTLY.trim_start_matches('+'),
287 "rust-src",
288 "rustc-dev",
289 "llvm-tools",
290 ],
291 )
292}
294fn install_pup() -> ExitCode {
295 let components = sequence(&[add_pup_components]);
296 if components != ExitCode::SUCCESS {
297 return components;
298 }
299 tool_present(&[PINNED_NIGHTLY, "pup", "--help"], || {
300 cargo(&[
301 PINNED_NIGHTLY,
302 "install",
303 "cargo_pup",
304 "--version",
305 PUP_VERSION,
306 // Freeze pup's dependency graph: a semver-compatible but
307 // broken dep release on crates.io cannot break the gate.
308 "--locked",
309 ])
310 })
311}
313264/// Run `probe` with cargo; when it fails, run `install` and return its code.
314265/// The probe pins the tool so a stale unpinned binary is replaced.
315fn tool_present(probe: &[&str], install: impl FnOnce() -> ExitCode) -> ExitCode {
316 let mut arguments = vec!["cargo"];
317 arguments.extend_from_slice(probe);
318 match Command::new(arguments[0])
319 .args(&arguments[1..])
320 .stdout(std::process::Stdio::null())
321 .stderr(std::process::Stdio::null())
322 .status()
323 {
324 Ok(status) if status.success() => ExitCode::SUCCESS,
325 _ => install(),
326 }
327}
329266/// Probes an external binary directly and enforces the pinned version;
330267/// mismatch or absence runs the installer, so drift self-heals to the pin.
331268fn tool_present_bin(program: &str, version: &str, install: impl FnOnce() -> ExitCode) -> ExitCode {