html-to-markdown 2.24.4 → 2.24.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2165) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +6 -6
  3. data/README.md +1 -1
  4. data/ext/html-to-markdown-rb/native/Cargo.lock +254 -47
  5. data/ext/html-to-markdown-rb/native/Cargo.toml +1 -1
  6. data/lib/html_to_markdown/version.rb +1 -1
  7. data/rust-vendor/anyhow/.cargo-checksum.json +1 -0
  8. data/rust-vendor/anyhow/.cargo_vcs_info.json +6 -0
  9. data/rust-vendor/anyhow/.github/FUNDING.yml +1 -0
  10. data/rust-vendor/anyhow/.github/workflows/ci.yml +147 -0
  11. data/rust-vendor/anyhow/Cargo.lock +424 -0
  12. data/rust-vendor/anyhow/Cargo.toml +132 -0
  13. data/rust-vendor/anyhow/Cargo.toml.orig +40 -0
  14. data/rust-vendor/anyhow/LICENSE-APACHE +176 -0
  15. data/rust-vendor/anyhow/LICENSE-MIT +23 -0
  16. data/rust-vendor/anyhow/README.md +179 -0
  17. data/rust-vendor/anyhow/build.rs +207 -0
  18. data/rust-vendor/anyhow/rust-toolchain.toml +2 -0
  19. data/rust-vendor/anyhow/src/backtrace.rs +410 -0
  20. data/rust-vendor/anyhow/src/chain.rs +102 -0
  21. data/rust-vendor/anyhow/src/context.rs +193 -0
  22. data/rust-vendor/anyhow/src/ensure.rs +935 -0
  23. data/rust-vendor/anyhow/src/error.rs +1086 -0
  24. data/rust-vendor/anyhow/src/fmt.rs +158 -0
  25. data/rust-vendor/anyhow/src/kind.rs +121 -0
  26. data/rust-vendor/anyhow/src/lib.rs +728 -0
  27. data/rust-vendor/anyhow/src/macros.rs +245 -0
  28. data/rust-vendor/anyhow/src/nightly.rs +58 -0
  29. data/rust-vendor/anyhow/src/ptr.rs +187 -0
  30. data/rust-vendor/anyhow/src/wrapper.rs +84 -0
  31. data/rust-vendor/anyhow/tests/common/mod.rs +14 -0
  32. data/rust-vendor/anyhow/tests/compiletest.rs +7 -0
  33. data/rust-vendor/anyhow/tests/drop/mod.rs +53 -0
  34. data/rust-vendor/anyhow/tests/test_autotrait.rs +34 -0
  35. data/rust-vendor/anyhow/tests/test_backtrace.rs +15 -0
  36. data/rust-vendor/anyhow/tests/test_boxed.rs +45 -0
  37. data/rust-vendor/anyhow/tests/test_chain.rs +69 -0
  38. data/rust-vendor/anyhow/tests/test_context.rs +172 -0
  39. data/rust-vendor/anyhow/tests/test_convert.rs +46 -0
  40. data/rust-vendor/anyhow/tests/test_downcast.rs +123 -0
  41. data/rust-vendor/anyhow/tests/test_ensure.rs +756 -0
  42. data/rust-vendor/anyhow/tests/test_ffi.rs +19 -0
  43. data/rust-vendor/anyhow/tests/test_fmt.rs +93 -0
  44. data/rust-vendor/anyhow/tests/test_macros.rs +97 -0
  45. data/rust-vendor/anyhow/tests/test_repr.rs +30 -0
  46. data/rust-vendor/anyhow/tests/test_source.rs +62 -0
  47. data/rust-vendor/anyhow/tests/ui/chained-comparison.rs +8 -0
  48. data/rust-vendor/anyhow/tests/ui/chained-comparison.stderr +10 -0
  49. data/rust-vendor/anyhow/tests/ui/empty-ensure.rs +6 -0
  50. data/rust-vendor/anyhow/tests/ui/empty-ensure.stderr +12 -0
  51. data/rust-vendor/anyhow/tests/ui/ensure-nonbool.rs +40 -0
  52. data/rust-vendor/anyhow/tests/ui/ensure-nonbool.stderr +113 -0
  53. data/rust-vendor/anyhow/tests/ui/must-use.rs +11 -0
  54. data/rust-vendor/anyhow/tests/ui/must-use.stderr +15 -0
  55. data/rust-vendor/anyhow/tests/ui/no-impl.rs +8 -0
  56. data/rust-vendor/anyhow/tests/ui/no-impl.stderr +32 -0
  57. data/rust-vendor/anyhow/tests/ui/temporary-value.rs +5 -0
  58. data/rust-vendor/anyhow/tests/ui/temporary-value.stderr +15 -0
  59. data/rust-vendor/anyhow/tests/ui/wrong-interpolation.rs +5 -0
  60. data/rust-vendor/anyhow/tests/ui/wrong-interpolation.stderr +5 -0
  61. data/rust-vendor/bitflags/.cargo-checksum.json +1 -1
  62. data/rust-vendor/bitflags/.cargo_vcs_info.json +1 -1
  63. data/rust-vendor/bitflags/CHANGELOG.md +12 -0
  64. data/rust-vendor/bitflags/Cargo.lock +48 -48
  65. data/rust-vendor/bitflags/Cargo.toml +1 -1
  66. data/rust-vendor/bitflags/Cargo.toml.orig +1 -1
  67. data/rust-vendor/bitflags/README.md +1 -1
  68. data/rust-vendor/bitflags/src/external.rs +1 -1
  69. data/rust-vendor/bitflags/src/lib.rs +1 -1
  70. data/rust-vendor/bitflags/src/tests/known_bits.rs +47 -0
  71. data/rust-vendor/bitflags/src/tests/unknown_bits.rs +53 -0
  72. data/rust-vendor/bitflags/src/tests.rs +2 -0
  73. data/rust-vendor/bitflags/src/traits.rs +11 -1
  74. data/rust-vendor/cc/.cargo-checksum.json +1 -1
  75. data/rust-vendor/cc/.cargo_vcs_info.json +1 -1
  76. data/rust-vendor/cc/CHANGELOG.md +7 -0
  77. data/rust-vendor/cc/Cargo.lock +331 -7
  78. data/rust-vendor/cc/Cargo.toml +1 -1
  79. data/rust-vendor/cc/Cargo.toml.orig +1 -1
  80. data/rust-vendor/cc/src/lib.rs +10 -13
  81. data/rust-vendor/cc/src/target/generated.rs +1 -0
  82. data/rust-vendor/cpp_demangle/.cargo-checksum.json +1 -1
  83. data/rust-vendor/cpp_demangle/.cargo_vcs_info.json +1 -1
  84. data/rust-vendor/cpp_demangle/CHANGELOG.md +55 -0
  85. data/rust-vendor/cpp_demangle/Cargo.lock +5 -5
  86. data/rust-vendor/cpp_demangle/Cargo.toml +2 -2
  87. data/rust-vendor/cpp_demangle/Cargo.toml.orig +2 -2
  88. data/rust-vendor/cpp_demangle/README.md +9 -9
  89. data/rust-vendor/cpp_demangle/build.rs +10 -9
  90. data/rust-vendor/cpp_demangle/examples/cppfilt.rs +1 -1
  91. data/rust-vendor/cpp_demangle/examples/simple.rs +1 -1
  92. data/rust-vendor/cpp_demangle/src/ast.rs +238 -36
  93. data/rust-vendor/cpp_demangle/src/lib.rs +31 -46
  94. data/rust-vendor/cpp_demangle/src/subs.rs +1 -1
  95. data/rust-vendor/flate2/.cargo-checksum.json +1 -1
  96. data/rust-vendor/flate2/.cargo_vcs_info.json +1 -1
  97. data/rust-vendor/flate2/Cargo.lock +3 -3
  98. data/rust-vendor/flate2/Cargo.toml +13 -2
  99. data/rust-vendor/flate2/Cargo.toml.orig +16 -13
  100. data/rust-vendor/flate2/LICENSE-MIT +1 -1
  101. data/rust-vendor/flate2/src/crc.rs +177 -42
  102. data/rust-vendor/flate2/src/gz/mod.rs +159 -0
  103. data/rust-vendor/foldhash-0.1.5/.cargo-checksum.json +1 -0
  104. data/rust-vendor/foldhash-0.1.5/.cargo_vcs_info.json +6 -0
  105. data/rust-vendor/foldhash-0.1.5/Cargo.lock +852 -0
  106. data/rust-vendor/foldhash-0.1.5/Cargo.toml +76 -0
  107. data/rust-vendor/foldhash-0.1.5/Cargo.toml.orig +44 -0
  108. data/rust-vendor/foldhash-0.1.5/LICENSE +19 -0
  109. data/rust-vendor/foldhash-0.1.5/README.md +277 -0
  110. data/rust-vendor/foldhash-0.1.5/src/convenience.rs +73 -0
  111. data/rust-vendor/foldhash-0.1.5/src/fast.rs +270 -0
  112. data/rust-vendor/foldhash-0.1.5/src/lib.rs +284 -0
  113. data/rust-vendor/foldhash-0.1.5/src/quality.rs +174 -0
  114. data/rust-vendor/foldhash-0.1.5/src/seed.rs +267 -0
  115. data/rust-vendor/getrandom/.cargo-checksum.json +1 -1
  116. data/rust-vendor/getrandom/.cargo_vcs_info.json +1 -1
  117. data/rust-vendor/getrandom/CHANGELOG.md +39 -1
  118. data/rust-vendor/getrandom/Cargo.lock +451 -60
  119. data/rust-vendor/getrandom/Cargo.toml +44 -5
  120. data/rust-vendor/getrandom/Cargo.toml.orig +45 -10
  121. data/rust-vendor/getrandom/LICENSE-MIT +1 -1
  122. data/rust-vendor/getrandom/README.md +72 -40
  123. data/rust-vendor/getrandom/benches/buffer.rs +10 -8
  124. data/rust-vendor/getrandom/build.rs +1 -47
  125. data/rust-vendor/getrandom/src/backends/custom.rs +1 -1
  126. data/rust-vendor/getrandom/src/backends/efi_rng.rs +1 -1
  127. data/rust-vendor/getrandom/src/backends/esp_idf.rs +1 -1
  128. data/rust-vendor/getrandom/src/backends/extern_impl.rs +19 -0
  129. data/rust-vendor/getrandom/src/backends/fuchsia.rs +1 -1
  130. data/rust-vendor/getrandom/src/backends/getentropy.rs +4 -3
  131. data/rust-vendor/getrandom/src/backends/getrandom.rs +4 -12
  132. data/rust-vendor/getrandom/src/backends/hermit.rs +1 -1
  133. data/rust-vendor/getrandom/src/backends/linux_android_with_fallback.rs +8 -10
  134. data/rust-vendor/getrandom/src/backends/linux_raw.rs +101 -75
  135. data/rust-vendor/getrandom/src/backends/netbsd.rs +3 -3
  136. data/rust-vendor/getrandom/src/backends/rdrand.rs +26 -13
  137. data/rust-vendor/getrandom/src/backends/rndr.rs +13 -11
  138. data/rust-vendor/getrandom/src/backends/solaris.rs +5 -4
  139. data/rust-vendor/getrandom/src/backends/solid.rs +1 -1
  140. data/rust-vendor/getrandom/src/backends/use_file.rs +17 -28
  141. data/rust-vendor/getrandom/src/backends/vxworks.rs +2 -4
  142. data/rust-vendor/getrandom/src/backends/wasi_p1.rs +1 -1
  143. data/rust-vendor/getrandom/src/backends/wasi_p2_3.rs +61 -0
  144. data/rust-vendor/getrandom/src/backends/wasm_js.rs +1 -1
  145. data/rust-vendor/getrandom/src/backends/windows.rs +7 -11
  146. data/rust-vendor/getrandom/src/backends/windows_legacy.rs +1 -1
  147. data/rust-vendor/getrandom/src/backends.rs +9 -28
  148. data/rust-vendor/getrandom/src/error.rs +39 -6
  149. data/rust-vendor/getrandom/src/error_std_impls.rs +1 -3
  150. data/rust-vendor/getrandom/src/lib.rs +39 -18
  151. data/rust-vendor/getrandom/src/sys_rng.rs +55 -0
  152. data/rust-vendor/getrandom/src/util.rs +3 -15
  153. data/rust-vendor/getrandom/src/utils/get_errno.rs +29 -0
  154. data/rust-vendor/getrandom/src/utils/lazy.rs +64 -0
  155. data/rust-vendor/getrandom/src/utils/sanitizer.rs +28 -0
  156. data/rust-vendor/getrandom/src/utils/sys_fill_exact.rs +41 -0
  157. data/rust-vendor/getrandom/tests/mod.rs +6 -94
  158. data/rust-vendor/getrandom/tests/sys_rng.rs +18 -0
  159. data/rust-vendor/getrandom-0.3.4/.cargo-checksum.json +1 -0
  160. data/rust-vendor/getrandom-0.3.4/.cargo_vcs_info.json +6 -0
  161. data/rust-vendor/getrandom-0.3.4/CHANGELOG.md +673 -0
  162. data/rust-vendor/getrandom-0.3.4/Cargo.lock +292 -0
  163. data/rust-vendor/getrandom-0.3.4/Cargo.toml +133 -0
  164. data/rust-vendor/getrandom-0.3.4/Cargo.toml.orig +100 -0
  165. data/rust-vendor/getrandom-0.3.4/LICENSE-APACHE +201 -0
  166. data/rust-vendor/getrandom-0.3.4/LICENSE-MIT +26 -0
  167. data/rust-vendor/getrandom-0.3.4/README.md +386 -0
  168. data/rust-vendor/getrandom-0.3.4/SECURITY.md +13 -0
  169. data/rust-vendor/getrandom-0.3.4/benches/buffer.rs +121 -0
  170. data/rust-vendor/getrandom-0.3.4/build.rs +57 -0
  171. data/rust-vendor/getrandom-0.3.4/src/backends/apple_other.rs +21 -0
  172. data/rust-vendor/getrandom-0.3.4/src/backends/custom.rs +13 -0
  173. data/rust-vendor/getrandom-0.3.4/src/backends/efi_rng.rs +124 -0
  174. data/rust-vendor/getrandom-0.3.4/src/backends/esp_idf.rs +21 -0
  175. data/rust-vendor/getrandom-0.3.4/src/backends/fuchsia.rs +16 -0
  176. data/rust-vendor/getrandom-0.3.4/src/backends/getentropy.rs +27 -0
  177. data/rust-vendor/getrandom-0.3.4/src/backends/getrandom.rs +39 -0
  178. data/rust-vendor/getrandom-0.3.4/src/backends/hermit.rs +53 -0
  179. data/rust-vendor/getrandom-0.3.4/src/backends/linux_android_with_fallback.rs +103 -0
  180. data/rust-vendor/getrandom-0.3.4/src/backends/linux_raw.rs +143 -0
  181. data/rust-vendor/getrandom-0.3.4/src/backends/netbsd.rs +78 -0
  182. data/rust-vendor/getrandom-0.3.4/src/backends/rdrand.rs +182 -0
  183. data/rust-vendor/getrandom-0.3.4/src/backends/rndr.rs +145 -0
  184. data/rust-vendor/getrandom-0.3.4/src/backends/solaris.rs +42 -0
  185. data/rust-vendor/getrandom-0.3.4/src/backends/solid.rs +19 -0
  186. data/rust-vendor/getrandom-0.3.4/src/backends/unsupported.rs +9 -0
  187. data/rust-vendor/getrandom-0.3.4/src/backends/use_file.rs +234 -0
  188. data/rust-vendor/getrandom-0.3.4/src/backends/vxworks.rs +54 -0
  189. data/rust-vendor/getrandom-0.3.4/src/backends/wasi_p1.rs +32 -0
  190. data/rust-vendor/getrandom-0.3.4/src/backends/wasm_js.rs +72 -0
  191. data/rust-vendor/getrandom-0.3.4/src/backends/windows.rs +61 -0
  192. data/rust-vendor/getrandom-0.3.4/src/backends/windows_legacy.rs +48 -0
  193. data/rust-vendor/getrandom-0.3.4/src/backends.rs +209 -0
  194. data/rust-vendor/getrandom-0.3.4/src/error.rs +212 -0
  195. data/rust-vendor/getrandom-0.3.4/src/error_std_impls.rs +15 -0
  196. data/rust-vendor/getrandom-0.3.4/src/lib.rs +138 -0
  197. data/rust-vendor/getrandom-0.3.4/src/util.rs +84 -0
  198. data/rust-vendor/getrandom-0.3.4/tests/mod.rs +297 -0
  199. data/rust-vendor/hashbrown-0.15.5/.cargo-checksum.json +1 -0
  200. data/rust-vendor/hashbrown-0.15.5/.cargo_vcs_info.json +6 -0
  201. data/rust-vendor/hashbrown-0.15.5/CHANGELOG.md +619 -0
  202. data/rust-vendor/hashbrown-0.15.5/Cargo.lock +306 -0
  203. data/rust-vendor/hashbrown-0.15.5/Cargo.toml +164 -0
  204. data/rust-vendor/hashbrown-0.15.5/Cargo.toml.orig +77 -0
  205. data/rust-vendor/hashbrown-0.15.5/Cross.toml +3 -0
  206. data/rust-vendor/hashbrown-0.15.5/LICENSE-APACHE +201 -0
  207. data/rust-vendor/hashbrown-0.15.5/LICENSE-MIT +25 -0
  208. data/rust-vendor/hashbrown-0.15.5/README.md +80 -0
  209. data/rust-vendor/hashbrown-0.15.5/benches/bench.rs +329 -0
  210. data/rust-vendor/hashbrown-0.15.5/benches/insert_unique_unchecked.rs +34 -0
  211. data/rust-vendor/hashbrown-0.15.5/benches/set_ops.rs +148 -0
  212. data/rust-vendor/hashbrown-0.15.5/clippy.toml +1 -0
  213. data/rust-vendor/hashbrown-0.15.5/src/control/bitmask.rs +117 -0
  214. data/rust-vendor/hashbrown-0.15.5/src/control/group/generic.rs +154 -0
  215. data/rust-vendor/hashbrown-0.15.5/src/control/group/lsx.rs +137 -0
  216. data/rust-vendor/hashbrown-0.15.5/src/control/group/mod.rs +43 -0
  217. data/rust-vendor/hashbrown-0.15.5/src/control/group/neon.rs +121 -0
  218. data/rust-vendor/hashbrown-0.15.5/src/control/group/sse2.rs +146 -0
  219. data/rust-vendor/hashbrown-0.15.5/src/control/mod.rs +10 -0
  220. data/rust-vendor/hashbrown-0.15.5/src/control/tag.rs +83 -0
  221. data/rust-vendor/hashbrown-0.15.5/src/external_trait_impls/mod.rs +4 -0
  222. data/rust-vendor/hashbrown-0.15.5/src/external_trait_impls/rayon/helpers.rs +27 -0
  223. data/rust-vendor/hashbrown-0.15.5/src/external_trait_impls/rayon/map.rs +721 -0
  224. data/rust-vendor/hashbrown-0.15.5/src/external_trait_impls/rayon/mod.rs +5 -0
  225. data/rust-vendor/hashbrown-0.15.5/src/external_trait_impls/rayon/raw.rs +230 -0
  226. data/rust-vendor/hashbrown-0.15.5/src/external_trait_impls/rayon/set.rs +659 -0
  227. data/rust-vendor/hashbrown-0.15.5/src/external_trait_impls/rayon/table.rs +249 -0
  228. data/rust-vendor/hashbrown-0.15.5/src/external_trait_impls/serde.rs +220 -0
  229. data/rust-vendor/hashbrown-0.15.5/src/lib.rs +188 -0
  230. data/rust-vendor/hashbrown-0.15.5/src/macros.rs +70 -0
  231. data/rust-vendor/hashbrown-0.15.5/src/map.rs +6583 -0
  232. data/rust-vendor/hashbrown-0.15.5/src/raw/alloc.rs +92 -0
  233. data/rust-vendor/hashbrown-0.15.5/src/raw/mod.rs +4436 -0
  234. data/rust-vendor/hashbrown-0.15.5/src/raw_entry.rs +1740 -0
  235. data/rust-vendor/hashbrown-0.15.5/src/rustc_entry.rs +567 -0
  236. data/rust-vendor/hashbrown-0.15.5/src/scopeguard.rs +72 -0
  237. data/rust-vendor/hashbrown-0.15.5/src/set.rs +3121 -0
  238. data/rust-vendor/hashbrown-0.15.5/src/table.rs +2380 -0
  239. data/rust-vendor/hashbrown-0.15.5/src/util.rs +38 -0
  240. data/rust-vendor/hashbrown-0.15.5/tests/equivalent_trait.rs +53 -0
  241. data/rust-vendor/hashbrown-0.15.5/tests/hasher.rs +65 -0
  242. data/rust-vendor/hashbrown-0.15.5/tests/rayon.rs +535 -0
  243. data/rust-vendor/hashbrown-0.15.5/tests/serde.rs +65 -0
  244. data/rust-vendor/hashbrown-0.15.5/tests/set.rs +34 -0
  245. data/rust-vendor/heck/.cargo-checksum.json +1 -0
  246. data/rust-vendor/heck/.cargo_vcs_info.json +6 -0
  247. data/rust-vendor/heck/CHANGELOG.md +25 -0
  248. data/rust-vendor/heck/Cargo.toml +34 -0
  249. data/rust-vendor/heck/Cargo.toml.orig +11 -0
  250. data/rust-vendor/heck/LICENSE-APACHE +201 -0
  251. data/rust-vendor/heck/LICENSE-MIT +25 -0
  252. data/rust-vendor/heck/README.md +53 -0
  253. data/rust-vendor/heck/src/kebab.rs +75 -0
  254. data/rust-vendor/heck/src/lib.rs +192 -0
  255. data/rust-vendor/heck/src/lower_camel.rs +88 -0
  256. data/rust-vendor/heck/src/shouty_kebab.rs +73 -0
  257. data/rust-vendor/heck/src/shouty_snake.rs +86 -0
  258. data/rust-vendor/heck/src/snake.rs +100 -0
  259. data/rust-vendor/heck/src/title.rs +75 -0
  260. data/rust-vendor/heck/src/train.rs +87 -0
  261. data/rust-vendor/heck/src/upper_camel.rs +88 -0
  262. data/rust-vendor/html-to-markdown-rs/src/converter/inline/semantic/typography.rs +32 -22
  263. data/rust-vendor/html-to-markdown-rs/tests/integration_test.rs +44 -0
  264. data/rust-vendor/id-arena/.cargo-checksum.json +1 -0
  265. data/rust-vendor/id-arena/.cargo_vcs_info.json +6 -0
  266. data/rust-vendor/id-arena/.travis.yml +22 -0
  267. data/rust-vendor/id-arena/CHANGELOG.md +71 -0
  268. data/rust-vendor/id-arena/Cargo.lock +61 -0
  269. data/rust-vendor/id-arena/Cargo.toml +54 -0
  270. data/rust-vendor/id-arena/Cargo.toml.orig +21 -0
  271. data/rust-vendor/id-arena/LICENSE-APACHE +201 -0
  272. data/rust-vendor/id-arena/LICENSE-MIT +25 -0
  273. data/rust-vendor/id-arena/README.md +101 -0
  274. data/rust-vendor/id-arena/README.tpl +3 -0
  275. data/rust-vendor/id-arena/src/lib.rs +726 -0
  276. data/rust-vendor/id-arena/src/rayon.rs +282 -0
  277. data/rust-vendor/id-arena/tests/readme_up_to_date.rs +22 -0
  278. data/rust-vendor/leb128fmt/.cargo-checksum.json +1 -0
  279. data/rust-vendor/leb128fmt/.cargo_vcs_info.json +6 -0
  280. data/rust-vendor/leb128fmt/CHANGELOG.md +11 -0
  281. data/rust-vendor/leb128fmt/Cargo.toml +55 -0
  282. data/rust-vendor/leb128fmt/Cargo.toml.orig +32 -0
  283. data/rust-vendor/leb128fmt/LICENSE-APACHE +201 -0
  284. data/rust-vendor/leb128fmt/LICENSE-MIT +23 -0
  285. data/rust-vendor/leb128fmt/README.md +162 -0
  286. data/rust-vendor/leb128fmt/src/lib.rs +1650 -0
  287. data/rust-vendor/libc/.cargo-checksum.json +1 -1
  288. data/rust-vendor/libc/.cargo_vcs_info.json +1 -1
  289. data/rust-vendor/libc/CHANGELOG.md +42 -0
  290. data/rust-vendor/libc/Cargo.lock +1 -1
  291. data/rust-vendor/libc/Cargo.toml +75 -51
  292. data/rust-vendor/libc/Cargo.toml.orig +85 -53
  293. data/rust-vendor/libc/LICENSE-MIT +1 -1
  294. data/rust-vendor/libc/src/fuchsia/mod.rs +12 -10
  295. data/rust-vendor/libc/src/macros.rs +63 -71
  296. data/rust-vendor/libc/src/new/linux_uapi/linux/can/error.rs +73 -0
  297. data/rust-vendor/libc/src/new/linux_uapi/linux/can.rs +1 -0
  298. data/rust-vendor/libc/src/new/mod.rs +3 -2
  299. data/rust-vendor/libc/src/new/qurt/dlfcn.rs +26 -0
  300. data/rust-vendor/libc/src/new/qurt/fcntl.rs +4 -1
  301. data/rust-vendor/libc/src/new/qurt/mod.rs +224 -14
  302. data/rust-vendor/libc/src/new/qurt/pthread.rs +1 -22
  303. data/rust-vendor/libc/src/new/qurt/signal.rs +54 -4
  304. data/rust-vendor/libc/src/new/qurt/stdio.rs +0 -5
  305. data/rust-vendor/libc/src/new/qurt/sys/mman.rs +55 -0
  306. data/rust-vendor/libc/src/new/qurt/sys/mod.rs +2 -0
  307. data/rust-vendor/libc/src/new/qurt/sys/sched.rs +24 -0
  308. data/rust-vendor/libc/src/new/qurt/sys/stat.rs +0 -6
  309. data/rust-vendor/libc/src/new/qurt/time.rs +4 -22
  310. data/rust-vendor/libc/src/new/qurt/unistd.rs +210 -20
  311. data/rust-vendor/libc/src/qurt/mod.rs +9 -325
  312. data/rust-vendor/libc/src/types.rs +2 -2
  313. data/rust-vendor/libc/src/unix/aix/mod.rs +11 -20
  314. data/rust-vendor/libc/src/unix/aix/powerpc64.rs +6 -6
  315. data/rust-vendor/libc/src/unix/bsd/apple/mod.rs +15 -0
  316. data/rust-vendor/libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs +4 -4
  317. data/rust-vendor/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs +3 -3
  318. data/rust-vendor/libc/src/unix/bsd/freebsdlike/mod.rs +14 -0
  319. data/rust-vendor/libc/src/unix/bsd/mod.rs +0 -14
  320. data/rust-vendor/libc/src/unix/bsd/netbsdlike/mod.rs +6 -0
  321. data/rust-vendor/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs +15 -7
  322. data/rust-vendor/libc/src/unix/bsd/netbsdlike/openbsd/mod.rs +41 -1
  323. data/rust-vendor/libc/src/unix/cygwin/mod.rs +2 -2
  324. data/rust-vendor/libc/src/unix/haiku/mod.rs +1 -1
  325. data/rust-vendor/libc/src/unix/haiku/x86_64.rs +2 -2
  326. data/rust-vendor/libc/src/unix/hurd/mod.rs +6 -6
  327. data/rust-vendor/libc/src/unix/linux_like/android/mod.rs +2 -0
  328. data/rust-vendor/libc/src/unix/linux_like/linux/gnu/mod.rs +3 -0
  329. data/rust-vendor/libc/src/unix/linux_like/linux/musl/b32/arm/mod.rs +16 -13
  330. data/rust-vendor/libc/src/unix/linux_like/linux/musl/b32/hexagon.rs +12 -13
  331. data/rust-vendor/libc/src/unix/linux_like/linux/musl/b32/mips/mod.rs +25 -16
  332. data/rust-vendor/libc/src/unix/linux_like/linux/musl/b32/powerpc.rs +16 -13
  333. data/rust-vendor/libc/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs +12 -15
  334. data/rust-vendor/libc/src/unix/linux_like/linux/musl/b32/x86/mod.rs +10 -13
  335. data/rust-vendor/libc/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs +0 -15
  336. data/rust-vendor/libc/src/unix/linux_like/linux/musl/b64/loongarch64/mod.rs +0 -15
  337. data/rust-vendor/libc/src/unix/linux_like/linux/musl/b64/mips64.rs +0 -15
  338. data/rust-vendor/libc/src/unix/linux_like/linux/musl/b64/powerpc64.rs +0 -15
  339. data/rust-vendor/libc/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs +0 -15
  340. data/rust-vendor/libc/src/unix/linux_like/linux/musl/b64/s390x.rs +0 -15
  341. data/rust-vendor/libc/src/unix/linux_like/linux/musl/b64/wasm32/mod.rs +0 -15
  342. data/rust-vendor/libc/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs +9 -15
  343. data/rust-vendor/libc/src/unix/mod.rs +87 -11
  344. data/rust-vendor/libc/src/unix/newlib/arm/mod.rs +1 -1
  345. data/rust-vendor/libc/src/unix/newlib/horizon/mod.rs +1 -1
  346. data/rust-vendor/libc/src/unix/newlib/vita/mod.rs +3 -3
  347. data/rust-vendor/libc/src/unix/nto/mod.rs +23 -6
  348. data/rust-vendor/libc/src/unix/redox/mod.rs +45 -3
  349. data/rust-vendor/libc/src/unix/solarish/illumos.rs +2 -0
  350. data/rust-vendor/libc/src/vxworks/mod.rs +7 -7
  351. data/rust-vendor/memchr/.cargo-checksum.json +1 -1
  352. data/rust-vendor/memchr/.cargo_vcs_info.json +1 -1
  353. data/rust-vendor/memchr/Cargo.lock +13 -13
  354. data/rust-vendor/memchr/Cargo.toml +1 -1
  355. data/rust-vendor/memchr/Cargo.toml.orig +1 -1
  356. data/rust-vendor/memchr/src/cow.rs +3 -1
  357. data/rust-vendor/memchr/src/memmem/mod.rs +42 -3
  358. data/rust-vendor/prettyplease/.cargo-checksum.json +1 -0
  359. data/rust-vendor/prettyplease/.cargo_vcs_info.json +6 -0
  360. data/rust-vendor/prettyplease/.github/FUNDING.yml +1 -0
  361. data/rust-vendor/prettyplease/.github/workflows/ci.yml +123 -0
  362. data/rust-vendor/prettyplease/Cargo.lock +54 -0
  363. data/rust-vendor/prettyplease/Cargo.toml +90 -0
  364. data/rust-vendor/prettyplease/Cargo.toml.orig +43 -0
  365. data/rust-vendor/prettyplease/LICENSE-APACHE +176 -0
  366. data/rust-vendor/prettyplease/LICENSE-MIT +23 -0
  367. data/rust-vendor/prettyplease/README.md +312 -0
  368. data/rust-vendor/prettyplease/build.rs +21 -0
  369. data/rust-vendor/prettyplease/examples/.tokeignore +1 -0
  370. data/rust-vendor/prettyplease/examples/input.rs +1 -0
  371. data/rust-vendor/prettyplease/examples/output.prettyplease.rs +593 -0
  372. data/rust-vendor/prettyplease/examples/output.rustc.rs +506 -0
  373. data/rust-vendor/prettyplease/examples/output.rustfmt.rs +552 -0
  374. data/rust-vendor/prettyplease/src/algorithm.rs +386 -0
  375. data/rust-vendor/prettyplease/src/attr.rs +288 -0
  376. data/rust-vendor/prettyplease/src/classify.rs +324 -0
  377. data/rust-vendor/prettyplease/src/convenience.rs +98 -0
  378. data/rust-vendor/prettyplease/src/data.rs +79 -0
  379. data/rust-vendor/prettyplease/src/expr.rs +1533 -0
  380. data/rust-vendor/prettyplease/src/file.rs +17 -0
  381. data/rust-vendor/prettyplease/src/fixup.rs +676 -0
  382. data/rust-vendor/prettyplease/src/generics.rs +426 -0
  383. data/rust-vendor/prettyplease/src/item.rs +1813 -0
  384. data/rust-vendor/prettyplease/src/iter.rs +46 -0
  385. data/rust-vendor/prettyplease/src/lib.rs +385 -0
  386. data/rust-vendor/prettyplease/src/lifetime.rs +9 -0
  387. data/rust-vendor/prettyplease/src/lit.rs +57 -0
  388. data/rust-vendor/prettyplease/src/mac.rs +706 -0
  389. data/rust-vendor/prettyplease/src/pat.rs +254 -0
  390. data/rust-vendor/prettyplease/src/path.rs +194 -0
  391. data/rust-vendor/prettyplease/src/precedence.rs +148 -0
  392. data/rust-vendor/prettyplease/src/ring.rs +81 -0
  393. data/rust-vendor/prettyplease/src/stmt.rs +221 -0
  394. data/rust-vendor/prettyplease/src/token.rs +80 -0
  395. data/rust-vendor/prettyplease/src/ty.rs +326 -0
  396. data/rust-vendor/prettyplease/tests/test.rs +51 -0
  397. data/rust-vendor/prettyplease/tests/test_precedence.rs +900 -0
  398. data/rust-vendor/regex/.cargo-checksum.json +1 -1
  399. data/rust-vendor/regex/.cargo_vcs_info.json +1 -1
  400. data/rust-vendor/regex/CHANGELOG.md +13 -0
  401. data/rust-vendor/regex/Cargo.lock +5 -5
  402. data/rust-vendor/regex/Cargo.toml +15 -7
  403. data/rust-vendor/regex/Cargo.toml.orig +19 -2
  404. data/rust-vendor/regex-automata/.cargo-checksum.json +1 -1
  405. data/rust-vendor/regex-automata/.cargo_vcs_info.json +1 -1
  406. data/rust-vendor/regex-automata/Cargo.lock +3 -3
  407. data/rust-vendor/regex-automata/Cargo.toml +16 -1
  408. data/rust-vendor/regex-automata/Cargo.toml.orig +2 -1
  409. data/rust-vendor/regex-automata/src/dfa/onepass.rs +21 -5
  410. data/rust-vendor/regex-automata/tests/dfa/onepass/mod.rs +1 -0
  411. data/rust-vendor/regex-automata/tests/dfa/onepass/regression.rs +61 -0
  412. data/rust-vendor/regex-automata/tests/nfa/thompson/backtrack/mod.rs +1 -0
  413. data/rust-vendor/regex-automata/tests/nfa/thompson/backtrack/regression.rs +20 -0
  414. data/rust-vendor/regex-automata/tests/nfa/thompson/pikevm/mod.rs +1 -0
  415. data/rust-vendor/regex-automata/tests/nfa/thompson/pikevm/regression.rs +20 -0
  416. data/rust-vendor/regex-syntax/.cargo-checksum.json +1 -1
  417. data/rust-vendor/regex-syntax/.cargo_vcs_info.json +1 -1
  418. data/rust-vendor/regex-syntax/Cargo.lock +1 -1
  419. data/rust-vendor/regex-syntax/Cargo.toml +16 -5
  420. data/rust-vendor/regex-syntax/Cargo.toml.orig +2 -1
  421. data/rust-vendor/semver/.cargo-checksum.json +1 -0
  422. data/rust-vendor/semver/.cargo_vcs_info.json +6 -0
  423. data/rust-vendor/semver/.github/FUNDING.yml +1 -0
  424. data/rust-vendor/semver/.github/workflows/ci.yml +140 -0
  425. data/rust-vendor/semver/Cargo.lock +75 -0
  426. data/rust-vendor/semver/Cargo.toml +86 -0
  427. data/rust-vendor/semver/Cargo.toml.orig +36 -0
  428. data/rust-vendor/semver/LICENSE-APACHE +176 -0
  429. data/rust-vendor/semver/LICENSE-MIT +23 -0
  430. data/rust-vendor/semver/README.md +84 -0
  431. data/rust-vendor/semver/benches/parse.rs +24 -0
  432. data/rust-vendor/semver/src/display.rs +163 -0
  433. data/rust-vendor/semver/src/error.rs +126 -0
  434. data/rust-vendor/semver/src/eval.rs +179 -0
  435. data/rust-vendor/semver/src/identifier.rs +412 -0
  436. data/rust-vendor/semver/src/impls.rs +163 -0
  437. data/rust-vendor/semver/src/lib.rs +570 -0
  438. data/rust-vendor/semver/src/parse.rs +404 -0
  439. data/rust-vendor/semver/src/serde.rs +109 -0
  440. data/rust-vendor/semver/tests/node/mod.rs +43 -0
  441. data/rust-vendor/semver/tests/test_autotrait.rs +14 -0
  442. data/rust-vendor/semver/tests/test_identifier.rs +51 -0
  443. data/rust-vendor/semver/tests/test_version.rs +251 -0
  444. data/rust-vendor/semver/tests/test_version_req.rs +480 -0
  445. data/rust-vendor/semver/tests/util/mod.rs +54 -0
  446. data/rust-vendor/symbolic-common/.cargo-checksum.json +1 -1
  447. data/rust-vendor/symbolic-common/Cargo.lock +74 -3
  448. data/rust-vendor/symbolic-common/Cargo.toml +2 -2
  449. data/rust-vendor/symbolic-common/Cargo.toml.orig +1 -1
  450. data/rust-vendor/symbolic-demangle/.cargo-checksum.json +1 -1
  451. data/rust-vendor/symbolic-demangle/Cargo.lock +87 -9
  452. data/rust-vendor/symbolic-demangle/Cargo.toml +5 -5
  453. data/rust-vendor/symbolic-demangle/Cargo.toml.orig +2 -2
  454. data/rust-vendor/syn/.cargo-checksum.json +1 -1
  455. data/rust-vendor/syn/.cargo_vcs_info.json +1 -1
  456. data/rust-vendor/syn/Cargo.lock +322 -109
  457. data/rust-vendor/syn/Cargo.toml +2 -2
  458. data/rust-vendor/syn/Cargo.toml.orig +2 -2
  459. data/rust-vendor/syn/benches/rust.rs +1 -2
  460. data/rust-vendor/syn/src/lib.rs +1 -1
  461. data/rust-vendor/syn/src/parse.rs +2 -2
  462. data/rust-vendor/syn/src/path.rs +1 -5
  463. data/rust-vendor/syn/tests/common/eq.rs +28 -17
  464. data/rust-vendor/syn/tests/common/parse.rs +1 -2
  465. data/rust-vendor/syn/tests/repo/progress.rs +1 -1
  466. data/rust-vendor/syn/tests/test_round_trip.rs +5 -36
  467. data/rust-vendor/tempfile/.cargo-checksum.json +1 -1
  468. data/rust-vendor/tempfile/.cargo_vcs_info.json +1 -1
  469. data/rust-vendor/tempfile/CHANGELOG.md +4 -0
  470. data/rust-vendor/tempfile/Cargo.lock +333 -21
  471. data/rust-vendor/tempfile/Cargo.toml +2 -2
  472. data/rust-vendor/tempfile/Cargo.toml.orig +2 -2
  473. data/rust-vendor/unicode-ident/.cargo-checksum.json +1 -1
  474. data/rust-vendor/unicode-ident/.cargo_vcs_info.json +1 -1
  475. data/rust-vendor/unicode-ident/.github/workflows/ci.yml +10 -10
  476. data/rust-vendor/unicode-ident/Cargo.lock +468 -186
  477. data/rust-vendor/unicode-ident/Cargo.toml +8 -8
  478. data/rust-vendor/unicode-ident/Cargo.toml.orig +7 -5
  479. data/rust-vendor/unicode-ident/src/lib.rs +1 -1
  480. data/rust-vendor/unicode-xid/.cargo-checksum.json +1 -0
  481. data/rust-vendor/unicode-xid/.cargo_vcs_info.json +6 -0
  482. data/rust-vendor/unicode-xid/COPYRIGHT +7 -0
  483. data/rust-vendor/unicode-xid/Cargo.toml +65 -0
  484. data/rust-vendor/unicode-xid/Cargo.toml.orig +34 -0
  485. data/rust-vendor/unicode-xid/LICENSE-APACHE +201 -0
  486. data/rust-vendor/unicode-xid/LICENSE-MIT +25 -0
  487. data/rust-vendor/unicode-xid/README.md +61 -0
  488. data/rust-vendor/unicode-xid/benches/xid.rs +60 -0
  489. data/rust-vendor/unicode-xid/src/lib.rs +90 -0
  490. data/rust-vendor/unicode-xid/src/tables.rs +1537 -0
  491. data/rust-vendor/unicode-xid/src/tests.rs +95 -0
  492. data/rust-vendor/unicode-xid/tests/exhaustive_tests.rs +25 -0
  493. data/rust-vendor/uuid/.cargo-checksum.json +1 -1
  494. data/rust-vendor/uuid/.cargo_vcs_info.json +1 -1
  495. data/rust-vendor/uuid/Cargo.lock +298 -44
  496. data/rust-vendor/uuid/Cargo.toml +5 -5
  497. data/rust-vendor/uuid/Cargo.toml.orig +5 -5
  498. data/rust-vendor/uuid/README.md +3 -3
  499. data/rust-vendor/uuid/src/error.rs +1 -7
  500. data/rust-vendor/uuid/src/lib.rs +4 -4
  501. data/rust-vendor/wasip3/.cargo-checksum.json +1 -0
  502. data/rust-vendor/wasip3/.cargo_vcs_info.json +6 -0
  503. data/rust-vendor/wasip3/Cargo.lock +483 -0
  504. data/rust-vendor/wasip3/Cargo.toml +96 -0
  505. data/rust-vendor/wasip3/Cargo.toml.orig +49 -0
  506. data/rust-vendor/wasip3/README.md +56 -0
  507. data/rust-vendor/wasip3/examples/cli-command.rs +19 -0
  508. data/rust-vendor/wasip3/examples/http-proxy-compat.rs +20 -0
  509. data/rust-vendor/wasip3/examples/http-proxy.rs +22 -0
  510. data/rust-vendor/wasip3/src/command.rs +513 -0
  511. data/rust-vendor/wasip3/src/http_compat/body_writer.rs +145 -0
  512. data/rust-vendor/wasip3/src/http_compat/conversions.rs +307 -0
  513. data/rust-vendor/wasip3/src/http_compat/mod.rs +314 -0
  514. data/rust-vendor/wasip3/src/imports.rs +10543 -0
  515. data/rust-vendor/wasip3/src/lib.rs +280 -0
  516. data/rust-vendor/wasip3/src/service.rs +7274 -0
  517. data/rust-vendor/wasip3/wit/deps/cli.wit +256 -0
  518. data/rust-vendor/wasip3/wit/deps/clocks.wit +161 -0
  519. data/rust-vendor/wasip3/wit/deps/filesystem.wit +553 -0
  520. data/rust-vendor/wasip3/wit/deps/http.wit +457 -0
  521. data/rust-vendor/wasip3/wit/deps/random.wit +92 -0
  522. data/rust-vendor/wasip3/wit/deps/sockets.wit +752 -0
  523. data/rust-vendor/wasip3/wit/wasi-crate.wit +1 -0
  524. data/rust-vendor/wasm-encoder/.cargo-checksum.json +1 -0
  525. data/rust-vendor/wasm-encoder/.cargo_vcs_info.json +6 -0
  526. data/rust-vendor/wasm-encoder/Cargo.lock +348 -0
  527. data/rust-vendor/wasm-encoder/Cargo.toml +104 -0
  528. data/rust-vendor/wasm-encoder/Cargo.toml.orig +43 -0
  529. data/rust-vendor/wasm-encoder/README.md +81 -0
  530. data/rust-vendor/wasm-encoder/src/component/aliases.rs +161 -0
  531. data/rust-vendor/wasm-encoder/src/component/builder.rs +826 -0
  532. data/rust-vendor/wasm-encoder/src/component/canonicals.rs +584 -0
  533. data/rust-vendor/wasm-encoder/src/component/components.rs +30 -0
  534. data/rust-vendor/wasm-encoder/src/component/exports.rs +130 -0
  535. data/rust-vendor/wasm-encoder/src/component/imports.rs +170 -0
  536. data/rust-vendor/wasm-encoder/src/component/instances.rs +200 -0
  537. data/rust-vendor/wasm-encoder/src/component/modules.rs +30 -0
  538. data/rust-vendor/wasm-encoder/src/component/names.rs +162 -0
  539. data/rust-vendor/wasm-encoder/src/component/start.rs +53 -0
  540. data/rust-vendor/wasm-encoder/src/component/types.rs +816 -0
  541. data/rust-vendor/wasm-encoder/src/component.rs +169 -0
  542. data/rust-vendor/wasm-encoder/src/core/branch_hints.rs +127 -0
  543. data/rust-vendor/wasm-encoder/src/core/code.rs +2464 -0
  544. data/rust-vendor/wasm-encoder/src/core/custom.rs +74 -0
  545. data/rust-vendor/wasm-encoder/src/core/data.rs +187 -0
  546. data/rust-vendor/wasm-encoder/src/core/dump.rs +629 -0
  547. data/rust-vendor/wasm-encoder/src/core/elements.rs +225 -0
  548. data/rust-vendor/wasm-encoder/src/core/exports.rs +86 -0
  549. data/rust-vendor/wasm-encoder/src/core/functions.rs +64 -0
  550. data/rust-vendor/wasm-encoder/src/core/globals.rs +101 -0
  551. data/rust-vendor/wasm-encoder/src/core/imports.rs +230 -0
  552. data/rust-vendor/wasm-encoder/src/core/instructions.rs +4686 -0
  553. data/rust-vendor/wasm-encoder/src/core/linking.rs +264 -0
  554. data/rust-vendor/wasm-encoder/src/core/memories.rs +116 -0
  555. data/rust-vendor/wasm-encoder/src/core/names.rs +305 -0
  556. data/rust-vendor/wasm-encoder/src/core/producers.rs +181 -0
  557. data/rust-vendor/wasm-encoder/src/core/start.rs +40 -0
  558. data/rust-vendor/wasm-encoder/src/core/tables.rs +130 -0
  559. data/rust-vendor/wasm-encoder/src/core/tags.rs +86 -0
  560. data/rust-vendor/wasm-encoder/src/core/types.rs +753 -0
  561. data/rust-vendor/wasm-encoder/src/core.rs +179 -0
  562. data/rust-vendor/wasm-encoder/src/lib.rs +224 -0
  563. data/rust-vendor/wasm-encoder/src/raw.rs +32 -0
  564. data/rust-vendor/wasm-encoder/src/reencode/component.rs +1548 -0
  565. data/rust-vendor/wasm-encoder/src/reencode.rs +2134 -0
  566. data/rust-vendor/wasm-metadata/.cargo-checksum.json +1 -0
  567. data/rust-vendor/wasm-metadata/.cargo_vcs_info.json +6 -0
  568. data/rust-vendor/wasm-metadata/Cargo.lock +769 -0
  569. data/rust-vendor/wasm-metadata/Cargo.toml +152 -0
  570. data/rust-vendor/wasm-metadata/Cargo.toml.orig +38 -0
  571. data/rust-vendor/wasm-metadata/README.md +27 -0
  572. data/rust-vendor/wasm-metadata/src/add_metadata.rs +91 -0
  573. data/rust-vendor/wasm-metadata/src/clap.rs +169 -0
  574. data/rust-vendor/wasm-metadata/src/dependencies.rs +142 -0
  575. data/rust-vendor/wasm-metadata/src/lib.rs +83 -0
  576. data/rust-vendor/wasm-metadata/src/metadata.rs +34 -0
  577. data/rust-vendor/wasm-metadata/src/names/component.rs +107 -0
  578. data/rust-vendor/wasm-metadata/src/names/mod.rs +5 -0
  579. data/rust-vendor/wasm-metadata/src/names/module.rs +101 -0
  580. data/rust-vendor/wasm-metadata/src/oci_annotations/authors.rs +111 -0
  581. data/rust-vendor/wasm-metadata/src/oci_annotations/description.rs +110 -0
  582. data/rust-vendor/wasm-metadata/src/oci_annotations/homepage.rs +118 -0
  583. data/rust-vendor/wasm-metadata/src/oci_annotations/licenses.rs +122 -0
  584. data/rust-vendor/wasm-metadata/src/oci_annotations/mod.rs +32 -0
  585. data/rust-vendor/wasm-metadata/src/oci_annotations/revision.rs +113 -0
  586. data/rust-vendor/wasm-metadata/src/oci_annotations/source.rs +117 -0
  587. data/rust-vendor/wasm-metadata/src/oci_annotations/version.rs +110 -0
  588. data/rust-vendor/wasm-metadata/src/payload.rs +215 -0
  589. data/rust-vendor/wasm-metadata/src/producers.rs +254 -0
  590. data/rust-vendor/wasm-metadata/src/rewrite.rs +224 -0
  591. data/rust-vendor/wasm-metadata/src/utils.rs +21 -0
  592. data/rust-vendor/wasm-metadata/tests/component.rs +310 -0
  593. data/rust-vendor/wasm-metadata/tests/module.rs +86 -0
  594. data/rust-vendor/wasmparser/.cargo-checksum.json +1 -0
  595. data/rust-vendor/wasmparser/.cargo_vcs_info.json +6 -0
  596. data/rust-vendor/wasmparser/Cargo.lock +687 -0
  597. data/rust-vendor/wasmparser/Cargo.toml +161 -0
  598. data/rust-vendor/wasmparser/Cargo.toml.orig +89 -0
  599. data/rust-vendor/wasmparser/README.md +28 -0
  600. data/rust-vendor/wasmparser/benches/.gitignore +1 -0
  601. data/rust-vendor/wasmparser/benches/benchmark.rs +395 -0
  602. data/rust-vendor/wasmparser/examples/simple.rs +37 -0
  603. data/rust-vendor/wasmparser/src/arity.rs +318 -0
  604. data/rust-vendor/wasmparser/src/binary_reader.rs +2109 -0
  605. data/rust-vendor/wasmparser/src/collections/hash.rs +120 -0
  606. data/rust-vendor/wasmparser/src/collections/index_map/detail.rs +1100 -0
  607. data/rust-vendor/wasmparser/src/collections/index_map/tests.rs +183 -0
  608. data/rust-vendor/wasmparser/src/collections/index_map.rs +653 -0
  609. data/rust-vendor/wasmparser/src/collections/index_set.rs +316 -0
  610. data/rust-vendor/wasmparser/src/collections/map.rs +852 -0
  611. data/rust-vendor/wasmparser/src/collections/mod.rs +34 -0
  612. data/rust-vendor/wasmparser/src/collections/set.rs +672 -0
  613. data/rust-vendor/wasmparser/src/features.rs +442 -0
  614. data/rust-vendor/wasmparser/src/lib.rs +1340 -0
  615. data/rust-vendor/wasmparser/src/limits.rs +90 -0
  616. data/rust-vendor/wasmparser/src/parser.rs +1925 -0
  617. data/rust-vendor/wasmparser/src/readers/component/aliases.rs +119 -0
  618. data/rust-vendor/wasmparser/src/readers/component/canonicals.rs +458 -0
  619. data/rust-vendor/wasmparser/src/readers/component/exports.rs +135 -0
  620. data/rust-vendor/wasmparser/src/readers/component/imports.rs +145 -0
  621. data/rust-vendor/wasmparser/src/readers/component/instances.rs +166 -0
  622. data/rust-vendor/wasmparser/src/readers/component/names.rs +101 -0
  623. data/rust-vendor/wasmparser/src/readers/component/start.rs +31 -0
  624. data/rust-vendor/wasmparser/src/readers/component/types.rs +537 -0
  625. data/rust-vendor/wasmparser/src/readers/component.rs +17 -0
  626. data/rust-vendor/wasmparser/src/readers/core/branch_hinting.rs +59 -0
  627. data/rust-vendor/wasmparser/src/readers/core/code.rs +177 -0
  628. data/rust-vendor/wasmparser/src/readers/core/coredumps.rs +274 -0
  629. data/rust-vendor/wasmparser/src/readers/core/custom.rs +134 -0
  630. data/rust-vendor/wasmparser/src/readers/core/data.rs +94 -0
  631. data/rust-vendor/wasmparser/src/readers/core/dylink0.rs +117 -0
  632. data/rust-vendor/wasmparser/src/readers/core/elements.rs +153 -0
  633. data/rust-vendor/wasmparser/src/readers/core/exports.rs +75 -0
  634. data/rust-vendor/wasmparser/src/readers/core/functions.rs +17 -0
  635. data/rust-vendor/wasmparser/src/readers/core/globals.rs +51 -0
  636. data/rust-vendor/wasmparser/src/readers/core/imports.rs +307 -0
  637. data/rust-vendor/wasmparser/src/readers/core/init.rs +70 -0
  638. data/rust-vendor/wasmparser/src/readers/core/linking.rs +457 -0
  639. data/rust-vendor/wasmparser/src/readers/core/memories.rs +61 -0
  640. data/rust-vendor/wasmparser/src/readers/core/names.rs +162 -0
  641. data/rust-vendor/wasmparser/src/readers/core/operators.rs +1105 -0
  642. data/rust-vendor/wasmparser/src/readers/core/producers.rs +84 -0
  643. data/rust-vendor/wasmparser/src/readers/core/reloc.rs +300 -0
  644. data/rust-vendor/wasmparser/src/readers/core/tables.rs +96 -0
  645. data/rust-vendor/wasmparser/src/readers/core/tags.rs +32 -0
  646. data/rust-vendor/wasmparser/src/readers/core/types/matches.rs +321 -0
  647. data/rust-vendor/wasmparser/src/readers/core/types.rs +2249 -0
  648. data/rust-vendor/wasmparser/src/readers/core.rs +43 -0
  649. data/rust-vendor/wasmparser/src/readers.rs +330 -0
  650. data/rust-vendor/wasmparser/src/resources.rs +265 -0
  651. data/rust-vendor/wasmparser/src/validator/component.rs +4765 -0
  652. data/rust-vendor/wasmparser/src/validator/component_types.rs +4036 -0
  653. data/rust-vendor/wasmparser/src/validator/core/canonical.rs +552 -0
  654. data/rust-vendor/wasmparser/src/validator/core.rs +1313 -0
  655. data/rust-vendor/wasmparser/src/validator/func.rs +613 -0
  656. data/rust-vendor/wasmparser/src/validator/names.rs +1017 -0
  657. data/rust-vendor/wasmparser/src/validator/operators/simd.rs +971 -0
  658. data/rust-vendor/wasmparser/src/validator/operators.rs +4696 -0
  659. data/rust-vendor/wasmparser/src/validator/types.rs +1327 -0
  660. data/rust-vendor/wasmparser/src/validator.rs +1645 -0
  661. data/rust-vendor/wasmparser/tests/big-module.rs +62 -0
  662. data/rust-vendor/wit-bindgen/.cargo-checksum.json +1 -1
  663. data/rust-vendor/wit-bindgen/.cargo_vcs_info.json +1 -1
  664. data/rust-vendor/wit-bindgen/Cargo.lock +76 -66
  665. data/rust-vendor/wit-bindgen/Cargo.toml +25 -11
  666. data/rust-vendor/wit-bindgen/Cargo.toml.orig +11 -3
  667. data/rust-vendor/wit-bindgen/src/lib.rs +21 -15
  668. data/rust-vendor/wit-bindgen/src/rt/async_support/abi_buffer.rs +35 -32
  669. data/rust-vendor/wit-bindgen/src/rt/async_support/cabi.rs +15 -20
  670. data/rust-vendor/wit-bindgen/src/rt/async_support/error_context.rs +11 -22
  671. data/rust-vendor/wit-bindgen/src/rt/async_support/future_support.rs +406 -146
  672. data/rust-vendor/wit-bindgen/src/rt/async_support/inter_task_wakeup.rs +98 -0
  673. data/rust-vendor/wit-bindgen/src/rt/async_support/inter_task_wakeup_disabled.rs +45 -0
  674. data/rust-vendor/wit-bindgen/src/rt/async_support/spawn.rs +82 -0
  675. data/rust-vendor/wit-bindgen/src/rt/async_support/spawn_disabled.rs +30 -0
  676. data/rust-vendor/wit-bindgen/src/rt/async_support/stream_support.rs +262 -122
  677. data/rust-vendor/wit-bindgen/src/rt/async_support/subtask.rs +49 -54
  678. data/rust-vendor/wit-bindgen/src/rt/async_support/unit_stream.rs +81 -0
  679. data/rust-vendor/wit-bindgen/src/rt/async_support/waitable.rs +47 -31
  680. data/rust-vendor/wit-bindgen/src/rt/async_support/waitable_set.rs +17 -35
  681. data/rust-vendor/wit-bindgen/src/rt/async_support.rs +262 -188
  682. data/rust-vendor/wit-bindgen/src/rt/mod.rs +14 -12
  683. data/rust-vendor/wit-bindgen/src/rt/wit_bindgen_cabi_realloc.c +2 -2
  684. data/rust-vendor/wit-bindgen/src/rt/wit_bindgen_cabi_realloc.o +0 -0
  685. data/rust-vendor/wit-bindgen/src/rt/wit_bindgen_cabi_realloc.rs +2 -2
  686. data/rust-vendor/wit-bindgen/src/rt/wit_bindgen_cabi_wasip3.o +0 -0
  687. data/rust-vendor/wit-bindgen-0.46.0/.cargo-checksum.json +1 -0
  688. data/rust-vendor/wit-bindgen-0.46.0/.cargo_vcs_info.json +6 -0
  689. data/rust-vendor/wit-bindgen-0.46.0/Cargo.lock +428 -0
  690. data/rust-vendor/wit-bindgen-0.46.0/Cargo.toml +88 -0
  691. data/rust-vendor/wit-bindgen-0.46.0/Cargo.toml.orig +37 -0
  692. data/rust-vendor/wit-bindgen-0.46.0/LICENSE-APACHE +201 -0
  693. data/rust-vendor/wit-bindgen-0.46.0/LICENSE-Apache-2.0_WITH_LLVM-exception +220 -0
  694. data/rust-vendor/wit-bindgen-0.46.0/LICENSE-MIT +23 -0
  695. data/rust-vendor/wit-bindgen-0.46.0/README.md +45 -0
  696. data/rust-vendor/wit-bindgen-0.46.0/build.rs +32 -0
  697. data/rust-vendor/wit-bindgen-0.46.0/src/examples/_0_world_imports.rs +17 -0
  698. data/rust-vendor/wit-bindgen-0.46.0/src/examples/_1_interface_imports.rs +32 -0
  699. data/rust-vendor/wit-bindgen-0.46.0/src/examples/_2_imported_resources.rs +22 -0
  700. data/rust-vendor/wit-bindgen-0.46.0/src/examples/_3_world_exports.rs +47 -0
  701. data/rust-vendor/wit-bindgen-0.46.0/src/examples/_4_exported_resources.rs +26 -0
  702. data/rust-vendor/wit-bindgen-0.46.0/src/examples.rs +55 -0
  703. data/rust-vendor/wit-bindgen-0.46.0/src/lib.rs +881 -0
  704. data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support/abi_buffer.rs +417 -0
  705. data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support/cabi.rs +112 -0
  706. data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support/error_context.rs +94 -0
  707. data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support/future_support.rs +734 -0
  708. data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support/stream_support.rs +604 -0
  709. data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support/subtask.rs +289 -0
  710. data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support/waitable.rs +466 -0
  711. data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support/waitable_set.rs +100 -0
  712. data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support.rs +634 -0
  713. data/rust-vendor/wit-bindgen-0.46.0/src/rt/mod.rs +230 -0
  714. data/rust-vendor/wit-bindgen-0.46.0/src/rt/wit_bindgen_cabi_realloc.c +10 -0
  715. data/rust-vendor/wit-bindgen-0.46.0/src/rt/wit_bindgen_cabi_realloc.o +0 -0
  716. data/rust-vendor/wit-bindgen-0.46.0/src/rt/wit_bindgen_cabi_realloc.rs +11 -0
  717. data/rust-vendor/wit-bindgen-0.46.0/src/rt/wit_bindgen_cabi_wasip3.c +12 -0
  718. data/rust-vendor/wit-bindgen-0.46.0/src/rt/wit_bindgen_cabi_wasip3.o +0 -0
  719. data/rust-vendor/wit-bindgen-0.46.0/wasi-cli@0.2.0.wasm +0 -0
  720. data/rust-vendor/wit-bindgen-core/.cargo-checksum.json +1 -0
  721. data/rust-vendor/wit-bindgen-core/.cargo_vcs_info.json +6 -0
  722. data/rust-vendor/wit-bindgen-core/Cargo.lock +340 -0
  723. data/rust-vendor/wit-bindgen-core/Cargo.toml +75 -0
  724. data/rust-vendor/wit-bindgen-core/Cargo.toml.orig +30 -0
  725. data/rust-vendor/wit-bindgen-core/LICENSE-APACHE +201 -0
  726. data/rust-vendor/wit-bindgen-core/LICENSE-Apache-2.0_WITH_LLVM-exception +220 -0
  727. data/rust-vendor/wit-bindgen-core/LICENSE-MIT +23 -0
  728. data/rust-vendor/wit-bindgen-core/src/abi.rs +2526 -0
  729. data/rust-vendor/wit-bindgen-core/src/async_.rs +200 -0
  730. data/rust-vendor/wit-bindgen-core/src/lib.rs +239 -0
  731. data/rust-vendor/wit-bindgen-core/src/ns.rs +27 -0
  732. data/rust-vendor/wit-bindgen-core/src/path.rs +47 -0
  733. data/rust-vendor/wit-bindgen-core/src/source.rs +222 -0
  734. data/rust-vendor/wit-bindgen-core/src/types.rs +232 -0
  735. data/rust-vendor/wit-bindgen-rust/.cargo-checksum.json +1 -0
  736. data/rust-vendor/wit-bindgen-rust/.cargo_vcs_info.json +6 -0
  737. data/rust-vendor/wit-bindgen-rust/Cargo.lock +547 -0
  738. data/rust-vendor/wit-bindgen-rust/Cargo.toml +112 -0
  739. data/rust-vendor/wit-bindgen-rust/Cargo.toml.orig +44 -0
  740. data/rust-vendor/wit-bindgen-rust/LICENSE-APACHE +201 -0
  741. data/rust-vendor/wit-bindgen-rust/LICENSE-Apache-2.0_WITH_LLVM-exception +220 -0
  742. data/rust-vendor/wit-bindgen-rust/LICENSE-MIT +23 -0
  743. data/rust-vendor/wit-bindgen-rust/build.rs +4 -0
  744. data/rust-vendor/wit-bindgen-rust/src/bindgen.rs +1215 -0
  745. data/rust-vendor/wit-bindgen-rust/src/interface.rs +3020 -0
  746. data/rust-vendor/wit-bindgen-rust/src/lib.rs +1880 -0
  747. data/rust-vendor/wit-bindgen-rust/tests/codegen.rs +174 -0
  748. data/rust-vendor/wit-bindgen-rust/tests/wit/path1/world.wit +3 -0
  749. data/rust-vendor/wit-bindgen-rust/tests/wit/path2/world.wit +3 -0
  750. data/rust-vendor/wit-bindgen-rust/tests/wit/path3/package.wit +3 -0
  751. data/rust-vendor/wit-bindgen-rust-macro/.cargo-checksum.json +1 -0
  752. data/rust-vendor/wit-bindgen-rust-macro/.cargo_vcs_info.json +6 -0
  753. data/rust-vendor/wit-bindgen-rust-macro/Cargo.lock +306 -0
  754. data/rust-vendor/wit-bindgen-rust-macro/Cargo.toml +62 -0
  755. data/rust-vendor/wit-bindgen-rust-macro/Cargo.toml.orig +28 -0
  756. data/rust-vendor/wit-bindgen-rust-macro/LICENSE-APACHE +201 -0
  757. data/rust-vendor/wit-bindgen-rust-macro/LICENSE-Apache-2.0_WITH_LLVM-exception +220 -0
  758. data/rust-vendor/wit-bindgen-rust-macro/LICENSE-MIT +23 -0
  759. data/rust-vendor/wit-bindgen-rust-macro/build.rs +5 -0
  760. data/rust-vendor/wit-bindgen-rust-macro/src/lib.rs +606 -0
  761. data/rust-vendor/wit-component/.cargo-checksum.json +1 -0
  762. data/rust-vendor/wit-component/.cargo_vcs_info.json +6 -0
  763. data/rust-vendor/wit-component/Cargo.lock +1823 -0
  764. data/rust-vendor/wit-component/Cargo.toml +217 -0
  765. data/rust-vendor/wit-component/Cargo.toml.orig +61 -0
  766. data/rust-vendor/wit-component/README.md +251 -0
  767. data/rust-vendor/wit-component/src/dummy.rs +395 -0
  768. data/rust-vendor/wit-component/src/encoding/dedupe.rs +164 -0
  769. data/rust-vendor/wit-component/src/encoding/types.rs +510 -0
  770. data/rust-vendor/wit-component/src/encoding/wit.rs +393 -0
  771. data/rust-vendor/wit-component/src/encoding/world.rs +525 -0
  772. data/rust-vendor/wit-component/src/encoding.rs +3231 -0
  773. data/rust-vendor/wit-component/src/gc.rs +1134 -0
  774. data/rust-vendor/wit-component/src/lib.rs +178 -0
  775. data/rust-vendor/wit-component/src/linking/metadata.rs +515 -0
  776. data/rust-vendor/wit-component/src/linking.rs +1727 -0
  777. data/rust-vendor/wit-component/src/metadata.rs +447 -0
  778. data/rust-vendor/wit-component/src/printing.rs +1485 -0
  779. data/rust-vendor/wit-component/src/semver_check.rs +113 -0
  780. data/rust-vendor/wit-component/src/targets.rs +44 -0
  781. data/rust-vendor/wit-component/src/validation.rs +2679 -0
  782. data/rust-vendor/wit-component/tests/.gitignore +2 -0
  783. data/rust-vendor/wit-component/tests/components/adapt-empty-interface/adapt-old.wat +3 -0
  784. data/rust-vendor/wit-component/tests/components/adapt-empty-interface/adapt-old.wit +5 -0
  785. data/rust-vendor/wit-component/tests/components/adapt-empty-interface/component.wat +60 -0
  786. data/rust-vendor/wit-component/tests/components/adapt-empty-interface/component.wit.print +4 -0
  787. data/rust-vendor/wit-component/tests/components/adapt-empty-interface/module.wat +3 -0
  788. data/rust-vendor/wit-component/tests/components/adapt-empty-interface/module.wit +2 -0
  789. data/rust-vendor/wit-component/tests/components/adapt-export-default/adapt-old.wat +4 -0
  790. data/rust-vendor/wit-component/tests/components/adapt-export-default/adapt-old.wit +3 -0
  791. data/rust-vendor/wit-component/tests/components/adapt-export-default/component.wat +32 -0
  792. data/rust-vendor/wit-component/tests/components/adapt-export-default/component.wit.print +5 -0
  793. data/rust-vendor/wit-component/tests/components/adapt-export-default/module.wat +3 -0
  794. data/rust-vendor/wit-component/tests/components/adapt-export-default/module.wit +2 -0
  795. data/rust-vendor/wit-component/tests/components/adapt-export-namespaced/adapt-old.wat +4 -0
  796. data/rust-vendor/wit-component/tests/components/adapt-export-namespaced/adapt-old.wit +7 -0
  797. data/rust-vendor/wit-component/tests/components/adapt-export-namespaced/component.wat +42 -0
  798. data/rust-vendor/wit-component/tests/components/adapt-export-namespaced/component.wit.print +5 -0
  799. data/rust-vendor/wit-component/tests/components/adapt-export-namespaced/module.wat +3 -0
  800. data/rust-vendor/wit-component/tests/components/adapt-export-namespaced/module.wit +3 -0
  801. data/rust-vendor/wit-component/tests/components/adapt-export-reallocs/adapt-old.wat +47 -0
  802. data/rust-vendor/wit-component/tests/components/adapt-export-reallocs/adapt-old.wit +6 -0
  803. data/rust-vendor/wit-component/tests/components/adapt-export-reallocs/component.wat +131 -0
  804. data/rust-vendor/wit-component/tests/components/adapt-export-reallocs/component.wit.print +9 -0
  805. data/rust-vendor/wit-component/tests/components/adapt-export-reallocs/module.wat +8 -0
  806. data/rust-vendor/wit-component/tests/components/adapt-export-reallocs/module.wit +3 -0
  807. data/rust-vendor/wit-component/tests/components/adapt-export-save-args/adapt-old.wat +13 -0
  808. data/rust-vendor/wit-component/tests/components/adapt-export-save-args/adapt-old.wit +3 -0
  809. data/rust-vendor/wit-component/tests/components/adapt-export-save-args/component.wat +86 -0
  810. data/rust-vendor/wit-component/tests/components/adapt-export-save-args/component.wit.print +5 -0
  811. data/rust-vendor/wit-component/tests/components/adapt-export-save-args/module.wat +4 -0
  812. data/rust-vendor/wit-component/tests/components/adapt-export-save-args/module.wit +2 -0
  813. data/rust-vendor/wit-component/tests/components/adapt-export-with-post-return/adapt-old.wat +33 -0
  814. data/rust-vendor/wit-component/tests/components/adapt-export-with-post-return/adapt-old.wit +7 -0
  815. data/rust-vendor/wit-component/tests/components/adapt-export-with-post-return/component.wat +101 -0
  816. data/rust-vendor/wit-component/tests/components/adapt-export-with-post-return/component.wit.print +5 -0
  817. data/rust-vendor/wit-component/tests/components/adapt-export-with-post-return/module.wat +9 -0
  818. data/rust-vendor/wit-component/tests/components/adapt-export-with-post-return/module.wit +3 -0
  819. data/rust-vendor/wit-component/tests/components/adapt-import-only-used-in-adapter/adapt-unused.wat +7 -0
  820. data/rust-vendor/wit-component/tests/components/adapt-import-only-used-in-adapter/adapt-unused.wit +9 -0
  821. data/rust-vendor/wit-component/tests/components/adapt-import-only-used-in-adapter/component.wat +115 -0
  822. data/rust-vendor/wit-component/tests/components/adapt-import-only-used-in-adapter/component.wit.print +9 -0
  823. data/rust-vendor/wit-component/tests/components/adapt-import-only-used-in-adapter/module.wat +5 -0
  824. data/rust-vendor/wit-component/tests/components/adapt-import-only-used-in-adapter/module.wit +6 -0
  825. data/rust-vendor/wit-component/tests/components/adapt-inject-stack/adapt-old.wat +54 -0
  826. data/rust-vendor/wit-component/tests/components/adapt-inject-stack/adapt-old.wit +5 -0
  827. data/rust-vendor/wit-component/tests/components/adapt-inject-stack/component.wat +163 -0
  828. data/rust-vendor/wit-component/tests/components/adapt-inject-stack/component.wit.print +7 -0
  829. data/rust-vendor/wit-component/tests/components/adapt-inject-stack/module.wat +4 -0
  830. data/rust-vendor/wit-component/tests/components/adapt-inject-stack/module.wit +2 -0
  831. data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-adapt-realloc/adapt-old.wat +76 -0
  832. data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-adapt-realloc/adapt-old.wit +5 -0
  833. data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-adapt-realloc/component.wat +174 -0
  834. data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-adapt-realloc/component.wit.print +7 -0
  835. data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-adapt-realloc/module.wat +12 -0
  836. data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-adapt-realloc/module.wit +2 -0
  837. data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-realloc/adapt-old.wat +76 -0
  838. data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-realloc/adapt-old.wit +5 -0
  839. data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-realloc/component.wat +199 -0
  840. data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-realloc/component.wit.print +7 -0
  841. data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-realloc/module.wat +38 -0
  842. data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-realloc/module.wit +3 -0
  843. data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-realloc-no-state/adapt-old.wat +68 -0
  844. data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-realloc-no-state/adapt-old.wit +5 -0
  845. data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-realloc-no-state/component.wat +216 -0
  846. data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-realloc-no-state/component.wit.print +7 -0
  847. data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-realloc-no-state/module.wat +38 -0
  848. data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-realloc-no-state/module.wit +3 -0
  849. data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-reallocing-adapter/adapt-old.wat +62 -0
  850. data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-reallocing-adapter/adapt-old.wit +5 -0
  851. data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-reallocing-adapter/component.wat +187 -0
  852. data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-reallocing-adapter/component.wit.print +7 -0
  853. data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-reallocing-adapter/module.wat +38 -0
  854. data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-reallocing-adapter/module.wit +2 -0
  855. data/rust-vendor/wit-component/tests/components/adapt-list-return/adapt-old.wat +14 -0
  856. data/rust-vendor/wit-component/tests/components/adapt-list-return/adapt-old.wit +5 -0
  857. data/rust-vendor/wit-component/tests/components/adapt-list-return/component.wat +104 -0
  858. data/rust-vendor/wit-component/tests/components/adapt-list-return/component.wit.print +7 -0
  859. data/rust-vendor/wit-component/tests/components/adapt-list-return/module.wat +4 -0
  860. data/rust-vendor/wit-component/tests/components/adapt-list-return/module.wit +3 -0
  861. data/rust-vendor/wit-component/tests/components/adapt-memory-simple/adapt-old.wat +4 -0
  862. data/rust-vendor/wit-component/tests/components/adapt-memory-simple/adapt-old.wit +5 -0
  863. data/rust-vendor/wit-component/tests/components/adapt-memory-simple/component.wat +92 -0
  864. data/rust-vendor/wit-component/tests/components/adapt-memory-simple/component.wit.print +7 -0
  865. data/rust-vendor/wit-component/tests/components/adapt-memory-simple/module.wat +4 -0
  866. data/rust-vendor/wit-component/tests/components/adapt-memory-simple/module.wit +2 -0
  867. data/rust-vendor/wit-component/tests/components/adapt-multiple/adapt-foo.wat +10 -0
  868. data/rust-vendor/wit-component/tests/components/adapt-multiple/adapt-foo.wit +8 -0
  869. data/rust-vendor/wit-component/tests/components/adapt-multiple/component.wat +107 -0
  870. data/rust-vendor/wit-component/tests/components/adapt-multiple/component.wit.print +10 -0
  871. data/rust-vendor/wit-component/tests/components/adapt-multiple/module.wat +4 -0
  872. data/rust-vendor/wit-component/tests/components/adapt-multiple/module.wit +2 -0
  873. data/rust-vendor/wit-component/tests/components/adapt-preview1/adapt-wasi-snapshot-preview1.wat +13 -0
  874. data/rust-vendor/wit-component/tests/components/adapt-preview1/adapt-wasi-snapshot-preview1.wit +12 -0
  875. data/rust-vendor/wit-component/tests/components/adapt-preview1/component.wat +119 -0
  876. data/rust-vendor/wit-component/tests/components/adapt-preview1/component.wit.print +8 -0
  877. data/rust-vendor/wit-component/tests/components/adapt-preview1/module.wat +11 -0
  878. data/rust-vendor/wit-component/tests/components/adapt-preview1/module.wit +7 -0
  879. data/rust-vendor/wit-component/tests/components/adapt-stub-wasip2/adapt-wasip2.wat +8 -0
  880. data/rust-vendor/wit-component/tests/components/adapt-stub-wasip2/adapt-wasip2.wit +1 -0
  881. data/rust-vendor/wit-component/tests/components/adapt-stub-wasip2/component.wat +74 -0
  882. data/rust-vendor/wit-component/tests/components/adapt-stub-wasip2/component.wit.print +4 -0
  883. data/rust-vendor/wit-component/tests/components/adapt-stub-wasip2/deps/cli/environment.wit +5 -0
  884. data/rust-vendor/wit-component/tests/components/adapt-stub-wasip2/module.wat +11 -0
  885. data/rust-vendor/wit-component/tests/components/adapt-stub-wasip2/module.wit +5 -0
  886. data/rust-vendor/wit-component/tests/components/adapt-unused/adapt-old.wat +4 -0
  887. data/rust-vendor/wit-component/tests/components/adapt-unused/adapt-old.wit +5 -0
  888. data/rust-vendor/wit-component/tests/components/adapt-unused/component.wat +12 -0
  889. data/rust-vendor/wit-component/tests/components/adapt-unused/component.wit.print +4 -0
  890. data/rust-vendor/wit-component/tests/components/adapt-unused/module.wat +1 -0
  891. data/rust-vendor/wit-component/tests/components/adapt-unused/module.wit +2 -0
  892. data/rust-vendor/wit-component/tests/components/async-builtins/component.wat +259 -0
  893. data/rust-vendor/wit-component/tests/components/async-builtins/component.wit.print +6 -0
  894. data/rust-vendor/wit-component/tests/components/async-builtins/module.wat +28 -0
  895. data/rust-vendor/wit-component/tests/components/async-builtins/module.wit +10 -0
  896. data/rust-vendor/wit-component/tests/components/async-export/component.wat +91 -0
  897. data/rust-vendor/wit-component/tests/components/async-export/component.wit.print +6 -0
  898. data/rust-vendor/wit-component/tests/components/async-export/module.wat +8 -0
  899. data/rust-vendor/wit-component/tests/components/async-export/module.wit +30 -0
  900. data/rust-vendor/wit-component/tests/components/async-export-with-callback/component.wat +59 -0
  901. data/rust-vendor/wit-component/tests/components/async-export-with-callback/component.wit.print +6 -0
  902. data/rust-vendor/wit-component/tests/components/async-export-with-callback/module.wat +8 -0
  903. data/rust-vendor/wit-component/tests/components/async-export-with-callback/module.wit +10 -0
  904. data/rust-vendor/wit-component/tests/components/async-import/component.wat +125 -0
  905. data/rust-vendor/wit-component/tests/components/async-import/component.wit.print +6 -0
  906. data/rust-vendor/wit-component/tests/components/async-import/module.wat +8 -0
  907. data/rust-vendor/wit-component/tests/components/async-import/module.wit +10 -0
  908. data/rust-vendor/wit-component/tests/components/async-import-only-intrinsic/component.wat +34 -0
  909. data/rust-vendor/wit-component/tests/components/async-import-only-intrinsic/component.wit.print +5 -0
  910. data/rust-vendor/wit-component/tests/components/async-import-only-intrinsic/module.wat +4 -0
  911. data/rust-vendor/wit-component/tests/components/async-import-only-intrinsic/module.wit +17 -0
  912. data/rust-vendor/wit-component/tests/components/async-import-tricky/component.wat +39 -0
  913. data/rust-vendor/wit-component/tests/components/async-import-tricky/component.wit.print +5 -0
  914. data/rust-vendor/wit-component/tests/components/async-import-tricky/module.wat +6 -0
  915. data/rust-vendor/wit-component/tests/components/async-import-tricky/module.wit +17 -0
  916. data/rust-vendor/wit-component/tests/components/async-streams-and-futures/component.wat +649 -0
  917. data/rust-vendor/wit-component/tests/components/async-streams-and-futures/component.wit.print +9 -0
  918. data/rust-vendor/wit-component/tests/components/async-streams-and-futures/module.wat +92 -0
  919. data/rust-vendor/wit-component/tests/components/async-streams-and-futures/module.wit +12 -0
  920. data/rust-vendor/wit-component/tests/components/async-unit-builtins/component.wat +138 -0
  921. data/rust-vendor/wit-component/tests/components/async-unit-builtins/component.wit.print +4 -0
  922. data/rust-vendor/wit-component/tests/components/async-unit-builtins/module.wat +18 -0
  923. data/rust-vendor/wit-component/tests/components/async-unit-builtins/module.wit +4 -0
  924. data/rust-vendor/wit-component/tests/components/bare-funcs/component.wat +93 -0
  925. data/rust-vendor/wit-component/tests/components/bare-funcs/component.wit.print +9 -0
  926. data/rust-vendor/wit-component/tests/components/bare-funcs/module.wat +13 -0
  927. data/rust-vendor/wit-component/tests/components/bare-funcs/module.wit +7 -0
  928. data/rust-vendor/wit-component/tests/components/cm32-names/component.wat +366 -0
  929. data/rust-vendor/wit-component/tests/components/cm32-names/component.wit.print +25 -0
  930. data/rust-vendor/wit-component/tests/components/cm32-names/module.wat +32 -0
  931. data/rust-vendor/wit-component/tests/components/cm32-names/module.wit +30 -0
  932. data/rust-vendor/wit-component/tests/components/custom-page-sizes/component.wat +23 -0
  933. data/rust-vendor/wit-component/tests/components/custom-page-sizes/component.wit.print +4 -0
  934. data/rust-vendor/wit-component/tests/components/custom-page-sizes/module.wat +12 -0
  935. data/rust-vendor/wit-component/tests/components/custom-page-sizes/module.wit +3 -0
  936. data/rust-vendor/wit-component/tests/components/deduplicate-imports/adapt-wasi-snapshot-preview1.wat +10 -0
  937. data/rust-vendor/wit-component/tests/components/deduplicate-imports/adapt-wasi-snapshot-preview1.wit +10 -0
  938. data/rust-vendor/wit-component/tests/components/deduplicate-imports/component.wat +132 -0
  939. data/rust-vendor/wit-component/tests/components/deduplicate-imports/component.wit.print +9 -0
  940. data/rust-vendor/wit-component/tests/components/deduplicate-imports/module.wat +40 -0
  941. data/rust-vendor/wit-component/tests/components/deduplicate-imports/module.wit +9 -0
  942. data/rust-vendor/wit-component/tests/components/empty/component.wat +12 -0
  943. data/rust-vendor/wit-component/tests/components/empty/component.wit.print +4 -0
  944. data/rust-vendor/wit-component/tests/components/empty/module.wat +1 -0
  945. data/rust-vendor/wit-component/tests/components/empty/module.wit +2 -0
  946. data/rust-vendor/wit-component/tests/components/ensure-default-type-exports/component.wat +50 -0
  947. data/rust-vendor/wit-component/tests/components/ensure-default-type-exports/component.wit.print +7 -0
  948. data/rust-vendor/wit-component/tests/components/ensure-default-type-exports/module.wat +6 -0
  949. data/rust-vendor/wit-component/tests/components/ensure-default-type-exports/module.wit +17 -0
  950. data/rust-vendor/wit-component/tests/components/error-adapt-missing-memory/adapt-old.wat +4 -0
  951. data/rust-vendor/wit-component/tests/components/error-adapt-missing-memory/adapt-old.wit +5 -0
  952. data/rust-vendor/wit-component/tests/components/error-adapt-missing-memory/error.txt +1 -0
  953. data/rust-vendor/wit-component/tests/components/error-adapt-missing-memory/module.wat +3 -0
  954. data/rust-vendor/wit-component/tests/components/error-adapt-missing-memory/module.wit +2 -0
  955. data/rust-vendor/wit-component/tests/components/error-async-export-missing-callback/error.txt +1 -0
  956. data/rust-vendor/wit-component/tests/components/error-async-export-missing-callback/module.wat +6 -0
  957. data/rust-vendor/wit-component/tests/components/error-async-export-missing-callback/module.wit +10 -0
  958. data/rust-vendor/wit-component/tests/components/error-default-export-sig-mismatch/error.txt +1 -0
  959. data/rust-vendor/wit-component/tests/components/error-default-export-sig-mismatch/module.wat +3 -0
  960. data/rust-vendor/wit-component/tests/components/error-default-export-sig-mismatch/module.wit +5 -0
  961. data/rust-vendor/wit-component/tests/components/error-empty-module-import/error.txt +1 -0
  962. data/rust-vendor/wit-component/tests/components/error-empty-module-import/module.wat +3 -0
  963. data/rust-vendor/wit-component/tests/components/error-empty-module-import/module.wit +2 -0
  964. data/rust-vendor/wit-component/tests/components/error-export-sig-mismatch/error.txt +1 -0
  965. data/rust-vendor/wit-component/tests/components/error-export-sig-mismatch/module.wat +3 -0
  966. data/rust-vendor/wit-component/tests/components/error-export-sig-mismatch/module.wit +7 -0
  967. data/rust-vendor/wit-component/tests/components/error-import-resource-rep/error.txt +1 -0
  968. data/rust-vendor/wit-component/tests/components/error-import-resource-rep/module.wat +3 -0
  969. data/rust-vendor/wit-component/tests/components/error-import-resource-rep/module.wit +5 -0
  970. data/rust-vendor/wit-component/tests/components/error-import-resource-wrong-signature/error.txt +1 -0
  971. data/rust-vendor/wit-component/tests/components/error-import-resource-wrong-signature/module.wat +3 -0
  972. data/rust-vendor/wit-component/tests/components/error-import-resource-wrong-signature/module.wit +5 -0
  973. data/rust-vendor/wit-component/tests/components/error-import-sig-mismatch/error.txt +1 -0
  974. data/rust-vendor/wit-component/tests/components/error-import-sig-mismatch/module.wat +3 -0
  975. data/rust-vendor/wit-component/tests/components/error-import-sig-mismatch/module.wit +7 -0
  976. data/rust-vendor/wit-component/tests/components/error-invalid-module-import/error.txt +1 -0
  977. data/rust-vendor/wit-component/tests/components/error-invalid-module-import/module.wat +3 -0
  978. data/rust-vendor/wit-component/tests/components/error-invalid-module-import/module.wit +2 -0
  979. data/rust-vendor/wit-component/tests/components/error-link-duplicate-initializers/error.txt +1 -0
  980. data/rust-vendor/wit-component/tests/components/error-link-duplicate-initializers/lib-bar.wat +12 -0
  981. data/rust-vendor/wit-component/tests/components/error-link-duplicate-initializers/lib-bar.wit +3 -0
  982. data/rust-vendor/wit-component/tests/components/error-link-duplicate-initializers/lib-foo.wat +21 -0
  983. data/rust-vendor/wit-component/tests/components/error-link-duplicate-initializers/lib-foo.wit +10 -0
  984. data/rust-vendor/wit-component/tests/components/error-link-missing-needed/error.txt +2 -0
  985. data/rust-vendor/wit-component/tests/components/error-link-missing-needed/lib-foo.wat +15 -0
  986. data/rust-vendor/wit-component/tests/components/error-link-missing-needed/lib-foo.wit +10 -0
  987. data/rust-vendor/wit-component/tests/components/error-link-missing-symbols/error.txt +3 -0
  988. data/rust-vendor/wit-component/tests/components/error-link-missing-symbols/lib-foo.wat +13 -0
  989. data/rust-vendor/wit-component/tests/components/error-link-missing-symbols/lib-foo.wit +10 -0
  990. data/rust-vendor/wit-component/tests/components/error-missing-default-export/error.txt +1 -0
  991. data/rust-vendor/wit-component/tests/components/error-missing-default-export/module.wat +1 -0
  992. data/rust-vendor/wit-component/tests/components/error-missing-default-export/module.wit +4 -0
  993. data/rust-vendor/wit-component/tests/components/error-missing-export/error.txt +1 -0
  994. data/rust-vendor/wit-component/tests/components/error-missing-export/module.wat +1 -0
  995. data/rust-vendor/wit-component/tests/components/error-missing-export/module.wit +7 -0
  996. data/rust-vendor/wit-component/tests/components/error-missing-import/error.txt +1 -0
  997. data/rust-vendor/wit-component/tests/components/error-missing-import/module.wat +3 -0
  998. data/rust-vendor/wit-component/tests/components/error-missing-import/module.wit +2 -0
  999. data/rust-vendor/wit-component/tests/components/error-missing-import-func/error.txt +1 -0
  1000. data/rust-vendor/wit-component/tests/components/error-missing-import-func/module.wat +3 -0
  1001. data/rust-vendor/wit-component/tests/components/error-missing-import-func/module.wit +9 -0
  1002. data/rust-vendor/wit-component/tests/components/error-missing-module-metadata/adapt-old.wat +4 -0
  1003. data/rust-vendor/wit-component/tests/components/error-missing-module-metadata/adapt-old.wit +5 -0
  1004. data/rust-vendor/wit-component/tests/components/error-missing-module-metadata/error.txt +1 -0
  1005. data/rust-vendor/wit-component/tests/components/error-missing-module-metadata/module.wat +4 -0
  1006. data/rust-vendor/wit-component/tests/components/error-missing-module-metadata/module.wit +4 -0
  1007. data/rust-vendor/wit-component/tests/components/export-interface-using-import/component.wat +37 -0
  1008. data/rust-vendor/wit-component/tests/components/export-interface-using-import/component.wit.print +9 -0
  1009. data/rust-vendor/wit-component/tests/components/export-interface-using-import/module.wat +1 -0
  1010. data/rust-vendor/wit-component/tests/components/export-interface-using-import/module.wit +17 -0
  1011. data/rust-vendor/wit-component/tests/components/export-name-shuffling/component.wat +43 -0
  1012. data/rust-vendor/wit-component/tests/components/export-name-shuffling/component.wit.print +10 -0
  1013. data/rust-vendor/wit-component/tests/components/export-name-shuffling/module.wat +3 -0
  1014. data/rust-vendor/wit-component/tests/components/export-name-shuffling/module.wit +17 -0
  1015. data/rust-vendor/wit-component/tests/components/export-resource/component.wat +102 -0
  1016. data/rust-vendor/wit-component/tests/components/export-resource/component.wit.print +10 -0
  1017. data/rust-vendor/wit-component/tests/components/export-resource/module.wat +15 -0
  1018. data/rust-vendor/wit-component/tests/components/export-resource/module.wit +11 -0
  1019. data/rust-vendor/wit-component/tests/components/export-type-name-conflict/component.wat +46 -0
  1020. data/rust-vendor/wit-component/tests/components/export-type-name-conflict/component.wit.print +11 -0
  1021. data/rust-vendor/wit-component/tests/components/export-type-name-conflict/module.wat +5 -0
  1022. data/rust-vendor/wit-component/tests/components/export-type-name-conflict/module.wit +15 -0
  1023. data/rust-vendor/wit-component/tests/components/export-with-type-alias/component.wat +40 -0
  1024. data/rust-vendor/wit-component/tests/components/export-with-type-alias/component.wit.print +5 -0
  1025. data/rust-vendor/wit-component/tests/components/export-with-type-alias/module.wat +3 -0
  1026. data/rust-vendor/wit-component/tests/components/export-with-type-alias/module.wit +11 -0
  1027. data/rust-vendor/wit-component/tests/components/exports/component.wat +139 -0
  1028. data/rust-vendor/wit-component/tests/components/exports/component.wit.print +29 -0
  1029. data/rust-vendor/wit-component/tests/components/exports/module.wat +14 -0
  1030. data/rust-vendor/wit-component/tests/components/exports/module.wit +29 -0
  1031. data/rust-vendor/wit-component/tests/components/fallible-constructor/component.wat +73 -0
  1032. data/rust-vendor/wit-component/tests/components/fallible-constructor/component.wit.print +9 -0
  1033. data/rust-vendor/wit-component/tests/components/fallible-constructor/module.wat +5 -0
  1034. data/rust-vendor/wit-component/tests/components/fallible-constructor/module.wit +9 -0
  1035. data/rust-vendor/wit-component/tests/components/import-and-export-resource/component.wat +53 -0
  1036. data/rust-vendor/wit-component/tests/components/import-and-export-resource/component.wit.print +8 -0
  1037. data/rust-vendor/wit-component/tests/components/import-and-export-resource/module.wat +6 -0
  1038. data/rust-vendor/wit-component/tests/components/import-and-export-resource/module.wit +12 -0
  1039. data/rust-vendor/wit-component/tests/components/import-conflict/component.wat +118 -0
  1040. data/rust-vendor/wit-component/tests/components/import-conflict/component.wit.print +7 -0
  1041. data/rust-vendor/wit-component/tests/components/import-conflict/module.wat +7 -0
  1042. data/rust-vendor/wit-component/tests/components/import-conflict/module.wit +19 -0
  1043. data/rust-vendor/wit-component/tests/components/import-empty-interface/component.wat +12 -0
  1044. data/rust-vendor/wit-component/tests/components/import-empty-interface/component.wit.print +4 -0
  1045. data/rust-vendor/wit-component/tests/components/import-empty-interface/module.wat +1 -0
  1046. data/rust-vendor/wit-component/tests/components/import-empty-interface/module.wit +5 -0
  1047. data/rust-vendor/wit-component/tests/components/import-export/component.wat +124 -0
  1048. data/rust-vendor/wit-component/tests/components/import-export/component.wit.print +14 -0
  1049. data/rust-vendor/wit-component/tests/components/import-export/module.wat +10 -0
  1050. data/rust-vendor/wit-component/tests/components/import-export/module.wit +14 -0
  1051. data/rust-vendor/wit-component/tests/components/import-export-same-iface-name/component.wat +59 -0
  1052. data/rust-vendor/wit-component/tests/components/import-export-same-iface-name/component.wit.print +8 -0
  1053. data/rust-vendor/wit-component/tests/components/import-export-same-iface-name/deps/dep/foo.wit +5 -0
  1054. data/rust-vendor/wit-component/tests/components/import-export-same-iface-name/module.wat +5 -0
  1055. data/rust-vendor/wit-component/tests/components/import-export-same-iface-name/module.wit +11 -0
  1056. data/rust-vendor/wit-component/tests/components/import-in-adapter-and-main-module/adapt-old.wat +23 -0
  1057. data/rust-vendor/wit-component/tests/components/import-in-adapter-and-main-module/adapt-old.wit +9 -0
  1058. data/rust-vendor/wit-component/tests/components/import-in-adapter-and-main-module/component.wat +220 -0
  1059. data/rust-vendor/wit-component/tests/components/import-in-adapter-and-main-module/component.wit.print +16 -0
  1060. data/rust-vendor/wit-component/tests/components/import-in-adapter-and-main-module/deps/shared-dependency/doc.wit +13 -0
  1061. data/rust-vendor/wit-component/tests/components/import-in-adapter-and-main-module/deps/shared-dependency/types.wit +3 -0
  1062. data/rust-vendor/wit-component/tests/components/import-in-adapter-and-main-module/module.wat +15 -0
  1063. data/rust-vendor/wit-component/tests/components/import-in-adapter-and-main-module/module.wit +11 -0
  1064. data/rust-vendor/wit-component/tests/components/import-only-resource-static-function/component.wat +30 -0
  1065. data/rust-vendor/wit-component/tests/components/import-only-resource-static-function/component.wit.print +5 -0
  1066. data/rust-vendor/wit-component/tests/components/import-only-resource-static-function/module.wat +3 -0
  1067. data/rust-vendor/wit-component/tests/components/import-only-resource-static-function/module.wit +11 -0
  1068. data/rust-vendor/wit-component/tests/components/import-partial-export-full/component.wat +34 -0
  1069. data/rust-vendor/wit-component/tests/components/import-partial-export-full/component.wit.print +8 -0
  1070. data/rust-vendor/wit-component/tests/components/import-partial-export-full/module.wat +1 -0
  1071. data/rust-vendor/wit-component/tests/components/import-partial-export-full/module.wit +19 -0
  1072. data/rust-vendor/wit-component/tests/components/import-resource-in-interface/component.wat +41 -0
  1073. data/rust-vendor/wit-component/tests/components/import-resource-in-interface/component.wit.print +10 -0
  1074. data/rust-vendor/wit-component/tests/components/import-resource-in-interface/module.wat +5 -0
  1075. data/rust-vendor/wit-component/tests/components/import-resource-in-interface/module.wit +11 -0
  1076. data/rust-vendor/wit-component/tests/components/import-resource-simple/component.wat +33 -0
  1077. data/rust-vendor/wit-component/tests/components/import-resource-simple/component.wit.print +8 -0
  1078. data/rust-vendor/wit-component/tests/components/import-resource-simple/module.wat +5 -0
  1079. data/rust-vendor/wit-component/tests/components/import-resource-simple/module.wit +9 -0
  1080. data/rust-vendor/wit-component/tests/components/imports/component.wat +149 -0
  1081. data/rust-vendor/wit-component/tests/components/imports/component.wit.print +29 -0
  1082. data/rust-vendor/wit-component/tests/components/imports/module.wat +12 -0
  1083. data/rust-vendor/wit-component/tests/components/imports/module.wit +33 -0
  1084. data/rust-vendor/wit-component/tests/components/initialize/component.wat +38 -0
  1085. data/rust-vendor/wit-component/tests/components/initialize/component.wit.print +5 -0
  1086. data/rust-vendor/wit-component/tests/components/initialize/module.wat +6 -0
  1087. data/rust-vendor/wit-component/tests/components/initialize/module.wit +5 -0
  1088. data/rust-vendor/wit-component/tests/components/lift-options/component.wat +286 -0
  1089. data/rust-vendor/wit-component/tests/components/lift-options/component.wit.print +5 -0
  1090. data/rust-vendor/wit-component/tests/components/lift-options/module.wat +24 -0
  1091. data/rust-vendor/wit-component/tests/components/lift-options/module.wit +40 -0
  1092. data/rust-vendor/wit-component/tests/components/link/component.wat +271 -0
  1093. data/rust-vendor/wit-component/tests/components/link/component.wit.print +7 -0
  1094. data/rust-vendor/wit-component/tests/components/link/lib-bar.wat +29 -0
  1095. data/rust-vendor/wit-component/tests/components/link/lib-bar.wit +10 -0
  1096. data/rust-vendor/wit-component/tests/components/link/lib-c.wat +27 -0
  1097. data/rust-vendor/wit-component/tests/components/link/lib-c.wit +3 -0
  1098. data/rust-vendor/wit-component/tests/components/link/lib-foo.wat +55 -0
  1099. data/rust-vendor/wit-component/tests/components/link/lib-foo.wit +3 -0
  1100. data/rust-vendor/wit-component/tests/components/link/lib-unused.wat +55 -0
  1101. data/rust-vendor/wit-component/tests/components/link/lib-unused.wit +3 -0
  1102. data/rust-vendor/wit-component/tests/components/link-asyncify/component.wat +267 -0
  1103. data/rust-vendor/wit-component/tests/components/link-asyncify/component.wit.print +5 -0
  1104. data/rust-vendor/wit-component/tests/components/link-asyncify/lib-bar.wat +81 -0
  1105. data/rust-vendor/wit-component/tests/components/link-asyncify/lib-bar.wit +9 -0
  1106. data/rust-vendor/wit-component/tests/components/link-asyncify/lib-foo.wat +78 -0
  1107. data/rust-vendor/wit-component/tests/components/link-asyncify/lib-foo.wit +3 -0
  1108. data/rust-vendor/wit-component/tests/components/link-bare-funcs/component.wat +212 -0
  1109. data/rust-vendor/wit-component/tests/components/link-bare-funcs/component.wit.print +9 -0
  1110. data/rust-vendor/wit-component/tests/components/link-bare-funcs/lib-c.wat +27 -0
  1111. data/rust-vendor/wit-component/tests/components/link-bare-funcs/lib-c.wit +3 -0
  1112. data/rust-vendor/wit-component/tests/components/link-bare-funcs/lib-foo.wat +18 -0
  1113. data/rust-vendor/wit-component/tests/components/link-bare-funcs/lib-foo.wit +7 -0
  1114. data/rust-vendor/wit-component/tests/components/link-circular/component.wat +133 -0
  1115. data/rust-vendor/wit-component/tests/components/link-circular/component.wit.print +7 -0
  1116. data/rust-vendor/wit-component/tests/components/link-circular/lib-bar.wat +12 -0
  1117. data/rust-vendor/wit-component/tests/components/link-circular/lib-bar.wit +3 -0
  1118. data/rust-vendor/wit-component/tests/components/link-circular/lib-foo.wat +15 -0
  1119. data/rust-vendor/wit-component/tests/components/link-circular/lib-foo.wit +10 -0
  1120. data/rust-vendor/wit-component/tests/components/link-dl-openable/component.wat +108 -0
  1121. data/rust-vendor/wit-component/tests/components/link-dl-openable/component.wit.print +7 -0
  1122. data/rust-vendor/wit-component/tests/components/link-dl-openable/dlopen-lib-foo.wat +15 -0
  1123. data/rust-vendor/wit-component/tests/components/link-dl-openable/dlopen-lib-foo.wit +10 -0
  1124. data/rust-vendor/wit-component/tests/components/link-dl-openable-builtin-libdl/component.wat +657 -0
  1125. data/rust-vendor/wit-component/tests/components/link-dl-openable-builtin-libdl/component.wit.print +7 -0
  1126. data/rust-vendor/wit-component/tests/components/link-dl-openable-builtin-libdl/dlopen-lib-foo.wat +17 -0
  1127. data/rust-vendor/wit-component/tests/components/link-dl-openable-builtin-libdl/dlopen-lib-foo.wit +10 -0
  1128. data/rust-vendor/wit-component/tests/components/link-dl-openable-builtin-libdl/lib-c.wat +30 -0
  1129. data/rust-vendor/wit-component/tests/components/link-dl-openable-builtin-libdl/lib-c.wit +3 -0
  1130. data/rust-vendor/wit-component/tests/components/link-dl-openable-builtin-libdl/stub-missing-functions +0 -0
  1131. data/rust-vendor/wit-component/tests/components/link-dl-openable-builtin-libdl/use-built-in-libdl +0 -0
  1132. data/rust-vendor/wit-component/tests/components/link-dl-openable-builtin-libdl-with-unused/component.wat +654 -0
  1133. data/rust-vendor/wit-component/tests/components/link-dl-openable-builtin-libdl-with-unused/component.wit.print +7 -0
  1134. data/rust-vendor/wit-component/tests/components/link-dl-openable-builtin-libdl-with-unused/dlopen-lib-foo.wat +19 -0
  1135. data/rust-vendor/wit-component/tests/components/link-dl-openable-builtin-libdl-with-unused/dlopen-lib-foo.wit +10 -0
  1136. data/rust-vendor/wit-component/tests/components/link-dl-openable-builtin-libdl-with-unused/lib-c.wat +39 -0
  1137. data/rust-vendor/wit-component/tests/components/link-dl-openable-builtin-libdl-with-unused/lib-c.wit +3 -0
  1138. data/rust-vendor/wit-component/tests/components/link-dl-openable-builtin-libdl-with-unused/lib-unused.wat +55 -0
  1139. data/rust-vendor/wit-component/tests/components/link-dl-openable-builtin-libdl-with-unused/lib-unused.wit +3 -0
  1140. data/rust-vendor/wit-component/tests/components/link-dl-openable-builtin-libdl-with-unused/use-built-in-libdl +0 -0
  1141. data/rust-vendor/wit-component/tests/components/link-duplicate-symbols/component.wat +135 -0
  1142. data/rust-vendor/wit-component/tests/components/link-duplicate-symbols/component.wit.print +7 -0
  1143. data/rust-vendor/wit-component/tests/components/link-duplicate-symbols/lib-bar.wat +13 -0
  1144. data/rust-vendor/wit-component/tests/components/link-duplicate-symbols/lib-bar.wit +3 -0
  1145. data/rust-vendor/wit-component/tests/components/link-duplicate-symbols/lib-foo.wat +15 -0
  1146. data/rust-vendor/wit-component/tests/components/link-duplicate-symbols/lib-foo.wit +10 -0
  1147. data/rust-vendor/wit-component/tests/components/link-got-func/component.wat +125 -0
  1148. data/rust-vendor/wit-component/tests/components/link-got-func/component.wit.print +7 -0
  1149. data/rust-vendor/wit-component/tests/components/link-got-func/lib-bar.wat +10 -0
  1150. data/rust-vendor/wit-component/tests/components/link-got-func/lib-bar.wit +3 -0
  1151. data/rust-vendor/wit-component/tests/components/link-got-func/lib-foo.wat +10 -0
  1152. data/rust-vendor/wit-component/tests/components/link-got-func/lib-foo.wit +10 -0
  1153. data/rust-vendor/wit-component/tests/components/link-initialize/component.wat +271 -0
  1154. data/rust-vendor/wit-component/tests/components/link-initialize/component.wit.print +7 -0
  1155. data/rust-vendor/wit-component/tests/components/link-initialize/lib-bar.wat +29 -0
  1156. data/rust-vendor/wit-component/tests/components/link-initialize/lib-bar.wit +10 -0
  1157. data/rust-vendor/wit-component/tests/components/link-initialize/lib-c.wat +27 -0
  1158. data/rust-vendor/wit-component/tests/components/link-initialize/lib-c.wit +3 -0
  1159. data/rust-vendor/wit-component/tests/components/link-initialize/lib-foo.wat +55 -0
  1160. data/rust-vendor/wit-component/tests/components/link-initialize/lib-foo.wit +3 -0
  1161. data/rust-vendor/wit-component/tests/components/link-lib-with-async-export/component.wat +148 -0
  1162. data/rust-vendor/wit-component/tests/components/link-lib-with-async-export/component.wit.print +19 -0
  1163. data/rust-vendor/wit-component/tests/components/link-lib-with-async-export/lib-c.wat +4 -0
  1164. data/rust-vendor/wit-component/tests/components/link-lib-with-async-export/lib-c.wit +3 -0
  1165. data/rust-vendor/wit-component/tests/components/link-lib-with-async-export/lib-foo.wat +12 -0
  1166. data/rust-vendor/wit-component/tests/components/link-lib-with-async-export/lib-foo.wit +16 -0
  1167. data/rust-vendor/wit-component/tests/components/link-resources/component.wat +150 -0
  1168. data/rust-vendor/wit-component/tests/components/link-resources/component.wit.print +6 -0
  1169. data/rust-vendor/wit-component/tests/components/link-resources/lib-bar.wat +15 -0
  1170. data/rust-vendor/wit-component/tests/components/link-resources/lib-bar.wit +13 -0
  1171. data/rust-vendor/wit-component/tests/components/link-resources/lib-foo.wat +17 -0
  1172. data/rust-vendor/wit-component/tests/components/link-resources/lib-foo.wit +13 -0
  1173. data/rust-vendor/wit-component/tests/components/link-stack-high-and-low/component.wat +146 -0
  1174. data/rust-vendor/wit-component/tests/components/link-stack-high-and-low/component.wit.print +5 -0
  1175. data/rust-vendor/wit-component/tests/components/link-stack-high-and-low/lib-bar.wat +19 -0
  1176. data/rust-vendor/wit-component/tests/components/link-stack-high-and-low/lib-bar.wit +9 -0
  1177. data/rust-vendor/wit-component/tests/components/link-stack-high-and-low/lib-foo.wat +17 -0
  1178. data/rust-vendor/wit-component/tests/components/link-stack-high-and-low/lib-foo.wit +3 -0
  1179. data/rust-vendor/wit-component/tests/components/link-stub-wasip2/adapt-wasip2.wat +8 -0
  1180. data/rust-vendor/wit-component/tests/components/link-stub-wasip2/adapt-wasip2.wit +1 -0
  1181. data/rust-vendor/wit-component/tests/components/link-stub-wasip2/component.wat +330 -0
  1182. data/rust-vendor/wit-component/tests/components/link-stub-wasip2/component.wit.print +7 -0
  1183. data/rust-vendor/wit-component/tests/components/link-stub-wasip2/deps/cli/environment.wit +5 -0
  1184. data/rust-vendor/wit-component/tests/components/link-stub-wasip2/lib-bar.wat +29 -0
  1185. data/rust-vendor/wit-component/tests/components/link-stub-wasip2/lib-bar.wit +10 -0
  1186. data/rust-vendor/wit-component/tests/components/link-stub-wasip2/lib-c.wat +29 -0
  1187. data/rust-vendor/wit-component/tests/components/link-stub-wasip2/lib-c.wit +5 -0
  1188. data/rust-vendor/wit-component/tests/components/link-stub-wasip2/lib-foo.wat +55 -0
  1189. data/rust-vendor/wit-component/tests/components/link-stub-wasip2/lib-foo.wit +3 -0
  1190. data/rust-vendor/wit-component/tests/components/link-stub-wasip2/lib-unused.wat +55 -0
  1191. data/rust-vendor/wit-component/tests/components/link-stub-wasip2/lib-unused.wit +3 -0
  1192. data/rust-vendor/wit-component/tests/components/link-stubs/component.wat +118 -0
  1193. data/rust-vendor/wit-component/tests/components/link-stubs/component.wit.print +7 -0
  1194. data/rust-vendor/wit-component/tests/components/link-stubs/lib-foo.wat +13 -0
  1195. data/rust-vendor/wit-component/tests/components/link-stubs/lib-foo.wit +10 -0
  1196. data/rust-vendor/wit-component/tests/components/link-stubs/stub-missing-functions +0 -0
  1197. data/rust-vendor/wit-component/tests/components/link-tag/component.wat +123 -0
  1198. data/rust-vendor/wit-component/tests/components/link-tag/component.wit.print +5 -0
  1199. data/rust-vendor/wit-component/tests/components/link-tag/lib-bar.wat +6 -0
  1200. data/rust-vendor/wit-component/tests/components/link-tag/lib-bar.wit +3 -0
  1201. data/rust-vendor/wit-component/tests/components/link-tag/lib-foo.wat +7 -0
  1202. data/rust-vendor/wit-component/tests/components/link-tag/lib-foo.wit +5 -0
  1203. data/rust-vendor/wit-component/tests/components/link-weak-cabi-realloc/component.wat +99 -0
  1204. data/rust-vendor/wit-component/tests/components/link-weak-cabi-realloc/component.wit.print +5 -0
  1205. data/rust-vendor/wit-component/tests/components/link-weak-cabi-realloc/lib-foo.wat +14 -0
  1206. data/rust-vendor/wit-component/tests/components/link-weak-cabi-realloc/lib-foo.wit +9 -0
  1207. data/rust-vendor/wit-component/tests/components/link-weak-import/component.wat +120 -0
  1208. data/rust-vendor/wit-component/tests/components/link-weak-import/component.wit.print +7 -0
  1209. data/rust-vendor/wit-component/tests/components/link-weak-import/lib-foo.wat +15 -0
  1210. data/rust-vendor/wit-component/tests/components/link-weak-import/lib-foo.wit +10 -0
  1211. data/rust-vendor/wit-component/tests/components/live-exports-dead-imports/component.wat +38 -0
  1212. data/rust-vendor/wit-component/tests/components/live-exports-dead-imports/component.wit.print +5 -0
  1213. data/rust-vendor/wit-component/tests/components/live-exports-dead-imports/module.wat +4 -0
  1214. data/rust-vendor/wit-component/tests/components/live-exports-dead-imports/module.wit +12 -0
  1215. data/rust-vendor/wit-component/tests/components/lower-options/component.wat +281 -0
  1216. data/rust-vendor/wit-component/tests/components/lower-options/component.wit.print +5 -0
  1217. data/rust-vendor/wit-component/tests/components/lower-options/module.wat +20 -0
  1218. data/rust-vendor/wit-component/tests/components/lower-options/module.wit +40 -0
  1219. data/rust-vendor/wit-component/tests/components/many-same-names/component.wat +48 -0
  1220. data/rust-vendor/wit-component/tests/components/many-same-names/component.wit.print +10 -0
  1221. data/rust-vendor/wit-component/tests/components/many-same-names/module.wat +3 -0
  1222. data/rust-vendor/wit-component/tests/components/many-same-names/module.wit +21 -0
  1223. data/rust-vendor/wit-component/tests/components/merge-import-versions/component.wat +125 -0
  1224. data/rust-vendor/wit-component/tests/components/merge-import-versions/component.wit.print +5 -0
  1225. data/rust-vendor/wit-component/tests/components/merge-import-versions/module.wat +15 -0
  1226. data/rust-vendor/wit-component/tests/components/merge-import-versions/module.wit +30 -0
  1227. data/rust-vendor/wit-component/tests/components/merge-import-versions-with-adapter/adapt-old.wat +10 -0
  1228. data/rust-vendor/wit-component/tests/components/merge-import-versions-with-adapter/adapt-old.wit +19 -0
  1229. data/rust-vendor/wit-component/tests/components/merge-import-versions-with-adapter/component.wat +104 -0
  1230. data/rust-vendor/wit-component/tests/components/merge-import-versions-with-adapter/component.wit.print +5 -0
  1231. data/rust-vendor/wit-component/tests/components/merge-import-versions-with-adapter/module.wat +9 -0
  1232. data/rust-vendor/wit-component/tests/components/merge-import-versions-with-adapter/module.wit +14 -0
  1233. data/rust-vendor/wit-component/tests/components/multi-package/baz/qux/component.wat +90 -0
  1234. data/rust-vendor/wit-component/tests/components/multi-package/baz/qux/component.wit.print +13 -0
  1235. data/rust-vendor/wit-component/tests/components/multi-package/baz/qux/module.wat +7 -0
  1236. data/rust-vendor/wit-component/tests/components/multi-package/component.wat +44 -0
  1237. data/rust-vendor/wit-component/tests/components/multi-package/component.wit.print +4 -0
  1238. data/rust-vendor/wit-component/tests/components/multi-package/foo/bar/component.wat +82 -0
  1239. data/rust-vendor/wit-component/tests/components/multi-package/foo/bar/component.wit.print +13 -0
  1240. data/rust-vendor/wit-component/tests/components/multi-package/foo/bar/module.wat +6 -0
  1241. data/rust-vendor/wit-component/tests/components/multi-package/module.wit +25 -0
  1242. data/rust-vendor/wit-component/tests/components/no-realloc-required/component.wat +67 -0
  1243. data/rust-vendor/wit-component/tests/components/no-realloc-required/component.wit.print +7 -0
  1244. data/rust-vendor/wit-component/tests/components/no-realloc-required/module.wat +4 -0
  1245. data/rust-vendor/wit-component/tests/components/no-realloc-required/module.wit +7 -0
  1246. data/rust-vendor/wit-component/tests/components/post-return/component.wat +36 -0
  1247. data/rust-vendor/wit-component/tests/components/post-return/component.wit.print +5 -0
  1248. data/rust-vendor/wit-component/tests/components/post-return/module.wat +6 -0
  1249. data/rust-vendor/wit-component/tests/components/post-return/module.wit +5 -0
  1250. data/rust-vendor/wit-component/tests/components/rename-import-interface/component.wat +29 -0
  1251. data/rust-vendor/wit-component/tests/components/rename-import-interface/component.wit.print +5 -0
  1252. data/rust-vendor/wit-component/tests/components/rename-import-interface/module.wat +3 -0
  1253. data/rust-vendor/wit-component/tests/components/rename-import-interface/module.wit +9 -0
  1254. data/rust-vendor/wit-component/tests/components/rename-interface/component.wat +39 -0
  1255. data/rust-vendor/wit-component/tests/components/rename-interface/component.wit.print +10 -0
  1256. data/rust-vendor/wit-component/tests/components/rename-interface/module.wat +3 -0
  1257. data/rust-vendor/wit-component/tests/components/rename-interface/module.wit +18 -0
  1258. data/rust-vendor/wit-component/tests/components/resource-intrinsics-with-just-import/component.wat +28 -0
  1259. data/rust-vendor/wit-component/tests/components/resource-intrinsics-with-just-import/component.wit.print +7 -0
  1260. data/rust-vendor/wit-component/tests/components/resource-intrinsics-with-just-import/module.wat +3 -0
  1261. data/rust-vendor/wit-component/tests/components/resource-intrinsics-with-just-import/module.wit +7 -0
  1262. data/rust-vendor/wit-component/tests/components/resource-used-through-import/component.wat +57 -0
  1263. data/rust-vendor/wit-component/tests/components/resource-used-through-import/component.wit.print +11 -0
  1264. data/rust-vendor/wit-component/tests/components/resource-used-through-import/module.wat +6 -0
  1265. data/rust-vendor/wit-component/tests/components/resource-used-through-import/module.wit +13 -0
  1266. data/rust-vendor/wit-component/tests/components/resource-using-export/component.wat +64 -0
  1267. data/rust-vendor/wit-component/tests/components/resource-using-export/component.wit.print +10 -0
  1268. data/rust-vendor/wit-component/tests/components/resource-using-export/module.wat +6 -0
  1269. data/rust-vendor/wit-component/tests/components/resource-using-export/module.wit +16 -0
  1270. data/rust-vendor/wit-component/tests/components/simple/component.wat +64 -0
  1271. data/rust-vendor/wit-component/tests/components/simple/component.wit.print +7 -0
  1272. data/rust-vendor/wit-component/tests/components/simple/module.wat +10 -0
  1273. data/rust-vendor/wit-component/tests/components/simple/module.wit +7 -0
  1274. data/rust-vendor/wit-component/tests/components/threading/component.wat +163 -0
  1275. data/rust-vendor/wit-component/tests/components/threading/component.wit.print +6 -0
  1276. data/rust-vendor/wit-component/tests/components/threading/module.wat +22 -0
  1277. data/rust-vendor/wit-component/tests/components/threading/module.wit +10 -0
  1278. data/rust-vendor/wit-component/tests/components/tricky-order/component.wat +44 -0
  1279. data/rust-vendor/wit-component/tests/components/tricky-order/component.wit.print +11 -0
  1280. data/rust-vendor/wit-component/tests/components/tricky-order/module.wat +1 -0
  1281. data/rust-vendor/wit-component/tests/components/tricky-order/module.wit +20 -0
  1282. data/rust-vendor/wit-component/tests/components/tricky-resources/component.wat +75 -0
  1283. data/rust-vendor/wit-component/tests/components/tricky-resources/component.wit.print +11 -0
  1284. data/rust-vendor/wit-component/tests/components/tricky-resources/module.wat +7 -0
  1285. data/rust-vendor/wit-component/tests/components/tricky-resources/module.wit +19 -0
  1286. data/rust-vendor/wit-component/tests/components/tricky-resources2/component.wat +50 -0
  1287. data/rust-vendor/wit-component/tests/components/tricky-resources2/component.wit.print +10 -0
  1288. data/rust-vendor/wit-component/tests/components/tricky-resources2/module.wat +4 -0
  1289. data/rust-vendor/wit-component/tests/components/tricky-resources2/module.wit +14 -0
  1290. data/rust-vendor/wit-component/tests/components/tricky-resources3/component.wat +44 -0
  1291. data/rust-vendor/wit-component/tests/components/tricky-resources3/component.wit.print +9 -0
  1292. data/rust-vendor/wit-component/tests/components/tricky-resources3/module.wat +1 -0
  1293. data/rust-vendor/wit-component/tests/components/tricky-resources3/module.wit +17 -0
  1294. data/rust-vendor/wit-component/tests/components/tricky-resources4/component.wat +64 -0
  1295. data/rust-vendor/wit-component/tests/components/tricky-resources4/component.wit.print +8 -0
  1296. data/rust-vendor/wit-component/tests/components/tricky-resources4/module.wat +6 -0
  1297. data/rust-vendor/wit-component/tests/components/tricky-resources4/module.wit +16 -0
  1298. data/rust-vendor/wit-component/tests/components/unused-import/component.wat +29 -0
  1299. data/rust-vendor/wit-component/tests/components/unused-import/component.wit.print +5 -0
  1300. data/rust-vendor/wit-component/tests/components/unused-import/module.wat +3 -0
  1301. data/rust-vendor/wit-component/tests/components/unused-import/module.wit +12 -0
  1302. data/rust-vendor/wit-component/tests/components/worlds-with-type-renamings/component.wat +67 -0
  1303. data/rust-vendor/wit-component/tests/components/worlds-with-type-renamings/component.wit.print +8 -0
  1304. data/rust-vendor/wit-component/tests/components/worlds-with-type-renamings/module.wat +12 -0
  1305. data/rust-vendor/wit-component/tests/components/worlds-with-type-renamings/module.wit +17 -0
  1306. data/rust-vendor/wit-component/tests/components/worlds-with-types/component.wat +25 -0
  1307. data/rust-vendor/wit-component/tests/components/worlds-with-types/component.wit.print +11 -0
  1308. data/rust-vendor/wit-component/tests/components/worlds-with-types/module.wat +3 -0
  1309. data/rust-vendor/wit-component/tests/components/worlds-with-types/module.wit +10 -0
  1310. data/rust-vendor/wit-component/tests/components.rs +291 -0
  1311. data/rust-vendor/wit-component/tests/interfaces/console.wat +18 -0
  1312. data/rust-vendor/wit-component/tests/interfaces/console.wit +5 -0
  1313. data/rust-vendor/wit-component/tests/interfaces/console.wit.print +6 -0
  1314. data/rust-vendor/wit-component/tests/interfaces/diamond-disambiguate/foo.wit.print +20 -0
  1315. data/rust-vendor/wit-component/tests/interfaces/diamond-disambiguate/join.wit +10 -0
  1316. data/rust-vendor/wit-component/tests/interfaces/diamond-disambiguate/shared1.wit +3 -0
  1317. data/rust-vendor/wit-component/tests/interfaces/diamond-disambiguate/shared2.wit +3 -0
  1318. data/rust-vendor/wit-component/tests/interfaces/diamond-disambiguate.wat +70 -0
  1319. data/rust-vendor/wit-component/tests/interfaces/diamond.wat +107 -0
  1320. data/rust-vendor/wit-component/tests/interfaces/diamond.wit +31 -0
  1321. data/rust-vendor/wit-component/tests/interfaces/diamond.wit.print +34 -0
  1322. data/rust-vendor/wit-component/tests/interfaces/doc-comments/foo.wit +79 -0
  1323. data/rust-vendor/wit-component/tests/interfaces/doc-comments/foo.wit.print +78 -0
  1324. data/rust-vendor/wit-component/tests/interfaces/doc-comments.wat +73 -0
  1325. data/rust-vendor/wit-component/tests/interfaces/empty.wat +50 -0
  1326. data/rust-vendor/wit-component/tests/interfaces/empty.wit +12 -0
  1327. data/rust-vendor/wit-component/tests/interfaces/empty.wit.print +16 -0
  1328. data/rust-vendor/wit-component/tests/interfaces/export-other-packages-interface/deps/the-dep/the-doc.wit +9 -0
  1329. data/rust-vendor/wit-component/tests/interfaces/export-other-packages-interface/foo.wit +5 -0
  1330. data/rust-vendor/wit-component/tests/interfaces/export-other-packages-interface/foo.wit.print +5 -0
  1331. data/rust-vendor/wit-component/tests/interfaces/export-other-packages-interface.wat +23 -0
  1332. data/rust-vendor/wit-component/tests/interfaces/exports.wat +39 -0
  1333. data/rust-vendor/wit-component/tests/interfaces/exports.wit +13 -0
  1334. data/rust-vendor/wit-component/tests/interfaces/exports.wit.print +13 -0
  1335. data/rust-vendor/wit-component/tests/interfaces/flags.wat +79 -0
  1336. data/rust-vendor/wit-component/tests/interfaces/flags.wit +100 -0
  1337. data/rust-vendor/wit-component/tests/interfaces/flags.wit.print +100 -0
  1338. data/rust-vendor/wit-component/tests/interfaces/floats.wat +47 -0
  1339. data/rust-vendor/wit-component/tests/interfaces/floats.wit +12 -0
  1340. data/rust-vendor/wit-component/tests/interfaces/floats.wit.print +15 -0
  1341. data/rust-vendor/wit-component/tests/interfaces/foreign-use-chain/deps/bar/bar.wit +9 -0
  1342. data/rust-vendor/wit-component/tests/interfaces/foreign-use-chain/foo.wit +5 -0
  1343. data/rust-vendor/wit-component/tests/interfaces/foreign-use-chain/foo.wit.print +6 -0
  1344. data/rust-vendor/wit-component/tests/interfaces/foreign-use-chain.wat +31 -0
  1345. data/rust-vendor/wit-component/tests/interfaces/import-and-export.wat +54 -0
  1346. data/rust-vendor/wit-component/tests/interfaces/import-and-export.wit +14 -0
  1347. data/rust-vendor/wit-component/tests/interfaces/import-and-export.wit.print +15 -0
  1348. data/rust-vendor/wit-component/tests/interfaces/integers.wat +107 -0
  1349. data/rust-vendor/wit-component/tests/interfaces/integers.wit +27 -0
  1350. data/rust-vendor/wit-component/tests/interfaces/integers.wit.print +45 -0
  1351. data/rust-vendor/wit-component/tests/interfaces/lists.wat +211 -0
  1352. data/rust-vendor/wit-component/tests/interfaces/lists.wit +96 -0
  1353. data/rust-vendor/wit-component/tests/interfaces/lists.wit.print +96 -0
  1354. data/rust-vendor/wit-component/tests/interfaces/maps.wat +186 -0
  1355. data/rust-vendor/wit-component/tests/interfaces/maps.wit +38 -0
  1356. data/rust-vendor/wit-component/tests/interfaces/maps.wit.print +57 -0
  1357. data/rust-vendor/wit-component/tests/interfaces/multi-doc/a.wit +9 -0
  1358. data/rust-vendor/wit-component/tests/interfaces/multi-doc/b.wit +9 -0
  1359. data/rust-vendor/wit-component/tests/interfaces/multi-doc/foo.wit.print +20 -0
  1360. data/rust-vendor/wit-component/tests/interfaces/multi-doc.wat +78 -0
  1361. data/rust-vendor/wit-component/tests/interfaces/multiple-use.wat +67 -0
  1362. data/rust-vendor/wit-component/tests/interfaces/multiple-use.wit +16 -0
  1363. data/rust-vendor/wit-component/tests/interfaces/multiple-use.wit.print +18 -0
  1364. data/rust-vendor/wit-component/tests/interfaces/pkg-use-chain/chain.wit.print +18 -0
  1365. data/rust-vendor/wit-component/tests/interfaces/pkg-use-chain/def.wit +13 -0
  1366. data/rust-vendor/wit-component/tests/interfaces/pkg-use-chain/the-use.wit +5 -0
  1367. data/rust-vendor/wit-component/tests/interfaces/pkg-use-chain.wat +70 -0
  1368. data/rust-vendor/wit-component/tests/interfaces/pkg-use-chain2/bar.wit +13 -0
  1369. data/rust-vendor/wit-component/tests/interfaces/pkg-use-chain2/foo.wit +5 -0
  1370. data/rust-vendor/wit-component/tests/interfaces/pkg-use-chain2/foo.wit.print +20 -0
  1371. data/rust-vendor/wit-component/tests/interfaces/pkg-use-chain2.wat +70 -0
  1372. data/rust-vendor/wit-component/tests/interfaces/preserve-dep-type-order/deps/dep/foo.wit +11 -0
  1373. data/rust-vendor/wit-component/tests/interfaces/preserve-dep-type-order/foo.wit +9 -0
  1374. data/rust-vendor/wit-component/tests/interfaces/preserve-dep-type-order/foo.wit.print +9 -0
  1375. data/rust-vendor/wit-component/tests/interfaces/preserve-dep-type-order.wat +47 -0
  1376. data/rust-vendor/wit-component/tests/interfaces/preserve-foreign-reexport/deps/my-dep/my-doc.wit +8 -0
  1377. data/rust-vendor/wit-component/tests/interfaces/preserve-foreign-reexport/foo.wit +5 -0
  1378. data/rust-vendor/wit-component/tests/interfaces/preserve-foreign-reexport/foo.wit.print +5 -0
  1379. data/rust-vendor/wit-component/tests/interfaces/preserve-foreign-reexport.wat +24 -0
  1380. data/rust-vendor/wit-component/tests/interfaces/print-keyword.wat +21 -0
  1381. data/rust-vendor/wit-component/tests/interfaces/print-keyword.wit +10 -0
  1382. data/rust-vendor/wit-component/tests/interfaces/print-keyword.wit.print +12 -0
  1383. data/rust-vendor/wit-component/tests/interfaces/records.wat +141 -0
  1384. data/rust-vendor/wit-component/tests/interfaces/records.wit +63 -0
  1385. data/rust-vendor/wit-component/tests/interfaces/records.wit.print +64 -0
  1386. data/rust-vendor/wit-component/tests/interfaces/reference-out-of-order.wat +63 -0
  1387. data/rust-vendor/wit-component/tests/interfaces/reference-out-of-order.wit +28 -0
  1388. data/rust-vendor/wit-component/tests/interfaces/reference-out-of-order.wit.print +31 -0
  1389. data/rust-vendor/wit-component/tests/interfaces/resources.wat +192 -0
  1390. data/rust-vendor/wit-component/tests/interfaces/resources.wit +80 -0
  1391. data/rust-vendor/wit-component/tests/interfaces/resources.wit.print +81 -0
  1392. data/rust-vendor/wit-component/tests/interfaces/simple-deps/deps/some-dep/types.wit +5 -0
  1393. data/rust-vendor/wit-component/tests/interfaces/simple-deps/foo.wit +4 -0
  1394. data/rust-vendor/wit-component/tests/interfaces/simple-deps/foo.wit.print +6 -0
  1395. data/rust-vendor/wit-component/tests/interfaces/simple-deps.wat +26 -0
  1396. data/rust-vendor/wit-component/tests/interfaces/simple-multi/bar.wit +1 -0
  1397. data/rust-vendor/wit-component/tests/interfaces/simple-multi/foo.wit +3 -0
  1398. data/rust-vendor/wit-component/tests/interfaces/simple-multi/foo.wit.print +8 -0
  1399. data/rust-vendor/wit-component/tests/interfaces/simple-multi.wat +24 -0
  1400. data/rust-vendor/wit-component/tests/interfaces/simple-use.wat +40 -0
  1401. data/rust-vendor/wit-component/tests/interfaces/simple-use.wit +13 -0
  1402. data/rust-vendor/wit-component/tests/interfaces/simple-use.wit.print +15 -0
  1403. data/rust-vendor/wit-component/tests/interfaces/simple-world.wat +35 -0
  1404. data/rust-vendor/wit-component/tests/interfaces/simple-world.wit +9 -0
  1405. data/rust-vendor/wit-component/tests/interfaces/simple-world.wit.print +9 -0
  1406. data/rust-vendor/wit-component/tests/interfaces/single-named-result.wat +18 -0
  1407. data/rust-vendor/wit-component/tests/interfaces/type-alias.wat +51 -0
  1408. data/rust-vendor/wit-component/tests/interfaces/type-alias.wit +13 -0
  1409. data/rust-vendor/wit-component/tests/interfaces/type-alias.wit.print +15 -0
  1410. data/rust-vendor/wit-component/tests/interfaces/type-alias2.wat +41 -0
  1411. data/rust-vendor/wit-component/tests/interfaces/type-alias2.wit +15 -0
  1412. data/rust-vendor/wit-component/tests/interfaces/type-alias2.wit.print +15 -0
  1413. data/rust-vendor/wit-component/tests/interfaces/upstream-deps-same-name/deps/a/the-name.wit +4 -0
  1414. data/rust-vendor/wit-component/tests/interfaces/upstream-deps-same-name/deps/b/the-name.wit +4 -0
  1415. data/rust-vendor/wit-component/tests/interfaces/upstream-deps-same-name/foo.wit +6 -0
  1416. data/rust-vendor/wit-component/tests/interfaces/upstream-deps-same-name/foo.wit.print +7 -0
  1417. data/rust-vendor/wit-component/tests/interfaces/upstream-deps-same-name.wat +36 -0
  1418. data/rust-vendor/wit-component/tests/interfaces/use-chain.wat +72 -0
  1419. data/rust-vendor/wit-component/tests/interfaces/use-chain.wit +15 -0
  1420. data/rust-vendor/wit-component/tests/interfaces/use-chain.wit.print +18 -0
  1421. data/rust-vendor/wit-component/tests/interfaces/use-for-type.wat +49 -0
  1422. data/rust-vendor/wit-component/tests/interfaces/use-for-type.wit +16 -0
  1423. data/rust-vendor/wit-component/tests/interfaces/use-for-type.wit.print +17 -0
  1424. data/rust-vendor/wit-component/tests/interfaces/variants.wat +197 -0
  1425. data/rust-vendor/wit-component/tests/interfaces/variants.wit +78 -0
  1426. data/rust-vendor/wit-component/tests/interfaces/variants.wit.print +95 -0
  1427. data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/cli/command.wit +7 -0
  1428. data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/cli/environment.wit +18 -0
  1429. data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/cli/exit.wit +4 -0
  1430. data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/cli/imports.wit +20 -0
  1431. data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/cli/run.wit +4 -0
  1432. data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/cli/stdio.wit +17 -0
  1433. data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/cli/terminal.wit +47 -0
  1434. data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/clocks/monotonic-clock.wit +45 -0
  1435. data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/clocks/wall-clock.wit +42 -0
  1436. data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/clocks/world.wit +6 -0
  1437. data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/filesystem/preopens.wit +8 -0
  1438. data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/filesystem/types.wit +634 -0
  1439. data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/filesystem/world.wit +6 -0
  1440. data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/io/error.wit +34 -0
  1441. data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/io/poll.wit +41 -0
  1442. data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/io/streams.wit +251 -0
  1443. data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/io/world.wit +6 -0
  1444. data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/random/insecure-seed.wit +25 -0
  1445. data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/random/insecure.wit +22 -0
  1446. data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/random/random.wit +26 -0
  1447. data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/random/world.wit +7 -0
  1448. data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/sockets/instance-network.wit +9 -0
  1449. data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/sockets/ip-name-lookup.wit +51 -0
  1450. data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/sockets/network.wit +147 -0
  1451. data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/sockets/tcp-create-socket.wit +26 -0
  1452. data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/sockets/tcp.wit +321 -0
  1453. data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/sockets/udp-create-socket.wit +26 -0
  1454. data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/sockets/udp.wit +277 -0
  1455. data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/sockets/world.wit +11 -0
  1456. data/rust-vendor/wit-component/tests/interfaces/wasi-http/handler.wit +43 -0
  1457. data/rust-vendor/wit-component/tests/interfaces/wasi-http/http.wit.print +571 -0
  1458. data/rust-vendor/wit-component/tests/interfaces/wasi-http/proxy.wit +32 -0
  1459. data/rust-vendor/wit-component/tests/interfaces/wasi-http/types.wit +570 -0
  1460. data/rust-vendor/wit-component/tests/interfaces/wasi-http.wat +881 -0
  1461. data/rust-vendor/wit-component/tests/interfaces/world-inline-interface.wat +24 -0
  1462. data/rust-vendor/wit-component/tests/interfaces/world-inline-interface.wit +6 -0
  1463. data/rust-vendor/wit-component/tests/interfaces/world-inline-interface.wit.print +9 -0
  1464. data/rust-vendor/wit-component/tests/interfaces/world-pkg-conflict/bar.wit +3 -0
  1465. data/rust-vendor/wit-component/tests/interfaces/world-pkg-conflict/foo.wit +9 -0
  1466. data/rust-vendor/wit-component/tests/interfaces/world-pkg-conflict/foo.wit.print +12 -0
  1467. data/rust-vendor/wit-component/tests/interfaces/world-pkg-conflict.wat +47 -0
  1468. data/rust-vendor/wit-component/tests/interfaces/world-top-level.wat +55 -0
  1469. data/rust-vendor/wit-component/tests/interfaces/world-top-level.wit +20 -0
  1470. data/rust-vendor/wit-component/tests/interfaces/world-top-level.wit.print +19 -0
  1471. data/rust-vendor/wit-component/tests/interfaces/worlds-with-types.wat +56 -0
  1472. data/rust-vendor/wit-component/tests/interfaces/worlds-with-types.wit +23 -0
  1473. data/rust-vendor/wit-component/tests/interfaces/worlds-with-types.wit.print +23 -0
  1474. data/rust-vendor/wit-component/tests/interfaces.rs +123 -0
  1475. data/rust-vendor/wit-component/tests/linking.rs +299 -0
  1476. data/rust-vendor/wit-component/tests/merge/bad-interface1/error.txt +1 -0
  1477. data/rust-vendor/wit-component/tests/merge/bad-interface1/from/a.wit +5 -0
  1478. data/rust-vendor/wit-component/tests/merge/bad-interface1/from/deps/foo/a.wit +5 -0
  1479. data/rust-vendor/wit-component/tests/merge/bad-interface1/into/a.wit +5 -0
  1480. data/rust-vendor/wit-component/tests/merge/bad-interface1/into/deps/foo/a.wit +5 -0
  1481. data/rust-vendor/wit-component/tests/merge/bad-interface2/error.txt +1 -0
  1482. data/rust-vendor/wit-component/tests/merge/bad-interface2/from/a.wit +5 -0
  1483. data/rust-vendor/wit-component/tests/merge/bad-interface2/from/deps/foo/a.wit +7 -0
  1484. data/rust-vendor/wit-component/tests/merge/bad-interface2/into/a.wit +5 -0
  1485. data/rust-vendor/wit-component/tests/merge/bad-interface2/into/deps/foo/a.wit +7 -0
  1486. data/rust-vendor/wit-component/tests/merge/bad-world1/error.txt +1 -0
  1487. data/rust-vendor/wit-component/tests/merge/bad-world1/from/a.wit +4 -0
  1488. data/rust-vendor/wit-component/tests/merge/bad-world1/from/deps/foo/a.wit +11 -0
  1489. data/rust-vendor/wit-component/tests/merge/bad-world1/into/a.wit +4 -0
  1490. data/rust-vendor/wit-component/tests/merge/bad-world1/into/deps/foo/a.wit +9 -0
  1491. data/rust-vendor/wit-component/tests/merge/bad-world2/error.txt +1 -0
  1492. data/rust-vendor/wit-component/tests/merge/bad-world2/from/a.wit +5 -0
  1493. data/rust-vendor/wit-component/tests/merge/bad-world2/from/deps/foo/a.wit +8 -0
  1494. data/rust-vendor/wit-component/tests/merge/bad-world2/into/a.wit +5 -0
  1495. data/rust-vendor/wit-component/tests/merge/bad-world2/into/deps/foo/a.wit +9 -0
  1496. data/rust-vendor/wit-component/tests/merge/bad-world3/error.txt +1 -0
  1497. data/rust-vendor/wit-component/tests/merge/bad-world3/from/a.wit +5 -0
  1498. data/rust-vendor/wit-component/tests/merge/bad-world3/from/deps/foo/a.wit +8 -0
  1499. data/rust-vendor/wit-component/tests/merge/bad-world3/into/a.wit +5 -0
  1500. data/rust-vendor/wit-component/tests/merge/bad-world3/into/deps/foo/a.wit +9 -0
  1501. data/rust-vendor/wit-component/tests/merge/bad-world4/error.txt +1 -0
  1502. data/rust-vendor/wit-component/tests/merge/bad-world4/from/a.wit +5 -0
  1503. data/rust-vendor/wit-component/tests/merge/bad-world4/from/deps/foo/a.wit +11 -0
  1504. data/rust-vendor/wit-component/tests/merge/bad-world4/into/a.wit +5 -0
  1505. data/rust-vendor/wit-component/tests/merge/bad-world4/into/deps/foo/a.wit +9 -0
  1506. data/rust-vendor/wit-component/tests/merge/bad-world5/error.txt +1 -0
  1507. data/rust-vendor/wit-component/tests/merge/bad-world5/from/a.wit +5 -0
  1508. data/rust-vendor/wit-component/tests/merge/bad-world5/from/deps/foo/a.wit +11 -0
  1509. data/rust-vendor/wit-component/tests/merge/bad-world5/into/a.wit +5 -0
  1510. data/rust-vendor/wit-component/tests/merge/bad-world5/into/deps/foo/a.wit +9 -0
  1511. data/rust-vendor/wit-component/tests/merge/success/from/a.wit +7 -0
  1512. data/rust-vendor/wit-component/tests/merge/success/from/deps/foo/only-from.wit +5 -0
  1513. data/rust-vendor/wit-component/tests/merge/success/from/deps/foo/shared.wit +46 -0
  1514. data/rust-vendor/wit-component/tests/merge/success/from/deps/only-from-dep/a.wit +5 -0
  1515. data/rust-vendor/wit-component/tests/merge/success/into/b.wit +7 -0
  1516. data/rust-vendor/wit-component/tests/merge/success/into/deps/foo/only-into.wit +5 -0
  1517. data/rust-vendor/wit-component/tests/merge/success/into/deps/foo/shared.wit +44 -0
  1518. data/rust-vendor/wit-component/tests/merge/success/merge/foo.wit +77 -0
  1519. data/rust-vendor/wit-component/tests/merge/success/merge/from.wit +8 -0
  1520. data/rust-vendor/wit-component/tests/merge/success/merge/into.wit +8 -0
  1521. data/rust-vendor/wit-component/tests/merge/success/merge/only-from-dep.wit +6 -0
  1522. data/rust-vendor/wit-component/tests/merge.rs +80 -0
  1523. data/rust-vendor/wit-component/tests/targets/error-missing-export/error.txt +2 -0
  1524. data/rust-vendor/wit-component/tests/targets/error-missing-export/test.wat +39 -0
  1525. data/rust-vendor/wit-component/tests/targets/error-missing-export/test.wit +18 -0
  1526. data/rust-vendor/wit-component/tests/targets/error-missing-import/error.txt +2 -0
  1527. data/rust-vendor/wit-component/tests/targets/error-missing-import/test.wat +37 -0
  1528. data/rust-vendor/wit-component/tests/targets/error-missing-import/test.wit +13 -0
  1529. data/rust-vendor/wit-component/tests/targets/success/test.wat +56 -0
  1530. data/rust-vendor/wit-component/tests/targets/success/test.wit +14 -0
  1531. data/rust-vendor/wit-component/tests/targets/success-empty/test.wat +1 -0
  1532. data/rust-vendor/wit-component/tests/targets/success-empty/test.wit +9 -0
  1533. data/rust-vendor/wit-component/tests/targets.rs +89 -0
  1534. data/rust-vendor/wit-component/tests/wit/parse-dir/wit/deps/bar/bar.wit +9 -0
  1535. data/rust-vendor/wit-component/tests/wit/parse-dir/wit/world.wit +5 -0
  1536. data/rust-vendor/wit-component/tests/wit.rs +49 -0
  1537. data/rust-vendor/wit-parser/.cargo-checksum.json +1 -0
  1538. data/rust-vendor/wit-parser/.cargo_vcs_info.json +6 -0
  1539. data/rust-vendor/wit-parser/Cargo.lock +576 -0
  1540. data/rust-vendor/wit-parser/Cargo.toml +157 -0
  1541. data/rust-vendor/wit-parser/Cargo.toml.orig +56 -0
  1542. data/rust-vendor/wit-parser/README.md +13 -0
  1543. data/rust-vendor/wit-parser/src/abi.rs +410 -0
  1544. data/rust-vendor/wit-parser/src/ast/lex.rs +751 -0
  1545. data/rust-vendor/wit-parser/src/ast/resolve.rs +1813 -0
  1546. data/rust-vendor/wit-parser/src/ast/toposort.rs +249 -0
  1547. data/rust-vendor/wit-parser/src/ast.rs +1958 -0
  1548. data/rust-vendor/wit-parser/src/decoding.rs +1864 -0
  1549. data/rust-vendor/wit-parser/src/lib.rs +1413 -0
  1550. data/rust-vendor/wit-parser/src/live.rs +264 -0
  1551. data/rust-vendor/wit-parser/src/metadata.rs +772 -0
  1552. data/rust-vendor/wit-parser/src/resolve/clone.rs +227 -0
  1553. data/rust-vendor/wit-parser/src/resolve.rs +4636 -0
  1554. data/rust-vendor/wit-parser/src/serde_.rs +140 -0
  1555. data/rust-vendor/wit-parser/src/sizealign.rs +626 -0
  1556. data/rust-vendor/wit-parser/tests/.gitignore +2 -0
  1557. data/rust-vendor/wit-parser/tests/all.rs +153 -0
  1558. data/rust-vendor/wit-parser/tests/ui/async.wit +24 -0
  1559. data/rust-vendor/wit-parser/tests/ui/async.wit.json +151 -0
  1560. data/rust-vendor/wit-parser/tests/ui/comments.wit +25 -0
  1561. data/rust-vendor/wit-parser/tests/ui/comments.wit.json +46 -0
  1562. data/rust-vendor/wit-parser/tests/ui/complex-include/deps/bar/root.wit +9 -0
  1563. data/rust-vendor/wit-parser/tests/ui/complex-include/deps/baz/root.wit +9 -0
  1564. data/rust-vendor/wit-parser/tests/ui/complex-include/root.wit +26 -0
  1565. data/rust-vendor/wit-parser/tests/ui/complex-include.wit.json +200 -0
  1566. data/rust-vendor/wit-parser/tests/ui/cross-package-resource/deps/foo/foo.wit +5 -0
  1567. data/rust-vendor/wit-parser/tests/ui/cross-package-resource/foo.wit +7 -0
  1568. data/rust-vendor/wit-parser/tests/ui/cross-package-resource.wit.json +67 -0
  1569. data/rust-vendor/wit-parser/tests/ui/diamond1/deps/dep1/types.wit +2 -0
  1570. data/rust-vendor/wit-parser/tests/ui/diamond1/deps/dep2/types.wit +2 -0
  1571. data/rust-vendor/wit-parser/tests/ui/diamond1/join.wit +6 -0
  1572. data/rust-vendor/wit-parser/tests/ui/diamond1.wit.json +59 -0
  1573. data/rust-vendor/wit-parser/tests/ui/disambiguate-diamond/shared1.wit +3 -0
  1574. data/rust-vendor/wit-parser/tests/ui/disambiguate-diamond/shared2.wit +3 -0
  1575. data/rust-vendor/wit-parser/tests/ui/disambiguate-diamond/world.wit +13 -0
  1576. data/rust-vendor/wit-parser/tests/ui/disambiguate-diamond.wit.json +115 -0
  1577. data/rust-vendor/wit-parser/tests/ui/empty.wit +1 -0
  1578. data/rust-vendor/wit-parser/tests/ui/empty.wit.json +12 -0
  1579. data/rust-vendor/wit-parser/tests/ui/error-context.wit +7 -0
  1580. data/rust-vendor/wit-parser/tests/ui/error-context.wit.json +59 -0
  1581. data/rust-vendor/wit-parser/tests/ui/feature-gates.wit +118 -0
  1582. data/rust-vendor/wit-parser/tests/ui/feature-gates.wit.json +301 -0
  1583. data/rust-vendor/wit-parser/tests/ui/feature-types.wit +13 -0
  1584. data/rust-vendor/wit-parser/tests/ui/feature-types.wit.json +66 -0
  1585. data/rust-vendor/wit-parser/tests/ui/foreign-deps/deps/another-pkg/other-doc.wit +3 -0
  1586. data/rust-vendor/wit-parser/tests/ui/foreign-deps/deps/corp/saas.wit +4 -0
  1587. data/rust-vendor/wit-parser/tests/ui/foreign-deps/deps/different-pkg/the-doc.wit +2 -0
  1588. data/rust-vendor/wit-parser/tests/ui/foreign-deps/deps/foreign-pkg/the-doc.wit +5 -0
  1589. data/rust-vendor/wit-parser/tests/ui/foreign-deps/deps/some-pkg/some-doc.wit +13 -0
  1590. data/rust-vendor/wit-parser/tests/ui/foreign-deps/deps/wasi/clocks.wit +5 -0
  1591. data/rust-vendor/wit-parser/tests/ui/foreign-deps/deps/wasi/filesystem.wit +7 -0
  1592. data/rust-vendor/wit-parser/tests/ui/foreign-deps/root.wit +44 -0
  1593. data/rust-vendor/wit-parser/tests/ui/foreign-deps-union/deps/another-pkg/other-doc.wit +3 -0
  1594. data/rust-vendor/wit-parser/tests/ui/foreign-deps-union/deps/corp/saas.wit +4 -0
  1595. data/rust-vendor/wit-parser/tests/ui/foreign-deps-union/deps/different-pkg/the-doc.wit +2 -0
  1596. data/rust-vendor/wit-parser/tests/ui/foreign-deps-union/deps/foreign-pkg/the-doc.wit +5 -0
  1597. data/rust-vendor/wit-parser/tests/ui/foreign-deps-union/deps/some-pkg/some-doc.wit +13 -0
  1598. data/rust-vendor/wit-parser/tests/ui/foreign-deps-union/deps/wasi/clocks.wit +5 -0
  1599. data/rust-vendor/wit-parser/tests/ui/foreign-deps-union/deps/wasi/filesystem.wit +7 -0
  1600. data/rust-vendor/wit-parser/tests/ui/foreign-deps-union/deps/wasi/wasi.wit +6 -0
  1601. data/rust-vendor/wit-parser/tests/ui/foreign-deps-union/root.wit +50 -0
  1602. data/rust-vendor/wit-parser/tests/ui/foreign-deps-union.wit.json +410 -0
  1603. data/rust-vendor/wit-parser/tests/ui/foreign-deps.wit.json +362 -0
  1604. data/rust-vendor/wit-parser/tests/ui/foreign-interface-dep-gated.wit +17 -0
  1605. data/rust-vendor/wit-parser/tests/ui/foreign-interface-dep-gated.wit.json +39 -0
  1606. data/rust-vendor/wit-parser/tests/ui/foreign-world-dep-gated.wit +17 -0
  1607. data/rust-vendor/wit-parser/tests/ui/foreign-world-dep-gated.wit.json +39 -0
  1608. data/rust-vendor/wit-parser/tests/ui/functions.wit +11 -0
  1609. data/rust-vendor/wit-parser/tests/ui/functions.wit.json +115 -0
  1610. data/rust-vendor/wit-parser/tests/ui/gated-include.wit +67 -0
  1611. data/rust-vendor/wit-parser/tests/ui/gated-include.wit.json +346 -0
  1612. data/rust-vendor/wit-parser/tests/ui/gated-use.wit +13 -0
  1613. data/rust-vendor/wit-parser/tests/ui/gated-use.wit.json +34 -0
  1614. data/rust-vendor/wit-parser/tests/ui/ignore-files-deps/deps/bar/types.wit +2 -0
  1615. data/rust-vendor/wit-parser/tests/ui/ignore-files-deps/deps/ignore-me.txt +1 -0
  1616. data/rust-vendor/wit-parser/tests/ui/ignore-files-deps/world.wit +5 -0
  1617. data/rust-vendor/wit-parser/tests/ui/ignore-files-deps.wit.json +41 -0
  1618. data/rust-vendor/wit-parser/tests/ui/import-export-overlap1.wit +5 -0
  1619. data/rust-vendor/wit-parser/tests/ui/import-export-overlap1.wit.json +37 -0
  1620. data/rust-vendor/wit-parser/tests/ui/import-export-overlap2.wit +5 -0
  1621. data/rust-vendor/wit-parser/tests/ui/import-export-overlap2.wit.json +42 -0
  1622. data/rust-vendor/wit-parser/tests/ui/include-reps.wit +15 -0
  1623. data/rust-vendor/wit-parser/tests/ui/include-reps.wit.json +68 -0
  1624. data/rust-vendor/wit-parser/tests/ui/kebab-name-include-with.wit +8 -0
  1625. data/rust-vendor/wit-parser/tests/ui/kebab-name-include-with.wit.json +66 -0
  1626. data/rust-vendor/wit-parser/tests/ui/kinds-of-deps/a.wit +8 -0
  1627. data/rust-vendor/wit-parser/tests/ui/kinds-of-deps/deps/b/root.wit +3 -0
  1628. data/rust-vendor/wit-parser/tests/ui/kinds-of-deps/deps/c.wit +3 -0
  1629. data/rust-vendor/wit-parser/tests/ui/kinds-of-deps/deps/d.wat +6 -0
  1630. data/rust-vendor/wit-parser/tests/ui/kinds-of-deps/deps/e.wasm +0 -0
  1631. data/rust-vendor/wit-parser/tests/ui/kinds-of-deps.wit.json +95 -0
  1632. data/rust-vendor/wit-parser/tests/ui/many-names/a.wit +2 -0
  1633. data/rust-vendor/wit-parser/tests/ui/many-names/b.wit +5 -0
  1634. data/rust-vendor/wit-parser/tests/ui/many-names.wit.json +42 -0
  1635. data/rust-vendor/wit-parser/tests/ui/maps.wit +34 -0
  1636. data/rust-vendor/wit-parser/tests/ui/maps.wit.json +255 -0
  1637. data/rust-vendor/wit-parser/tests/ui/multi-file/bar.wit +21 -0
  1638. data/rust-vendor/wit-parser/tests/ui/multi-file/cycle-a.wit +7 -0
  1639. data/rust-vendor/wit-parser/tests/ui/multi-file/cycle-b.wit +3 -0
  1640. data/rust-vendor/wit-parser/tests/ui/multi-file/foo.wit +31 -0
  1641. data/rust-vendor/wit-parser/tests/ui/multi-file-multi-package/a.wit +24 -0
  1642. data/rust-vendor/wit-parser/tests/ui/multi-file-multi-package/b.wit +23 -0
  1643. data/rust-vendor/wit-parser/tests/ui/multi-file-multi-package.wit.json +255 -0
  1644. data/rust-vendor/wit-parser/tests/ui/multi-file.wit.json +300 -0
  1645. data/rust-vendor/wit-parser/tests/ui/multi-package-deps/deps/dep.wit +13 -0
  1646. data/rust-vendor/wit-parser/tests/ui/multi-package-deps/root.wit +16 -0
  1647. data/rust-vendor/wit-parser/tests/ui/multi-package-deps.wit.json +161 -0
  1648. data/rust-vendor/wit-parser/tests/ui/multi-package-gated-include.wit +114 -0
  1649. data/rust-vendor/wit-parser/tests/ui/multi-package-gated-include.wit.json +697 -0
  1650. data/rust-vendor/wit-parser/tests/ui/multi-package-shared-deps/deps/dep1/types.wit +4 -0
  1651. data/rust-vendor/wit-parser/tests/ui/multi-package-shared-deps/deps/dep2/types.wit +4 -0
  1652. data/rust-vendor/wit-parser/tests/ui/multi-package-shared-deps/packages.wit +41 -0
  1653. data/rust-vendor/wit-parser/tests/ui/multi-package-shared-deps.wit.json +261 -0
  1654. data/rust-vendor/wit-parser/tests/ui/multi-package-transitive-deps/deps/dep1/types.wit +8 -0
  1655. data/rust-vendor/wit-parser/tests/ui/multi-package-transitive-deps/deps/dep2/types.wit +14 -0
  1656. data/rust-vendor/wit-parser/tests/ui/multi-package-transitive-deps/packages.wit +12 -0
  1657. data/rust-vendor/wit-parser/tests/ui/multi-package-transitive-deps.wit.json +174 -0
  1658. data/rust-vendor/wit-parser/tests/ui/name-both-resource-and-type/deps/dep/foo.wit +5 -0
  1659. data/rust-vendor/wit-parser/tests/ui/name-both-resource-and-type/foo.wit +9 -0
  1660. data/rust-vendor/wit-parser/tests/ui/name-both-resource-and-type.wit.json +89 -0
  1661. data/rust-vendor/wit-parser/tests/ui/package-syntax1.wit +1 -0
  1662. data/rust-vendor/wit-parser/tests/ui/package-syntax1.wit.json +12 -0
  1663. data/rust-vendor/wit-parser/tests/ui/package-syntax3.wit +1 -0
  1664. data/rust-vendor/wit-parser/tests/ui/package-syntax3.wit.json +12 -0
  1665. data/rust-vendor/wit-parser/tests/ui/package-syntax4.wit +1 -0
  1666. data/rust-vendor/wit-parser/tests/ui/package-syntax4.wit.json +12 -0
  1667. data/rust-vendor/wit-parser/tests/ui/packages-multiple-nested.wit +35 -0
  1668. data/rust-vendor/wit-parser/tests/ui/packages-multiple-nested.wit.json +184 -0
  1669. data/rust-vendor/wit-parser/tests/ui/packages-nested-colliding-decl-names.wit +24 -0
  1670. data/rust-vendor/wit-parser/tests/ui/packages-nested-colliding-decl-names.wit.json +135 -0
  1671. data/rust-vendor/wit-parser/tests/ui/packages-nested-internal-references.wit +16 -0
  1672. data/rust-vendor/wit-parser/tests/ui/packages-nested-internal-references.wit.json +91 -0
  1673. data/rust-vendor/wit-parser/tests/ui/packages-nested-with-semver.wit +24 -0
  1674. data/rust-vendor/wit-parser/tests/ui/packages-nested-with-semver.wit.json +135 -0
  1675. data/rust-vendor/wit-parser/tests/ui/packages-single-nested.wit +12 -0
  1676. data/rust-vendor/wit-parser/tests/ui/packages-single-nested.wit.json +75 -0
  1677. data/rust-vendor/wit-parser/tests/ui/parse-fail/alias-no-type.wit +6 -0
  1678. data/rust-vendor/wit-parser/tests/ui/parse-fail/alias-no-type.wit.result +5 -0
  1679. data/rust-vendor/wit-parser/tests/ui/parse-fail/async-bad-world.wit +6 -0
  1680. data/rust-vendor/wit-parser/tests/ui/parse-fail/async-bad-world.wit.result +5 -0
  1681. data/rust-vendor/wit-parser/tests/ui/parse-fail/async-bad-world2.wit +6 -0
  1682. data/rust-vendor/wit-parser/tests/ui/parse-fail/async-bad-world2.wit.result +5 -0
  1683. data/rust-vendor/wit-parser/tests/ui/parse-fail/async-bad-world3.wit +6 -0
  1684. data/rust-vendor/wit-parser/tests/ui/parse-fail/async-bad-world3.wit.result +5 -0
  1685. data/rust-vendor/wit-parser/tests/ui/parse-fail/async-bad-world4.wit +11 -0
  1686. data/rust-vendor/wit-parser/tests/ui/parse-fail/async-bad-world4.wit.result +5 -0
  1687. data/rust-vendor/wit-parser/tests/ui/parse-fail/async-bad1.wit +7 -0
  1688. data/rust-vendor/wit-parser/tests/ui/parse-fail/async-bad1.wit.result +5 -0
  1689. data/rust-vendor/wit-parser/tests/ui/parse-fail/async-bad2.wit +7 -0
  1690. data/rust-vendor/wit-parser/tests/ui/parse-fail/async-bad2.wit.result +5 -0
  1691. data/rust-vendor/wit-parser/tests/ui/parse-fail/async.wit.result +5 -0
  1692. data/rust-vendor/wit-parser/tests/ui/parse-fail/async1.wit.result +5 -0
  1693. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-deprecated1.wit +4 -0
  1694. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-deprecated1.wit.result +5 -0
  1695. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-deprecated2.wit +4 -0
  1696. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-deprecated2.wit.result +5 -0
  1697. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-deprecated3.wit +4 -0
  1698. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-deprecated3.wit.result +5 -0
  1699. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-deprecated4.wit +5 -0
  1700. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-deprecated4.wit.result +5 -0
  1701. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-function.wit +7 -0
  1702. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-function.wit.result +5 -0
  1703. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-function2.wit +7 -0
  1704. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-function2.wit.result +5 -0
  1705. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-gate1.wit +8 -0
  1706. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-gate1.wit.result +5 -0
  1707. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-gate2.wit +8 -0
  1708. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-gate2.wit.result +5 -0
  1709. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-gate3.wit +6 -0
  1710. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-gate3.wit.result +5 -0
  1711. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-gate4.wit +8 -0
  1712. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-gate4.wit.result +5 -0
  1713. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-gate5.wit +11 -0
  1714. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-gate5.wit.result +5 -0
  1715. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-include1.wit +5 -0
  1716. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-include1.wit.result +5 -0
  1717. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-include2.wit +9 -0
  1718. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-include2.wit.result +5 -0
  1719. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-include3.wit +5 -0
  1720. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-include3.wit.result +5 -0
  1721. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-list.wit +7 -0
  1722. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-list.wit.result +5 -0
  1723. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-list2.wit +7 -0
  1724. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-list2.wit.result +5 -0
  1725. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-list3.wit +7 -0
  1726. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-list3.wit.result +5 -0
  1727. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-list4.wit +7 -0
  1728. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-list4.wit.result +5 -0
  1729. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg1/root.wit +5 -0
  1730. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg1.wit.result +5 -0
  1731. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg2/deps/bar/empty.wit +1 -0
  1732. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg2/root.wit +5 -0
  1733. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg2.wit.result +5 -0
  1734. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg3/deps/bar/.gitkeep +0 -0
  1735. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg3/deps/bar/baz.wit +2 -0
  1736. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg3/root.wit +5 -0
  1737. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg3.wit.result +5 -0
  1738. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg4/deps/bar/.gitkeep +0 -0
  1739. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg4/deps/bar/baz.wit +4 -0
  1740. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg4/root.wit +4 -0
  1741. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg4.wit.result +5 -0
  1742. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg5/deps/bar/.gitkeep +0 -0
  1743. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg5/deps/bar/baz.wit +3 -0
  1744. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg5/root.wit +4 -0
  1745. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg5.wit.result +5 -0
  1746. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg6/deps/bar/.gitkeep +0 -0
  1747. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg6/deps/bar/baz.wit +4 -0
  1748. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg6/root.wit +4 -0
  1749. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg6.wit.result +8 -0
  1750. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource1.wit +5 -0
  1751. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource1.wit.result +5 -0
  1752. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource10.wit +5 -0
  1753. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource10.wit.result +5 -0
  1754. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource11.wit +5 -0
  1755. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource11.wit.result +5 -0
  1756. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource12.wit +6 -0
  1757. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource12.wit.result +5 -0
  1758. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource13.wit +6 -0
  1759. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource13.wit.result +5 -0
  1760. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource14.wit +7 -0
  1761. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource14.wit.result +5 -0
  1762. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource15/deps/foo/foo.wit +5 -0
  1763. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource15/foo.wit +7 -0
  1764. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource15.wit.result +5 -0
  1765. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource16.wit +7 -0
  1766. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource16.wit.result +5 -0
  1767. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource17.wit +8 -0
  1768. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource17.wit.result +5 -0
  1769. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource2.wit +5 -0
  1770. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource2.wit.result +5 -0
  1771. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource3.wit +6 -0
  1772. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource3.wit.result +5 -0
  1773. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource4.wit +6 -0
  1774. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource4.wit.result +5 -0
  1775. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource5.wit +7 -0
  1776. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource5.wit.result +5 -0
  1777. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource6.wit +7 -0
  1778. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource6.wit.result +5 -0
  1779. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource7.wit +8 -0
  1780. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource7.wit.result +5 -0
  1781. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource8.wit +8 -0
  1782. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource8.wit.result +5 -0
  1783. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource9.wit +7 -0
  1784. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource9.wit.result +5 -0
  1785. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-since1.wit +4 -0
  1786. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-since1.wit.result +5 -0
  1787. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-since3.wit +5 -0
  1788. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-since3.wit.result +5 -0
  1789. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-world-type1.wit +5 -0
  1790. data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-world-type1.wit.result +5 -0
  1791. data/rust-vendor/wit-parser/tests/ui/parse-fail/case-insensitive-duplicates.wit +9 -0
  1792. data/rust-vendor/wit-parser/tests/ui/parse-fail/case-insensitive-duplicates.wit.result +1 -0
  1793. data/rust-vendor/wit-parser/tests/ui/parse-fail/conflicting-package/a.wit +1 -0
  1794. data/rust-vendor/wit-parser/tests/ui/parse-fail/conflicting-package/b.wit +1 -0
  1795. data/rust-vendor/wit-parser/tests/ui/parse-fail/conflicting-package.wit.result +5 -0
  1796. data/rust-vendor/wit-parser/tests/ui/parse-fail/cycle.wit +6 -0
  1797. data/rust-vendor/wit-parser/tests/ui/parse-fail/cycle.wit.result +5 -0
  1798. data/rust-vendor/wit-parser/tests/ui/parse-fail/cycle2.wit +7 -0
  1799. data/rust-vendor/wit-parser/tests/ui/parse-fail/cycle2.wit.result +5 -0
  1800. data/rust-vendor/wit-parser/tests/ui/parse-fail/cycle3.wit +7 -0
  1801. data/rust-vendor/wit-parser/tests/ui/parse-fail/cycle3.wit.result +5 -0
  1802. data/rust-vendor/wit-parser/tests/ui/parse-fail/cycle4.wit +7 -0
  1803. data/rust-vendor/wit-parser/tests/ui/parse-fail/cycle4.wit.result +5 -0
  1804. data/rust-vendor/wit-parser/tests/ui/parse-fail/cycle5.wit +7 -0
  1805. data/rust-vendor/wit-parser/tests/ui/parse-fail/cycle5.wit.result +5 -0
  1806. data/rust-vendor/wit-parser/tests/ui/parse-fail/dangling-type.wit +5 -0
  1807. data/rust-vendor/wit-parser/tests/ui/parse-fail/dangling-type.wit.result +5 -0
  1808. data/rust-vendor/wit-parser/tests/ui/parse-fail/duplicate-function-params.wit +7 -0
  1809. data/rust-vendor/wit-parser/tests/ui/parse-fail/duplicate-function-params.wit.result +5 -0
  1810. data/rust-vendor/wit-parser/tests/ui/parse-fail/duplicate-functions.wit +8 -0
  1811. data/rust-vendor/wit-parser/tests/ui/parse-fail/duplicate-functions.wit.result +5 -0
  1812. data/rust-vendor/wit-parser/tests/ui/parse-fail/duplicate-interface.wit +6 -0
  1813. data/rust-vendor/wit-parser/tests/ui/parse-fail/duplicate-interface.wit.result +5 -0
  1814. data/rust-vendor/wit-parser/tests/ui/parse-fail/duplicate-interface2/foo.wit +3 -0
  1815. data/rust-vendor/wit-parser/tests/ui/parse-fail/duplicate-interface2/foo2.wit +3 -0
  1816. data/rust-vendor/wit-parser/tests/ui/parse-fail/duplicate-interface2.wit.result +5 -0
  1817. data/rust-vendor/wit-parser/tests/ui/parse-fail/duplicate-type.wit +7 -0
  1818. data/rust-vendor/wit-parser/tests/ui/parse-fail/duplicate-type.wit.result +5 -0
  1819. data/rust-vendor/wit-parser/tests/ui/parse-fail/empty-enum.wit +6 -0
  1820. data/rust-vendor/wit-parser/tests/ui/parse-fail/empty-enum.wit.result +5 -0
  1821. data/rust-vendor/wit-parser/tests/ui/parse-fail/empty-variant1.wit +6 -0
  1822. data/rust-vendor/wit-parser/tests/ui/parse-fail/empty-variant1.wit.result +5 -0
  1823. data/rust-vendor/wit-parser/tests/ui/parse-fail/export-twice.wit +8 -0
  1824. data/rust-vendor/wit-parser/tests/ui/parse-fail/export-twice.wit.result +5 -0
  1825. data/rust-vendor/wit-parser/tests/ui/parse-fail/import-and-export1.wit +17 -0
  1826. data/rust-vendor/wit-parser/tests/ui/parse-fail/import-and-export1.wit.result +5 -0
  1827. data/rust-vendor/wit-parser/tests/ui/parse-fail/import-and-export2.wit +18 -0
  1828. data/rust-vendor/wit-parser/tests/ui/parse-fail/import-and-export2.wit.result +5 -0
  1829. data/rust-vendor/wit-parser/tests/ui/parse-fail/import-and-export3.wit +37 -0
  1830. data/rust-vendor/wit-parser/tests/ui/parse-fail/import-and-export3.wit.result +5 -0
  1831. data/rust-vendor/wit-parser/tests/ui/parse-fail/import-and-export4.wit +44 -0
  1832. data/rust-vendor/wit-parser/tests/ui/parse-fail/import-and-export4.wit.result +5 -0
  1833. data/rust-vendor/wit-parser/tests/ui/parse-fail/import-and-export5.wit +18 -0
  1834. data/rust-vendor/wit-parser/tests/ui/parse-fail/import-and-export5.wit.result +5 -0
  1835. data/rust-vendor/wit-parser/tests/ui/parse-fail/import-twice.wit +8 -0
  1836. data/rust-vendor/wit-parser/tests/ui/parse-fail/import-twice.wit.result +5 -0
  1837. data/rust-vendor/wit-parser/tests/ui/parse-fail/include-cycle.wit +9 -0
  1838. data/rust-vendor/wit-parser/tests/ui/parse-fail/include-cycle.wit.result +5 -0
  1839. data/rust-vendor/wit-parser/tests/ui/parse-fail/include-foreign/deps/bar/empty.wit +3 -0
  1840. data/rust-vendor/wit-parser/tests/ui/parse-fail/include-foreign/root.wit +5 -0
  1841. data/rust-vendor/wit-parser/tests/ui/parse-fail/include-foreign.wit.result +5 -0
  1842. data/rust-vendor/wit-parser/tests/ui/parse-fail/include-with-id.wit +11 -0
  1843. data/rust-vendor/wit-parser/tests/ui/parse-fail/include-with-id.wit.result +5 -0
  1844. data/rust-vendor/wit-parser/tests/ui/parse-fail/include-with-on-id.wit +11 -0
  1845. data/rust-vendor/wit-parser/tests/ui/parse-fail/include-with-on-id.wit.result +5 -0
  1846. data/rust-vendor/wit-parser/tests/ui/parse-fail/invalid-toplevel.wit +5 -0
  1847. data/rust-vendor/wit-parser/tests/ui/parse-fail/invalid-toplevel.wit.result +5 -0
  1848. data/rust-vendor/wit-parser/tests/ui/parse-fail/invalid-type-reference.wit +10 -0
  1849. data/rust-vendor/wit-parser/tests/ui/parse-fail/invalid-type-reference.wit.result +5 -0
  1850. data/rust-vendor/wit-parser/tests/ui/parse-fail/invalid-type-reference2.wit +6 -0
  1851. data/rust-vendor/wit-parser/tests/ui/parse-fail/invalid-type-reference2.wit.result +5 -0
  1852. data/rust-vendor/wit-parser/tests/ui/parse-fail/kebab-name-include-not-found.wit +8 -0
  1853. data/rust-vendor/wit-parser/tests/ui/parse-fail/kebab-name-include-not-found.wit.result +5 -0
  1854. data/rust-vendor/wit-parser/tests/ui/parse-fail/kebab-name-include.wit +8 -0
  1855. data/rust-vendor/wit-parser/tests/ui/parse-fail/kebab-name-include.wit.result +5 -0
  1856. data/rust-vendor/wit-parser/tests/ui/parse-fail/keyword.wit +5 -0
  1857. data/rust-vendor/wit-parser/tests/ui/parse-fail/keyword.wit.result +5 -0
  1858. data/rust-vendor/wit-parser/tests/ui/parse-fail/map-invalid-key.wit +7 -0
  1859. data/rust-vendor/wit-parser/tests/ui/parse-fail/map-invalid-key.wit.result +5 -0
  1860. data/rust-vendor/wit-parser/tests/ui/parse-fail/missing-main-declaration-initial-main.wit +23 -0
  1861. data/rust-vendor/wit-parser/tests/ui/parse-fail/missing-main-declaration-initial-main.wit.result +1 -0
  1862. data/rust-vendor/wit-parser/tests/ui/parse-fail/missing-main-declaration-initial-nested.wit +23 -0
  1863. data/rust-vendor/wit-parser/tests/ui/parse-fail/missing-main-declaration-initial-nested.wit.result +1 -0
  1864. data/rust-vendor/wit-parser/tests/ui/parse-fail/missing-package.wit +0 -0
  1865. data/rust-vendor/wit-parser/tests/ui/parse-fail/missing-package.wit.result +1 -0
  1866. data/rust-vendor/wit-parser/tests/ui/parse-fail/multi-file-missing-delimiter/observe.wit +5 -0
  1867. data/rust-vendor/wit-parser/tests/ui/parse-fail/multi-file-missing-delimiter/world.wit +5 -0
  1868. data/rust-vendor/wit-parser/tests/ui/parse-fail/multi-file-missing-delimiter.wit.result +5 -0
  1869. data/rust-vendor/wit-parser/tests/ui/parse-fail/multi-package-deps-share-nest/deps/dep1/types.wit +12 -0
  1870. data/rust-vendor/wit-parser/tests/ui/parse-fail/multi-package-deps-share-nest/deps/dep2/types.wit +12 -0
  1871. data/rust-vendor/wit-parser/tests/ui/parse-fail/multi-package-deps-share-nest/root.wit +8 -0
  1872. data/rust-vendor/wit-parser/tests/ui/parse-fail/multi-package-deps-share-nest.wit.result +3 -0
  1873. data/rust-vendor/wit-parser/tests/ui/parse-fail/multiple-package-docs/a.wit +2 -0
  1874. data/rust-vendor/wit-parser/tests/ui/parse-fail/multiple-package-docs/b.wit +2 -0
  1875. data/rust-vendor/wit-parser/tests/ui/parse-fail/multiple-package-docs.wit.result +5 -0
  1876. data/rust-vendor/wit-parser/tests/ui/parse-fail/multiple-package-inline-cycle.wit +12 -0
  1877. data/rust-vendor/wit-parser/tests/ui/parse-fail/multiple-package-inline-cycle.wit.result +5 -0
  1878. data/rust-vendor/wit-parser/tests/ui/parse-fail/multiple-packages-no-scope-blocks.wit +15 -0
  1879. data/rust-vendor/wit-parser/tests/ui/parse-fail/multiple-packages-no-scope-blocks.wit.result +5 -0
  1880. data/rust-vendor/wit-parser/tests/ui/parse-fail/nested-packages-colliding-names.wit +5 -0
  1881. data/rust-vendor/wit-parser/tests/ui/parse-fail/nested-packages-colliding-names.wit.result +3 -0
  1882. data/rust-vendor/wit-parser/tests/ui/parse-fail/nested-packages-with-error.wit +14 -0
  1883. data/rust-vendor/wit-parser/tests/ui/parse-fail/nested-packages-with-error.wit.result +5 -0
  1884. data/rust-vendor/wit-parser/tests/ui/parse-fail/no-access-to-sibling-use/bar.wit +1 -0
  1885. data/rust-vendor/wit-parser/tests/ui/parse-fail/no-access-to-sibling-use/foo.wit +5 -0
  1886. data/rust-vendor/wit-parser/tests/ui/parse-fail/no-access-to-sibling-use.wit.result +5 -0
  1887. data/rust-vendor/wit-parser/tests/ui/parse-fail/non-existance-world-include/deps/bar/.gitkeep +0 -0
  1888. data/rust-vendor/wit-parser/tests/ui/parse-fail/non-existance-world-include/deps/bar/baz.wit +4 -0
  1889. data/rust-vendor/wit-parser/tests/ui/parse-fail/non-existance-world-include/root.wit +5 -0
  1890. data/rust-vendor/wit-parser/tests/ui/parse-fail/non-existance-world-include.wit.result +5 -0
  1891. data/rust-vendor/wit-parser/tests/ui/parse-fail/old-float-types.wit +5 -0
  1892. data/rust-vendor/wit-parser/tests/ui/parse-fail/old-float-types.wit.result +5 -0
  1893. data/rust-vendor/wit-parser/tests/ui/parse-fail/pkg-cycle/deps/a1/root.wit +4 -0
  1894. data/rust-vendor/wit-parser/tests/ui/parse-fail/pkg-cycle/root.wit +4 -0
  1895. data/rust-vendor/wit-parser/tests/ui/parse-fail/pkg-cycle.wit.result +5 -0
  1896. data/rust-vendor/wit-parser/tests/ui/parse-fail/pkg-cycle2/deps/a1/root.wit +4 -0
  1897. data/rust-vendor/wit-parser/tests/ui/parse-fail/pkg-cycle2/deps/a2/root.wit +4 -0
  1898. data/rust-vendor/wit-parser/tests/ui/parse-fail/pkg-cycle2/root.wit +4 -0
  1899. data/rust-vendor/wit-parser/tests/ui/parse-fail/pkg-cycle2.wit.result +5 -0
  1900. data/rust-vendor/wit-parser/tests/ui/parse-fail/resources-multiple-returns-borrow.wit +10 -0
  1901. data/rust-vendor/wit-parser/tests/ui/parse-fail/resources-multiple-returns-borrow.wit.result +5 -0
  1902. data/rust-vendor/wit-parser/tests/ui/parse-fail/resources-return-borrow.wit +10 -0
  1903. data/rust-vendor/wit-parser/tests/ui/parse-fail/resources-return-borrow.wit.result +5 -0
  1904. data/rust-vendor/wit-parser/tests/ui/parse-fail/return-borrow1.wit +7 -0
  1905. data/rust-vendor/wit-parser/tests/ui/parse-fail/return-borrow1.wit.result +5 -0
  1906. data/rust-vendor/wit-parser/tests/ui/parse-fail/return-borrow2.wit +8 -0
  1907. data/rust-vendor/wit-parser/tests/ui/parse-fail/return-borrow2.wit.result +5 -0
  1908. data/rust-vendor/wit-parser/tests/ui/parse-fail/return-borrow3.wit +7 -0
  1909. data/rust-vendor/wit-parser/tests/ui/parse-fail/return-borrow3.wit.result +5 -0
  1910. data/rust-vendor/wit-parser/tests/ui/parse-fail/return-borrow4.wit +7 -0
  1911. data/rust-vendor/wit-parser/tests/ui/parse-fail/return-borrow4.wit.result +5 -0
  1912. data/rust-vendor/wit-parser/tests/ui/parse-fail/return-borrow5.wit +7 -0
  1913. data/rust-vendor/wit-parser/tests/ui/parse-fail/return-borrow5.wit.result +5 -0
  1914. data/rust-vendor/wit-parser/tests/ui/parse-fail/return-borrow6.wit +7 -0
  1915. data/rust-vendor/wit-parser/tests/ui/parse-fail/return-borrow6.wit.result +5 -0
  1916. data/rust-vendor/wit-parser/tests/ui/parse-fail/return-borrow7.wit +11 -0
  1917. data/rust-vendor/wit-parser/tests/ui/parse-fail/return-borrow7.wit.result +5 -0
  1918. data/rust-vendor/wit-parser/tests/ui/parse-fail/return-borrow8/deps/baz.wit +9 -0
  1919. data/rust-vendor/wit-parser/tests/ui/parse-fail/return-borrow8/foo.wit +7 -0
  1920. data/rust-vendor/wit-parser/tests/ui/parse-fail/return-borrow8.wit.result +5 -0
  1921. data/rust-vendor/wit-parser/tests/ui/parse-fail/type-and-resource-same-name/deps/dep/foo.wit +5 -0
  1922. data/rust-vendor/wit-parser/tests/ui/parse-fail/type-and-resource-same-name/foo.wit +8 -0
  1923. data/rust-vendor/wit-parser/tests/ui/parse-fail/type-and-resource-same-name.wit.result +5 -0
  1924. data/rust-vendor/wit-parser/tests/ui/parse-fail/undefined-typed.wit +6 -0
  1925. data/rust-vendor/wit-parser/tests/ui/parse-fail/undefined-typed.wit.result +5 -0
  1926. data/rust-vendor/wit-parser/tests/ui/parse-fail/unknown-interface.wit +7 -0
  1927. data/rust-vendor/wit-parser/tests/ui/parse-fail/unknown-interface.wit.result +5 -0
  1928. data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-interface1.wit +7 -0
  1929. data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-interface1.wit.result +5 -0
  1930. data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-interface2.wit +8 -0
  1931. data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-interface2.wit.result +5 -0
  1932. data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-interface3.wit +5 -0
  1933. data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-interface3.wit.result +5 -0
  1934. data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-interface4.wit +7 -0
  1935. data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-interface4.wit.result +7 -0
  1936. data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-use1.wit +7 -0
  1937. data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-use1.wit.result +5 -0
  1938. data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-use10/bar.wit +5 -0
  1939. data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-use10/foo.wit +2 -0
  1940. data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-use10.wit.result +5 -0
  1941. data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-use2.wit +10 -0
  1942. data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-use2.wit.result +5 -0
  1943. data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-use3.wit +11 -0
  1944. data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-use3.wit.result +5 -0
  1945. data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-use7.wit +10 -0
  1946. data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-use7.wit.result +5 -0
  1947. data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-use8.wit +9 -0
  1948. data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-use8.wit.result +5 -0
  1949. data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-use9.wit +9 -0
  1950. data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-use9.wit.result +5 -0
  1951. data/rust-vendor/wit-parser/tests/ui/parse-fail/unterminated-string.wit.result +5 -0
  1952. data/rust-vendor/wit-parser/tests/ui/parse-fail/use-and-include-world/deps/bar/.gitkeep +0 -0
  1953. data/rust-vendor/wit-parser/tests/ui/parse-fail/use-and-include-world/deps/bar/baz.wit +4 -0
  1954. data/rust-vendor/wit-parser/tests/ui/parse-fail/use-and-include-world/root.wit +7 -0
  1955. data/rust-vendor/wit-parser/tests/ui/parse-fail/use-and-include-world.wit.result +5 -0
  1956. data/rust-vendor/wit-parser/tests/ui/parse-fail/use-conflict.wit +11 -0
  1957. data/rust-vendor/wit-parser/tests/ui/parse-fail/use-conflict.wit.result +5 -0
  1958. data/rust-vendor/wit-parser/tests/ui/parse-fail/use-conflict2.wit +13 -0
  1959. data/rust-vendor/wit-parser/tests/ui/parse-fail/use-conflict2.wit.result +5 -0
  1960. data/rust-vendor/wit-parser/tests/ui/parse-fail/use-conflict3.wit +13 -0
  1961. data/rust-vendor/wit-parser/tests/ui/parse-fail/use-conflict3.wit.result +5 -0
  1962. data/rust-vendor/wit-parser/tests/ui/parse-fail/use-cycle1.wit +7 -0
  1963. data/rust-vendor/wit-parser/tests/ui/parse-fail/use-cycle1.wit.result +5 -0
  1964. data/rust-vendor/wit-parser/tests/ui/parse-fail/use-cycle4.wit +14 -0
  1965. data/rust-vendor/wit-parser/tests/ui/parse-fail/use-cycle4.wit.result +5 -0
  1966. data/rust-vendor/wit-parser/tests/ui/parse-fail/use-shadow1.wit +7 -0
  1967. data/rust-vendor/wit-parser/tests/ui/parse-fail/use-shadow1.wit.result +5 -0
  1968. data/rust-vendor/wit-parser/tests/ui/parse-fail/use-world/deps/bar/.gitkeep +0 -0
  1969. data/rust-vendor/wit-parser/tests/ui/parse-fail/use-world/deps/bar/baz.wit +4 -0
  1970. data/rust-vendor/wit-parser/tests/ui/parse-fail/use-world/root.wit +7 -0
  1971. data/rust-vendor/wit-parser/tests/ui/parse-fail/use-world.wit.result +5 -0
  1972. data/rust-vendor/wit-parser/tests/ui/parse-fail/very-nested-packages.wit +8 -0
  1973. data/rust-vendor/wit-parser/tests/ui/parse-fail/very-nested-packages.wit.result +5 -0
  1974. data/rust-vendor/wit-parser/tests/ui/parse-fail/world-interface-clash.wit +3 -0
  1975. data/rust-vendor/wit-parser/tests/ui/parse-fail/world-interface-clash.wit.result +5 -0
  1976. data/rust-vendor/wit-parser/tests/ui/parse-fail/world-same-fields2.wit +8 -0
  1977. data/rust-vendor/wit-parser/tests/ui/parse-fail/world-same-fields2.wit.result +5 -0
  1978. data/rust-vendor/wit-parser/tests/ui/parse-fail/world-same-fields3.wit +8 -0
  1979. data/rust-vendor/wit-parser/tests/ui/parse-fail/world-same-fields3.wit.result +5 -0
  1980. data/rust-vendor/wit-parser/tests/ui/parse-fail/world-top-level-func.wit +5 -0
  1981. data/rust-vendor/wit-parser/tests/ui/parse-fail/world-top-level-func.wit.result +5 -0
  1982. data/rust-vendor/wit-parser/tests/ui/parse-fail/world-top-level-func2.wit +4 -0
  1983. data/rust-vendor/wit-parser/tests/ui/parse-fail/world-top-level-func2.wit.result +5 -0
  1984. data/rust-vendor/wit-parser/tests/ui/random.wit +27 -0
  1985. data/rust-vendor/wit-parser/tests/ui/random.wit.json +56 -0
  1986. data/rust-vendor/wit-parser/tests/ui/resources-empty.wit +10 -0
  1987. data/rust-vendor/wit-parser/tests/ui/resources-empty.wit.json +70 -0
  1988. data/rust-vendor/wit-parser/tests/ui/resources-multiple-returns-own.wit +10 -0
  1989. data/rust-vendor/wit-parser/tests/ui/resources-multiple-returns-own.wit.json +85 -0
  1990. data/rust-vendor/wit-parser/tests/ui/resources-multiple.wit +17 -0
  1991. data/rust-vendor/wit-parser/tests/ui/resources-multiple.wit.json +207 -0
  1992. data/rust-vendor/wit-parser/tests/ui/resources-return-own.wit +10 -0
  1993. data/rust-vendor/wit-parser/tests/ui/resources-return-own.wit.json +73 -0
  1994. data/rust-vendor/wit-parser/tests/ui/resources.wit +55 -0
  1995. data/rust-vendor/wit-parser/tests/ui/resources.wit.json +387 -0
  1996. data/rust-vendor/wit-parser/tests/ui/resources1.wit +12 -0
  1997. data/rust-vendor/wit-parser/tests/ui/resources1.wit.json +92 -0
  1998. data/rust-vendor/wit-parser/tests/ui/same-name-import-export.wit +6 -0
  1999. data/rust-vendor/wit-parser/tests/ui/same-name-import-export.wit.json +39 -0
  2000. data/rust-vendor/wit-parser/tests/ui/shared-types.wit +10 -0
  2001. data/rust-vendor/wit-parser/tests/ui/shared-types.wit.json +79 -0
  2002. data/rust-vendor/wit-parser/tests/ui/simple-wasm-text.wat +6 -0
  2003. data/rust-vendor/wit-parser/tests/ui/simple-wasm-text.wit.json +21 -0
  2004. data/rust-vendor/wit-parser/tests/ui/since-and-unstable.wit +107 -0
  2005. data/rust-vendor/wit-parser/tests/ui/since-and-unstable.wit.json +608 -0
  2006. data/rust-vendor/wit-parser/tests/ui/streams-and-futures.wit +15 -0
  2007. data/rust-vendor/wit-parser/tests/ui/streams-and-futures.wit.json +205 -0
  2008. data/rust-vendor/wit-parser/tests/ui/stress-export-elaborate.wit +54 -0
  2009. data/rust-vendor/wit-parser/tests/ui/stress-export-elaborate.wit.json +1156 -0
  2010. data/rust-vendor/wit-parser/tests/ui/type-then-eof.wit +5 -0
  2011. data/rust-vendor/wit-parser/tests/ui/type-then-eof.wit.json +28 -0
  2012. data/rust-vendor/wit-parser/tests/ui/types.wit +59 -0
  2013. data/rust-vendor/wit-parser/tests/ui/types.wit.json +768 -0
  2014. data/rust-vendor/wit-parser/tests/ui/union-fuzz-1.wit +9 -0
  2015. data/rust-vendor/wit-parser/tests/ui/union-fuzz-1.wit.json +35 -0
  2016. data/rust-vendor/wit-parser/tests/ui/union-fuzz-2.wit +12 -0
  2017. data/rust-vendor/wit-parser/tests/ui/union-fuzz-2.wit.json +62 -0
  2018. data/rust-vendor/wit-parser/tests/ui/unstable-resource.wit +17 -0
  2019. data/rust-vendor/wit-parser/tests/ui/unstable-resource.wit.json +44 -0
  2020. data/rust-vendor/wit-parser/tests/ui/use-chain.wit +11 -0
  2021. data/rust-vendor/wit-parser/tests/ui/use-chain.wit.json +53 -0
  2022. data/rust-vendor/wit-parser/tests/ui/use.wit +34 -0
  2023. data/rust-vendor/wit-parser/tests/ui/use.wit.json +168 -0
  2024. data/rust-vendor/wit-parser/tests/ui/version-syntax.wit +10 -0
  2025. data/rust-vendor/wit-parser/tests/ui/version-syntax.wit.json +57 -0
  2026. data/rust-vendor/wit-parser/tests/ui/versions/deps/a1/foo.wit +5 -0
  2027. data/rust-vendor/wit-parser/tests/ui/versions/deps/a2/foo.wit +5 -0
  2028. data/rust-vendor/wit-parser/tests/ui/versions/foo.wit +7 -0
  2029. data/rust-vendor/wit-parser/tests/ui/versions.wit.json +91 -0
  2030. data/rust-vendor/wit-parser/tests/ui/wasi.wit +178 -0
  2031. data/rust-vendor/wit-parser/tests/ui/wasi.wit.json +539 -0
  2032. data/rust-vendor/wit-parser/tests/ui/with-resource-as.wit +15 -0
  2033. data/rust-vendor/wit-parser/tests/ui/with-resource-as.wit.json +221 -0
  2034. data/rust-vendor/wit-parser/tests/ui/world-diamond.wit +23 -0
  2035. data/rust-vendor/wit-parser/tests/ui/world-diamond.wit.json +115 -0
  2036. data/rust-vendor/wit-parser/tests/ui/world-iface-no-collide.wit +11 -0
  2037. data/rust-vendor/wit-parser/tests/ui/world-iface-no-collide.wit.json +67 -0
  2038. data/rust-vendor/wit-parser/tests/ui/world-implicit-import1.wit +12 -0
  2039. data/rust-vendor/wit-parser/tests/ui/world-implicit-import1.wit.json +81 -0
  2040. data/rust-vendor/wit-parser/tests/ui/world-implicit-import2.wit +11 -0
  2041. data/rust-vendor/wit-parser/tests/ui/world-implicit-import2.wit.json +68 -0
  2042. data/rust-vendor/wit-parser/tests/ui/world-implicit-import3.wit +11 -0
  2043. data/rust-vendor/wit-parser/tests/ui/world-implicit-import3.wit.json +69 -0
  2044. data/rust-vendor/wit-parser/tests/ui/world-same-fields4.wit +13 -0
  2045. data/rust-vendor/wit-parser/tests/ui/world-same-fields4.wit.json +82 -0
  2046. data/rust-vendor/wit-parser/tests/ui/world-top-level-funcs.wit +9 -0
  2047. data/rust-vendor/wit-parser/tests/ui/world-top-level-funcs.wit.json +79 -0
  2048. data/rust-vendor/wit-parser/tests/ui/world-top-level-resources.wit +24 -0
  2049. data/rust-vendor/wit-parser/tests/ui/world-top-level-resources.wit.json +225 -0
  2050. data/rust-vendor/wit-parser/tests/ui/worlds-union-dedup.wit +23 -0
  2051. data/rust-vendor/wit-parser/tests/ui/worlds-union-dedup.wit.json +112 -0
  2052. data/rust-vendor/wit-parser/tests/ui/worlds-with-types.wit +34 -0
  2053. data/rust-vendor/wit-parser/tests/ui/worlds-with-types.wit.json +188 -0
  2054. data/rust-vendor/zerocopy/.cargo-checksum.json +1 -1
  2055. data/rust-vendor/zerocopy/.cargo_vcs_info.json +1 -2
  2056. data/rust-vendor/zerocopy/Cargo.lock +3 -3
  2057. data/rust-vendor/zerocopy/Cargo.toml +4 -4
  2058. data/rust-vendor/zerocopy/Cargo.toml.orig +4 -4
  2059. data/rust-vendor/zerocopy/agent_docs/reviewing.md +8 -0
  2060. data/rust-vendor/zerocopy/build.rs +1 -0
  2061. data/rust-vendor/zerocopy/ci/release_crate_version.sh +3 -0
  2062. data/rust-vendor/zerocopy/src/doctests.rs +18 -2
  2063. data/rust-vendor/zerocopy/src/impls.rs +7 -4
  2064. data/rust-vendor/zerocopy/src/lib.rs +60 -28
  2065. data/rust-vendor/zerocopy/src/macros.rs +24 -4
  2066. data/rust-vendor/zerocopy/src/pointer/invariant.rs +31 -3
  2067. data/rust-vendor/zerocopy/src/pointer/mod.rs +2 -2
  2068. data/rust-vendor/zerocopy/src/pointer/ptr.rs +3 -3
  2069. data/rust-vendor/zerocopy/src/util/macros.rs +21 -6
  2070. data/rust-vendor/zerocopy/tests/trybuild.rs +3 -18
  2071. data/rust-vendor/zerocopy-derive/.cargo-checksum.json +1 -1
  2072. data/rust-vendor/zerocopy-derive/.cargo_vcs_info.json +1 -1
  2073. data/rust-vendor/zerocopy-derive/Cargo.lock +1 -1
  2074. data/rust-vendor/zerocopy-derive/Cargo.toml +9 -2
  2075. data/rust-vendor/zerocopy-derive/Cargo.toml.orig +5 -2
  2076. data/rust-vendor/zerocopy-derive/src/derive/from_bytes.rs +9 -7
  2077. data/rust-vendor/zerocopy-derive/src/derive/into_bytes.rs +8 -4
  2078. data/rust-vendor/zerocopy-derive/src/derive/try_from_bytes.rs +52 -18
  2079. data/rust-vendor/zerocopy-derive/src/derive/unaligned.rs +3 -3
  2080. data/rust-vendor/zerocopy-derive/src/output_tests/expected/from_bytes_enum.expected.rs +7 -3
  2081. data/rust-vendor/zerocopy-derive/src/output_tests/expected/from_bytes_struct.expected.rs +7 -3
  2082. data/rust-vendor/zerocopy-derive/src/output_tests/expected/from_bytes_union.expected.rs +7 -3
  2083. data/rust-vendor/zerocopy-derive/src/output_tests/expected/from_zeros.expected.rs +7 -3
  2084. data/rust-vendor/zerocopy-derive/src/output_tests/expected/try_from_bytes.expected.rs +7 -3
  2085. data/rust-vendor/zerocopy-derive/src/output_tests/expected/try_from_bytes_enum_1.expected.rs +22 -10
  2086. data/rust-vendor/zerocopy-derive/src/output_tests/expected/try_from_bytes_enum_2.expected.rs +22 -10
  2087. data/rust-vendor/zerocopy-derive/src/output_tests/expected/try_from_bytes_enum_3.expected.rs +22 -10
  2088. data/rust-vendor/zerocopy-derive/src/output_tests/expected/try_from_bytes_trivial_is_bit_valid_enum.expected.rs +7 -3
  2089. data/rust-vendor/zerocopy-derive/src/util.rs +72 -5
  2090. data/rust-vendor/zerocopy-derive/tests/on_error.rs +169 -0
  2091. data/rust-vendor/zerocopy-derive/tests/trybuild.rs +9 -7
  2092. data/rust-vendor/zerocopy-derive/tests/ui-msrv/cfgs/on_error.rs +19 -0
  2093. data/rust-vendor/zerocopy-derive/tests/ui-msrv/cfgs/on_error.stderr +16 -0
  2094. data/rust-vendor/zerocopy-derive/tests/ui-msrv/{union_into_bytes_cfg → cfgs}/union_into_bytes_cfg.stderr +1 -1
  2095. data/rust-vendor/zerocopy-derive/tests/ui-nightly/cfgs/on_error.rs +19 -0
  2096. data/rust-vendor/zerocopy-derive/tests/ui-nightly/cfgs/on_error.stderr +31 -0
  2097. data/rust-vendor/zerocopy-derive/tests/ui-nightly/cfgs/union_into_bytes_cfg.stderr +8 -0
  2098. data/rust-vendor/zerocopy-derive/tests/ui-nightly/union.stderr +0 -14
  2099. data/rust-vendor/zerocopy-derive/tests/ui-stable/cfgs/on_error.rs +19 -0
  2100. data/rust-vendor/zerocopy-derive/tests/ui-stable/cfgs/on_error.stderr +27 -0
  2101. data/rust-vendor/zerocopy-derive/tests/ui-stable/cfgs/union_into_bytes_cfg.stderr +8 -0
  2102. data/rust-vendor/zerocopy-derive/tests/ui-stable/union.stderr +0 -14
  2103. data/rust-vendor/zmij/.cargo-checksum.json +1 -1
  2104. data/rust-vendor/zmij/.cargo_vcs_info.json +1 -1
  2105. data/rust-vendor/zmij/.github/workflows/ci.yml +9 -6
  2106. data/rust-vendor/zmij/Cargo.lock +281 -58
  2107. data/rust-vendor/zmij/Cargo.toml +3 -3
  2108. data/rust-vendor/zmij/Cargo.toml.orig +3 -3
  2109. data/rust-vendor/zmij/README.md +1 -1
  2110. data/rust-vendor/zmij/src/lib.rs +124 -79
  2111. data/rust-vendor/zmij/src/tests.rs +11 -5
  2112. data/rust-vendor/zmij/tests/ryu_comparison.rs +3 -3
  2113. metadata +1841 -55
  2114. data/rust-vendor/libc/src/qurt/hexagon.rs +0 -340
  2115. data/rust-vendor/regex/.vim/coc-settings.json +0 -6
  2116. data/rust-vendor/regex/Cross.toml +0 -7
  2117. data/rust-vendor/regex/rustfmt.toml +0 -2
  2118. data/rust-vendor/regex/test +0 -46
  2119. data/rust-vendor/regex/testdata/README.md +0 -22
  2120. data/rust-vendor/regex/testdata/fowler/basic.toml +0 -1611
  2121. data/rust-vendor/regex/testdata/fowler/dat/README +0 -25
  2122. data/rust-vendor/regex/testdata/fowler/dat/basic.dat +0 -223
  2123. data/rust-vendor/regex/testdata/fowler/dat/nullsubexpr.dat +0 -74
  2124. data/rust-vendor/regex/testdata/fowler/dat/repetition.dat +0 -169
  2125. data/rust-vendor/regex/testdata/fowler/nullsubexpr.toml +0 -405
  2126. data/rust-vendor/regex/testdata/fowler/repetition.toml +0 -746
  2127. data/rust-vendor/regex-automata/test +0 -95
  2128. data/rust-vendor/regex-automata/tests/fuzz/mod.rs +0 -2
  2129. data/rust-vendor/regex-automata/tests/fuzz/testdata/deserialize_dense_crash-9486fb7c8a93b12c12a62166b43d31640c0208a9 +0 -0
  2130. data/rust-vendor/regex-automata/tests/fuzz/testdata/deserialize_dense_minimized-from-9486fb7c8a93b12c12a62166b43d31640c0208a9 +0 -0
  2131. data/rust-vendor/regex-automata/tests/fuzz/testdata/deserialize_sparse_crash-0da59c0434eaf35e5a6b470fa9244bb79c72b000 +0 -0
  2132. data/rust-vendor/regex-automata/tests/fuzz/testdata/deserialize_sparse_crash-18cfc246f2ddfc3dfc92b0c7893178c7cf65efa9 +0 -0
  2133. data/rust-vendor/regex-automata/tests/fuzz/testdata/deserialize_sparse_crash-61fd8e3003bf9d99f6c1e5a8488727eefd234b98 +0 -0
  2134. data/rust-vendor/regex-automata/tests/fuzz/testdata/deserialize_sparse_crash-a1b839d899ced76d5d7d0f78f9edb7a421505838 +0 -0
  2135. data/rust-vendor/regex-automata/tests/fuzz/testdata/deserialize_sparse_crash-c383ae07ec5e191422eadc492117439011816570 +0 -0
  2136. data/rust-vendor/regex-automata/tests/fuzz/testdata/deserialize_sparse_crash-d07703ceb94b10dcd9e4acb809f2051420449e2b +0 -0
  2137. data/rust-vendor/regex-automata/tests/fuzz/testdata/deserialize_sparse_crash-dbb8172d3984e7e7d03f4b5f8bb86ecd1460eff9 +0 -0
  2138. data/rust-vendor/regex-automata/tests/gen/README.md +0 -65
  2139. data/rust-vendor/regex-automata/tests/gen/dense/multi_pattern_v2_fwd.bigendian.dfa +0 -0
  2140. data/rust-vendor/regex-automata/tests/gen/dense/multi_pattern_v2_fwd.littleendian.dfa +0 -0
  2141. data/rust-vendor/regex-automata/tests/gen/dense/multi_pattern_v2_rev.bigendian.dfa +0 -0
  2142. data/rust-vendor/regex-automata/tests/gen/dense/multi_pattern_v2_rev.littleendian.dfa +0 -0
  2143. data/rust-vendor/regex-automata/tests/gen/sparse/multi_pattern_v2_fwd.bigendian.dfa +0 -0
  2144. data/rust-vendor/regex-automata/tests/gen/sparse/multi_pattern_v2_fwd.littleendian.dfa +0 -0
  2145. data/rust-vendor/regex-automata/tests/gen/sparse/multi_pattern_v2_rev.bigendian.dfa +0 -0
  2146. data/rust-vendor/regex-automata/tests/gen/sparse/multi_pattern_v2_rev.littleendian.dfa +0 -0
  2147. data/rust-vendor/regex-syntax/benches/bench.rs +0 -63
  2148. data/rust-vendor/regex-syntax/test +0 -30
  2149. data/rust-vendor/zerocopy/tests/ui-msrv/invalid-impls/invalid-impls.rs +0 -31
  2150. data/rust-vendor/zerocopy/tests/ui-msrv/invalid-impls/invalid-impls.stderr +0 -159
  2151. data/rust-vendor/zerocopy/tests/ui-nightly/invalid-impls/invalid-impls.rs +0 -31
  2152. data/rust-vendor/zerocopy/tests/ui-nightly/invalid-impls/invalid-impls.stderr +0 -139
  2153. data/rust-vendor/zerocopy/tests/ui-stable/invalid-impls/invalid-impls.rs +0 -31
  2154. data/rust-vendor/zerocopy/tests/ui-stable/invalid-impls/invalid-impls.stderr +0 -155
  2155. data/rust-vendor/zerocopy-derive/tests/ui-nightly/union_into_bytes_cfg/union_into_bytes_cfg.stderr +0 -22
  2156. data/rust-vendor/zerocopy-derive/tests/ui-stable/union_into_bytes_cfg/union_into_bytes_cfg.stderr +0 -22
  2157. /data/rust-vendor/{getrandom → getrandom-0.3.4}/src/backends/sanitizer.rs +0 -0
  2158. /data/rust-vendor/{getrandom → getrandom-0.3.4}/src/backends/wasi_p2.rs +0 -0
  2159. /data/rust-vendor/{getrandom → getrandom-0.3.4}/src/lazy.rs +0 -0
  2160. /data/rust-vendor/{getrandom → getrandom-0.3.4}/src/util_libc.rs +0 -0
  2161. /data/rust-vendor/{wit-bindgen → wit-bindgen-0.46.0}/src/rt/wit_bindgen_cabi.c +0 -0
  2162. /data/rust-vendor/{wit-bindgen → wit-bindgen-0.46.0}/src/rt/wit_bindgen_cabi.o +0 -0
  2163. /data/rust-vendor/zerocopy-derive/tests/ui-msrv/{union_into_bytes_cfg → cfgs}/union_into_bytes_cfg.rs +0 -0
  2164. /data/rust-vendor/zerocopy-derive/tests/ui-nightly/{union_into_bytes_cfg → cfgs}/union_into_bytes_cfg.rs +0 -0
  2165. /data/rust-vendor/zerocopy-derive/tests/ui-stable/{union_into_bytes_cfg → cfgs}/union_into_bytes_cfg.rs +0 -0
@@ -0,0 +1,2526 @@
1
+ use std::fmt;
2
+ use std::iter;
3
+
4
+ pub use wit_parser::abi::{AbiVariant, FlatTypes, WasmSignature, WasmType};
5
+ use wit_parser::{
6
+ Alignment, ArchitectureSize, ElementInfo, Enum, Flags, FlagsRepr, Function, Handle, Int,
7
+ Record, Resolve, Result_, SizeAlign, Tuple, Type, TypeDefKind, TypeId, Variant, align_to_arch,
8
+ };
9
+
10
+ // Helper macro for defining instructions without having to have tons of
11
+ // exhaustive `match` statements to update
12
+ macro_rules! def_instruction {
13
+ (
14
+ $( #[$enum_attr:meta] )*
15
+ pub enum $name:ident<'a> {
16
+ $(
17
+ $( #[$attr:meta] )*
18
+ $variant:ident $( {
19
+ $($field:ident : $field_ty:ty $(,)* )*
20
+ } )?
21
+ :
22
+ [$num_popped:expr] => [$num_pushed:expr],
23
+ )*
24
+ }
25
+ ) => {
26
+ $( #[$enum_attr] )*
27
+ pub enum $name<'a> {
28
+ $(
29
+ $( #[$attr] )*
30
+ $variant $( {
31
+ $(
32
+ $field : $field_ty,
33
+ )*
34
+ } )? ,
35
+ )*
36
+ }
37
+
38
+ impl $name<'_> {
39
+ /// How many operands does this instruction pop from the stack?
40
+ #[allow(unused_variables, reason = "match arms bind fields for exhaustiveness, not usage")]
41
+ pub fn operands_len(&self) -> usize {
42
+ match self {
43
+ $(
44
+ Self::$variant $( {
45
+ $(
46
+ $field,
47
+ )*
48
+ } )? => $num_popped,
49
+ )*
50
+ }
51
+ }
52
+
53
+ /// How many results does this instruction push onto the stack?
54
+ #[allow(unused_variables, reason = "match arms bind fields for exhaustiveness, not usage")]
55
+ pub fn results_len(&self) -> usize {
56
+ match self {
57
+ $(
58
+ Self::$variant $( {
59
+ $(
60
+ $field,
61
+ )*
62
+ } )? => $num_pushed,
63
+ )*
64
+ }
65
+ }
66
+ }
67
+ };
68
+ }
69
+
70
+ def_instruction! {
71
+ #[derive(Debug)]
72
+ pub enum Instruction<'a> {
73
+ /// Acquires the specified parameter and places it on the stack.
74
+ /// Depending on the context this may refer to wasm parameters or
75
+ /// interface types parameters.
76
+ GetArg { nth: usize } : [0] => [1],
77
+
78
+ // Integer const/manipulation instructions
79
+
80
+ /// Pushes the constant `val` onto the stack.
81
+ I32Const { val: i32 } : [0] => [1],
82
+ /// Casts the top N items on the stack using the `Bitcast` enum
83
+ /// provided. Consumes the same number of operands that this produces.
84
+ Bitcasts { casts: &'a [Bitcast] } : [casts.len()] => [casts.len()],
85
+ /// Pushes a number of constant zeros for each wasm type on the stack.
86
+ ConstZero { tys: &'a [WasmType] } : [0] => [tys.len()],
87
+
88
+ // Memory load/store instructions
89
+
90
+ /// Pops a pointer from the stack and loads a little-endian `i32` from
91
+ /// it, using the specified constant offset.
92
+ I32Load { offset: ArchitectureSize } : [1] => [1],
93
+ /// Pops a pointer from the stack and loads a little-endian `i8` from
94
+ /// it, using the specified constant offset. The value loaded is the
95
+ /// zero-extended to 32-bits
96
+ I32Load8U { offset: ArchitectureSize } : [1] => [1],
97
+ /// Pops a pointer from the stack and loads a little-endian `i8` from
98
+ /// it, using the specified constant offset. The value loaded is the
99
+ /// sign-extended to 32-bits
100
+ I32Load8S { offset: ArchitectureSize } : [1] => [1],
101
+ /// Pops a pointer from the stack and loads a little-endian `i16` from
102
+ /// it, using the specified constant offset. The value loaded is the
103
+ /// zero-extended to 32-bits
104
+ I32Load16U { offset: ArchitectureSize } : [1] => [1],
105
+ /// Pops a pointer from the stack and loads a little-endian `i16` from
106
+ /// it, using the specified constant offset. The value loaded is the
107
+ /// sign-extended to 32-bits
108
+ I32Load16S { offset: ArchitectureSize } : [1] => [1],
109
+ /// Pops a pointer from the stack and loads a little-endian `i64` from
110
+ /// it, using the specified constant offset.
111
+ I64Load { offset: ArchitectureSize } : [1] => [1],
112
+ /// Pops a pointer from the stack and loads a little-endian `f32` from
113
+ /// it, using the specified constant offset.
114
+ F32Load { offset: ArchitectureSize } : [1] => [1],
115
+ /// Pops a pointer from the stack and loads a little-endian `f64` from
116
+ /// it, using the specified constant offset.
117
+ F64Load { offset: ArchitectureSize } : [1] => [1],
118
+
119
+ /// Like `I32Load` or `I64Load`, but for loading pointer values.
120
+ PointerLoad { offset: ArchitectureSize } : [1] => [1],
121
+ /// Like `I32Load` or `I64Load`, but for loading array length values.
122
+ LengthLoad { offset: ArchitectureSize } : [1] => [1],
123
+
124
+ /// Pops a pointer from the stack and then an `i32` value.
125
+ /// Stores the value in little-endian at the pointer specified plus the
126
+ /// constant `offset`.
127
+ I32Store { offset: ArchitectureSize } : [2] => [0],
128
+ /// Pops a pointer from the stack and then an `i32` value.
129
+ /// Stores the low 8 bits of the value in little-endian at the pointer
130
+ /// specified plus the constant `offset`.
131
+ I32Store8 { offset: ArchitectureSize } : [2] => [0],
132
+ /// Pops a pointer from the stack and then an `i32` value.
133
+ /// Stores the low 16 bits of the value in little-endian at the pointer
134
+ /// specified plus the constant `offset`.
135
+ I32Store16 { offset: ArchitectureSize } : [2] => [0],
136
+ /// Pops a pointer from the stack and then an `i64` value.
137
+ /// Stores the value in little-endian at the pointer specified plus the
138
+ /// constant `offset`.
139
+ I64Store { offset: ArchitectureSize } : [2] => [0],
140
+ /// Pops a pointer from the stack and then an `f32` value.
141
+ /// Stores the value in little-endian at the pointer specified plus the
142
+ /// constant `offset`.
143
+ F32Store { offset: ArchitectureSize } : [2] => [0],
144
+ /// Pops a pointer from the stack and then an `f64` value.
145
+ /// Stores the value in little-endian at the pointer specified plus the
146
+ /// constant `offset`.
147
+ F64Store { offset: ArchitectureSize } : [2] => [0],
148
+
149
+ /// Like `I32Store` or `I64Store`, but for storing pointer values.
150
+ PointerStore { offset: ArchitectureSize } : [2] => [0],
151
+ /// Like `I32Store` or `I64Store`, but for storing array length values.
152
+ LengthStore { offset: ArchitectureSize } : [2] => [0],
153
+
154
+ // Scalar lifting/lowering
155
+
156
+ /// Converts an interface type `char` value to a 32-bit integer
157
+ /// representing the unicode scalar value.
158
+ I32FromChar : [1] => [1],
159
+ /// Converts an interface type `u64` value to a wasm `i64`.
160
+ I64FromU64 : [1] => [1],
161
+ /// Converts an interface type `s64` value to a wasm `i64`.
162
+ I64FromS64 : [1] => [1],
163
+ /// Converts an interface type `u32` value to a wasm `i32`.
164
+ I32FromU32 : [1] => [1],
165
+ /// Converts an interface type `s32` value to a wasm `i32`.
166
+ I32FromS32 : [1] => [1],
167
+ /// Converts an interface type `u16` value to a wasm `i32`.
168
+ I32FromU16 : [1] => [1],
169
+ /// Converts an interface type `s16` value to a wasm `i32`.
170
+ I32FromS16 : [1] => [1],
171
+ /// Converts an interface type `u8` value to a wasm `i32`.
172
+ I32FromU8 : [1] => [1],
173
+ /// Converts an interface type `s8` value to a wasm `i32`.
174
+ I32FromS8 : [1] => [1],
175
+ /// Conversion an interface type `f32` value to a wasm `f32`.
176
+ ///
177
+ /// This may be a noop for some implementations, but it's here in case the
178
+ /// native language representation of `f32` is different than the wasm
179
+ /// representation of `f32`.
180
+ CoreF32FromF32 : [1] => [1],
181
+ /// Conversion an interface type `f64` value to a wasm `f64`.
182
+ ///
183
+ /// This may be a noop for some implementations, but it's here in case the
184
+ /// native language representation of `f64` is different than the wasm
185
+ /// representation of `f64`.
186
+ CoreF64FromF64 : [1] => [1],
187
+
188
+ /// Converts a native wasm `i32` to an interface type `s8`.
189
+ ///
190
+ /// This will truncate the upper bits of the `i32`.
191
+ S8FromI32 : [1] => [1],
192
+ /// Converts a native wasm `i32` to an interface type `u8`.
193
+ ///
194
+ /// This will truncate the upper bits of the `i32`.
195
+ U8FromI32 : [1] => [1],
196
+ /// Converts a native wasm `i32` to an interface type `s16`.
197
+ ///
198
+ /// This will truncate the upper bits of the `i32`.
199
+ S16FromI32 : [1] => [1],
200
+ /// Converts a native wasm `i32` to an interface type `u16`.
201
+ ///
202
+ /// This will truncate the upper bits of the `i32`.
203
+ U16FromI32 : [1] => [1],
204
+ /// Converts a native wasm `i32` to an interface type `s32`.
205
+ S32FromI32 : [1] => [1],
206
+ /// Converts a native wasm `i32` to an interface type `u32`.
207
+ U32FromI32 : [1] => [1],
208
+ /// Converts a native wasm `i64` to an interface type `s64`.
209
+ S64FromI64 : [1] => [1],
210
+ /// Converts a native wasm `i64` to an interface type `u64`.
211
+ U64FromI64 : [1] => [1],
212
+ /// Converts a native wasm `i32` to an interface type `char`.
213
+ ///
214
+ /// It's safe to assume that the `i32` is indeed a valid unicode code point.
215
+ CharFromI32 : [1] => [1],
216
+ /// Converts a native wasm `f32` to an interface type `f32`.
217
+ F32FromCoreF32 : [1] => [1],
218
+ /// Converts a native wasm `f64` to an interface type `f64`.
219
+ F64FromCoreF64 : [1] => [1],
220
+
221
+ /// Creates a `bool` from an `i32` input, trapping if the `i32` isn't
222
+ /// zero or one.
223
+ BoolFromI32 : [1] => [1],
224
+ /// Creates an `i32` from a `bool` input, must return 0 or 1.
225
+ I32FromBool : [1] => [1],
226
+
227
+ // lists
228
+
229
+ /// Lowers a list where the element's layout in the native language is
230
+ /// expected to match the canonical ABI definition of interface types.
231
+ ///
232
+ /// Pops a list value from the stack and pushes the pointer/length onto
233
+ /// the stack. If `realloc` is set to `Some` then this is expected to
234
+ /// *consume* the list which means that the data needs to be copied. An
235
+ /// allocation/copy is expected when:
236
+ ///
237
+ /// * A host is calling a wasm export with a list (it needs to copy the
238
+ /// list in to the callee's module, allocating space with `realloc`)
239
+ /// * A wasm export is returning a list (it's expected to use `realloc`
240
+ /// to give ownership of the list to the caller.
241
+ /// * A host is returning a list in a import definition, meaning that
242
+ /// space needs to be allocated in the caller with `realloc`).
243
+ ///
244
+ /// A copy does not happen (e.g. `realloc` is `None`) when:
245
+ ///
246
+ /// * A wasm module calls an import with the list. In this situation
247
+ /// it's expected the caller will know how to access this module's
248
+ /// memory (e.g. the host has raw access or wasm-to-wasm communication
249
+ /// would copy the list).
250
+ ///
251
+ /// If `realloc` is `Some` then the adapter is not responsible for
252
+ /// cleaning up this list because the other end is receiving the
253
+ /// allocation. If `realloc` is `None` then the adapter is responsible
254
+ /// for cleaning up any temporary allocation it created, if any.
255
+ ListCanonLower {
256
+ element: &'a Type,
257
+ realloc: Option<&'a str>,
258
+ } : [1] => [2],
259
+
260
+ /// Same as `ListCanonLower`, but used for strings
261
+ StringLower {
262
+ realloc: Option<&'a str>,
263
+ } : [1] => [2],
264
+
265
+ /// Lowers a list where the element's layout in the native language is
266
+ /// not expected to match the canonical ABI definition of interface
267
+ /// types.
268
+ ///
269
+ /// Pops a list value from the stack and pushes the pointer/length onto
270
+ /// the stack. This operation also pops a block from the block stack
271
+ /// which is used as the iteration body of writing each element of the
272
+ /// list consumed.
273
+ ///
274
+ /// The `realloc` field here behaves the same way as `ListCanonLower`.
275
+ /// It's only set to `None` when a wasm module calls a declared import.
276
+ /// Otherwise lowering in other contexts requires allocating memory for
277
+ /// the receiver to own.
278
+ ListLower {
279
+ element: &'a Type,
280
+ realloc: Option<&'a str>,
281
+ } : [1] => [2],
282
+
283
+ /// Lifts a list which has a canonical representation into an interface
284
+ /// types value.
285
+ ///
286
+ /// The term "canonical" representation here means that the
287
+ /// representation of the interface types value in the native language
288
+ /// exactly matches the canonical ABI definition of the type.
289
+ ///
290
+ /// This will consume two `i32` values from the stack, a pointer and a
291
+ /// length, and then produces an interface value list.
292
+ ListCanonLift {
293
+ element: &'a Type,
294
+ ty: TypeId,
295
+ } : [2] => [1],
296
+
297
+ /// Same as `ListCanonLift`, but used for strings
298
+ StringLift : [2] => [1],
299
+
300
+ /// Lifts a list which into an interface types value.
301
+ ///
302
+ /// This will consume two `i32` values from the stack, a pointer and a
303
+ /// length, and then produces an interface value list.
304
+ ///
305
+ /// This will also pop a block from the block stack which is how to
306
+ /// read each individual element from the list.
307
+ ListLift {
308
+ element: &'a Type,
309
+ ty: TypeId,
310
+ } : [2] => [1],
311
+
312
+ /// Pushes an operand onto the stack representing the list item from
313
+ /// each iteration of the list.
314
+ ///
315
+ /// This is only used inside of blocks related to lowering lists.
316
+ IterElem { element: &'a Type } : [0] => [1],
317
+
318
+ /// Pushes an operand onto the stack representing the base pointer of
319
+ /// the next element in a list.
320
+ ///
321
+ /// This is used for both lifting and lowering lists.
322
+ IterBasePointer : [0] => [1],
323
+
324
+ // records and tuples
325
+
326
+ /// Pops a record value off the stack, decomposes the record to all of
327
+ /// its fields, and then pushes the fields onto the stack.
328
+ RecordLower {
329
+ record: &'a Record,
330
+ name: &'a str,
331
+ ty: TypeId,
332
+ } : [1] => [record.fields.len()],
333
+
334
+ /// Pops all fields for a record off the stack and then composes them
335
+ /// into a record.
336
+ RecordLift {
337
+ record: &'a Record,
338
+ name: &'a str,
339
+ ty: TypeId,
340
+ } : [record.fields.len()] => [1],
341
+
342
+ /// Create an `i32` from a handle.
343
+ HandleLower {
344
+ handle: &'a Handle,
345
+ name: &'a str,
346
+ ty: TypeId,
347
+ } : [1] => [1],
348
+
349
+ /// Create a handle from an `i32`.
350
+ HandleLift {
351
+ handle: &'a Handle,
352
+ name: &'a str,
353
+ ty: TypeId,
354
+ } : [1] => [1],
355
+
356
+ /// Create an `i32` from a future.
357
+ FutureLower {
358
+ payload: &'a Option<Type>,
359
+ ty: TypeId,
360
+ } : [1] => [1],
361
+
362
+ /// Create a future from an `i32`.
363
+ FutureLift {
364
+ payload: &'a Option<Type>,
365
+ ty: TypeId,
366
+ } : [1] => [1],
367
+
368
+ /// Create an `i32` from a stream.
369
+ StreamLower {
370
+ payload: &'a Option<Type>,
371
+ ty: TypeId,
372
+ } : [1] => [1],
373
+
374
+ /// Create a stream from an `i32`.
375
+ StreamLift {
376
+ payload: &'a Option<Type>,
377
+ ty: TypeId,
378
+ } : [1] => [1],
379
+
380
+ /// Create an `i32` from an error-context.
381
+ ErrorContextLower : [1] => [1],
382
+
383
+ /// Create a error-context from an `i32`.
384
+ ErrorContextLift : [1] => [1],
385
+
386
+ /// Pops a tuple value off the stack, decomposes the tuple to all of
387
+ /// its fields, and then pushes the fields onto the stack.
388
+ TupleLower {
389
+ tuple: &'a Tuple,
390
+ ty: TypeId,
391
+ } : [1] => [tuple.types.len()],
392
+
393
+ /// Pops all fields for a tuple off the stack and then composes them
394
+ /// into a tuple.
395
+ TupleLift {
396
+ tuple: &'a Tuple,
397
+ ty: TypeId,
398
+ } : [tuple.types.len()] => [1],
399
+
400
+ /// Converts a language-specific record-of-bools to a list of `i32`.
401
+ FlagsLower {
402
+ flags: &'a Flags,
403
+ name: &'a str,
404
+ ty: TypeId,
405
+ } : [1] => [flags.repr().count()],
406
+ /// Converts a list of native wasm `i32` to a language-specific
407
+ /// record-of-bools.
408
+ FlagsLift {
409
+ flags: &'a Flags,
410
+ name: &'a str,
411
+ ty: TypeId,
412
+ } : [flags.repr().count()] => [1],
413
+
414
+ // variants
415
+
416
+ /// This is a special instruction used for `VariantLower`
417
+ /// instruction to determine the name of the payload, if present, to use
418
+ /// within each block.
419
+ ///
420
+ /// Each sub-block will have this be the first instruction, and if it
421
+ /// lowers a payload it will expect something bound to this name.
422
+ VariantPayloadName : [0] => [1],
423
+
424
+ /// Pops a variant off the stack as well as `ty.cases.len()` blocks
425
+ /// from the code generator. Uses each of those blocks and the value
426
+ /// from the stack to produce `nresults` of items.
427
+ VariantLower {
428
+ variant: &'a Variant,
429
+ name: &'a str,
430
+ ty: TypeId,
431
+ results: &'a [WasmType],
432
+ } : [1] => [results.len()],
433
+
434
+ /// Pops an `i32` off the stack as well as `ty.cases.len()` blocks
435
+ /// from the code generator. Uses each of those blocks and the value
436
+ /// from the stack to produce a final variant.
437
+ VariantLift {
438
+ variant: &'a Variant,
439
+ name: &'a str,
440
+ ty: TypeId,
441
+ } : [1] => [1],
442
+
443
+ /// Pops an enum off the stack and pushes the `i32` representation.
444
+ EnumLower {
445
+ enum_: &'a Enum,
446
+ name: &'a str,
447
+ ty: TypeId,
448
+ } : [1] => [1],
449
+
450
+ /// Pops an `i32` off the stack and lifts it into the `enum` specified.
451
+ EnumLift {
452
+ enum_: &'a Enum,
453
+ name: &'a str,
454
+ ty: TypeId,
455
+ } : [1] => [1],
456
+
457
+ /// Specialization of `VariantLower` for specifically `option<T>` types,
458
+ /// otherwise behaves the same as `VariantLower` (e.g. two blocks for
459
+ /// the two cases.
460
+ OptionLower {
461
+ payload: &'a Type,
462
+ ty: TypeId,
463
+ results: &'a [WasmType],
464
+ } : [1] => [results.len()],
465
+
466
+ /// Specialization of `VariantLift` for specifically the `option<T>`
467
+ /// type. Otherwise behaves the same as the `VariantLift` instruction
468
+ /// with two blocks for the lift.
469
+ OptionLift {
470
+ payload: &'a Type,
471
+ ty: TypeId,
472
+ } : [1] => [1],
473
+
474
+ /// Specialization of `VariantLower` for specifically `result<T, E>`
475
+ /// types, otherwise behaves the same as `VariantLower` (e.g. two blocks
476
+ /// for the two cases.
477
+ ResultLower {
478
+ result: &'a Result_
479
+ ty: TypeId,
480
+ results: &'a [WasmType],
481
+ } : [1] => [results.len()],
482
+
483
+ /// Specialization of `VariantLift` for specifically the `result<T,
484
+ /// E>` type. Otherwise behaves the same as the `VariantLift`
485
+ /// instruction with two blocks for the lift.
486
+ ResultLift {
487
+ result: &'a Result_,
488
+ ty: TypeId,
489
+ } : [1] => [1],
490
+
491
+ // calling/control flow
492
+
493
+ /// Represents a call to a raw WebAssembly API. The module/name are
494
+ /// provided inline as well as the types if necessary.
495
+ CallWasm {
496
+ name: &'a str,
497
+ sig: &'a WasmSignature,
498
+ } : [sig.params.len()] => [sig.results.len()],
499
+
500
+ /// Same as `CallWasm`, except the dual where an interface is being
501
+ /// called rather than a raw wasm function.
502
+ ///
503
+ /// Note that this will be used for async functions, and `async_`
504
+ /// indicates whether the function should be invoked in an async
505
+ /// fashion.
506
+ CallInterface {
507
+ func: &'a Function,
508
+ async_: bool,
509
+ } : [func.params.len()] => [usize::from(func.result.is_some())],
510
+
511
+ /// Returns `amt` values on the stack. This is always the last
512
+ /// instruction.
513
+ Return { amt: usize, func: &'a Function } : [*amt] => [0],
514
+
515
+ /// Calls the `realloc` function specified in a malloc-like fashion
516
+ /// allocating `size` bytes with alignment `align`.
517
+ ///
518
+ /// Pushes the returned pointer onto the stack.
519
+ Malloc {
520
+ realloc: &'static str,
521
+ size: ArchitectureSize,
522
+ align: Alignment,
523
+ } : [0] => [1],
524
+
525
+ /// Used exclusively for guest-code generation this indicates that
526
+ /// the standard memory deallocation function needs to be invoked with
527
+ /// the specified parameters.
528
+ ///
529
+ /// This will pop a pointer from the stack and push nothing.
530
+ GuestDeallocate {
531
+ size: ArchitectureSize,
532
+ align: Alignment,
533
+ } : [1] => [0],
534
+
535
+ /// Used exclusively for guest-code generation this indicates that
536
+ /// a string is being deallocated. The ptr/length are on the stack and
537
+ /// are poppped off and used to deallocate the string.
538
+ GuestDeallocateString : [2] => [0],
539
+
540
+ /// Used exclusively for guest-code generation this indicates that
541
+ /// a list is being deallocated. The ptr/length are on the stack and
542
+ /// are poppped off and used to deallocate the list.
543
+ ///
544
+ /// This variant also pops a block off the block stack to be used as the
545
+ /// body of the deallocation loop.
546
+ GuestDeallocateList {
547
+ element: &'a Type,
548
+ } : [2] => [0],
549
+
550
+ /// Used exclusively for guest-code generation this indicates that
551
+ /// a variant is being deallocated. The integer discriminant is popped
552
+ /// off the stack as well as `blocks` number of blocks popped from the
553
+ /// blocks stack. The variant is used to select, at runtime, which of
554
+ /// the blocks is executed to deallocate the variant.
555
+ GuestDeallocateVariant {
556
+ blocks: usize,
557
+ } : [1] => [0],
558
+
559
+ /// Deallocates the language-specific handle representation on the top
560
+ /// of the stack. Used for async imports.
561
+ DropHandle { ty: &'a Type } : [1] => [0],
562
+
563
+ /// Call `task.return` for an async-lifted export.
564
+ ///
565
+ /// This will call core wasm import `name` which will be mapped to
566
+ /// `task.return` later on. The function given has `params` as its
567
+ /// parameters and it will return no results. This is used to pass the
568
+ /// lowered representation of a function's results to `task.return`.
569
+ AsyncTaskReturn { name: &'a str, params: &'a [WasmType] } : [params.len()] => [0],
570
+
571
+ /// Force the evaluation of the specified number of expressions and push
572
+ /// the results to the stack.
573
+ ///
574
+ /// This is useful prior to disposing of temporary variables and/or
575
+ /// allocations which are referenced by one or more not-yet-evaluated
576
+ /// expressions.
577
+ Flush { amt: usize } : [*amt] => [*amt],
578
+ }
579
+ }
580
+
581
+ #[derive(Debug, PartialEq)]
582
+ pub enum Bitcast {
583
+ // Upcasts
584
+ F32ToI32,
585
+ F64ToI64,
586
+ I32ToI64,
587
+ F32ToI64,
588
+
589
+ // Downcasts
590
+ I32ToF32,
591
+ I64ToF64,
592
+ I64ToI32,
593
+ I64ToF32,
594
+
595
+ // PointerOrI64 conversions. These preserve provenance when the source
596
+ // or destination is a pointer value.
597
+ //
598
+ // These are used when pointer values are being stored in
599
+ // (ToP64) and loaded out of (P64To) PointerOrI64 values, so they
600
+ // always have to preserve provenance when the value being loaded or
601
+ // stored is a pointer.
602
+ P64ToI64,
603
+ I64ToP64,
604
+ P64ToP,
605
+ PToP64,
606
+
607
+ // Pointer<->number conversions. These do not preserve provenance.
608
+ //
609
+ // These are used when integer or floating-point values are being stored in
610
+ // (I32ToP/etc.) and loaded out of (PToI32/etc.) pointer values, so they
611
+ // never have any provenance to preserve.
612
+ I32ToP,
613
+ PToI32,
614
+ PToL,
615
+ LToP,
616
+
617
+ // Number<->Number conversions.
618
+ I32ToL,
619
+ LToI32,
620
+ I64ToL,
621
+ LToI64,
622
+
623
+ // Multiple conversions in sequence.
624
+ Sequence(Box<[Bitcast; 2]>),
625
+
626
+ None,
627
+ }
628
+
629
+ /// Whether the glue code surrounding a call is lifting arguments and lowering
630
+ /// results or vice versa.
631
+ #[derive(Clone, Copy, PartialEq, Eq)]
632
+ pub enum LiftLower {
633
+ /// When the glue code lifts arguments and lowers results.
634
+ ///
635
+ /// ```text
636
+ /// Wasm --lift-args--> SourceLanguage; call; SourceLanguage --lower-results--> Wasm
637
+ /// ```
638
+ LiftArgsLowerResults,
639
+ /// When the glue code lowers arguments and lifts results.
640
+ ///
641
+ /// ```text
642
+ /// SourceLanguage --lower-args--> Wasm; call; Wasm --lift-results--> SourceLanguage
643
+ /// ```
644
+ LowerArgsLiftResults,
645
+ }
646
+
647
+ /// Trait for language implementors to use to generate glue code between native
648
+ /// WebAssembly signatures and interface types signatures.
649
+ ///
650
+ /// This is used as an implementation detail in interpreting the ABI between
651
+ /// interface types and wasm types. Eventually this will be driven by interface
652
+ /// types adapters themselves, but for now the ABI of a function dictates what
653
+ /// instructions are fed in.
654
+ ///
655
+ /// Types implementing `Bindgen` are incrementally fed `Instruction` values to
656
+ /// generate code for. Instructions operate like a stack machine where each
657
+ /// instruction has a list of inputs and a list of outputs (provided by the
658
+ /// `emit` function).
659
+ pub trait Bindgen {
660
+ /// The intermediate type for fragments of code for this type.
661
+ ///
662
+ /// For most languages `String` is a suitable intermediate type.
663
+ type Operand: Clone + fmt::Debug;
664
+
665
+ /// Emit code to implement the given instruction.
666
+ ///
667
+ /// Each operand is given in `operands` and can be popped off if ownership
668
+ /// is required. It's guaranteed that `operands` has the appropriate length
669
+ /// for the `inst` given, as specified with [`Instruction`].
670
+ ///
671
+ /// Each result variable should be pushed onto `results`. This function must
672
+ /// push the appropriate number of results or binding generation will panic.
673
+ fn emit(
674
+ &mut self,
675
+ resolve: &Resolve,
676
+ inst: &Instruction<'_>,
677
+ operands: &mut Vec<Self::Operand>,
678
+ results: &mut Vec<Self::Operand>,
679
+ );
680
+
681
+ /// Gets a operand reference to the return pointer area.
682
+ ///
683
+ /// The provided size and alignment is for the function's return type.
684
+ fn return_pointer(&mut self, size: ArchitectureSize, align: Alignment) -> Self::Operand;
685
+
686
+ /// Enters a new block of code to generate code for.
687
+ ///
688
+ /// This is currently exclusively used for constructing variants. When a
689
+ /// variant is constructed a block here will be pushed for each case of a
690
+ /// variant, generating the code necessary to translate a variant case.
691
+ ///
692
+ /// Blocks are completed with `finish_block` below. It's expected that `emit`
693
+ /// will always push code (if necessary) into the "current block", which is
694
+ /// updated by calling this method and `finish_block` below.
695
+ fn push_block(&mut self);
696
+
697
+ /// Indicates to the code generator that a block is completed, and the
698
+ /// `operand` specified was the resulting value of the block.
699
+ ///
700
+ /// This method will be used to compute the value of each arm of lifting a
701
+ /// variant. The `operand` will be `None` if the variant case didn't
702
+ /// actually have any type associated with it. Otherwise it will be `Some`
703
+ /// as the last value remaining on the stack representing the value
704
+ /// associated with a variant's `case`.
705
+ ///
706
+ /// It's expected that this will resume code generation in the previous
707
+ /// block before `push_block` was called. This must also save the results
708
+ /// of the current block internally for instructions like `ResultLift` to
709
+ /// use later.
710
+ fn finish_block(&mut self, operand: &mut Vec<Self::Operand>);
711
+
712
+ /// Returns size information that was previously calculated for all types.
713
+ fn sizes(&self) -> &SizeAlign;
714
+
715
+ /// Returns whether or not the specified element type is represented in a
716
+ /// "canonical" form for lists. This dictates whether the `ListCanonLower`
717
+ /// and `ListCanonLift` instructions are used or not.
718
+ fn is_list_canonical(&self, resolve: &Resolve, element: &Type) -> bool;
719
+ }
720
+
721
+ /// Generates an abstract sequence of instructions which represents this
722
+ /// function being adapted as an imported function.
723
+ ///
724
+ /// The instructions here, when executed, will emulate a language with
725
+ /// interface types calling the concrete wasm implementation. The parameters
726
+ /// for the returned instruction sequence are the language's own
727
+ /// interface-types parameters. One instruction in the instruction stream
728
+ /// will be a `Call` which represents calling the actual raw wasm function
729
+ /// signature.
730
+ ///
731
+ /// This function is useful, for example, if you're building a language
732
+ /// generator for WASI bindings. This will document how to translate
733
+ /// language-specific values into the wasm types to call a WASI function,
734
+ /// and it will also automatically convert the results of the WASI function
735
+ /// back to a language-specific value.
736
+ pub fn call(
737
+ resolve: &Resolve,
738
+ variant: AbiVariant,
739
+ lift_lower: LiftLower,
740
+ func: &Function,
741
+ bindgen: &mut impl Bindgen,
742
+ async_: bool,
743
+ ) {
744
+ Generator::new(resolve, bindgen).call(func, variant, lift_lower, async_);
745
+ }
746
+
747
+ pub fn lower_to_memory<B: Bindgen>(
748
+ resolve: &Resolve,
749
+ bindgen: &mut B,
750
+ address: B::Operand,
751
+ value: B::Operand,
752
+ ty: &Type,
753
+ ) {
754
+ let mut generator = Generator::new(resolve, bindgen);
755
+ // TODO: make this configurable? Right now this function is only called for
756
+ // future/stream callbacks so it's appropriate to skip realloc here as it's
757
+ // all "lower for wasm import", but this might get reused for something else
758
+ // in the future.
759
+ generator.realloc = Some(Realloc::Export("cabi_realloc"));
760
+ generator.stack.push(value);
761
+ generator.write_to_memory(ty, address, Default::default());
762
+ }
763
+
764
+ pub fn lower_flat<B: Bindgen>(
765
+ resolve: &Resolve,
766
+ bindgen: &mut B,
767
+ value: B::Operand,
768
+ ty: &Type,
769
+ ) -> Vec<B::Operand> {
770
+ let mut generator = Generator::new(resolve, bindgen);
771
+ generator.stack.push(value);
772
+ generator.realloc = Some(Realloc::Export("cabi_realloc"));
773
+ generator.lower(ty);
774
+ generator.stack
775
+ }
776
+
777
+ pub fn lift_from_memory<B: Bindgen>(
778
+ resolve: &Resolve,
779
+ bindgen: &mut B,
780
+ address: B::Operand,
781
+ ty: &Type,
782
+ ) -> B::Operand {
783
+ let mut generator = Generator::new(resolve, bindgen);
784
+ generator.read_from_memory(ty, address, Default::default());
785
+ generator.stack.pop().unwrap()
786
+ }
787
+
788
+ /// Used in a similar manner as the `Interface::call` function except is
789
+ /// used to generate the `post-return` callback for `func`.
790
+ ///
791
+ /// This is only intended to be used in guest generators for exported
792
+ /// functions and will primarily generate `GuestDeallocate*` instructions,
793
+ /// plus others used as input to those instructions.
794
+ pub fn post_return(resolve: &Resolve, func: &Function, bindgen: &mut impl Bindgen) {
795
+ Generator::new(resolve, bindgen).post_return(func);
796
+ }
797
+
798
+ /// Returns whether the `Function` specified needs a post-return function to
799
+ /// be generated in guest code.
800
+ ///
801
+ /// This is used when the return value contains a memory allocation such as
802
+ /// a list or a string primarily.
803
+ pub fn guest_export_needs_post_return(resolve: &Resolve, func: &Function) -> bool {
804
+ func.result
805
+ .map(|t| needs_deallocate(resolve, &t, Deallocate::Lists))
806
+ .unwrap_or(false)
807
+ }
808
+
809
+ pub fn guest_export_params_have_allocations(resolve: &Resolve, func: &Function) -> bool {
810
+ func.params
811
+ .iter()
812
+ .any(|(_, t)| needs_deallocate(resolve, &t, Deallocate::Lists))
813
+ }
814
+
815
+ fn needs_deallocate(resolve: &Resolve, ty: &Type, what: Deallocate) -> bool {
816
+ match ty {
817
+ Type::String => true,
818
+ Type::ErrorContext => true,
819
+ Type::Id(id) => match &resolve.types[*id].kind {
820
+ TypeDefKind::List(_) => true,
821
+ TypeDefKind::Type(t) => needs_deallocate(resolve, t, what),
822
+ TypeDefKind::Handle(Handle::Own(_)) => what.handles(),
823
+ TypeDefKind::Handle(Handle::Borrow(_)) => false,
824
+ TypeDefKind::Resource => false,
825
+ TypeDefKind::Record(r) => r
826
+ .fields
827
+ .iter()
828
+ .any(|f| needs_deallocate(resolve, &f.ty, what)),
829
+ TypeDefKind::Tuple(t) => t.types.iter().any(|t| needs_deallocate(resolve, t, what)),
830
+ TypeDefKind::Variant(t) => t
831
+ .cases
832
+ .iter()
833
+ .filter_map(|t| t.ty.as_ref())
834
+ .any(|t| needs_deallocate(resolve, t, what)),
835
+ TypeDefKind::Option(t) => needs_deallocate(resolve, t, what),
836
+ TypeDefKind::Result(t) => [&t.ok, &t.err]
837
+ .iter()
838
+ .filter_map(|t| t.as_ref())
839
+ .any(|t| needs_deallocate(resolve, t, what)),
840
+ TypeDefKind::Flags(_) | TypeDefKind::Enum(_) => false,
841
+ TypeDefKind::Future(_) | TypeDefKind::Stream(_) => what.handles(),
842
+ TypeDefKind::Unknown => unreachable!(),
843
+ TypeDefKind::FixedSizeList(..) => todo!(),
844
+ TypeDefKind::Map(..) => todo!(),
845
+ },
846
+
847
+ Type::Bool
848
+ | Type::U8
849
+ | Type::S8
850
+ | Type::U16
851
+ | Type::S16
852
+ | Type::U32
853
+ | Type::S32
854
+ | Type::U64
855
+ | Type::S64
856
+ | Type::F32
857
+ | Type::F64
858
+ | Type::Char => false,
859
+ }
860
+ }
861
+
862
+ /// Generate instructions in `bindgen` to deallocate all lists in `ptr` where
863
+ /// that's a pointer to a sequence of `types` stored in linear memory.
864
+ pub fn deallocate_lists_in_types<B: Bindgen>(
865
+ resolve: &Resolve,
866
+ types: &[Type],
867
+ operands: &[B::Operand],
868
+ indirect: bool,
869
+ bindgen: &mut B,
870
+ ) {
871
+ Generator::new(resolve, bindgen).deallocate_in_types(
872
+ types,
873
+ operands,
874
+ indirect,
875
+ Deallocate::Lists,
876
+ );
877
+ }
878
+
879
+ /// Generate instructions in `bindgen` to deallocate all lists in `ptr` where
880
+ /// that's a pointer to a sequence of `types` stored in linear memory.
881
+ pub fn deallocate_lists_and_own_in_types<B: Bindgen>(
882
+ resolve: &Resolve,
883
+ types: &[Type],
884
+ operands: &[B::Operand],
885
+ indirect: bool,
886
+ bindgen: &mut B,
887
+ ) {
888
+ Generator::new(resolve, bindgen).deallocate_in_types(
889
+ types,
890
+ operands,
891
+ indirect,
892
+ Deallocate::ListsAndOwn,
893
+ );
894
+ }
895
+
896
+ #[derive(Copy, Clone)]
897
+ pub enum Realloc {
898
+ None,
899
+ Export(&'static str),
900
+ }
901
+
902
+ /// What to deallocate in various `deallocate_*` methods.
903
+ #[derive(Copy, Clone)]
904
+ enum Deallocate {
905
+ /// Only deallocate lists.
906
+ Lists,
907
+ /// Deallocate lists and owned resources such as `own<T>` and
908
+ /// futures/streams.
909
+ ListsAndOwn,
910
+ }
911
+
912
+ impl Deallocate {
913
+ fn handles(&self) -> bool {
914
+ match self {
915
+ Deallocate::Lists => false,
916
+ Deallocate::ListsAndOwn => true,
917
+ }
918
+ }
919
+ }
920
+
921
+ struct Generator<'a, B: Bindgen> {
922
+ bindgen: &'a mut B,
923
+ resolve: &'a Resolve,
924
+ operands: Vec<B::Operand>,
925
+ results: Vec<B::Operand>,
926
+ stack: Vec<B::Operand>,
927
+ return_pointer: Option<B::Operand>,
928
+ realloc: Option<Realloc>,
929
+ }
930
+
931
+ const MAX_FLAT_PARAMS: usize = 16;
932
+ const MAX_FLAT_ASYNC_PARAMS: usize = 4;
933
+
934
+ impl<'a, B: Bindgen> Generator<'a, B> {
935
+ fn new(resolve: &'a Resolve, bindgen: &'a mut B) -> Generator<'a, B> {
936
+ Generator {
937
+ resolve,
938
+ bindgen,
939
+ operands: Vec::new(),
940
+ results: Vec::new(),
941
+ stack: Vec::new(),
942
+ return_pointer: None,
943
+ realloc: None,
944
+ }
945
+ }
946
+
947
+ fn call(&mut self, func: &Function, variant: AbiVariant, lift_lower: LiftLower, async_: bool) {
948
+ let sig = self.resolve.wasm_signature(variant, func);
949
+
950
+ // Lowering parameters calling a wasm import _or_ returning a result
951
+ // from an async-lifted wasm export means we don't need to pass
952
+ // ownership, but we pass ownership in all other cases.
953
+ let realloc = match (variant, lift_lower, async_) {
954
+ (AbiVariant::GuestImport, LiftLower::LowerArgsLiftResults, _)
955
+ | (
956
+ AbiVariant::GuestExport
957
+ | AbiVariant::GuestExportAsync
958
+ | AbiVariant::GuestExportAsyncStackful,
959
+ LiftLower::LiftArgsLowerResults,
960
+ true,
961
+ ) => Realloc::None,
962
+ _ => Realloc::Export("cabi_realloc"),
963
+ };
964
+ assert!(self.realloc.is_none());
965
+
966
+ match lift_lower {
967
+ LiftLower::LowerArgsLiftResults => {
968
+ self.realloc = Some(realloc);
969
+
970
+ // Create a function that performs individual lowering of operands
971
+ let lower_to_memory = |self_: &mut Self, ptr: B::Operand| {
972
+ let mut offset = ArchitectureSize::default();
973
+ for (nth, (_, ty)) in func.params.iter().enumerate() {
974
+ self_.emit(&Instruction::GetArg { nth });
975
+ offset = align_to_arch(offset, self_.bindgen.sizes().align(ty));
976
+ self_.write_to_memory(ty, ptr.clone(), offset);
977
+ offset += self_.bindgen.sizes().size(ty);
978
+ }
979
+
980
+ self_.stack.push(ptr);
981
+ };
982
+
983
+ // Lower parameters
984
+ if sig.indirect_params {
985
+ // If parameters are indirect space is
986
+ // allocated for them and each argument is lowered
987
+ // individually into memory.
988
+ let ElementInfo { size, align } = self
989
+ .bindgen
990
+ .sizes()
991
+ .record(func.params.iter().map(|t| &t.1));
992
+
993
+ // Resolve the pointer to the indirectly stored parameters
994
+ let ptr = match variant {
995
+ // When a wasm module calls an import it will provide
996
+ // space that isn't explicitly deallocated.
997
+ AbiVariant::GuestImport => self.bindgen.return_pointer(size, align),
998
+
999
+ AbiVariant::GuestImportAsync => {
1000
+ todo!("direct param lowering for async guest import not implemented")
1001
+ }
1002
+
1003
+ // When calling a wasm module from the outside, though,
1004
+ // malloc needs to be called.
1005
+ AbiVariant::GuestExport => {
1006
+ self.emit(&Instruction::Malloc {
1007
+ realloc: "cabi_realloc",
1008
+ size,
1009
+ align,
1010
+ });
1011
+ self.stack.pop().unwrap()
1012
+ }
1013
+
1014
+ AbiVariant::GuestExportAsync | AbiVariant::GuestExportAsyncStackful => {
1015
+ todo!("direct param lowering for async not implemented")
1016
+ }
1017
+ };
1018
+
1019
+ // Lower the parameters to memory
1020
+ lower_to_memory(self, ptr);
1021
+ } else {
1022
+ // ... otherwise arguments are direct,
1023
+ // (there aren't too many) then we simply do a normal lower
1024
+ // operation for them all.
1025
+ for (nth, (_, ty)) in func.params.iter().enumerate() {
1026
+ self.emit(&Instruction::GetArg { nth });
1027
+ self.lower(ty);
1028
+ }
1029
+ }
1030
+ self.realloc = None;
1031
+
1032
+ // If necessary we may need to prepare a return pointer for this ABI.
1033
+ if variant == AbiVariant::GuestImport && sig.retptr {
1034
+ let info = self.bindgen.sizes().params(&func.result);
1035
+ let ptr = self.bindgen.return_pointer(info.size, info.align);
1036
+ self.return_pointer = Some(ptr.clone());
1037
+ self.stack.push(ptr);
1038
+ }
1039
+
1040
+ // Call the Wasm function
1041
+ assert_eq!(self.stack.len(), sig.params.len());
1042
+ self.emit(&Instruction::CallWasm {
1043
+ name: &func.name,
1044
+ sig: &sig,
1045
+ });
1046
+
1047
+ // Handle the result
1048
+ if sig.retptr {
1049
+ // If there is a return pointer, we must get the pointer to where results
1050
+ // should be stored, and store the results there?
1051
+
1052
+ let ptr = match variant {
1053
+ // imports into guests means it's a wasm module
1054
+ // calling an imported function. We supplied the
1055
+ // return pointer as the last argument (saved in
1056
+ // `self.return_pointer`) so we use that to read
1057
+ // the result of the function from memory.
1058
+ AbiVariant::GuestImport => {
1059
+ assert!(sig.results.is_empty());
1060
+ self.return_pointer.take().unwrap()
1061
+ }
1062
+
1063
+ // guest exports means that this is a host
1064
+ // calling wasm so wasm returned a pointer to where
1065
+ // the result is stored
1066
+ AbiVariant::GuestExport => self.stack.pop().unwrap(),
1067
+
1068
+ AbiVariant::GuestImportAsync
1069
+ | AbiVariant::GuestExportAsync
1070
+ | AbiVariant::GuestExportAsyncStackful => {
1071
+ unreachable!()
1072
+ }
1073
+ };
1074
+
1075
+ if let (AbiVariant::GuestExport, true) = (variant, async_) {
1076
+ // If we're dealing with an async function, the result should not be read from memory
1077
+ // immediately, as it's the async call result
1078
+ //
1079
+ // We can leave the result of the call (the indication of what to do as an async call)
1080
+ // on the stack as a return
1081
+ self.stack.push(ptr);
1082
+ } else {
1083
+ // If we're not dealing with an async call, the result must be in memory at this point and can be read out
1084
+ self.read_results_from_memory(
1085
+ &func.result,
1086
+ ptr.clone(),
1087
+ ArchitectureSize::default(),
1088
+ );
1089
+ self.emit(&Instruction::Flush {
1090
+ amt: usize::from(func.result.is_some()),
1091
+ });
1092
+ }
1093
+ } else {
1094
+ // With no return pointer in use we can simply lift the
1095
+ // result(s) of the function from the result of the core
1096
+ // wasm function.
1097
+ if let Some(ty) = &func.result {
1098
+ self.lift(ty)
1099
+ }
1100
+ }
1101
+
1102
+ // Emit the function return
1103
+ self.emit(&Instruction::Return {
1104
+ func,
1105
+ amt: usize::from(func.result.is_some()),
1106
+ });
1107
+ }
1108
+
1109
+ LiftLower::LiftArgsLowerResults => {
1110
+ let max_flat_params = match (variant, async_) {
1111
+ (AbiVariant::GuestImportAsync, _is_async @ true) => MAX_FLAT_ASYNC_PARAMS,
1112
+ _ => MAX_FLAT_PARAMS,
1113
+ };
1114
+
1115
+ // Read parameters from memory
1116
+ let read_from_memory = |self_: &mut Self| {
1117
+ let mut offset = ArchitectureSize::default();
1118
+ let ptr = self_
1119
+ .stack
1120
+ .pop()
1121
+ .expect("empty stack during read param from memory");
1122
+ for (_, ty) in func.params.iter() {
1123
+ offset = align_to_arch(offset, self_.bindgen.sizes().align(ty));
1124
+ self_.read_from_memory(ty, ptr.clone(), offset);
1125
+ offset += self_.bindgen.sizes().size(ty);
1126
+ }
1127
+ };
1128
+
1129
+ // Resolve parameters
1130
+ if sig.indirect_params {
1131
+ // If parameters were passed indirectly, arguments must be
1132
+ // read in succession from memory, with the pointer to the arguments
1133
+ // being the first argument to the function.
1134
+ self.emit(&Instruction::GetArg { nth: 0 });
1135
+ read_from_memory(self);
1136
+ } else {
1137
+ // ... otherwise, if parameters were passed directly then we lift each
1138
+ // argument in succession from the component wasm types that
1139
+ // make-up the type.
1140
+ let mut offset = 0;
1141
+ for (param_name, ty) in func.params.iter() {
1142
+ let Some(types) = flat_types(self.resolve, ty, Some(max_flat_params))
1143
+ else {
1144
+ panic!(
1145
+ "failed to flatten types during direct parameter lifting ('{param_name}' in func '{}')",
1146
+ func.name
1147
+ );
1148
+ };
1149
+ for _ in 0..types.len() {
1150
+ self.emit(&Instruction::GetArg { nth: offset });
1151
+ offset += 1;
1152
+ }
1153
+ self.lift(ty);
1154
+ }
1155
+ }
1156
+
1157
+ // ... and that allows us to call the interface types function
1158
+ self.emit(&Instruction::CallInterface { func, async_ });
1159
+
1160
+ // The return value of an async function is *not* the result of the function
1161
+ // itself or a pointer but rather a status code.
1162
+ //
1163
+ // Asynchronous functions will call `task.return` after the
1164
+ // interface function completes, so lowering is conditional
1165
+ // based on slightly different logic for the `task.return`
1166
+ // intrinsic.
1167
+ //
1168
+ // Note that in the async import case teh code below deals with the CM function being lowered,
1169
+ // not the core function that is underneath that (i.e. func.result may be empty,
1170
+ // where the associated core function underneath must have a i32 status code result)
1171
+ let (lower_to_memory, async_flat_results) = match (async_, &func.result) {
1172
+ // All async cases pass along the function results and flatten where necesary
1173
+ (_is_async @ true, func_result) => {
1174
+ let results = match &func_result {
1175
+ Some(ty) => flat_types(self.resolve, ty, Some(max_flat_params)),
1176
+ None => Some(Vec::new()),
1177
+ };
1178
+ (results.is_none(), Some(results))
1179
+ }
1180
+ // All other non-async cases
1181
+ (_is_async @ false, _) => (sig.retptr, None),
1182
+ };
1183
+
1184
+ // This was dynamically allocated by the caller (or async start
1185
+ // function) so after it's been read by the guest we need to
1186
+ // deallocate it.
1187
+ if let AbiVariant::GuestExport
1188
+ | AbiVariant::GuestExportAsync
1189
+ | AbiVariant::GuestExportAsyncStackful = variant
1190
+ {
1191
+ if sig.indirect_params && !async_ {
1192
+ let ElementInfo { size, align } = self
1193
+ .bindgen
1194
+ .sizes()
1195
+ .record(func.params.iter().map(|t| &t.1));
1196
+ self.emit(&Instruction::GetArg { nth: 0 });
1197
+ self.emit(&Instruction::GuestDeallocate { size, align });
1198
+ }
1199
+ }
1200
+
1201
+ self.realloc = Some(realloc);
1202
+
1203
+ // Perform memory lowing of relevant results, including out pointers as well as traditional results
1204
+ match (lower_to_memory, sig.retptr, variant) {
1205
+ // For sync calls, if no lowering to memory is required and there *is* a return pointer in use
1206
+ // then we need to lower then simply lower the result(s) and return that directly from the function.
1207
+ (_lower_to_memory @ false, _, _) => {
1208
+ if let Some(ty) = &func.result {
1209
+ self.lower(ty);
1210
+ }
1211
+ }
1212
+
1213
+ // Lowering to memory for a guest import
1214
+ //
1215
+ // When a function is imported to a guest this means
1216
+ // it's a host providing the implementation of the
1217
+ // import. The result is stored in the pointer
1218
+ // specified in the last argument, so we get the
1219
+ // pointer here and then write the return value into
1220
+ // it.
1221
+ (
1222
+ _lower_to_memory @ true,
1223
+ _has_ret_ptr @ true,
1224
+ AbiVariant::GuestImport | AbiVariant::GuestImportAsync,
1225
+ ) => {
1226
+ self.emit(&Instruction::GetArg {
1227
+ nth: sig.params.len() - 1,
1228
+ });
1229
+ let ptr = self
1230
+ .stack
1231
+ .pop()
1232
+ .expect("empty stack during result lower to memory");
1233
+ self.write_params_to_memory(&func.result, ptr, Default::default());
1234
+ }
1235
+
1236
+ // Lowering to memory for a guest export
1237
+ //
1238
+ // For a guest import this is a function defined in
1239
+ // wasm, so we're returning a pointer where the
1240
+ // value was stored at. Allocate some space here
1241
+ // (statically) and then write the result into that
1242
+ // memory, returning the pointer at the end.
1243
+ (_lower_to_memory @ true, _, variant) => match variant {
1244
+ AbiVariant::GuestExport | AbiVariant::GuestExportAsync => {
1245
+ let ElementInfo { size, align } =
1246
+ self.bindgen.sizes().params(&func.result);
1247
+ let ptr = self.bindgen.return_pointer(size, align);
1248
+ self.write_params_to_memory(
1249
+ &func.result,
1250
+ ptr.clone(),
1251
+ Default::default(),
1252
+ );
1253
+ self.stack.push(ptr);
1254
+ }
1255
+ AbiVariant::GuestImport | AbiVariant::GuestImportAsync => {
1256
+ unreachable!(
1257
+ "lowering to memory cannot be performed without a return pointer ({async_note} func [{func_name}], variant {variant:#?})",
1258
+ async_note = async_.then_some("async").unwrap_or("sync"),
1259
+ func_name = func.name,
1260
+ )
1261
+ }
1262
+ AbiVariant::GuestExportAsyncStackful => {
1263
+ todo!("stackful exports are not yet supported")
1264
+ }
1265
+ },
1266
+ }
1267
+
1268
+ // Build and emit the appropriate return
1269
+ match (variant, async_flat_results) {
1270
+ // Async guest imports always return a i32 status code
1271
+ (AbiVariant::GuestImport | AbiVariant::GuestImportAsync, None) if async_ => {
1272
+ unreachable!("async guest imports must have a return")
1273
+ }
1274
+
1275
+ // Async guest imports with results return the status code, not a pointer to any results
1276
+ (AbiVariant::GuestImport | AbiVariant::GuestImportAsync, Some(results))
1277
+ if async_ =>
1278
+ {
1279
+ let name = &format!("[task-return]{}", func.name);
1280
+ let params = results.as_deref().unwrap_or_default();
1281
+ self.emit(&Instruction::AsyncTaskReturn { name, params });
1282
+ }
1283
+
1284
+ // All async/non-async cases with results that need to be returned
1285
+ //
1286
+ // In practice, async imports should not end up here, as the returned result of an
1287
+ // async import is *not* a pointer but instead a status code.
1288
+ (_, Some(results)) => {
1289
+ let name = &format!("[task-return]{}", func.name);
1290
+ let params = results.as_deref().unwrap_or(&[WasmType::Pointer]);
1291
+ self.emit(&Instruction::AsyncTaskReturn { name, params });
1292
+ }
1293
+
1294
+ // All async/non-async cases with no results
1295
+ (_, None) => {
1296
+ if async_ {
1297
+ let name = &format!("[task-return]{}", func.name);
1298
+ self.emit(&Instruction::AsyncTaskReturn {
1299
+ name: name,
1300
+ params: if sig.results.len() > MAX_FLAT_ASYNC_PARAMS {
1301
+ &[WasmType::Pointer]
1302
+ } else {
1303
+ &sig.results
1304
+ },
1305
+ });
1306
+ } else {
1307
+ self.emit(&Instruction::Return {
1308
+ func,
1309
+ amt: sig.results.len(),
1310
+ });
1311
+ }
1312
+ }
1313
+ }
1314
+
1315
+ self.realloc = None;
1316
+ }
1317
+ }
1318
+
1319
+ assert!(self.realloc.is_none());
1320
+
1321
+ assert!(
1322
+ self.stack.is_empty(),
1323
+ "stack has {} items remaining: {:?}",
1324
+ self.stack.len(),
1325
+ self.stack,
1326
+ );
1327
+ }
1328
+
1329
+ fn post_return(&mut self, func: &Function) {
1330
+ let sig = self.resolve.wasm_signature(AbiVariant::GuestExport, func);
1331
+
1332
+ // Currently post-return is only used for lists and lists are always
1333
+ // returned indirectly through memory due to their flat representation
1334
+ // having more than one type. Assert that a return pointer is used,
1335
+ // though, in case this ever changes.
1336
+ assert!(sig.retptr);
1337
+
1338
+ self.emit(&Instruction::GetArg { nth: 0 });
1339
+ let addr = self.stack.pop().unwrap();
1340
+
1341
+ let mut types = Vec::new();
1342
+ types.extend(func.result);
1343
+ self.deallocate_in_types(&types, &[addr], true, Deallocate::Lists);
1344
+
1345
+ self.emit(&Instruction::Return { func, amt: 0 });
1346
+ }
1347
+
1348
+ fn deallocate_in_types(
1349
+ &mut self,
1350
+ types: &[Type],
1351
+ operands: &[B::Operand],
1352
+ indirect: bool,
1353
+ what: Deallocate,
1354
+ ) {
1355
+ if indirect {
1356
+ assert_eq!(operands.len(), 1);
1357
+ for (offset, ty) in self.bindgen.sizes().field_offsets(types) {
1358
+ self.deallocate_indirect(ty, operands[0].clone(), offset, what);
1359
+ }
1360
+ assert!(
1361
+ self.stack.is_empty(),
1362
+ "stack has {} items remaining",
1363
+ self.stack.len()
1364
+ );
1365
+ } else {
1366
+ let mut operands = operands;
1367
+ let mut operands_for_ty;
1368
+ for ty in types {
1369
+ let types = flat_types(self.resolve, ty, None).unwrap();
1370
+ (operands_for_ty, operands) = operands.split_at(types.len());
1371
+ self.stack.extend_from_slice(operands_for_ty);
1372
+ self.deallocate(ty, what);
1373
+ assert!(
1374
+ self.stack.is_empty(),
1375
+ "stack has {} items remaining",
1376
+ self.stack.len()
1377
+ );
1378
+ }
1379
+ assert!(operands.is_empty());
1380
+ }
1381
+ }
1382
+
1383
+ fn emit(&mut self, inst: &Instruction<'_>) {
1384
+ self.operands.clear();
1385
+ self.results.clear();
1386
+
1387
+ let operands_len = inst.operands_len();
1388
+ assert!(
1389
+ self.stack.len() >= operands_len,
1390
+ "not enough operands on stack for {:?}: have {} need {operands_len}",
1391
+ inst,
1392
+ self.stack.len(),
1393
+ );
1394
+ self.operands
1395
+ .extend(self.stack.drain((self.stack.len() - operands_len)..));
1396
+ self.results.reserve(inst.results_len());
1397
+
1398
+ self.bindgen
1399
+ .emit(self.resolve, inst, &mut self.operands, &mut self.results);
1400
+
1401
+ assert_eq!(
1402
+ self.results.len(),
1403
+ inst.results_len(),
1404
+ "{:?} expected {} results, got {}",
1405
+ inst,
1406
+ inst.results_len(),
1407
+ self.results.len()
1408
+ );
1409
+ self.stack.append(&mut self.results);
1410
+ }
1411
+
1412
+ fn push_block(&mut self) {
1413
+ self.bindgen.push_block();
1414
+ }
1415
+
1416
+ fn finish_block(&mut self, size: usize) {
1417
+ self.operands.clear();
1418
+ assert!(
1419
+ size <= self.stack.len(),
1420
+ "not enough operands on stack for finishing block",
1421
+ );
1422
+ self.operands
1423
+ .extend(self.stack.drain((self.stack.len() - size)..));
1424
+ self.bindgen.finish_block(&mut self.operands);
1425
+ }
1426
+
1427
+ fn lower(&mut self, ty: &Type) {
1428
+ use Instruction::*;
1429
+
1430
+ match *ty {
1431
+ Type::Bool => self.emit(&I32FromBool),
1432
+ Type::S8 => self.emit(&I32FromS8),
1433
+ Type::U8 => self.emit(&I32FromU8),
1434
+ Type::S16 => self.emit(&I32FromS16),
1435
+ Type::U16 => self.emit(&I32FromU16),
1436
+ Type::S32 => self.emit(&I32FromS32),
1437
+ Type::U32 => self.emit(&I32FromU32),
1438
+ Type::S64 => self.emit(&I64FromS64),
1439
+ Type::U64 => self.emit(&I64FromU64),
1440
+ Type::Char => self.emit(&I32FromChar),
1441
+ Type::F32 => self.emit(&CoreF32FromF32),
1442
+ Type::F64 => self.emit(&CoreF64FromF64),
1443
+ Type::String => {
1444
+ let realloc = self.list_realloc();
1445
+ self.emit(&StringLower { realloc });
1446
+ }
1447
+ Type::ErrorContext => self.emit(&ErrorContextLower),
1448
+ Type::Id(id) => match &self.resolve.types[id].kind {
1449
+ TypeDefKind::Type(t) => self.lower(t),
1450
+ TypeDefKind::List(element) => {
1451
+ let realloc = self.list_realloc();
1452
+ if self.bindgen.is_list_canonical(self.resolve, element) {
1453
+ self.emit(&ListCanonLower { element, realloc });
1454
+ } else {
1455
+ self.push_block();
1456
+ self.emit(&IterElem { element });
1457
+ self.emit(&IterBasePointer);
1458
+ let addr = self.stack.pop().unwrap();
1459
+ self.write_to_memory(element, addr, Default::default());
1460
+ self.finish_block(0);
1461
+ self.emit(&ListLower { element, realloc });
1462
+ }
1463
+ }
1464
+ TypeDefKind::Handle(handle) => {
1465
+ let (Handle::Own(ty) | Handle::Borrow(ty)) = handle;
1466
+ self.emit(&HandleLower {
1467
+ handle,
1468
+ ty: id,
1469
+ name: self.resolve.types[*ty].name.as_deref().unwrap(),
1470
+ });
1471
+ }
1472
+ TypeDefKind::Resource => {
1473
+ todo!();
1474
+ }
1475
+ TypeDefKind::Record(record) => {
1476
+ self.emit(&RecordLower {
1477
+ record,
1478
+ ty: id,
1479
+ name: self.resolve.types[id].name.as_deref().unwrap(),
1480
+ });
1481
+ let values = self
1482
+ .stack
1483
+ .drain(self.stack.len() - record.fields.len()..)
1484
+ .collect::<Vec<_>>();
1485
+ for (field, value) in record.fields.iter().zip(values) {
1486
+ self.stack.push(value);
1487
+ self.lower(&field.ty);
1488
+ }
1489
+ }
1490
+ TypeDefKind::Tuple(tuple) => {
1491
+ self.emit(&TupleLower { tuple, ty: id });
1492
+ let values = self
1493
+ .stack
1494
+ .drain(self.stack.len() - tuple.types.len()..)
1495
+ .collect::<Vec<_>>();
1496
+ for (ty, value) in tuple.types.iter().zip(values) {
1497
+ self.stack.push(value);
1498
+ self.lower(ty);
1499
+ }
1500
+ }
1501
+
1502
+ TypeDefKind::Flags(flags) => {
1503
+ self.emit(&FlagsLower {
1504
+ flags,
1505
+ ty: id,
1506
+ name: self.resolve.types[id].name.as_ref().unwrap(),
1507
+ });
1508
+ }
1509
+
1510
+ TypeDefKind::Variant(v) => {
1511
+ let results =
1512
+ self.lower_variant_arms(ty, v.cases.iter().map(|c| c.ty.as_ref()));
1513
+ self.emit(&VariantLower {
1514
+ variant: v,
1515
+ ty: id,
1516
+ results: &results,
1517
+ name: self.resolve.types[id].name.as_deref().unwrap(),
1518
+ });
1519
+ }
1520
+ TypeDefKind::Enum(enum_) => {
1521
+ self.emit(&EnumLower {
1522
+ enum_,
1523
+ ty: id,
1524
+ name: self.resolve.types[id].name.as_deref().unwrap(),
1525
+ });
1526
+ }
1527
+ TypeDefKind::Option(t) => {
1528
+ let results = self.lower_variant_arms(ty, [None, Some(t)]);
1529
+ self.emit(&OptionLower {
1530
+ payload: t,
1531
+ ty: id,
1532
+ results: &results,
1533
+ });
1534
+ }
1535
+ TypeDefKind::Result(r) => {
1536
+ let results = self.lower_variant_arms(ty, [r.ok.as_ref(), r.err.as_ref()]);
1537
+ self.emit(&ResultLower {
1538
+ result: r,
1539
+ ty: id,
1540
+ results: &results,
1541
+ });
1542
+ }
1543
+ TypeDefKind::Future(ty) => {
1544
+ self.emit(&FutureLower {
1545
+ payload: ty,
1546
+ ty: id,
1547
+ });
1548
+ }
1549
+ TypeDefKind::Stream(ty) => {
1550
+ self.emit(&StreamLower {
1551
+ payload: ty,
1552
+ ty: id,
1553
+ });
1554
+ }
1555
+ TypeDefKind::Unknown => unreachable!(),
1556
+ TypeDefKind::FixedSizeList(..) => todo!(),
1557
+ TypeDefKind::Map(..) => todo!(),
1558
+ },
1559
+ }
1560
+ }
1561
+
1562
+ fn lower_variant_arms<'b>(
1563
+ &mut self,
1564
+ ty: &Type,
1565
+ cases: impl IntoIterator<Item = Option<&'b Type>>,
1566
+ ) -> Vec<WasmType> {
1567
+ use Instruction::*;
1568
+ let results = flat_types(self.resolve, ty, None).unwrap();
1569
+ let mut casts = Vec::new();
1570
+ for (i, ty) in cases.into_iter().enumerate() {
1571
+ self.push_block();
1572
+ self.emit(&VariantPayloadName);
1573
+ let payload_name = self.stack.pop().unwrap();
1574
+ self.emit(&I32Const { val: i as i32 });
1575
+ let mut pushed = 1;
1576
+ if let Some(ty) = ty {
1577
+ // Using the payload of this block we lower the type to
1578
+ // raw wasm values.
1579
+ self.stack.push(payload_name);
1580
+ self.lower(ty);
1581
+
1582
+ // Determine the types of all the wasm values we just
1583
+ // pushed, and record how many. If we pushed too few
1584
+ // then we'll need to push some zeros after this.
1585
+ let temp = flat_types(self.resolve, ty, None).unwrap();
1586
+ pushed += temp.len();
1587
+
1588
+ // For all the types pushed we may need to insert some
1589
+ // bitcasts. This will go through and cast everything
1590
+ // to the right type to ensure all blocks produce the
1591
+ // same set of results.
1592
+ casts.truncate(0);
1593
+ for (actual, expected) in temp.iter().zip(&results[1..]) {
1594
+ casts.push(cast(*actual, *expected));
1595
+ }
1596
+ if casts.iter().any(|c| *c != Bitcast::None) {
1597
+ self.emit(&Bitcasts { casts: &casts });
1598
+ }
1599
+ }
1600
+
1601
+ // If we haven't pushed enough items in this block to match
1602
+ // what other variants are pushing then we need to push
1603
+ // some zeros.
1604
+ if pushed < results.len() {
1605
+ self.emit(&ConstZero {
1606
+ tys: &results[pushed..],
1607
+ });
1608
+ }
1609
+ self.finish_block(results.len());
1610
+ }
1611
+ results
1612
+ }
1613
+
1614
+ fn list_realloc(&self) -> Option<&'static str> {
1615
+ match self.realloc.expect("realloc should be configured") {
1616
+ Realloc::None => None,
1617
+ Realloc::Export(s) => Some(s),
1618
+ }
1619
+ }
1620
+
1621
+ /// Note that in general everything in this function is the opposite of the
1622
+ /// `lower` function above. This is intentional and should be kept this way!
1623
+ fn lift(&mut self, ty: &Type) {
1624
+ use Instruction::*;
1625
+
1626
+ match *ty {
1627
+ Type::Bool => self.emit(&BoolFromI32),
1628
+ Type::S8 => self.emit(&S8FromI32),
1629
+ Type::U8 => self.emit(&U8FromI32),
1630
+ Type::S16 => self.emit(&S16FromI32),
1631
+ Type::U16 => self.emit(&U16FromI32),
1632
+ Type::S32 => self.emit(&S32FromI32),
1633
+ Type::U32 => self.emit(&U32FromI32),
1634
+ Type::S64 => self.emit(&S64FromI64),
1635
+ Type::U64 => self.emit(&U64FromI64),
1636
+ Type::Char => self.emit(&CharFromI32),
1637
+ Type::F32 => self.emit(&F32FromCoreF32),
1638
+ Type::F64 => self.emit(&F64FromCoreF64),
1639
+ Type::String => self.emit(&StringLift),
1640
+ Type::ErrorContext => self.emit(&ErrorContextLift),
1641
+ Type::Id(id) => match &self.resolve.types[id].kind {
1642
+ TypeDefKind::Type(t) => self.lift(t),
1643
+ TypeDefKind::List(element) => {
1644
+ if self.bindgen.is_list_canonical(self.resolve, element) {
1645
+ self.emit(&ListCanonLift { element, ty: id });
1646
+ } else {
1647
+ self.push_block();
1648
+ self.emit(&IterBasePointer);
1649
+ let addr = self.stack.pop().unwrap();
1650
+ self.read_from_memory(element, addr, Default::default());
1651
+ self.finish_block(1);
1652
+ self.emit(&ListLift { element, ty: id });
1653
+ }
1654
+ }
1655
+ TypeDefKind::Handle(handle) => {
1656
+ let (Handle::Own(ty) | Handle::Borrow(ty)) = handle;
1657
+ self.emit(&HandleLift {
1658
+ handle,
1659
+ ty: id,
1660
+ name: self.resolve.types[*ty].name.as_deref().unwrap(),
1661
+ });
1662
+ }
1663
+ TypeDefKind::Resource => {
1664
+ todo!();
1665
+ }
1666
+ TypeDefKind::Record(record) => {
1667
+ self.flat_for_each_record_type(
1668
+ ty,
1669
+ record.fields.iter().map(|f| &f.ty),
1670
+ Self::lift,
1671
+ );
1672
+ self.emit(&RecordLift {
1673
+ record,
1674
+ ty: id,
1675
+ name: self.resolve.types[id].name.as_deref().unwrap(),
1676
+ });
1677
+ }
1678
+ TypeDefKind::Tuple(tuple) => {
1679
+ self.flat_for_each_record_type(ty, tuple.types.iter(), Self::lift);
1680
+ self.emit(&TupleLift { tuple, ty: id });
1681
+ }
1682
+ TypeDefKind::Flags(flags) => {
1683
+ self.emit(&FlagsLift {
1684
+ flags,
1685
+ ty: id,
1686
+ name: self.resolve.types[id].name.as_ref().unwrap(),
1687
+ });
1688
+ }
1689
+
1690
+ TypeDefKind::Variant(v) => {
1691
+ self.flat_for_each_variant_arm(
1692
+ ty,
1693
+ true,
1694
+ v.cases.iter().map(|c| c.ty.as_ref()),
1695
+ Self::lift,
1696
+ );
1697
+ self.emit(&VariantLift {
1698
+ variant: v,
1699
+ ty: id,
1700
+ name: self.resolve.types[id].name.as_deref().unwrap(),
1701
+ });
1702
+ }
1703
+
1704
+ TypeDefKind::Enum(enum_) => {
1705
+ self.emit(&EnumLift {
1706
+ enum_,
1707
+ ty: id,
1708
+ name: self.resolve.types[id].name.as_deref().unwrap(),
1709
+ });
1710
+ }
1711
+
1712
+ TypeDefKind::Option(t) => {
1713
+ self.flat_for_each_variant_arm(ty, true, [None, Some(t)], Self::lift);
1714
+ self.emit(&OptionLift { payload: t, ty: id });
1715
+ }
1716
+
1717
+ TypeDefKind::Result(r) => {
1718
+ self.flat_for_each_variant_arm(
1719
+ ty,
1720
+ true,
1721
+ [r.ok.as_ref(), r.err.as_ref()],
1722
+ Self::lift,
1723
+ );
1724
+ self.emit(&ResultLift { result: r, ty: id });
1725
+ }
1726
+
1727
+ TypeDefKind::Future(ty) => {
1728
+ self.emit(&FutureLift {
1729
+ payload: ty,
1730
+ ty: id,
1731
+ });
1732
+ }
1733
+ TypeDefKind::Stream(ty) => {
1734
+ self.emit(&StreamLift {
1735
+ payload: ty,
1736
+ ty: id,
1737
+ });
1738
+ }
1739
+ TypeDefKind::Unknown => unreachable!(),
1740
+ TypeDefKind::FixedSizeList(..) => todo!(),
1741
+ TypeDefKind::Map(..) => todo!(),
1742
+ },
1743
+ }
1744
+ }
1745
+
1746
+ fn flat_for_each_record_type<'b>(
1747
+ &mut self,
1748
+ container: &Type,
1749
+ types: impl Iterator<Item = &'b Type>,
1750
+ mut iter: impl FnMut(&mut Self, &Type),
1751
+ ) {
1752
+ let temp = flat_types(self.resolve, container, None).unwrap();
1753
+ let mut args = self
1754
+ .stack
1755
+ .drain(self.stack.len() - temp.len()..)
1756
+ .collect::<Vec<_>>();
1757
+ for ty in types {
1758
+ let temp = flat_types(self.resolve, ty, None).unwrap();
1759
+ self.stack.extend(args.drain(..temp.len()));
1760
+ iter(self, ty);
1761
+ }
1762
+ }
1763
+
1764
+ fn flat_for_each_variant_arm<'b>(
1765
+ &mut self,
1766
+ ty: &Type,
1767
+ blocks_with_type_have_result: bool,
1768
+ cases: impl IntoIterator<Item = Option<&'b Type>>,
1769
+ mut iter: impl FnMut(&mut Self, &Type),
1770
+ ) {
1771
+ let params = flat_types(self.resolve, ty, None).unwrap();
1772
+ let mut casts = Vec::new();
1773
+ let block_inputs = self
1774
+ .stack
1775
+ .drain(self.stack.len() + 1 - params.len()..)
1776
+ .collect::<Vec<_>>();
1777
+ for ty in cases {
1778
+ self.push_block();
1779
+ if let Some(ty) = ty {
1780
+ // Push only the values we need for this variant onto
1781
+ // the stack.
1782
+ let temp = flat_types(self.resolve, ty, None).unwrap();
1783
+ self.stack
1784
+ .extend(block_inputs[..temp.len()].iter().cloned());
1785
+
1786
+ // Cast all the types we have on the stack to the actual
1787
+ // types needed for this variant, if necessary.
1788
+ casts.truncate(0);
1789
+ for (actual, expected) in temp.iter().zip(&params[1..]) {
1790
+ casts.push(cast(*expected, *actual));
1791
+ }
1792
+ if casts.iter().any(|c| *c != Bitcast::None) {
1793
+ self.emit(&Instruction::Bitcasts { casts: &casts });
1794
+ }
1795
+
1796
+ // Then recursively lift this variant's payload.
1797
+ iter(self, ty);
1798
+ }
1799
+ self.finish_block(if blocks_with_type_have_result {
1800
+ ty.is_some() as usize
1801
+ } else {
1802
+ 0
1803
+ });
1804
+ }
1805
+ }
1806
+
1807
+ fn write_to_memory(&mut self, ty: &Type, addr: B::Operand, offset: ArchitectureSize) {
1808
+ use Instruction::*;
1809
+
1810
+ match *ty {
1811
+ // Builtin types need different flavors of storage instructions
1812
+ // depending on the size of the value written.
1813
+ Type::Bool | Type::U8 | Type::S8 => {
1814
+ self.lower_and_emit(ty, addr, &I32Store8 { offset })
1815
+ }
1816
+ Type::U16 | Type::S16 => self.lower_and_emit(ty, addr, &I32Store16 { offset }),
1817
+ Type::U32 | Type::S32 | Type::Char => {
1818
+ self.lower_and_emit(ty, addr, &I32Store { offset })
1819
+ }
1820
+ Type::U64 | Type::S64 => self.lower_and_emit(ty, addr, &I64Store { offset }),
1821
+ Type::F32 => self.lower_and_emit(ty, addr, &F32Store { offset }),
1822
+ Type::F64 => self.lower_and_emit(ty, addr, &F64Store { offset }),
1823
+ Type::String => self.write_list_to_memory(ty, addr, offset),
1824
+ Type::ErrorContext => self.lower_and_emit(ty, addr, &I32Store { offset }),
1825
+
1826
+ Type::Id(id) => match &self.resolve.types[id].kind {
1827
+ TypeDefKind::Type(t) => self.write_to_memory(t, addr, offset),
1828
+ TypeDefKind::List(_) => self.write_list_to_memory(ty, addr, offset),
1829
+
1830
+ TypeDefKind::Future(_) | TypeDefKind::Stream(_) | TypeDefKind::Handle(_) => {
1831
+ self.lower_and_emit(ty, addr, &I32Store { offset })
1832
+ }
1833
+
1834
+ // Decompose the record into its components and then write all
1835
+ // the components into memory one-by-one.
1836
+ TypeDefKind::Record(record) => {
1837
+ self.emit(&RecordLower {
1838
+ record,
1839
+ ty: id,
1840
+ name: self.resolve.types[id].name.as_deref().unwrap(),
1841
+ });
1842
+ self.write_fields_to_memory(record.fields.iter().map(|f| &f.ty), addr, offset);
1843
+ }
1844
+ TypeDefKind::Resource => {
1845
+ todo!()
1846
+ }
1847
+ TypeDefKind::Tuple(tuple) => {
1848
+ self.emit(&TupleLower { tuple, ty: id });
1849
+ self.write_fields_to_memory(tuple.types.iter(), addr, offset);
1850
+ }
1851
+
1852
+ TypeDefKind::Flags(f) => {
1853
+ self.lower(ty);
1854
+ match f.repr() {
1855
+ FlagsRepr::U8 => {
1856
+ self.stack.push(addr);
1857
+ self.store_intrepr(offset, Int::U8);
1858
+ }
1859
+ FlagsRepr::U16 => {
1860
+ self.stack.push(addr);
1861
+ self.store_intrepr(offset, Int::U16);
1862
+ }
1863
+ FlagsRepr::U32(n) => {
1864
+ for i in (0..n).rev() {
1865
+ self.stack.push(addr.clone());
1866
+ self.emit(&I32Store {
1867
+ offset: offset.add_bytes(i * 4),
1868
+ });
1869
+ }
1870
+ }
1871
+ }
1872
+ }
1873
+
1874
+ // Each case will get its own block, and the first item in each
1875
+ // case is writing the discriminant. After that if we have a
1876
+ // payload we write the payload after the discriminant, aligned up
1877
+ // to the type's alignment.
1878
+ TypeDefKind::Variant(v) => {
1879
+ self.write_variant_arms_to_memory(
1880
+ offset,
1881
+ addr,
1882
+ v.tag(),
1883
+ v.cases.iter().map(|c| c.ty.as_ref()),
1884
+ );
1885
+ self.emit(&VariantLower {
1886
+ variant: v,
1887
+ ty: id,
1888
+ results: &[],
1889
+ name: self.resolve.types[id].name.as_deref().unwrap(),
1890
+ });
1891
+ }
1892
+
1893
+ TypeDefKind::Option(t) => {
1894
+ self.write_variant_arms_to_memory(offset, addr, Int::U8, [None, Some(t)]);
1895
+ self.emit(&OptionLower {
1896
+ payload: t,
1897
+ ty: id,
1898
+ results: &[],
1899
+ });
1900
+ }
1901
+
1902
+ TypeDefKind::Result(r) => {
1903
+ self.write_variant_arms_to_memory(
1904
+ offset,
1905
+ addr,
1906
+ Int::U8,
1907
+ [r.ok.as_ref(), r.err.as_ref()],
1908
+ );
1909
+ self.emit(&ResultLower {
1910
+ result: r,
1911
+ ty: id,
1912
+ results: &[],
1913
+ });
1914
+ }
1915
+
1916
+ TypeDefKind::Enum(e) => {
1917
+ self.lower(ty);
1918
+ self.stack.push(addr);
1919
+ self.store_intrepr(offset, e.tag());
1920
+ }
1921
+
1922
+ TypeDefKind::Unknown => unreachable!(),
1923
+ TypeDefKind::FixedSizeList(..) => todo!(),
1924
+ TypeDefKind::Map(..) => todo!(),
1925
+ },
1926
+ }
1927
+ }
1928
+
1929
+ fn write_params_to_memory<'b>(
1930
+ &mut self,
1931
+ params: impl IntoIterator<Item = &'b Type, IntoIter: ExactSizeIterator>,
1932
+ addr: B::Operand,
1933
+ offset: ArchitectureSize,
1934
+ ) {
1935
+ self.write_fields_to_memory(params, addr, offset);
1936
+ }
1937
+
1938
+ fn write_variant_arms_to_memory<'b>(
1939
+ &mut self,
1940
+ offset: ArchitectureSize,
1941
+ addr: B::Operand,
1942
+ tag: Int,
1943
+ cases: impl IntoIterator<Item = Option<&'b Type>> + Clone,
1944
+ ) {
1945
+ let payload_offset = offset + (self.bindgen.sizes().payload_offset(tag, cases.clone()));
1946
+ for (i, ty) in cases.into_iter().enumerate() {
1947
+ self.push_block();
1948
+ self.emit(&Instruction::VariantPayloadName);
1949
+ let payload_name = self.stack.pop().unwrap();
1950
+ self.emit(&Instruction::I32Const { val: i as i32 });
1951
+ self.stack.push(addr.clone());
1952
+ self.store_intrepr(offset, tag);
1953
+ if let Some(ty) = ty {
1954
+ self.stack.push(payload_name.clone());
1955
+ self.write_to_memory(ty, addr.clone(), payload_offset);
1956
+ }
1957
+ self.finish_block(0);
1958
+ }
1959
+ }
1960
+
1961
+ fn write_list_to_memory(&mut self, ty: &Type, addr: B::Operand, offset: ArchitectureSize) {
1962
+ // After lowering the list there's two i32 values on the stack
1963
+ // which we write into memory, writing the pointer into the low address
1964
+ // and the length into the high address.
1965
+ self.lower(ty);
1966
+ self.stack.push(addr.clone());
1967
+ self.emit(&Instruction::LengthStore {
1968
+ offset: offset + self.bindgen.sizes().align(ty).into(),
1969
+ });
1970
+ self.stack.push(addr);
1971
+ self.emit(&Instruction::PointerStore { offset });
1972
+ }
1973
+
1974
+ fn write_fields_to_memory<'b>(
1975
+ &mut self,
1976
+ tys: impl IntoIterator<Item = &'b Type, IntoIter: ExactSizeIterator>,
1977
+ addr: B::Operand,
1978
+ offset: ArchitectureSize,
1979
+ ) {
1980
+ let tys = tys.into_iter();
1981
+ let fields = self
1982
+ .stack
1983
+ .drain(self.stack.len() - tys.len()..)
1984
+ .collect::<Vec<_>>();
1985
+ for ((field_offset, ty), op) in self
1986
+ .bindgen
1987
+ .sizes()
1988
+ .field_offsets(tys)
1989
+ .into_iter()
1990
+ .zip(fields)
1991
+ {
1992
+ self.stack.push(op);
1993
+ self.write_to_memory(ty, addr.clone(), offset + (field_offset));
1994
+ }
1995
+ }
1996
+
1997
+ fn lower_and_emit(&mut self, ty: &Type, addr: B::Operand, instr: &Instruction) {
1998
+ self.lower(ty);
1999
+ self.stack.push(addr);
2000
+ self.emit(instr);
2001
+ }
2002
+
2003
+ fn read_from_memory(&mut self, ty: &Type, addr: B::Operand, offset: ArchitectureSize) {
2004
+ use Instruction::*;
2005
+
2006
+ match *ty {
2007
+ Type::Bool => self.emit_and_lift(ty, addr, &I32Load8U { offset }),
2008
+ Type::U8 => self.emit_and_lift(ty, addr, &I32Load8U { offset }),
2009
+ Type::S8 => self.emit_and_lift(ty, addr, &I32Load8S { offset }),
2010
+ Type::U16 => self.emit_and_lift(ty, addr, &I32Load16U { offset }),
2011
+ Type::S16 => self.emit_and_lift(ty, addr, &I32Load16S { offset }),
2012
+ Type::U32 | Type::S32 | Type::Char => self.emit_and_lift(ty, addr, &I32Load { offset }),
2013
+ Type::U64 | Type::S64 => self.emit_and_lift(ty, addr, &I64Load { offset }),
2014
+ Type::F32 => self.emit_and_lift(ty, addr, &F32Load { offset }),
2015
+ Type::F64 => self.emit_and_lift(ty, addr, &F64Load { offset }),
2016
+ Type::String => self.read_list_from_memory(ty, addr, offset),
2017
+ Type::ErrorContext => self.emit_and_lift(ty, addr, &I32Load { offset }),
2018
+
2019
+ Type::Id(id) => match &self.resolve.types[id].kind {
2020
+ TypeDefKind::Type(t) => self.read_from_memory(t, addr, offset),
2021
+
2022
+ TypeDefKind::List(_) => self.read_list_from_memory(ty, addr, offset),
2023
+
2024
+ TypeDefKind::Future(_) | TypeDefKind::Stream(_) | TypeDefKind::Handle(_) => {
2025
+ self.emit_and_lift(ty, addr, &I32Load { offset })
2026
+ }
2027
+
2028
+ TypeDefKind::Resource => {
2029
+ todo!();
2030
+ }
2031
+
2032
+ // Read and lift each field individually, adjusting the offset
2033
+ // as we go along, then aggregate all the fields into the
2034
+ // record.
2035
+ TypeDefKind::Record(record) => {
2036
+ self.read_fields_from_memory(record.fields.iter().map(|f| &f.ty), addr, offset);
2037
+ self.emit(&RecordLift {
2038
+ record,
2039
+ ty: id,
2040
+ name: self.resolve.types[id].name.as_deref().unwrap(),
2041
+ });
2042
+ }
2043
+
2044
+ TypeDefKind::Tuple(tuple) => {
2045
+ self.read_fields_from_memory(&tuple.types, addr, offset);
2046
+ self.emit(&TupleLift { tuple, ty: id });
2047
+ }
2048
+
2049
+ TypeDefKind::Flags(f) => {
2050
+ match f.repr() {
2051
+ FlagsRepr::U8 => {
2052
+ self.stack.push(addr);
2053
+ self.load_intrepr(offset, Int::U8);
2054
+ }
2055
+ FlagsRepr::U16 => {
2056
+ self.stack.push(addr);
2057
+ self.load_intrepr(offset, Int::U16);
2058
+ }
2059
+ FlagsRepr::U32(n) => {
2060
+ for i in 0..n {
2061
+ self.stack.push(addr.clone());
2062
+ self.emit(&I32Load {
2063
+ offset: offset.add_bytes(i * 4),
2064
+ });
2065
+ }
2066
+ }
2067
+ }
2068
+ self.lift(ty);
2069
+ }
2070
+
2071
+ // Each case will get its own block, and we'll dispatch to the
2072
+ // right block based on the `i32.load` we initially perform. Each
2073
+ // individual block is pretty simple and just reads the payload type
2074
+ // from the corresponding offset if one is available.
2075
+ TypeDefKind::Variant(variant) => {
2076
+ self.read_variant_arms_from_memory(
2077
+ offset,
2078
+ addr,
2079
+ variant.tag(),
2080
+ variant.cases.iter().map(|c| c.ty.as_ref()),
2081
+ );
2082
+ self.emit(&VariantLift {
2083
+ variant,
2084
+ ty: id,
2085
+ name: self.resolve.types[id].name.as_deref().unwrap(),
2086
+ });
2087
+ }
2088
+
2089
+ TypeDefKind::Option(t) => {
2090
+ self.read_variant_arms_from_memory(offset, addr, Int::U8, [None, Some(t)]);
2091
+ self.emit(&OptionLift { payload: t, ty: id });
2092
+ }
2093
+
2094
+ TypeDefKind::Result(r) => {
2095
+ self.read_variant_arms_from_memory(
2096
+ offset,
2097
+ addr,
2098
+ Int::U8,
2099
+ [r.ok.as_ref(), r.err.as_ref()],
2100
+ );
2101
+ self.emit(&ResultLift { result: r, ty: id });
2102
+ }
2103
+
2104
+ TypeDefKind::Enum(e) => {
2105
+ self.stack.push(addr.clone());
2106
+ self.load_intrepr(offset, e.tag());
2107
+ self.lift(ty);
2108
+ }
2109
+
2110
+ TypeDefKind::Unknown => unreachable!(),
2111
+ TypeDefKind::FixedSizeList(..) => todo!(),
2112
+ TypeDefKind::Map(..) => todo!(),
2113
+ },
2114
+ }
2115
+ }
2116
+
2117
+ fn read_results_from_memory(
2118
+ &mut self,
2119
+ result: &Option<Type>,
2120
+ addr: B::Operand,
2121
+ offset: ArchitectureSize,
2122
+ ) {
2123
+ self.read_fields_from_memory(result, addr, offset)
2124
+ }
2125
+
2126
+ fn read_variant_arms_from_memory<'b>(
2127
+ &mut self,
2128
+ offset: ArchitectureSize,
2129
+ addr: B::Operand,
2130
+ tag: Int,
2131
+ cases: impl IntoIterator<Item = Option<&'b Type>> + Clone,
2132
+ ) {
2133
+ self.stack.push(addr.clone());
2134
+ self.load_intrepr(offset, tag);
2135
+ let payload_offset = offset + (self.bindgen.sizes().payload_offset(tag, cases.clone()));
2136
+ for ty in cases {
2137
+ self.push_block();
2138
+ if let Some(ty) = ty {
2139
+ self.read_from_memory(ty, addr.clone(), payload_offset);
2140
+ }
2141
+ self.finish_block(ty.is_some() as usize);
2142
+ }
2143
+ }
2144
+
2145
+ fn read_list_from_memory(&mut self, ty: &Type, addr: B::Operand, offset: ArchitectureSize) {
2146
+ // Read the pointer/len and then perform the standard lifting
2147
+ // proceses.
2148
+ self.stack.push(addr.clone());
2149
+ self.emit(&Instruction::PointerLoad { offset });
2150
+ self.stack.push(addr);
2151
+ self.emit(&Instruction::LengthLoad {
2152
+ offset: offset + self.bindgen.sizes().align(ty).into(),
2153
+ });
2154
+ self.lift(ty);
2155
+ }
2156
+
2157
+ fn read_fields_from_memory<'b>(
2158
+ &mut self,
2159
+ tys: impl IntoIterator<Item = &'b Type>,
2160
+ addr: B::Operand,
2161
+ offset: ArchitectureSize,
2162
+ ) {
2163
+ for (field_offset, ty) in self.bindgen.sizes().field_offsets(tys).iter() {
2164
+ self.read_from_memory(ty, addr.clone(), offset + (*field_offset));
2165
+ }
2166
+ }
2167
+
2168
+ fn emit_and_lift(&mut self, ty: &Type, addr: B::Operand, instr: &Instruction) {
2169
+ self.stack.push(addr);
2170
+ self.emit(instr);
2171
+ self.lift(ty);
2172
+ }
2173
+
2174
+ fn load_intrepr(&mut self, offset: ArchitectureSize, repr: Int) {
2175
+ self.emit(&match repr {
2176
+ Int::U64 => Instruction::I64Load { offset },
2177
+ Int::U32 => Instruction::I32Load { offset },
2178
+ Int::U16 => Instruction::I32Load16U { offset },
2179
+ Int::U8 => Instruction::I32Load8U { offset },
2180
+ });
2181
+ }
2182
+
2183
+ fn store_intrepr(&mut self, offset: ArchitectureSize, repr: Int) {
2184
+ self.emit(&match repr {
2185
+ Int::U64 => Instruction::I64Store { offset },
2186
+ Int::U32 => Instruction::I32Store { offset },
2187
+ Int::U16 => Instruction::I32Store16 { offset },
2188
+ Int::U8 => Instruction::I32Store8 { offset },
2189
+ });
2190
+ }
2191
+
2192
+ /// Runs the deallocation of `ty` for the operands currently on
2193
+ /// `self.stack`.
2194
+ ///
2195
+ /// This will pop the ABI items of `ty` from `self.stack`.
2196
+ fn deallocate(&mut self, ty: &Type, what: Deallocate) {
2197
+ use Instruction::*;
2198
+
2199
+ match *ty {
2200
+ Type::String => {
2201
+ self.emit(&Instruction::GuestDeallocateString);
2202
+ }
2203
+
2204
+ Type::Bool
2205
+ | Type::U8
2206
+ | Type::S8
2207
+ | Type::U16
2208
+ | Type::S16
2209
+ | Type::U32
2210
+ | Type::S32
2211
+ | Type::Char
2212
+ | Type::U64
2213
+ | Type::S64
2214
+ | Type::F32
2215
+ | Type::F64
2216
+ | Type::ErrorContext => {
2217
+ // No deallocation necessary, just discard the operand on the
2218
+ // stack.
2219
+ self.stack.pop().unwrap();
2220
+ }
2221
+
2222
+ Type::Id(id) => match &self.resolve.types[id].kind {
2223
+ TypeDefKind::Type(t) => self.deallocate(t, what),
2224
+
2225
+ TypeDefKind::List(element) => {
2226
+ self.push_block();
2227
+ self.emit(&IterBasePointer);
2228
+ let elemaddr = self.stack.pop().unwrap();
2229
+ self.deallocate_indirect(element, elemaddr, Default::default(), what);
2230
+ self.finish_block(0);
2231
+
2232
+ self.emit(&Instruction::GuestDeallocateList { element });
2233
+ }
2234
+
2235
+ TypeDefKind::Handle(Handle::Own(_))
2236
+ | TypeDefKind::Future(_)
2237
+ | TypeDefKind::Stream(_)
2238
+ if what.handles() =>
2239
+ {
2240
+ self.lift(ty);
2241
+ self.emit(&DropHandle { ty });
2242
+ }
2243
+
2244
+ TypeDefKind::Record(record) => {
2245
+ self.flat_for_each_record_type(
2246
+ ty,
2247
+ record.fields.iter().map(|f| &f.ty),
2248
+ |me, ty| me.deallocate(ty, what),
2249
+ );
2250
+ }
2251
+
2252
+ TypeDefKind::Tuple(tuple) => {
2253
+ self.flat_for_each_record_type(ty, tuple.types.iter(), |me, ty| {
2254
+ me.deallocate(ty, what)
2255
+ });
2256
+ }
2257
+
2258
+ TypeDefKind::Variant(variant) => {
2259
+ self.flat_for_each_variant_arm(
2260
+ ty,
2261
+ false,
2262
+ variant.cases.iter().map(|c| c.ty.as_ref()),
2263
+ |me, ty| me.deallocate(ty, what),
2264
+ );
2265
+ self.emit(&GuestDeallocateVariant {
2266
+ blocks: variant.cases.len(),
2267
+ });
2268
+ }
2269
+
2270
+ TypeDefKind::Option(t) => {
2271
+ self.flat_for_each_variant_arm(ty, false, [None, Some(t)], |me, ty| {
2272
+ me.deallocate(ty, what)
2273
+ });
2274
+ self.emit(&GuestDeallocateVariant { blocks: 2 });
2275
+ }
2276
+
2277
+ TypeDefKind::Result(e) => {
2278
+ self.flat_for_each_variant_arm(
2279
+ ty,
2280
+ false,
2281
+ [e.ok.as_ref(), e.err.as_ref()],
2282
+ |me, ty| me.deallocate(ty, what),
2283
+ );
2284
+ self.emit(&GuestDeallocateVariant { blocks: 2 });
2285
+ }
2286
+
2287
+ // discard the operand on the stack, otherwise nothing to free.
2288
+ TypeDefKind::Flags(_)
2289
+ | TypeDefKind::Enum(_)
2290
+ | TypeDefKind::Future(_)
2291
+ | TypeDefKind::Stream(_)
2292
+ | TypeDefKind::Handle(Handle::Own(_))
2293
+ | TypeDefKind::Handle(Handle::Borrow(_)) => {
2294
+ self.stack.pop().unwrap();
2295
+ }
2296
+
2297
+ TypeDefKind::Resource => unreachable!(),
2298
+ TypeDefKind::Unknown => unreachable!(),
2299
+
2300
+ TypeDefKind::FixedSizeList(..) => todo!(),
2301
+ TypeDefKind::Map(..) => todo!(),
2302
+ },
2303
+ }
2304
+ }
2305
+
2306
+ fn deallocate_indirect(
2307
+ &mut self,
2308
+ ty: &Type,
2309
+ addr: B::Operand,
2310
+ offset: ArchitectureSize,
2311
+ what: Deallocate,
2312
+ ) {
2313
+ use Instruction::*;
2314
+
2315
+ // No need to execute any instructions if this type itself doesn't
2316
+ // require any form of post-return.
2317
+ if !needs_deallocate(self.resolve, ty, what) {
2318
+ return;
2319
+ }
2320
+
2321
+ match *ty {
2322
+ Type::String => {
2323
+ self.stack.push(addr.clone());
2324
+ self.emit(&Instruction::PointerLoad { offset });
2325
+ self.stack.push(addr);
2326
+ self.emit(&Instruction::LengthLoad {
2327
+ offset: offset + self.bindgen.sizes().align(ty).into(),
2328
+ });
2329
+ self.deallocate(ty, what);
2330
+ }
2331
+
2332
+ Type::Bool
2333
+ | Type::U8
2334
+ | Type::S8
2335
+ | Type::U16
2336
+ | Type::S16
2337
+ | Type::U32
2338
+ | Type::S32
2339
+ | Type::Char
2340
+ | Type::U64
2341
+ | Type::S64
2342
+ | Type::F32
2343
+ | Type::F64
2344
+ | Type::ErrorContext => {}
2345
+
2346
+ Type::Id(id) => match &self.resolve.types[id].kind {
2347
+ TypeDefKind::Type(t) => self.deallocate_indirect(t, addr, offset, what),
2348
+
2349
+ TypeDefKind::List(_) => {
2350
+ self.stack.push(addr.clone());
2351
+ self.emit(&Instruction::PointerLoad { offset });
2352
+ self.stack.push(addr);
2353
+ self.emit(&Instruction::LengthLoad {
2354
+ offset: offset + self.bindgen.sizes().align(ty).into(),
2355
+ });
2356
+
2357
+ self.deallocate(ty, what);
2358
+ }
2359
+
2360
+ TypeDefKind::Handle(Handle::Own(_))
2361
+ | TypeDefKind::Future(_)
2362
+ | TypeDefKind::Stream(_)
2363
+ if what.handles() =>
2364
+ {
2365
+ self.read_from_memory(ty, addr, offset);
2366
+ self.emit(&DropHandle { ty });
2367
+ }
2368
+
2369
+ TypeDefKind::Handle(Handle::Own(_)) => unreachable!(),
2370
+ TypeDefKind::Handle(Handle::Borrow(_)) => unreachable!(),
2371
+ TypeDefKind::Resource => unreachable!(),
2372
+
2373
+ TypeDefKind::Record(record) => {
2374
+ self.deallocate_indirect_fields(
2375
+ &record.fields.iter().map(|f| f.ty).collect::<Vec<_>>(),
2376
+ addr,
2377
+ offset,
2378
+ what,
2379
+ );
2380
+ }
2381
+
2382
+ TypeDefKind::Tuple(tuple) => {
2383
+ self.deallocate_indirect_fields(&tuple.types, addr, offset, what);
2384
+ }
2385
+
2386
+ TypeDefKind::Flags(_) => {}
2387
+
2388
+ TypeDefKind::Variant(variant) => {
2389
+ self.deallocate_indirect_variant(
2390
+ offset,
2391
+ addr,
2392
+ variant.tag(),
2393
+ variant.cases.iter().map(|c| c.ty.as_ref()),
2394
+ what,
2395
+ );
2396
+ self.emit(&GuestDeallocateVariant {
2397
+ blocks: variant.cases.len(),
2398
+ });
2399
+ }
2400
+
2401
+ TypeDefKind::Option(t) => {
2402
+ self.deallocate_indirect_variant(offset, addr, Int::U8, [None, Some(t)], what);
2403
+ self.emit(&GuestDeallocateVariant { blocks: 2 });
2404
+ }
2405
+
2406
+ TypeDefKind::Result(e) => {
2407
+ self.deallocate_indirect_variant(
2408
+ offset,
2409
+ addr,
2410
+ Int::U8,
2411
+ [e.ok.as_ref(), e.err.as_ref()],
2412
+ what,
2413
+ );
2414
+ self.emit(&GuestDeallocateVariant { blocks: 2 });
2415
+ }
2416
+
2417
+ TypeDefKind::Enum(_) => {}
2418
+
2419
+ TypeDefKind::Future(_) => unreachable!(),
2420
+ TypeDefKind::Stream(_) => unreachable!(),
2421
+ TypeDefKind::Unknown => unreachable!(),
2422
+ TypeDefKind::FixedSizeList(..) => todo!(),
2423
+ TypeDefKind::Map(..) => todo!(),
2424
+ },
2425
+ }
2426
+ }
2427
+
2428
+ fn deallocate_indirect_variant<'b>(
2429
+ &mut self,
2430
+ offset: ArchitectureSize,
2431
+ addr: B::Operand,
2432
+ tag: Int,
2433
+ cases: impl IntoIterator<Item = Option<&'b Type>> + Clone,
2434
+ what: Deallocate,
2435
+ ) {
2436
+ self.stack.push(addr.clone());
2437
+ self.load_intrepr(offset, tag);
2438
+ let payload_offset = offset + (self.bindgen.sizes().payload_offset(tag, cases.clone()));
2439
+ for ty in cases {
2440
+ self.push_block();
2441
+ if let Some(ty) = ty {
2442
+ self.deallocate_indirect(ty, addr.clone(), payload_offset, what);
2443
+ }
2444
+ self.finish_block(0);
2445
+ }
2446
+ }
2447
+
2448
+ fn deallocate_indirect_fields(
2449
+ &mut self,
2450
+ tys: &[Type],
2451
+ addr: B::Operand,
2452
+ offset: ArchitectureSize,
2453
+ what: Deallocate,
2454
+ ) {
2455
+ for (field_offset, ty) in self.bindgen.sizes().field_offsets(tys) {
2456
+ self.deallocate_indirect(ty, addr.clone(), offset + (field_offset), what);
2457
+ }
2458
+ }
2459
+ }
2460
+
2461
+ fn cast(from: WasmType, to: WasmType) -> Bitcast {
2462
+ use WasmType::*;
2463
+
2464
+ match (from, to) {
2465
+ (I32, I32)
2466
+ | (I64, I64)
2467
+ | (F32, F32)
2468
+ | (F64, F64)
2469
+ | (Pointer, Pointer)
2470
+ | (PointerOrI64, PointerOrI64)
2471
+ | (Length, Length) => Bitcast::None,
2472
+
2473
+ (I32, I64) => Bitcast::I32ToI64,
2474
+ (F32, I32) => Bitcast::F32ToI32,
2475
+ (F64, I64) => Bitcast::F64ToI64,
2476
+
2477
+ (I64, I32) => Bitcast::I64ToI32,
2478
+ (I32, F32) => Bitcast::I32ToF32,
2479
+ (I64, F64) => Bitcast::I64ToF64,
2480
+
2481
+ (F32, I64) => Bitcast::F32ToI64,
2482
+ (I64, F32) => Bitcast::I64ToF32,
2483
+
2484
+ (I64, PointerOrI64) => Bitcast::I64ToP64,
2485
+ (Pointer, PointerOrI64) => Bitcast::PToP64,
2486
+ (_, PointerOrI64) => {
2487
+ Bitcast::Sequence(Box::new([cast(from, I64), cast(I64, PointerOrI64)]))
2488
+ }
2489
+
2490
+ (PointerOrI64, I64) => Bitcast::P64ToI64,
2491
+ (PointerOrI64, Pointer) => Bitcast::P64ToP,
2492
+ (PointerOrI64, _) => Bitcast::Sequence(Box::new([cast(PointerOrI64, I64), cast(I64, to)])),
2493
+
2494
+ (I32, Pointer) => Bitcast::I32ToP,
2495
+ (Pointer, I32) => Bitcast::PToI32,
2496
+ (I32, Length) => Bitcast::I32ToL,
2497
+ (Length, I32) => Bitcast::LToI32,
2498
+ (I64, Length) => Bitcast::I64ToL,
2499
+ (Length, I64) => Bitcast::LToI64,
2500
+ (Pointer, Length) => Bitcast::PToL,
2501
+ (Length, Pointer) => Bitcast::LToP,
2502
+
2503
+ (F32, Pointer | Length) => Bitcast::Sequence(Box::new([cast(F32, I32), cast(I32, to)])),
2504
+ (Pointer | Length, F32) => Bitcast::Sequence(Box::new([cast(from, I32), cast(I32, F32)])),
2505
+
2506
+ (F32, F64)
2507
+ | (F64, F32)
2508
+ | (F64, I32)
2509
+ | (I32, F64)
2510
+ | (Pointer | Length, I64 | F64)
2511
+ | (I64 | F64, Pointer | Length) => {
2512
+ unreachable!("Don't know how to bitcast from {:?} to {:?}", from, to);
2513
+ }
2514
+ }
2515
+ }
2516
+
2517
+ /// Flatten types in a given type
2518
+ ///
2519
+ /// It is sometimes necessary to restrict the number of max parameters dynamically,
2520
+ /// for example during an async guest import call (flat params are limited to 4)
2521
+ fn flat_types(resolve: &Resolve, ty: &Type, max_params: Option<usize>) -> Option<Vec<WasmType>> {
2522
+ let max_params = max_params.unwrap_or(MAX_FLAT_PARAMS);
2523
+ let mut storage = iter::repeat_n(WasmType::I32, max_params).collect::<Vec<_>>();
2524
+ let mut flat = FlatTypes::new(storage.as_mut_slice());
2525
+ resolve.push_flat(ty, &mut flat).then_some(flat.to_vec())
2526
+ }