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.
- checksums.yaml +4 -4
- data/Gemfile.lock +6 -6
- data/README.md +1 -1
- data/ext/html-to-markdown-rb/native/Cargo.lock +254 -47
- data/ext/html-to-markdown-rb/native/Cargo.toml +1 -1
- data/lib/html_to_markdown/version.rb +1 -1
- data/rust-vendor/anyhow/.cargo-checksum.json +1 -0
- data/rust-vendor/anyhow/.cargo_vcs_info.json +6 -0
- data/rust-vendor/anyhow/.github/FUNDING.yml +1 -0
- data/rust-vendor/anyhow/.github/workflows/ci.yml +147 -0
- data/rust-vendor/anyhow/Cargo.lock +424 -0
- data/rust-vendor/anyhow/Cargo.toml +132 -0
- data/rust-vendor/anyhow/Cargo.toml.orig +40 -0
- data/rust-vendor/anyhow/LICENSE-APACHE +176 -0
- data/rust-vendor/anyhow/LICENSE-MIT +23 -0
- data/rust-vendor/anyhow/README.md +179 -0
- data/rust-vendor/anyhow/build.rs +207 -0
- data/rust-vendor/anyhow/rust-toolchain.toml +2 -0
- data/rust-vendor/anyhow/src/backtrace.rs +410 -0
- data/rust-vendor/anyhow/src/chain.rs +102 -0
- data/rust-vendor/anyhow/src/context.rs +193 -0
- data/rust-vendor/anyhow/src/ensure.rs +935 -0
- data/rust-vendor/anyhow/src/error.rs +1086 -0
- data/rust-vendor/anyhow/src/fmt.rs +158 -0
- data/rust-vendor/anyhow/src/kind.rs +121 -0
- data/rust-vendor/anyhow/src/lib.rs +728 -0
- data/rust-vendor/anyhow/src/macros.rs +245 -0
- data/rust-vendor/anyhow/src/nightly.rs +58 -0
- data/rust-vendor/anyhow/src/ptr.rs +187 -0
- data/rust-vendor/anyhow/src/wrapper.rs +84 -0
- data/rust-vendor/anyhow/tests/common/mod.rs +14 -0
- data/rust-vendor/anyhow/tests/compiletest.rs +7 -0
- data/rust-vendor/anyhow/tests/drop/mod.rs +53 -0
- data/rust-vendor/anyhow/tests/test_autotrait.rs +34 -0
- data/rust-vendor/anyhow/tests/test_backtrace.rs +15 -0
- data/rust-vendor/anyhow/tests/test_boxed.rs +45 -0
- data/rust-vendor/anyhow/tests/test_chain.rs +69 -0
- data/rust-vendor/anyhow/tests/test_context.rs +172 -0
- data/rust-vendor/anyhow/tests/test_convert.rs +46 -0
- data/rust-vendor/anyhow/tests/test_downcast.rs +123 -0
- data/rust-vendor/anyhow/tests/test_ensure.rs +756 -0
- data/rust-vendor/anyhow/tests/test_ffi.rs +19 -0
- data/rust-vendor/anyhow/tests/test_fmt.rs +93 -0
- data/rust-vendor/anyhow/tests/test_macros.rs +97 -0
- data/rust-vendor/anyhow/tests/test_repr.rs +30 -0
- data/rust-vendor/anyhow/tests/test_source.rs +62 -0
- data/rust-vendor/anyhow/tests/ui/chained-comparison.rs +8 -0
- data/rust-vendor/anyhow/tests/ui/chained-comparison.stderr +10 -0
- data/rust-vendor/anyhow/tests/ui/empty-ensure.rs +6 -0
- data/rust-vendor/anyhow/tests/ui/empty-ensure.stderr +12 -0
- data/rust-vendor/anyhow/tests/ui/ensure-nonbool.rs +40 -0
- data/rust-vendor/anyhow/tests/ui/ensure-nonbool.stderr +113 -0
- data/rust-vendor/anyhow/tests/ui/must-use.rs +11 -0
- data/rust-vendor/anyhow/tests/ui/must-use.stderr +15 -0
- data/rust-vendor/anyhow/tests/ui/no-impl.rs +8 -0
- data/rust-vendor/anyhow/tests/ui/no-impl.stderr +32 -0
- data/rust-vendor/anyhow/tests/ui/temporary-value.rs +5 -0
- data/rust-vendor/anyhow/tests/ui/temporary-value.stderr +15 -0
- data/rust-vendor/anyhow/tests/ui/wrong-interpolation.rs +5 -0
- data/rust-vendor/anyhow/tests/ui/wrong-interpolation.stderr +5 -0
- data/rust-vendor/bitflags/.cargo-checksum.json +1 -1
- data/rust-vendor/bitflags/.cargo_vcs_info.json +1 -1
- data/rust-vendor/bitflags/CHANGELOG.md +12 -0
- data/rust-vendor/bitflags/Cargo.lock +48 -48
- data/rust-vendor/bitflags/Cargo.toml +1 -1
- data/rust-vendor/bitflags/Cargo.toml.orig +1 -1
- data/rust-vendor/bitflags/README.md +1 -1
- data/rust-vendor/bitflags/src/external.rs +1 -1
- data/rust-vendor/bitflags/src/lib.rs +1 -1
- data/rust-vendor/bitflags/src/tests/known_bits.rs +47 -0
- data/rust-vendor/bitflags/src/tests/unknown_bits.rs +53 -0
- data/rust-vendor/bitflags/src/tests.rs +2 -0
- data/rust-vendor/bitflags/src/traits.rs +11 -1
- data/rust-vendor/cc/.cargo-checksum.json +1 -1
- data/rust-vendor/cc/.cargo_vcs_info.json +1 -1
- data/rust-vendor/cc/CHANGELOG.md +7 -0
- data/rust-vendor/cc/Cargo.lock +331 -7
- data/rust-vendor/cc/Cargo.toml +1 -1
- data/rust-vendor/cc/Cargo.toml.orig +1 -1
- data/rust-vendor/cc/src/lib.rs +10 -13
- data/rust-vendor/cc/src/target/generated.rs +1 -0
- data/rust-vendor/cpp_demangle/.cargo-checksum.json +1 -1
- data/rust-vendor/cpp_demangle/.cargo_vcs_info.json +1 -1
- data/rust-vendor/cpp_demangle/CHANGELOG.md +55 -0
- data/rust-vendor/cpp_demangle/Cargo.lock +5 -5
- data/rust-vendor/cpp_demangle/Cargo.toml +2 -2
- data/rust-vendor/cpp_demangle/Cargo.toml.orig +2 -2
- data/rust-vendor/cpp_demangle/README.md +9 -9
- data/rust-vendor/cpp_demangle/build.rs +10 -9
- data/rust-vendor/cpp_demangle/examples/cppfilt.rs +1 -1
- data/rust-vendor/cpp_demangle/examples/simple.rs +1 -1
- data/rust-vendor/cpp_demangle/src/ast.rs +238 -36
- data/rust-vendor/cpp_demangle/src/lib.rs +31 -46
- data/rust-vendor/cpp_demangle/src/subs.rs +1 -1
- data/rust-vendor/flate2/.cargo-checksum.json +1 -1
- data/rust-vendor/flate2/.cargo_vcs_info.json +1 -1
- data/rust-vendor/flate2/Cargo.lock +3 -3
- data/rust-vendor/flate2/Cargo.toml +13 -2
- data/rust-vendor/flate2/Cargo.toml.orig +16 -13
- data/rust-vendor/flate2/LICENSE-MIT +1 -1
- data/rust-vendor/flate2/src/crc.rs +177 -42
- data/rust-vendor/flate2/src/gz/mod.rs +159 -0
- data/rust-vendor/foldhash-0.1.5/.cargo-checksum.json +1 -0
- data/rust-vendor/foldhash-0.1.5/.cargo_vcs_info.json +6 -0
- data/rust-vendor/foldhash-0.1.5/Cargo.lock +852 -0
- data/rust-vendor/foldhash-0.1.5/Cargo.toml +76 -0
- data/rust-vendor/foldhash-0.1.5/Cargo.toml.orig +44 -0
- data/rust-vendor/foldhash-0.1.5/LICENSE +19 -0
- data/rust-vendor/foldhash-0.1.5/README.md +277 -0
- data/rust-vendor/foldhash-0.1.5/src/convenience.rs +73 -0
- data/rust-vendor/foldhash-0.1.5/src/fast.rs +270 -0
- data/rust-vendor/foldhash-0.1.5/src/lib.rs +284 -0
- data/rust-vendor/foldhash-0.1.5/src/quality.rs +174 -0
- data/rust-vendor/foldhash-0.1.5/src/seed.rs +267 -0
- data/rust-vendor/getrandom/.cargo-checksum.json +1 -1
- data/rust-vendor/getrandom/.cargo_vcs_info.json +1 -1
- data/rust-vendor/getrandom/CHANGELOG.md +39 -1
- data/rust-vendor/getrandom/Cargo.lock +451 -60
- data/rust-vendor/getrandom/Cargo.toml +44 -5
- data/rust-vendor/getrandom/Cargo.toml.orig +45 -10
- data/rust-vendor/getrandom/LICENSE-MIT +1 -1
- data/rust-vendor/getrandom/README.md +72 -40
- data/rust-vendor/getrandom/benches/buffer.rs +10 -8
- data/rust-vendor/getrandom/build.rs +1 -47
- data/rust-vendor/getrandom/src/backends/custom.rs +1 -1
- data/rust-vendor/getrandom/src/backends/efi_rng.rs +1 -1
- data/rust-vendor/getrandom/src/backends/esp_idf.rs +1 -1
- data/rust-vendor/getrandom/src/backends/extern_impl.rs +19 -0
- data/rust-vendor/getrandom/src/backends/fuchsia.rs +1 -1
- data/rust-vendor/getrandom/src/backends/getentropy.rs +4 -3
- data/rust-vendor/getrandom/src/backends/getrandom.rs +4 -12
- data/rust-vendor/getrandom/src/backends/hermit.rs +1 -1
- data/rust-vendor/getrandom/src/backends/linux_android_with_fallback.rs +8 -10
- data/rust-vendor/getrandom/src/backends/linux_raw.rs +101 -75
- data/rust-vendor/getrandom/src/backends/netbsd.rs +3 -3
- data/rust-vendor/getrandom/src/backends/rdrand.rs +26 -13
- data/rust-vendor/getrandom/src/backends/rndr.rs +13 -11
- data/rust-vendor/getrandom/src/backends/solaris.rs +5 -4
- data/rust-vendor/getrandom/src/backends/solid.rs +1 -1
- data/rust-vendor/getrandom/src/backends/use_file.rs +17 -28
- data/rust-vendor/getrandom/src/backends/vxworks.rs +2 -4
- data/rust-vendor/getrandom/src/backends/wasi_p1.rs +1 -1
- data/rust-vendor/getrandom/src/backends/wasi_p2_3.rs +61 -0
- data/rust-vendor/getrandom/src/backends/wasm_js.rs +1 -1
- data/rust-vendor/getrandom/src/backends/windows.rs +7 -11
- data/rust-vendor/getrandom/src/backends/windows_legacy.rs +1 -1
- data/rust-vendor/getrandom/src/backends.rs +9 -28
- data/rust-vendor/getrandom/src/error.rs +39 -6
- data/rust-vendor/getrandom/src/error_std_impls.rs +1 -3
- data/rust-vendor/getrandom/src/lib.rs +39 -18
- data/rust-vendor/getrandom/src/sys_rng.rs +55 -0
- data/rust-vendor/getrandom/src/util.rs +3 -15
- data/rust-vendor/getrandom/src/utils/get_errno.rs +29 -0
- data/rust-vendor/getrandom/src/utils/lazy.rs +64 -0
- data/rust-vendor/getrandom/src/utils/sanitizer.rs +28 -0
- data/rust-vendor/getrandom/src/utils/sys_fill_exact.rs +41 -0
- data/rust-vendor/getrandom/tests/mod.rs +6 -94
- data/rust-vendor/getrandom/tests/sys_rng.rs +18 -0
- data/rust-vendor/getrandom-0.3.4/.cargo-checksum.json +1 -0
- data/rust-vendor/getrandom-0.3.4/.cargo_vcs_info.json +6 -0
- data/rust-vendor/getrandom-0.3.4/CHANGELOG.md +673 -0
- data/rust-vendor/getrandom-0.3.4/Cargo.lock +292 -0
- data/rust-vendor/getrandom-0.3.4/Cargo.toml +133 -0
- data/rust-vendor/getrandom-0.3.4/Cargo.toml.orig +100 -0
- data/rust-vendor/getrandom-0.3.4/LICENSE-APACHE +201 -0
- data/rust-vendor/getrandom-0.3.4/LICENSE-MIT +26 -0
- data/rust-vendor/getrandom-0.3.4/README.md +386 -0
- data/rust-vendor/getrandom-0.3.4/SECURITY.md +13 -0
- data/rust-vendor/getrandom-0.3.4/benches/buffer.rs +121 -0
- data/rust-vendor/getrandom-0.3.4/build.rs +57 -0
- data/rust-vendor/getrandom-0.3.4/src/backends/apple_other.rs +21 -0
- data/rust-vendor/getrandom-0.3.4/src/backends/custom.rs +13 -0
- data/rust-vendor/getrandom-0.3.4/src/backends/efi_rng.rs +124 -0
- data/rust-vendor/getrandom-0.3.4/src/backends/esp_idf.rs +21 -0
- data/rust-vendor/getrandom-0.3.4/src/backends/fuchsia.rs +16 -0
- data/rust-vendor/getrandom-0.3.4/src/backends/getentropy.rs +27 -0
- data/rust-vendor/getrandom-0.3.4/src/backends/getrandom.rs +39 -0
- data/rust-vendor/getrandom-0.3.4/src/backends/hermit.rs +53 -0
- data/rust-vendor/getrandom-0.3.4/src/backends/linux_android_with_fallback.rs +103 -0
- data/rust-vendor/getrandom-0.3.4/src/backends/linux_raw.rs +143 -0
- data/rust-vendor/getrandom-0.3.4/src/backends/netbsd.rs +78 -0
- data/rust-vendor/getrandom-0.3.4/src/backends/rdrand.rs +182 -0
- data/rust-vendor/getrandom-0.3.4/src/backends/rndr.rs +145 -0
- data/rust-vendor/getrandom-0.3.4/src/backends/solaris.rs +42 -0
- data/rust-vendor/getrandom-0.3.4/src/backends/solid.rs +19 -0
- data/rust-vendor/getrandom-0.3.4/src/backends/unsupported.rs +9 -0
- data/rust-vendor/getrandom-0.3.4/src/backends/use_file.rs +234 -0
- data/rust-vendor/getrandom-0.3.4/src/backends/vxworks.rs +54 -0
- data/rust-vendor/getrandom-0.3.4/src/backends/wasi_p1.rs +32 -0
- data/rust-vendor/getrandom-0.3.4/src/backends/wasm_js.rs +72 -0
- data/rust-vendor/getrandom-0.3.4/src/backends/windows.rs +61 -0
- data/rust-vendor/getrandom-0.3.4/src/backends/windows_legacy.rs +48 -0
- data/rust-vendor/getrandom-0.3.4/src/backends.rs +209 -0
- data/rust-vendor/getrandom-0.3.4/src/error.rs +212 -0
- data/rust-vendor/getrandom-0.3.4/src/error_std_impls.rs +15 -0
- data/rust-vendor/getrandom-0.3.4/src/lib.rs +138 -0
- data/rust-vendor/getrandom-0.3.4/src/util.rs +84 -0
- data/rust-vendor/getrandom-0.3.4/tests/mod.rs +297 -0
- data/rust-vendor/hashbrown-0.15.5/.cargo-checksum.json +1 -0
- data/rust-vendor/hashbrown-0.15.5/.cargo_vcs_info.json +6 -0
- data/rust-vendor/hashbrown-0.15.5/CHANGELOG.md +619 -0
- data/rust-vendor/hashbrown-0.15.5/Cargo.lock +306 -0
- data/rust-vendor/hashbrown-0.15.5/Cargo.toml +164 -0
- data/rust-vendor/hashbrown-0.15.5/Cargo.toml.orig +77 -0
- data/rust-vendor/hashbrown-0.15.5/Cross.toml +3 -0
- data/rust-vendor/hashbrown-0.15.5/LICENSE-APACHE +201 -0
- data/rust-vendor/hashbrown-0.15.5/LICENSE-MIT +25 -0
- data/rust-vendor/hashbrown-0.15.5/README.md +80 -0
- data/rust-vendor/hashbrown-0.15.5/benches/bench.rs +329 -0
- data/rust-vendor/hashbrown-0.15.5/benches/insert_unique_unchecked.rs +34 -0
- data/rust-vendor/hashbrown-0.15.5/benches/set_ops.rs +148 -0
- data/rust-vendor/hashbrown-0.15.5/clippy.toml +1 -0
- data/rust-vendor/hashbrown-0.15.5/src/control/bitmask.rs +117 -0
- data/rust-vendor/hashbrown-0.15.5/src/control/group/generic.rs +154 -0
- data/rust-vendor/hashbrown-0.15.5/src/control/group/lsx.rs +137 -0
- data/rust-vendor/hashbrown-0.15.5/src/control/group/mod.rs +43 -0
- data/rust-vendor/hashbrown-0.15.5/src/control/group/neon.rs +121 -0
- data/rust-vendor/hashbrown-0.15.5/src/control/group/sse2.rs +146 -0
- data/rust-vendor/hashbrown-0.15.5/src/control/mod.rs +10 -0
- data/rust-vendor/hashbrown-0.15.5/src/control/tag.rs +83 -0
- data/rust-vendor/hashbrown-0.15.5/src/external_trait_impls/mod.rs +4 -0
- data/rust-vendor/hashbrown-0.15.5/src/external_trait_impls/rayon/helpers.rs +27 -0
- data/rust-vendor/hashbrown-0.15.5/src/external_trait_impls/rayon/map.rs +721 -0
- data/rust-vendor/hashbrown-0.15.5/src/external_trait_impls/rayon/mod.rs +5 -0
- data/rust-vendor/hashbrown-0.15.5/src/external_trait_impls/rayon/raw.rs +230 -0
- data/rust-vendor/hashbrown-0.15.5/src/external_trait_impls/rayon/set.rs +659 -0
- data/rust-vendor/hashbrown-0.15.5/src/external_trait_impls/rayon/table.rs +249 -0
- data/rust-vendor/hashbrown-0.15.5/src/external_trait_impls/serde.rs +220 -0
- data/rust-vendor/hashbrown-0.15.5/src/lib.rs +188 -0
- data/rust-vendor/hashbrown-0.15.5/src/macros.rs +70 -0
- data/rust-vendor/hashbrown-0.15.5/src/map.rs +6583 -0
- data/rust-vendor/hashbrown-0.15.5/src/raw/alloc.rs +92 -0
- data/rust-vendor/hashbrown-0.15.5/src/raw/mod.rs +4436 -0
- data/rust-vendor/hashbrown-0.15.5/src/raw_entry.rs +1740 -0
- data/rust-vendor/hashbrown-0.15.5/src/rustc_entry.rs +567 -0
- data/rust-vendor/hashbrown-0.15.5/src/scopeguard.rs +72 -0
- data/rust-vendor/hashbrown-0.15.5/src/set.rs +3121 -0
- data/rust-vendor/hashbrown-0.15.5/src/table.rs +2380 -0
- data/rust-vendor/hashbrown-0.15.5/src/util.rs +38 -0
- data/rust-vendor/hashbrown-0.15.5/tests/equivalent_trait.rs +53 -0
- data/rust-vendor/hashbrown-0.15.5/tests/hasher.rs +65 -0
- data/rust-vendor/hashbrown-0.15.5/tests/rayon.rs +535 -0
- data/rust-vendor/hashbrown-0.15.5/tests/serde.rs +65 -0
- data/rust-vendor/hashbrown-0.15.5/tests/set.rs +34 -0
- data/rust-vendor/heck/.cargo-checksum.json +1 -0
- data/rust-vendor/heck/.cargo_vcs_info.json +6 -0
- data/rust-vendor/heck/CHANGELOG.md +25 -0
- data/rust-vendor/heck/Cargo.toml +34 -0
- data/rust-vendor/heck/Cargo.toml.orig +11 -0
- data/rust-vendor/heck/LICENSE-APACHE +201 -0
- data/rust-vendor/heck/LICENSE-MIT +25 -0
- data/rust-vendor/heck/README.md +53 -0
- data/rust-vendor/heck/src/kebab.rs +75 -0
- data/rust-vendor/heck/src/lib.rs +192 -0
- data/rust-vendor/heck/src/lower_camel.rs +88 -0
- data/rust-vendor/heck/src/shouty_kebab.rs +73 -0
- data/rust-vendor/heck/src/shouty_snake.rs +86 -0
- data/rust-vendor/heck/src/snake.rs +100 -0
- data/rust-vendor/heck/src/title.rs +75 -0
- data/rust-vendor/heck/src/train.rs +87 -0
- data/rust-vendor/heck/src/upper_camel.rs +88 -0
- data/rust-vendor/html-to-markdown-rs/src/converter/inline/semantic/typography.rs +32 -22
- data/rust-vendor/html-to-markdown-rs/tests/integration_test.rs +44 -0
- data/rust-vendor/id-arena/.cargo-checksum.json +1 -0
- data/rust-vendor/id-arena/.cargo_vcs_info.json +6 -0
- data/rust-vendor/id-arena/.travis.yml +22 -0
- data/rust-vendor/id-arena/CHANGELOG.md +71 -0
- data/rust-vendor/id-arena/Cargo.lock +61 -0
- data/rust-vendor/id-arena/Cargo.toml +54 -0
- data/rust-vendor/id-arena/Cargo.toml.orig +21 -0
- data/rust-vendor/id-arena/LICENSE-APACHE +201 -0
- data/rust-vendor/id-arena/LICENSE-MIT +25 -0
- data/rust-vendor/id-arena/README.md +101 -0
- data/rust-vendor/id-arena/README.tpl +3 -0
- data/rust-vendor/id-arena/src/lib.rs +726 -0
- data/rust-vendor/id-arena/src/rayon.rs +282 -0
- data/rust-vendor/id-arena/tests/readme_up_to_date.rs +22 -0
- data/rust-vendor/leb128fmt/.cargo-checksum.json +1 -0
- data/rust-vendor/leb128fmt/.cargo_vcs_info.json +6 -0
- data/rust-vendor/leb128fmt/CHANGELOG.md +11 -0
- data/rust-vendor/leb128fmt/Cargo.toml +55 -0
- data/rust-vendor/leb128fmt/Cargo.toml.orig +32 -0
- data/rust-vendor/leb128fmt/LICENSE-APACHE +201 -0
- data/rust-vendor/leb128fmt/LICENSE-MIT +23 -0
- data/rust-vendor/leb128fmt/README.md +162 -0
- data/rust-vendor/leb128fmt/src/lib.rs +1650 -0
- data/rust-vendor/libc/.cargo-checksum.json +1 -1
- data/rust-vendor/libc/.cargo_vcs_info.json +1 -1
- data/rust-vendor/libc/CHANGELOG.md +42 -0
- data/rust-vendor/libc/Cargo.lock +1 -1
- data/rust-vendor/libc/Cargo.toml +75 -51
- data/rust-vendor/libc/Cargo.toml.orig +85 -53
- data/rust-vendor/libc/LICENSE-MIT +1 -1
- data/rust-vendor/libc/src/fuchsia/mod.rs +12 -10
- data/rust-vendor/libc/src/macros.rs +63 -71
- data/rust-vendor/libc/src/new/linux_uapi/linux/can/error.rs +73 -0
- data/rust-vendor/libc/src/new/linux_uapi/linux/can.rs +1 -0
- data/rust-vendor/libc/src/new/mod.rs +3 -2
- data/rust-vendor/libc/src/new/qurt/dlfcn.rs +26 -0
- data/rust-vendor/libc/src/new/qurt/fcntl.rs +4 -1
- data/rust-vendor/libc/src/new/qurt/mod.rs +224 -14
- data/rust-vendor/libc/src/new/qurt/pthread.rs +1 -22
- data/rust-vendor/libc/src/new/qurt/signal.rs +54 -4
- data/rust-vendor/libc/src/new/qurt/stdio.rs +0 -5
- data/rust-vendor/libc/src/new/qurt/sys/mman.rs +55 -0
- data/rust-vendor/libc/src/new/qurt/sys/mod.rs +2 -0
- data/rust-vendor/libc/src/new/qurt/sys/sched.rs +24 -0
- data/rust-vendor/libc/src/new/qurt/sys/stat.rs +0 -6
- data/rust-vendor/libc/src/new/qurt/time.rs +4 -22
- data/rust-vendor/libc/src/new/qurt/unistd.rs +210 -20
- data/rust-vendor/libc/src/qurt/mod.rs +9 -325
- data/rust-vendor/libc/src/types.rs +2 -2
- data/rust-vendor/libc/src/unix/aix/mod.rs +11 -20
- data/rust-vendor/libc/src/unix/aix/powerpc64.rs +6 -6
- data/rust-vendor/libc/src/unix/bsd/apple/mod.rs +15 -0
- data/rust-vendor/libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs +4 -4
- data/rust-vendor/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs +3 -3
- data/rust-vendor/libc/src/unix/bsd/freebsdlike/mod.rs +14 -0
- data/rust-vendor/libc/src/unix/bsd/mod.rs +0 -14
- data/rust-vendor/libc/src/unix/bsd/netbsdlike/mod.rs +6 -0
- data/rust-vendor/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs +15 -7
- data/rust-vendor/libc/src/unix/bsd/netbsdlike/openbsd/mod.rs +41 -1
- data/rust-vendor/libc/src/unix/cygwin/mod.rs +2 -2
- data/rust-vendor/libc/src/unix/haiku/mod.rs +1 -1
- data/rust-vendor/libc/src/unix/haiku/x86_64.rs +2 -2
- data/rust-vendor/libc/src/unix/hurd/mod.rs +6 -6
- data/rust-vendor/libc/src/unix/linux_like/android/mod.rs +2 -0
- data/rust-vendor/libc/src/unix/linux_like/linux/gnu/mod.rs +3 -0
- data/rust-vendor/libc/src/unix/linux_like/linux/musl/b32/arm/mod.rs +16 -13
- data/rust-vendor/libc/src/unix/linux_like/linux/musl/b32/hexagon.rs +12 -13
- data/rust-vendor/libc/src/unix/linux_like/linux/musl/b32/mips/mod.rs +25 -16
- data/rust-vendor/libc/src/unix/linux_like/linux/musl/b32/powerpc.rs +16 -13
- data/rust-vendor/libc/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs +12 -15
- data/rust-vendor/libc/src/unix/linux_like/linux/musl/b32/x86/mod.rs +10 -13
- data/rust-vendor/libc/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs +0 -15
- data/rust-vendor/libc/src/unix/linux_like/linux/musl/b64/loongarch64/mod.rs +0 -15
- data/rust-vendor/libc/src/unix/linux_like/linux/musl/b64/mips64.rs +0 -15
- data/rust-vendor/libc/src/unix/linux_like/linux/musl/b64/powerpc64.rs +0 -15
- data/rust-vendor/libc/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs +0 -15
- data/rust-vendor/libc/src/unix/linux_like/linux/musl/b64/s390x.rs +0 -15
- data/rust-vendor/libc/src/unix/linux_like/linux/musl/b64/wasm32/mod.rs +0 -15
- data/rust-vendor/libc/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs +9 -15
- data/rust-vendor/libc/src/unix/mod.rs +87 -11
- data/rust-vendor/libc/src/unix/newlib/arm/mod.rs +1 -1
- data/rust-vendor/libc/src/unix/newlib/horizon/mod.rs +1 -1
- data/rust-vendor/libc/src/unix/newlib/vita/mod.rs +3 -3
- data/rust-vendor/libc/src/unix/nto/mod.rs +23 -6
- data/rust-vendor/libc/src/unix/redox/mod.rs +45 -3
- data/rust-vendor/libc/src/unix/solarish/illumos.rs +2 -0
- data/rust-vendor/libc/src/vxworks/mod.rs +7 -7
- data/rust-vendor/memchr/.cargo-checksum.json +1 -1
- data/rust-vendor/memchr/.cargo_vcs_info.json +1 -1
- data/rust-vendor/memchr/Cargo.lock +13 -13
- data/rust-vendor/memchr/Cargo.toml +1 -1
- data/rust-vendor/memchr/Cargo.toml.orig +1 -1
- data/rust-vendor/memchr/src/cow.rs +3 -1
- data/rust-vendor/memchr/src/memmem/mod.rs +42 -3
- data/rust-vendor/prettyplease/.cargo-checksum.json +1 -0
- data/rust-vendor/prettyplease/.cargo_vcs_info.json +6 -0
- data/rust-vendor/prettyplease/.github/FUNDING.yml +1 -0
- data/rust-vendor/prettyplease/.github/workflows/ci.yml +123 -0
- data/rust-vendor/prettyplease/Cargo.lock +54 -0
- data/rust-vendor/prettyplease/Cargo.toml +90 -0
- data/rust-vendor/prettyplease/Cargo.toml.orig +43 -0
- data/rust-vendor/prettyplease/LICENSE-APACHE +176 -0
- data/rust-vendor/prettyplease/LICENSE-MIT +23 -0
- data/rust-vendor/prettyplease/README.md +312 -0
- data/rust-vendor/prettyplease/build.rs +21 -0
- data/rust-vendor/prettyplease/examples/.tokeignore +1 -0
- data/rust-vendor/prettyplease/examples/input.rs +1 -0
- data/rust-vendor/prettyplease/examples/output.prettyplease.rs +593 -0
- data/rust-vendor/prettyplease/examples/output.rustc.rs +506 -0
- data/rust-vendor/prettyplease/examples/output.rustfmt.rs +552 -0
- data/rust-vendor/prettyplease/src/algorithm.rs +386 -0
- data/rust-vendor/prettyplease/src/attr.rs +288 -0
- data/rust-vendor/prettyplease/src/classify.rs +324 -0
- data/rust-vendor/prettyplease/src/convenience.rs +98 -0
- data/rust-vendor/prettyplease/src/data.rs +79 -0
- data/rust-vendor/prettyplease/src/expr.rs +1533 -0
- data/rust-vendor/prettyplease/src/file.rs +17 -0
- data/rust-vendor/prettyplease/src/fixup.rs +676 -0
- data/rust-vendor/prettyplease/src/generics.rs +426 -0
- data/rust-vendor/prettyplease/src/item.rs +1813 -0
- data/rust-vendor/prettyplease/src/iter.rs +46 -0
- data/rust-vendor/prettyplease/src/lib.rs +385 -0
- data/rust-vendor/prettyplease/src/lifetime.rs +9 -0
- data/rust-vendor/prettyplease/src/lit.rs +57 -0
- data/rust-vendor/prettyplease/src/mac.rs +706 -0
- data/rust-vendor/prettyplease/src/pat.rs +254 -0
- data/rust-vendor/prettyplease/src/path.rs +194 -0
- data/rust-vendor/prettyplease/src/precedence.rs +148 -0
- data/rust-vendor/prettyplease/src/ring.rs +81 -0
- data/rust-vendor/prettyplease/src/stmt.rs +221 -0
- data/rust-vendor/prettyplease/src/token.rs +80 -0
- data/rust-vendor/prettyplease/src/ty.rs +326 -0
- data/rust-vendor/prettyplease/tests/test.rs +51 -0
- data/rust-vendor/prettyplease/tests/test_precedence.rs +900 -0
- data/rust-vendor/regex/.cargo-checksum.json +1 -1
- data/rust-vendor/regex/.cargo_vcs_info.json +1 -1
- data/rust-vendor/regex/CHANGELOG.md +13 -0
- data/rust-vendor/regex/Cargo.lock +5 -5
- data/rust-vendor/regex/Cargo.toml +15 -7
- data/rust-vendor/regex/Cargo.toml.orig +19 -2
- data/rust-vendor/regex-automata/.cargo-checksum.json +1 -1
- data/rust-vendor/regex-automata/.cargo_vcs_info.json +1 -1
- data/rust-vendor/regex-automata/Cargo.lock +3 -3
- data/rust-vendor/regex-automata/Cargo.toml +16 -1
- data/rust-vendor/regex-automata/Cargo.toml.orig +2 -1
- data/rust-vendor/regex-automata/src/dfa/onepass.rs +21 -5
- data/rust-vendor/regex-automata/tests/dfa/onepass/mod.rs +1 -0
- data/rust-vendor/regex-automata/tests/dfa/onepass/regression.rs +61 -0
- data/rust-vendor/regex-automata/tests/nfa/thompson/backtrack/mod.rs +1 -0
- data/rust-vendor/regex-automata/tests/nfa/thompson/backtrack/regression.rs +20 -0
- data/rust-vendor/regex-automata/tests/nfa/thompson/pikevm/mod.rs +1 -0
- data/rust-vendor/regex-automata/tests/nfa/thompson/pikevm/regression.rs +20 -0
- data/rust-vendor/regex-syntax/.cargo-checksum.json +1 -1
- data/rust-vendor/regex-syntax/.cargo_vcs_info.json +1 -1
- data/rust-vendor/regex-syntax/Cargo.lock +1 -1
- data/rust-vendor/regex-syntax/Cargo.toml +16 -5
- data/rust-vendor/regex-syntax/Cargo.toml.orig +2 -1
- data/rust-vendor/semver/.cargo-checksum.json +1 -0
- data/rust-vendor/semver/.cargo_vcs_info.json +6 -0
- data/rust-vendor/semver/.github/FUNDING.yml +1 -0
- data/rust-vendor/semver/.github/workflows/ci.yml +140 -0
- data/rust-vendor/semver/Cargo.lock +75 -0
- data/rust-vendor/semver/Cargo.toml +86 -0
- data/rust-vendor/semver/Cargo.toml.orig +36 -0
- data/rust-vendor/semver/LICENSE-APACHE +176 -0
- data/rust-vendor/semver/LICENSE-MIT +23 -0
- data/rust-vendor/semver/README.md +84 -0
- data/rust-vendor/semver/benches/parse.rs +24 -0
- data/rust-vendor/semver/src/display.rs +163 -0
- data/rust-vendor/semver/src/error.rs +126 -0
- data/rust-vendor/semver/src/eval.rs +179 -0
- data/rust-vendor/semver/src/identifier.rs +412 -0
- data/rust-vendor/semver/src/impls.rs +163 -0
- data/rust-vendor/semver/src/lib.rs +570 -0
- data/rust-vendor/semver/src/parse.rs +404 -0
- data/rust-vendor/semver/src/serde.rs +109 -0
- data/rust-vendor/semver/tests/node/mod.rs +43 -0
- data/rust-vendor/semver/tests/test_autotrait.rs +14 -0
- data/rust-vendor/semver/tests/test_identifier.rs +51 -0
- data/rust-vendor/semver/tests/test_version.rs +251 -0
- data/rust-vendor/semver/tests/test_version_req.rs +480 -0
- data/rust-vendor/semver/tests/util/mod.rs +54 -0
- data/rust-vendor/symbolic-common/.cargo-checksum.json +1 -1
- data/rust-vendor/symbolic-common/Cargo.lock +74 -3
- data/rust-vendor/symbolic-common/Cargo.toml +2 -2
- data/rust-vendor/symbolic-common/Cargo.toml.orig +1 -1
- data/rust-vendor/symbolic-demangle/.cargo-checksum.json +1 -1
- data/rust-vendor/symbolic-demangle/Cargo.lock +87 -9
- data/rust-vendor/symbolic-demangle/Cargo.toml +5 -5
- data/rust-vendor/symbolic-demangle/Cargo.toml.orig +2 -2
- data/rust-vendor/syn/.cargo-checksum.json +1 -1
- data/rust-vendor/syn/.cargo_vcs_info.json +1 -1
- data/rust-vendor/syn/Cargo.lock +322 -109
- data/rust-vendor/syn/Cargo.toml +2 -2
- data/rust-vendor/syn/Cargo.toml.orig +2 -2
- data/rust-vendor/syn/benches/rust.rs +1 -2
- data/rust-vendor/syn/src/lib.rs +1 -1
- data/rust-vendor/syn/src/parse.rs +2 -2
- data/rust-vendor/syn/src/path.rs +1 -5
- data/rust-vendor/syn/tests/common/eq.rs +28 -17
- data/rust-vendor/syn/tests/common/parse.rs +1 -2
- data/rust-vendor/syn/tests/repo/progress.rs +1 -1
- data/rust-vendor/syn/tests/test_round_trip.rs +5 -36
- data/rust-vendor/tempfile/.cargo-checksum.json +1 -1
- data/rust-vendor/tempfile/.cargo_vcs_info.json +1 -1
- data/rust-vendor/tempfile/CHANGELOG.md +4 -0
- data/rust-vendor/tempfile/Cargo.lock +333 -21
- data/rust-vendor/tempfile/Cargo.toml +2 -2
- data/rust-vendor/tempfile/Cargo.toml.orig +2 -2
- data/rust-vendor/unicode-ident/.cargo-checksum.json +1 -1
- data/rust-vendor/unicode-ident/.cargo_vcs_info.json +1 -1
- data/rust-vendor/unicode-ident/.github/workflows/ci.yml +10 -10
- data/rust-vendor/unicode-ident/Cargo.lock +468 -186
- data/rust-vendor/unicode-ident/Cargo.toml +8 -8
- data/rust-vendor/unicode-ident/Cargo.toml.orig +7 -5
- data/rust-vendor/unicode-ident/src/lib.rs +1 -1
- data/rust-vendor/unicode-xid/.cargo-checksum.json +1 -0
- data/rust-vendor/unicode-xid/.cargo_vcs_info.json +6 -0
- data/rust-vendor/unicode-xid/COPYRIGHT +7 -0
- data/rust-vendor/unicode-xid/Cargo.toml +65 -0
- data/rust-vendor/unicode-xid/Cargo.toml.orig +34 -0
- data/rust-vendor/unicode-xid/LICENSE-APACHE +201 -0
- data/rust-vendor/unicode-xid/LICENSE-MIT +25 -0
- data/rust-vendor/unicode-xid/README.md +61 -0
- data/rust-vendor/unicode-xid/benches/xid.rs +60 -0
- data/rust-vendor/unicode-xid/src/lib.rs +90 -0
- data/rust-vendor/unicode-xid/src/tables.rs +1537 -0
- data/rust-vendor/unicode-xid/src/tests.rs +95 -0
- data/rust-vendor/unicode-xid/tests/exhaustive_tests.rs +25 -0
- data/rust-vendor/uuid/.cargo-checksum.json +1 -1
- data/rust-vendor/uuid/.cargo_vcs_info.json +1 -1
- data/rust-vendor/uuid/Cargo.lock +298 -44
- data/rust-vendor/uuid/Cargo.toml +5 -5
- data/rust-vendor/uuid/Cargo.toml.orig +5 -5
- data/rust-vendor/uuid/README.md +3 -3
- data/rust-vendor/uuid/src/error.rs +1 -7
- data/rust-vendor/uuid/src/lib.rs +4 -4
- data/rust-vendor/wasip3/.cargo-checksum.json +1 -0
- data/rust-vendor/wasip3/.cargo_vcs_info.json +6 -0
- data/rust-vendor/wasip3/Cargo.lock +483 -0
- data/rust-vendor/wasip3/Cargo.toml +96 -0
- data/rust-vendor/wasip3/Cargo.toml.orig +49 -0
- data/rust-vendor/wasip3/README.md +56 -0
- data/rust-vendor/wasip3/examples/cli-command.rs +19 -0
- data/rust-vendor/wasip3/examples/http-proxy-compat.rs +20 -0
- data/rust-vendor/wasip3/examples/http-proxy.rs +22 -0
- data/rust-vendor/wasip3/src/command.rs +513 -0
- data/rust-vendor/wasip3/src/http_compat/body_writer.rs +145 -0
- data/rust-vendor/wasip3/src/http_compat/conversions.rs +307 -0
- data/rust-vendor/wasip3/src/http_compat/mod.rs +314 -0
- data/rust-vendor/wasip3/src/imports.rs +10543 -0
- data/rust-vendor/wasip3/src/lib.rs +280 -0
- data/rust-vendor/wasip3/src/service.rs +7274 -0
- data/rust-vendor/wasip3/wit/deps/cli.wit +256 -0
- data/rust-vendor/wasip3/wit/deps/clocks.wit +161 -0
- data/rust-vendor/wasip3/wit/deps/filesystem.wit +553 -0
- data/rust-vendor/wasip3/wit/deps/http.wit +457 -0
- data/rust-vendor/wasip3/wit/deps/random.wit +92 -0
- data/rust-vendor/wasip3/wit/deps/sockets.wit +752 -0
- data/rust-vendor/wasip3/wit/wasi-crate.wit +1 -0
- data/rust-vendor/wasm-encoder/.cargo-checksum.json +1 -0
- data/rust-vendor/wasm-encoder/.cargo_vcs_info.json +6 -0
- data/rust-vendor/wasm-encoder/Cargo.lock +348 -0
- data/rust-vendor/wasm-encoder/Cargo.toml +104 -0
- data/rust-vendor/wasm-encoder/Cargo.toml.orig +43 -0
- data/rust-vendor/wasm-encoder/README.md +81 -0
- data/rust-vendor/wasm-encoder/src/component/aliases.rs +161 -0
- data/rust-vendor/wasm-encoder/src/component/builder.rs +826 -0
- data/rust-vendor/wasm-encoder/src/component/canonicals.rs +584 -0
- data/rust-vendor/wasm-encoder/src/component/components.rs +30 -0
- data/rust-vendor/wasm-encoder/src/component/exports.rs +130 -0
- data/rust-vendor/wasm-encoder/src/component/imports.rs +170 -0
- data/rust-vendor/wasm-encoder/src/component/instances.rs +200 -0
- data/rust-vendor/wasm-encoder/src/component/modules.rs +30 -0
- data/rust-vendor/wasm-encoder/src/component/names.rs +162 -0
- data/rust-vendor/wasm-encoder/src/component/start.rs +53 -0
- data/rust-vendor/wasm-encoder/src/component/types.rs +816 -0
- data/rust-vendor/wasm-encoder/src/component.rs +169 -0
- data/rust-vendor/wasm-encoder/src/core/branch_hints.rs +127 -0
- data/rust-vendor/wasm-encoder/src/core/code.rs +2464 -0
- data/rust-vendor/wasm-encoder/src/core/custom.rs +74 -0
- data/rust-vendor/wasm-encoder/src/core/data.rs +187 -0
- data/rust-vendor/wasm-encoder/src/core/dump.rs +629 -0
- data/rust-vendor/wasm-encoder/src/core/elements.rs +225 -0
- data/rust-vendor/wasm-encoder/src/core/exports.rs +86 -0
- data/rust-vendor/wasm-encoder/src/core/functions.rs +64 -0
- data/rust-vendor/wasm-encoder/src/core/globals.rs +101 -0
- data/rust-vendor/wasm-encoder/src/core/imports.rs +230 -0
- data/rust-vendor/wasm-encoder/src/core/instructions.rs +4686 -0
- data/rust-vendor/wasm-encoder/src/core/linking.rs +264 -0
- data/rust-vendor/wasm-encoder/src/core/memories.rs +116 -0
- data/rust-vendor/wasm-encoder/src/core/names.rs +305 -0
- data/rust-vendor/wasm-encoder/src/core/producers.rs +181 -0
- data/rust-vendor/wasm-encoder/src/core/start.rs +40 -0
- data/rust-vendor/wasm-encoder/src/core/tables.rs +130 -0
- data/rust-vendor/wasm-encoder/src/core/tags.rs +86 -0
- data/rust-vendor/wasm-encoder/src/core/types.rs +753 -0
- data/rust-vendor/wasm-encoder/src/core.rs +179 -0
- data/rust-vendor/wasm-encoder/src/lib.rs +224 -0
- data/rust-vendor/wasm-encoder/src/raw.rs +32 -0
- data/rust-vendor/wasm-encoder/src/reencode/component.rs +1548 -0
- data/rust-vendor/wasm-encoder/src/reencode.rs +2134 -0
- data/rust-vendor/wasm-metadata/.cargo-checksum.json +1 -0
- data/rust-vendor/wasm-metadata/.cargo_vcs_info.json +6 -0
- data/rust-vendor/wasm-metadata/Cargo.lock +769 -0
- data/rust-vendor/wasm-metadata/Cargo.toml +152 -0
- data/rust-vendor/wasm-metadata/Cargo.toml.orig +38 -0
- data/rust-vendor/wasm-metadata/README.md +27 -0
- data/rust-vendor/wasm-metadata/src/add_metadata.rs +91 -0
- data/rust-vendor/wasm-metadata/src/clap.rs +169 -0
- data/rust-vendor/wasm-metadata/src/dependencies.rs +142 -0
- data/rust-vendor/wasm-metadata/src/lib.rs +83 -0
- data/rust-vendor/wasm-metadata/src/metadata.rs +34 -0
- data/rust-vendor/wasm-metadata/src/names/component.rs +107 -0
- data/rust-vendor/wasm-metadata/src/names/mod.rs +5 -0
- data/rust-vendor/wasm-metadata/src/names/module.rs +101 -0
- data/rust-vendor/wasm-metadata/src/oci_annotations/authors.rs +111 -0
- data/rust-vendor/wasm-metadata/src/oci_annotations/description.rs +110 -0
- data/rust-vendor/wasm-metadata/src/oci_annotations/homepage.rs +118 -0
- data/rust-vendor/wasm-metadata/src/oci_annotations/licenses.rs +122 -0
- data/rust-vendor/wasm-metadata/src/oci_annotations/mod.rs +32 -0
- data/rust-vendor/wasm-metadata/src/oci_annotations/revision.rs +113 -0
- data/rust-vendor/wasm-metadata/src/oci_annotations/source.rs +117 -0
- data/rust-vendor/wasm-metadata/src/oci_annotations/version.rs +110 -0
- data/rust-vendor/wasm-metadata/src/payload.rs +215 -0
- data/rust-vendor/wasm-metadata/src/producers.rs +254 -0
- data/rust-vendor/wasm-metadata/src/rewrite.rs +224 -0
- data/rust-vendor/wasm-metadata/src/utils.rs +21 -0
- data/rust-vendor/wasm-metadata/tests/component.rs +310 -0
- data/rust-vendor/wasm-metadata/tests/module.rs +86 -0
- data/rust-vendor/wasmparser/.cargo-checksum.json +1 -0
- data/rust-vendor/wasmparser/.cargo_vcs_info.json +6 -0
- data/rust-vendor/wasmparser/Cargo.lock +687 -0
- data/rust-vendor/wasmparser/Cargo.toml +161 -0
- data/rust-vendor/wasmparser/Cargo.toml.orig +89 -0
- data/rust-vendor/wasmparser/README.md +28 -0
- data/rust-vendor/wasmparser/benches/.gitignore +1 -0
- data/rust-vendor/wasmparser/benches/benchmark.rs +395 -0
- data/rust-vendor/wasmparser/examples/simple.rs +37 -0
- data/rust-vendor/wasmparser/src/arity.rs +318 -0
- data/rust-vendor/wasmparser/src/binary_reader.rs +2109 -0
- data/rust-vendor/wasmparser/src/collections/hash.rs +120 -0
- data/rust-vendor/wasmparser/src/collections/index_map/detail.rs +1100 -0
- data/rust-vendor/wasmparser/src/collections/index_map/tests.rs +183 -0
- data/rust-vendor/wasmparser/src/collections/index_map.rs +653 -0
- data/rust-vendor/wasmparser/src/collections/index_set.rs +316 -0
- data/rust-vendor/wasmparser/src/collections/map.rs +852 -0
- data/rust-vendor/wasmparser/src/collections/mod.rs +34 -0
- data/rust-vendor/wasmparser/src/collections/set.rs +672 -0
- data/rust-vendor/wasmparser/src/features.rs +442 -0
- data/rust-vendor/wasmparser/src/lib.rs +1340 -0
- data/rust-vendor/wasmparser/src/limits.rs +90 -0
- data/rust-vendor/wasmparser/src/parser.rs +1925 -0
- data/rust-vendor/wasmparser/src/readers/component/aliases.rs +119 -0
- data/rust-vendor/wasmparser/src/readers/component/canonicals.rs +458 -0
- data/rust-vendor/wasmparser/src/readers/component/exports.rs +135 -0
- data/rust-vendor/wasmparser/src/readers/component/imports.rs +145 -0
- data/rust-vendor/wasmparser/src/readers/component/instances.rs +166 -0
- data/rust-vendor/wasmparser/src/readers/component/names.rs +101 -0
- data/rust-vendor/wasmparser/src/readers/component/start.rs +31 -0
- data/rust-vendor/wasmparser/src/readers/component/types.rs +537 -0
- data/rust-vendor/wasmparser/src/readers/component.rs +17 -0
- data/rust-vendor/wasmparser/src/readers/core/branch_hinting.rs +59 -0
- data/rust-vendor/wasmparser/src/readers/core/code.rs +177 -0
- data/rust-vendor/wasmparser/src/readers/core/coredumps.rs +274 -0
- data/rust-vendor/wasmparser/src/readers/core/custom.rs +134 -0
- data/rust-vendor/wasmparser/src/readers/core/data.rs +94 -0
- data/rust-vendor/wasmparser/src/readers/core/dylink0.rs +117 -0
- data/rust-vendor/wasmparser/src/readers/core/elements.rs +153 -0
- data/rust-vendor/wasmparser/src/readers/core/exports.rs +75 -0
- data/rust-vendor/wasmparser/src/readers/core/functions.rs +17 -0
- data/rust-vendor/wasmparser/src/readers/core/globals.rs +51 -0
- data/rust-vendor/wasmparser/src/readers/core/imports.rs +307 -0
- data/rust-vendor/wasmparser/src/readers/core/init.rs +70 -0
- data/rust-vendor/wasmparser/src/readers/core/linking.rs +457 -0
- data/rust-vendor/wasmparser/src/readers/core/memories.rs +61 -0
- data/rust-vendor/wasmparser/src/readers/core/names.rs +162 -0
- data/rust-vendor/wasmparser/src/readers/core/operators.rs +1105 -0
- data/rust-vendor/wasmparser/src/readers/core/producers.rs +84 -0
- data/rust-vendor/wasmparser/src/readers/core/reloc.rs +300 -0
- data/rust-vendor/wasmparser/src/readers/core/tables.rs +96 -0
- data/rust-vendor/wasmparser/src/readers/core/tags.rs +32 -0
- data/rust-vendor/wasmparser/src/readers/core/types/matches.rs +321 -0
- data/rust-vendor/wasmparser/src/readers/core/types.rs +2249 -0
- data/rust-vendor/wasmparser/src/readers/core.rs +43 -0
- data/rust-vendor/wasmparser/src/readers.rs +330 -0
- data/rust-vendor/wasmparser/src/resources.rs +265 -0
- data/rust-vendor/wasmparser/src/validator/component.rs +4765 -0
- data/rust-vendor/wasmparser/src/validator/component_types.rs +4036 -0
- data/rust-vendor/wasmparser/src/validator/core/canonical.rs +552 -0
- data/rust-vendor/wasmparser/src/validator/core.rs +1313 -0
- data/rust-vendor/wasmparser/src/validator/func.rs +613 -0
- data/rust-vendor/wasmparser/src/validator/names.rs +1017 -0
- data/rust-vendor/wasmparser/src/validator/operators/simd.rs +971 -0
- data/rust-vendor/wasmparser/src/validator/operators.rs +4696 -0
- data/rust-vendor/wasmparser/src/validator/types.rs +1327 -0
- data/rust-vendor/wasmparser/src/validator.rs +1645 -0
- data/rust-vendor/wasmparser/tests/big-module.rs +62 -0
- data/rust-vendor/wit-bindgen/.cargo-checksum.json +1 -1
- data/rust-vendor/wit-bindgen/.cargo_vcs_info.json +1 -1
- data/rust-vendor/wit-bindgen/Cargo.lock +76 -66
- data/rust-vendor/wit-bindgen/Cargo.toml +25 -11
- data/rust-vendor/wit-bindgen/Cargo.toml.orig +11 -3
- data/rust-vendor/wit-bindgen/src/lib.rs +21 -15
- data/rust-vendor/wit-bindgen/src/rt/async_support/abi_buffer.rs +35 -32
- data/rust-vendor/wit-bindgen/src/rt/async_support/cabi.rs +15 -20
- data/rust-vendor/wit-bindgen/src/rt/async_support/error_context.rs +11 -22
- data/rust-vendor/wit-bindgen/src/rt/async_support/future_support.rs +406 -146
- data/rust-vendor/wit-bindgen/src/rt/async_support/inter_task_wakeup.rs +98 -0
- data/rust-vendor/wit-bindgen/src/rt/async_support/inter_task_wakeup_disabled.rs +45 -0
- data/rust-vendor/wit-bindgen/src/rt/async_support/spawn.rs +82 -0
- data/rust-vendor/wit-bindgen/src/rt/async_support/spawn_disabled.rs +30 -0
- data/rust-vendor/wit-bindgen/src/rt/async_support/stream_support.rs +262 -122
- data/rust-vendor/wit-bindgen/src/rt/async_support/subtask.rs +49 -54
- data/rust-vendor/wit-bindgen/src/rt/async_support/unit_stream.rs +81 -0
- data/rust-vendor/wit-bindgen/src/rt/async_support/waitable.rs +47 -31
- data/rust-vendor/wit-bindgen/src/rt/async_support/waitable_set.rs +17 -35
- data/rust-vendor/wit-bindgen/src/rt/async_support.rs +262 -188
- data/rust-vendor/wit-bindgen/src/rt/mod.rs +14 -12
- data/rust-vendor/wit-bindgen/src/rt/wit_bindgen_cabi_realloc.c +2 -2
- data/rust-vendor/wit-bindgen/src/rt/wit_bindgen_cabi_realloc.o +0 -0
- data/rust-vendor/wit-bindgen/src/rt/wit_bindgen_cabi_realloc.rs +2 -2
- data/rust-vendor/wit-bindgen/src/rt/wit_bindgen_cabi_wasip3.o +0 -0
- data/rust-vendor/wit-bindgen-0.46.0/.cargo-checksum.json +1 -0
- data/rust-vendor/wit-bindgen-0.46.0/.cargo_vcs_info.json +6 -0
- data/rust-vendor/wit-bindgen-0.46.0/Cargo.lock +428 -0
- data/rust-vendor/wit-bindgen-0.46.0/Cargo.toml +88 -0
- data/rust-vendor/wit-bindgen-0.46.0/Cargo.toml.orig +37 -0
- data/rust-vendor/wit-bindgen-0.46.0/LICENSE-APACHE +201 -0
- data/rust-vendor/wit-bindgen-0.46.0/LICENSE-Apache-2.0_WITH_LLVM-exception +220 -0
- data/rust-vendor/wit-bindgen-0.46.0/LICENSE-MIT +23 -0
- data/rust-vendor/wit-bindgen-0.46.0/README.md +45 -0
- data/rust-vendor/wit-bindgen-0.46.0/build.rs +32 -0
- data/rust-vendor/wit-bindgen-0.46.0/src/examples/_0_world_imports.rs +17 -0
- data/rust-vendor/wit-bindgen-0.46.0/src/examples/_1_interface_imports.rs +32 -0
- data/rust-vendor/wit-bindgen-0.46.0/src/examples/_2_imported_resources.rs +22 -0
- data/rust-vendor/wit-bindgen-0.46.0/src/examples/_3_world_exports.rs +47 -0
- data/rust-vendor/wit-bindgen-0.46.0/src/examples/_4_exported_resources.rs +26 -0
- data/rust-vendor/wit-bindgen-0.46.0/src/examples.rs +55 -0
- data/rust-vendor/wit-bindgen-0.46.0/src/lib.rs +881 -0
- data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support/abi_buffer.rs +417 -0
- data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support/cabi.rs +112 -0
- data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support/error_context.rs +94 -0
- data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support/future_support.rs +734 -0
- data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support/stream_support.rs +604 -0
- data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support/subtask.rs +289 -0
- data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support/waitable.rs +466 -0
- data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support/waitable_set.rs +100 -0
- data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support.rs +634 -0
- data/rust-vendor/wit-bindgen-0.46.0/src/rt/mod.rs +230 -0
- data/rust-vendor/wit-bindgen-0.46.0/src/rt/wit_bindgen_cabi_realloc.c +10 -0
- data/rust-vendor/wit-bindgen-0.46.0/src/rt/wit_bindgen_cabi_realloc.o +0 -0
- data/rust-vendor/wit-bindgen-0.46.0/src/rt/wit_bindgen_cabi_realloc.rs +11 -0
- data/rust-vendor/wit-bindgen-0.46.0/src/rt/wit_bindgen_cabi_wasip3.c +12 -0
- data/rust-vendor/wit-bindgen-0.46.0/src/rt/wit_bindgen_cabi_wasip3.o +0 -0
- data/rust-vendor/wit-bindgen-0.46.0/wasi-cli@0.2.0.wasm +0 -0
- data/rust-vendor/wit-bindgen-core/.cargo-checksum.json +1 -0
- data/rust-vendor/wit-bindgen-core/.cargo_vcs_info.json +6 -0
- data/rust-vendor/wit-bindgen-core/Cargo.lock +340 -0
- data/rust-vendor/wit-bindgen-core/Cargo.toml +75 -0
- data/rust-vendor/wit-bindgen-core/Cargo.toml.orig +30 -0
- data/rust-vendor/wit-bindgen-core/LICENSE-APACHE +201 -0
- data/rust-vendor/wit-bindgen-core/LICENSE-Apache-2.0_WITH_LLVM-exception +220 -0
- data/rust-vendor/wit-bindgen-core/LICENSE-MIT +23 -0
- data/rust-vendor/wit-bindgen-core/src/abi.rs +2526 -0
- data/rust-vendor/wit-bindgen-core/src/async_.rs +200 -0
- data/rust-vendor/wit-bindgen-core/src/lib.rs +239 -0
- data/rust-vendor/wit-bindgen-core/src/ns.rs +27 -0
- data/rust-vendor/wit-bindgen-core/src/path.rs +47 -0
- data/rust-vendor/wit-bindgen-core/src/source.rs +222 -0
- data/rust-vendor/wit-bindgen-core/src/types.rs +232 -0
- data/rust-vendor/wit-bindgen-rust/.cargo-checksum.json +1 -0
- data/rust-vendor/wit-bindgen-rust/.cargo_vcs_info.json +6 -0
- data/rust-vendor/wit-bindgen-rust/Cargo.lock +547 -0
- data/rust-vendor/wit-bindgen-rust/Cargo.toml +112 -0
- data/rust-vendor/wit-bindgen-rust/Cargo.toml.orig +44 -0
- data/rust-vendor/wit-bindgen-rust/LICENSE-APACHE +201 -0
- data/rust-vendor/wit-bindgen-rust/LICENSE-Apache-2.0_WITH_LLVM-exception +220 -0
- data/rust-vendor/wit-bindgen-rust/LICENSE-MIT +23 -0
- data/rust-vendor/wit-bindgen-rust/build.rs +4 -0
- data/rust-vendor/wit-bindgen-rust/src/bindgen.rs +1215 -0
- data/rust-vendor/wit-bindgen-rust/src/interface.rs +3020 -0
- data/rust-vendor/wit-bindgen-rust/src/lib.rs +1880 -0
- data/rust-vendor/wit-bindgen-rust/tests/codegen.rs +174 -0
- data/rust-vendor/wit-bindgen-rust/tests/wit/path1/world.wit +3 -0
- data/rust-vendor/wit-bindgen-rust/tests/wit/path2/world.wit +3 -0
- data/rust-vendor/wit-bindgen-rust/tests/wit/path3/package.wit +3 -0
- data/rust-vendor/wit-bindgen-rust-macro/.cargo-checksum.json +1 -0
- data/rust-vendor/wit-bindgen-rust-macro/.cargo_vcs_info.json +6 -0
- data/rust-vendor/wit-bindgen-rust-macro/Cargo.lock +306 -0
- data/rust-vendor/wit-bindgen-rust-macro/Cargo.toml +62 -0
- data/rust-vendor/wit-bindgen-rust-macro/Cargo.toml.orig +28 -0
- data/rust-vendor/wit-bindgen-rust-macro/LICENSE-APACHE +201 -0
- data/rust-vendor/wit-bindgen-rust-macro/LICENSE-Apache-2.0_WITH_LLVM-exception +220 -0
- data/rust-vendor/wit-bindgen-rust-macro/LICENSE-MIT +23 -0
- data/rust-vendor/wit-bindgen-rust-macro/build.rs +5 -0
- data/rust-vendor/wit-bindgen-rust-macro/src/lib.rs +606 -0
- data/rust-vendor/wit-component/.cargo-checksum.json +1 -0
- data/rust-vendor/wit-component/.cargo_vcs_info.json +6 -0
- data/rust-vendor/wit-component/Cargo.lock +1823 -0
- data/rust-vendor/wit-component/Cargo.toml +217 -0
- data/rust-vendor/wit-component/Cargo.toml.orig +61 -0
- data/rust-vendor/wit-component/README.md +251 -0
- data/rust-vendor/wit-component/src/dummy.rs +395 -0
- data/rust-vendor/wit-component/src/encoding/dedupe.rs +164 -0
- data/rust-vendor/wit-component/src/encoding/types.rs +510 -0
- data/rust-vendor/wit-component/src/encoding/wit.rs +393 -0
- data/rust-vendor/wit-component/src/encoding/world.rs +525 -0
- data/rust-vendor/wit-component/src/encoding.rs +3231 -0
- data/rust-vendor/wit-component/src/gc.rs +1134 -0
- data/rust-vendor/wit-component/src/lib.rs +178 -0
- data/rust-vendor/wit-component/src/linking/metadata.rs +515 -0
- data/rust-vendor/wit-component/src/linking.rs +1727 -0
- data/rust-vendor/wit-component/src/metadata.rs +447 -0
- data/rust-vendor/wit-component/src/printing.rs +1485 -0
- data/rust-vendor/wit-component/src/semver_check.rs +113 -0
- data/rust-vendor/wit-component/src/targets.rs +44 -0
- data/rust-vendor/wit-component/src/validation.rs +2679 -0
- data/rust-vendor/wit-component/tests/.gitignore +2 -0
- data/rust-vendor/wit-component/tests/components/adapt-empty-interface/adapt-old.wat +3 -0
- data/rust-vendor/wit-component/tests/components/adapt-empty-interface/adapt-old.wit +5 -0
- data/rust-vendor/wit-component/tests/components/adapt-empty-interface/component.wat +60 -0
- data/rust-vendor/wit-component/tests/components/adapt-empty-interface/component.wit.print +4 -0
- data/rust-vendor/wit-component/tests/components/adapt-empty-interface/module.wat +3 -0
- data/rust-vendor/wit-component/tests/components/adapt-empty-interface/module.wit +2 -0
- data/rust-vendor/wit-component/tests/components/adapt-export-default/adapt-old.wat +4 -0
- data/rust-vendor/wit-component/tests/components/adapt-export-default/adapt-old.wit +3 -0
- data/rust-vendor/wit-component/tests/components/adapt-export-default/component.wat +32 -0
- data/rust-vendor/wit-component/tests/components/adapt-export-default/component.wit.print +5 -0
- data/rust-vendor/wit-component/tests/components/adapt-export-default/module.wat +3 -0
- data/rust-vendor/wit-component/tests/components/adapt-export-default/module.wit +2 -0
- data/rust-vendor/wit-component/tests/components/adapt-export-namespaced/adapt-old.wat +4 -0
- data/rust-vendor/wit-component/tests/components/adapt-export-namespaced/adapt-old.wit +7 -0
- data/rust-vendor/wit-component/tests/components/adapt-export-namespaced/component.wat +42 -0
- data/rust-vendor/wit-component/tests/components/adapt-export-namespaced/component.wit.print +5 -0
- data/rust-vendor/wit-component/tests/components/adapt-export-namespaced/module.wat +3 -0
- data/rust-vendor/wit-component/tests/components/adapt-export-namespaced/module.wit +3 -0
- data/rust-vendor/wit-component/tests/components/adapt-export-reallocs/adapt-old.wat +47 -0
- data/rust-vendor/wit-component/tests/components/adapt-export-reallocs/adapt-old.wit +6 -0
- data/rust-vendor/wit-component/tests/components/adapt-export-reallocs/component.wat +131 -0
- data/rust-vendor/wit-component/tests/components/adapt-export-reallocs/component.wit.print +9 -0
- data/rust-vendor/wit-component/tests/components/adapt-export-reallocs/module.wat +8 -0
- data/rust-vendor/wit-component/tests/components/adapt-export-reallocs/module.wit +3 -0
- data/rust-vendor/wit-component/tests/components/adapt-export-save-args/adapt-old.wat +13 -0
- data/rust-vendor/wit-component/tests/components/adapt-export-save-args/adapt-old.wit +3 -0
- data/rust-vendor/wit-component/tests/components/adapt-export-save-args/component.wat +86 -0
- data/rust-vendor/wit-component/tests/components/adapt-export-save-args/component.wit.print +5 -0
- data/rust-vendor/wit-component/tests/components/adapt-export-save-args/module.wat +4 -0
- data/rust-vendor/wit-component/tests/components/adapt-export-save-args/module.wit +2 -0
- data/rust-vendor/wit-component/tests/components/adapt-export-with-post-return/adapt-old.wat +33 -0
- data/rust-vendor/wit-component/tests/components/adapt-export-with-post-return/adapt-old.wit +7 -0
- data/rust-vendor/wit-component/tests/components/adapt-export-with-post-return/component.wat +101 -0
- data/rust-vendor/wit-component/tests/components/adapt-export-with-post-return/component.wit.print +5 -0
- data/rust-vendor/wit-component/tests/components/adapt-export-with-post-return/module.wat +9 -0
- data/rust-vendor/wit-component/tests/components/adapt-export-with-post-return/module.wit +3 -0
- data/rust-vendor/wit-component/tests/components/adapt-import-only-used-in-adapter/adapt-unused.wat +7 -0
- data/rust-vendor/wit-component/tests/components/adapt-import-only-used-in-adapter/adapt-unused.wit +9 -0
- data/rust-vendor/wit-component/tests/components/adapt-import-only-used-in-adapter/component.wat +115 -0
- data/rust-vendor/wit-component/tests/components/adapt-import-only-used-in-adapter/component.wit.print +9 -0
- data/rust-vendor/wit-component/tests/components/adapt-import-only-used-in-adapter/module.wat +5 -0
- data/rust-vendor/wit-component/tests/components/adapt-import-only-used-in-adapter/module.wit +6 -0
- data/rust-vendor/wit-component/tests/components/adapt-inject-stack/adapt-old.wat +54 -0
- data/rust-vendor/wit-component/tests/components/adapt-inject-stack/adapt-old.wit +5 -0
- data/rust-vendor/wit-component/tests/components/adapt-inject-stack/component.wat +163 -0
- data/rust-vendor/wit-component/tests/components/adapt-inject-stack/component.wit.print +7 -0
- data/rust-vendor/wit-component/tests/components/adapt-inject-stack/module.wat +4 -0
- data/rust-vendor/wit-component/tests/components/adapt-inject-stack/module.wit +2 -0
- data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-adapt-realloc/adapt-old.wat +76 -0
- data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-adapt-realloc/adapt-old.wit +5 -0
- data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-adapt-realloc/component.wat +174 -0
- data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-adapt-realloc/component.wit.print +7 -0
- data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-adapt-realloc/module.wat +12 -0
- data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-adapt-realloc/module.wit +2 -0
- data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-realloc/adapt-old.wat +76 -0
- data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-realloc/adapt-old.wit +5 -0
- data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-realloc/component.wat +199 -0
- data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-realloc/component.wit.print +7 -0
- data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-realloc/module.wat +38 -0
- data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-realloc/module.wit +3 -0
- data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-realloc-no-state/adapt-old.wat +68 -0
- data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-realloc-no-state/adapt-old.wit +5 -0
- data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-realloc-no-state/component.wat +216 -0
- data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-realloc-no-state/component.wit.print +7 -0
- data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-realloc-no-state/module.wat +38 -0
- data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-realloc-no-state/module.wit +3 -0
- data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-reallocing-adapter/adapt-old.wat +62 -0
- data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-reallocing-adapter/adapt-old.wit +5 -0
- data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-reallocing-adapter/component.wat +187 -0
- data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-reallocing-adapter/component.wit.print +7 -0
- data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-reallocing-adapter/module.wat +38 -0
- data/rust-vendor/wit-component/tests/components/adapt-inject-stack-with-reallocing-adapter/module.wit +2 -0
- data/rust-vendor/wit-component/tests/components/adapt-list-return/adapt-old.wat +14 -0
- data/rust-vendor/wit-component/tests/components/adapt-list-return/adapt-old.wit +5 -0
- data/rust-vendor/wit-component/tests/components/adapt-list-return/component.wat +104 -0
- data/rust-vendor/wit-component/tests/components/adapt-list-return/component.wit.print +7 -0
- data/rust-vendor/wit-component/tests/components/adapt-list-return/module.wat +4 -0
- data/rust-vendor/wit-component/tests/components/adapt-list-return/module.wit +3 -0
- data/rust-vendor/wit-component/tests/components/adapt-memory-simple/adapt-old.wat +4 -0
- data/rust-vendor/wit-component/tests/components/adapt-memory-simple/adapt-old.wit +5 -0
- data/rust-vendor/wit-component/tests/components/adapt-memory-simple/component.wat +92 -0
- data/rust-vendor/wit-component/tests/components/adapt-memory-simple/component.wit.print +7 -0
- data/rust-vendor/wit-component/tests/components/adapt-memory-simple/module.wat +4 -0
- data/rust-vendor/wit-component/tests/components/adapt-memory-simple/module.wit +2 -0
- data/rust-vendor/wit-component/tests/components/adapt-multiple/adapt-foo.wat +10 -0
- data/rust-vendor/wit-component/tests/components/adapt-multiple/adapt-foo.wit +8 -0
- data/rust-vendor/wit-component/tests/components/adapt-multiple/component.wat +107 -0
- data/rust-vendor/wit-component/tests/components/adapt-multiple/component.wit.print +10 -0
- data/rust-vendor/wit-component/tests/components/adapt-multiple/module.wat +4 -0
- data/rust-vendor/wit-component/tests/components/adapt-multiple/module.wit +2 -0
- data/rust-vendor/wit-component/tests/components/adapt-preview1/adapt-wasi-snapshot-preview1.wat +13 -0
- data/rust-vendor/wit-component/tests/components/adapt-preview1/adapt-wasi-snapshot-preview1.wit +12 -0
- data/rust-vendor/wit-component/tests/components/adapt-preview1/component.wat +119 -0
- data/rust-vendor/wit-component/tests/components/adapt-preview1/component.wit.print +8 -0
- data/rust-vendor/wit-component/tests/components/adapt-preview1/module.wat +11 -0
- data/rust-vendor/wit-component/tests/components/adapt-preview1/module.wit +7 -0
- data/rust-vendor/wit-component/tests/components/adapt-stub-wasip2/adapt-wasip2.wat +8 -0
- data/rust-vendor/wit-component/tests/components/adapt-stub-wasip2/adapt-wasip2.wit +1 -0
- data/rust-vendor/wit-component/tests/components/adapt-stub-wasip2/component.wat +74 -0
- data/rust-vendor/wit-component/tests/components/adapt-stub-wasip2/component.wit.print +4 -0
- data/rust-vendor/wit-component/tests/components/adapt-stub-wasip2/deps/cli/environment.wit +5 -0
- data/rust-vendor/wit-component/tests/components/adapt-stub-wasip2/module.wat +11 -0
- data/rust-vendor/wit-component/tests/components/adapt-stub-wasip2/module.wit +5 -0
- data/rust-vendor/wit-component/tests/components/adapt-unused/adapt-old.wat +4 -0
- data/rust-vendor/wit-component/tests/components/adapt-unused/adapt-old.wit +5 -0
- data/rust-vendor/wit-component/tests/components/adapt-unused/component.wat +12 -0
- data/rust-vendor/wit-component/tests/components/adapt-unused/component.wit.print +4 -0
- data/rust-vendor/wit-component/tests/components/adapt-unused/module.wat +1 -0
- data/rust-vendor/wit-component/tests/components/adapt-unused/module.wit +2 -0
- data/rust-vendor/wit-component/tests/components/async-builtins/component.wat +259 -0
- data/rust-vendor/wit-component/tests/components/async-builtins/component.wit.print +6 -0
- data/rust-vendor/wit-component/tests/components/async-builtins/module.wat +28 -0
- data/rust-vendor/wit-component/tests/components/async-builtins/module.wit +10 -0
- data/rust-vendor/wit-component/tests/components/async-export/component.wat +91 -0
- data/rust-vendor/wit-component/tests/components/async-export/component.wit.print +6 -0
- data/rust-vendor/wit-component/tests/components/async-export/module.wat +8 -0
- data/rust-vendor/wit-component/tests/components/async-export/module.wit +30 -0
- data/rust-vendor/wit-component/tests/components/async-export-with-callback/component.wat +59 -0
- data/rust-vendor/wit-component/tests/components/async-export-with-callback/component.wit.print +6 -0
- data/rust-vendor/wit-component/tests/components/async-export-with-callback/module.wat +8 -0
- data/rust-vendor/wit-component/tests/components/async-export-with-callback/module.wit +10 -0
- data/rust-vendor/wit-component/tests/components/async-import/component.wat +125 -0
- data/rust-vendor/wit-component/tests/components/async-import/component.wit.print +6 -0
- data/rust-vendor/wit-component/tests/components/async-import/module.wat +8 -0
- data/rust-vendor/wit-component/tests/components/async-import/module.wit +10 -0
- data/rust-vendor/wit-component/tests/components/async-import-only-intrinsic/component.wat +34 -0
- data/rust-vendor/wit-component/tests/components/async-import-only-intrinsic/component.wit.print +5 -0
- data/rust-vendor/wit-component/tests/components/async-import-only-intrinsic/module.wat +4 -0
- data/rust-vendor/wit-component/tests/components/async-import-only-intrinsic/module.wit +17 -0
- data/rust-vendor/wit-component/tests/components/async-import-tricky/component.wat +39 -0
- data/rust-vendor/wit-component/tests/components/async-import-tricky/component.wit.print +5 -0
- data/rust-vendor/wit-component/tests/components/async-import-tricky/module.wat +6 -0
- data/rust-vendor/wit-component/tests/components/async-import-tricky/module.wit +17 -0
- data/rust-vendor/wit-component/tests/components/async-streams-and-futures/component.wat +649 -0
- data/rust-vendor/wit-component/tests/components/async-streams-and-futures/component.wit.print +9 -0
- data/rust-vendor/wit-component/tests/components/async-streams-and-futures/module.wat +92 -0
- data/rust-vendor/wit-component/tests/components/async-streams-and-futures/module.wit +12 -0
- data/rust-vendor/wit-component/tests/components/async-unit-builtins/component.wat +138 -0
- data/rust-vendor/wit-component/tests/components/async-unit-builtins/component.wit.print +4 -0
- data/rust-vendor/wit-component/tests/components/async-unit-builtins/module.wat +18 -0
- data/rust-vendor/wit-component/tests/components/async-unit-builtins/module.wit +4 -0
- data/rust-vendor/wit-component/tests/components/bare-funcs/component.wat +93 -0
- data/rust-vendor/wit-component/tests/components/bare-funcs/component.wit.print +9 -0
- data/rust-vendor/wit-component/tests/components/bare-funcs/module.wat +13 -0
- data/rust-vendor/wit-component/tests/components/bare-funcs/module.wit +7 -0
- data/rust-vendor/wit-component/tests/components/cm32-names/component.wat +366 -0
- data/rust-vendor/wit-component/tests/components/cm32-names/component.wit.print +25 -0
- data/rust-vendor/wit-component/tests/components/cm32-names/module.wat +32 -0
- data/rust-vendor/wit-component/tests/components/cm32-names/module.wit +30 -0
- data/rust-vendor/wit-component/tests/components/custom-page-sizes/component.wat +23 -0
- data/rust-vendor/wit-component/tests/components/custom-page-sizes/component.wit.print +4 -0
- data/rust-vendor/wit-component/tests/components/custom-page-sizes/module.wat +12 -0
- data/rust-vendor/wit-component/tests/components/custom-page-sizes/module.wit +3 -0
- data/rust-vendor/wit-component/tests/components/deduplicate-imports/adapt-wasi-snapshot-preview1.wat +10 -0
- data/rust-vendor/wit-component/tests/components/deduplicate-imports/adapt-wasi-snapshot-preview1.wit +10 -0
- data/rust-vendor/wit-component/tests/components/deduplicate-imports/component.wat +132 -0
- data/rust-vendor/wit-component/tests/components/deduplicate-imports/component.wit.print +9 -0
- data/rust-vendor/wit-component/tests/components/deduplicate-imports/module.wat +40 -0
- data/rust-vendor/wit-component/tests/components/deduplicate-imports/module.wit +9 -0
- data/rust-vendor/wit-component/tests/components/empty/component.wat +12 -0
- data/rust-vendor/wit-component/tests/components/empty/component.wit.print +4 -0
- data/rust-vendor/wit-component/tests/components/empty/module.wat +1 -0
- data/rust-vendor/wit-component/tests/components/empty/module.wit +2 -0
- data/rust-vendor/wit-component/tests/components/ensure-default-type-exports/component.wat +50 -0
- data/rust-vendor/wit-component/tests/components/ensure-default-type-exports/component.wit.print +7 -0
- data/rust-vendor/wit-component/tests/components/ensure-default-type-exports/module.wat +6 -0
- data/rust-vendor/wit-component/tests/components/ensure-default-type-exports/module.wit +17 -0
- data/rust-vendor/wit-component/tests/components/error-adapt-missing-memory/adapt-old.wat +4 -0
- data/rust-vendor/wit-component/tests/components/error-adapt-missing-memory/adapt-old.wit +5 -0
- data/rust-vendor/wit-component/tests/components/error-adapt-missing-memory/error.txt +1 -0
- data/rust-vendor/wit-component/tests/components/error-adapt-missing-memory/module.wat +3 -0
- data/rust-vendor/wit-component/tests/components/error-adapt-missing-memory/module.wit +2 -0
- data/rust-vendor/wit-component/tests/components/error-async-export-missing-callback/error.txt +1 -0
- data/rust-vendor/wit-component/tests/components/error-async-export-missing-callback/module.wat +6 -0
- data/rust-vendor/wit-component/tests/components/error-async-export-missing-callback/module.wit +10 -0
- data/rust-vendor/wit-component/tests/components/error-default-export-sig-mismatch/error.txt +1 -0
- data/rust-vendor/wit-component/tests/components/error-default-export-sig-mismatch/module.wat +3 -0
- data/rust-vendor/wit-component/tests/components/error-default-export-sig-mismatch/module.wit +5 -0
- data/rust-vendor/wit-component/tests/components/error-empty-module-import/error.txt +1 -0
- data/rust-vendor/wit-component/tests/components/error-empty-module-import/module.wat +3 -0
- data/rust-vendor/wit-component/tests/components/error-empty-module-import/module.wit +2 -0
- data/rust-vendor/wit-component/tests/components/error-export-sig-mismatch/error.txt +1 -0
- data/rust-vendor/wit-component/tests/components/error-export-sig-mismatch/module.wat +3 -0
- data/rust-vendor/wit-component/tests/components/error-export-sig-mismatch/module.wit +7 -0
- data/rust-vendor/wit-component/tests/components/error-import-resource-rep/error.txt +1 -0
- data/rust-vendor/wit-component/tests/components/error-import-resource-rep/module.wat +3 -0
- data/rust-vendor/wit-component/tests/components/error-import-resource-rep/module.wit +5 -0
- data/rust-vendor/wit-component/tests/components/error-import-resource-wrong-signature/error.txt +1 -0
- data/rust-vendor/wit-component/tests/components/error-import-resource-wrong-signature/module.wat +3 -0
- data/rust-vendor/wit-component/tests/components/error-import-resource-wrong-signature/module.wit +5 -0
- data/rust-vendor/wit-component/tests/components/error-import-sig-mismatch/error.txt +1 -0
- data/rust-vendor/wit-component/tests/components/error-import-sig-mismatch/module.wat +3 -0
- data/rust-vendor/wit-component/tests/components/error-import-sig-mismatch/module.wit +7 -0
- data/rust-vendor/wit-component/tests/components/error-invalid-module-import/error.txt +1 -0
- data/rust-vendor/wit-component/tests/components/error-invalid-module-import/module.wat +3 -0
- data/rust-vendor/wit-component/tests/components/error-invalid-module-import/module.wit +2 -0
- data/rust-vendor/wit-component/tests/components/error-link-duplicate-initializers/error.txt +1 -0
- data/rust-vendor/wit-component/tests/components/error-link-duplicate-initializers/lib-bar.wat +12 -0
- data/rust-vendor/wit-component/tests/components/error-link-duplicate-initializers/lib-bar.wit +3 -0
- data/rust-vendor/wit-component/tests/components/error-link-duplicate-initializers/lib-foo.wat +21 -0
- data/rust-vendor/wit-component/tests/components/error-link-duplicate-initializers/lib-foo.wit +10 -0
- data/rust-vendor/wit-component/tests/components/error-link-missing-needed/error.txt +2 -0
- data/rust-vendor/wit-component/tests/components/error-link-missing-needed/lib-foo.wat +15 -0
- data/rust-vendor/wit-component/tests/components/error-link-missing-needed/lib-foo.wit +10 -0
- data/rust-vendor/wit-component/tests/components/error-link-missing-symbols/error.txt +3 -0
- data/rust-vendor/wit-component/tests/components/error-link-missing-symbols/lib-foo.wat +13 -0
- data/rust-vendor/wit-component/tests/components/error-link-missing-symbols/lib-foo.wit +10 -0
- data/rust-vendor/wit-component/tests/components/error-missing-default-export/error.txt +1 -0
- data/rust-vendor/wit-component/tests/components/error-missing-default-export/module.wat +1 -0
- data/rust-vendor/wit-component/tests/components/error-missing-default-export/module.wit +4 -0
- data/rust-vendor/wit-component/tests/components/error-missing-export/error.txt +1 -0
- data/rust-vendor/wit-component/tests/components/error-missing-export/module.wat +1 -0
- data/rust-vendor/wit-component/tests/components/error-missing-export/module.wit +7 -0
- data/rust-vendor/wit-component/tests/components/error-missing-import/error.txt +1 -0
- data/rust-vendor/wit-component/tests/components/error-missing-import/module.wat +3 -0
- data/rust-vendor/wit-component/tests/components/error-missing-import/module.wit +2 -0
- data/rust-vendor/wit-component/tests/components/error-missing-import-func/error.txt +1 -0
- data/rust-vendor/wit-component/tests/components/error-missing-import-func/module.wat +3 -0
- data/rust-vendor/wit-component/tests/components/error-missing-import-func/module.wit +9 -0
- data/rust-vendor/wit-component/tests/components/error-missing-module-metadata/adapt-old.wat +4 -0
- data/rust-vendor/wit-component/tests/components/error-missing-module-metadata/adapt-old.wit +5 -0
- data/rust-vendor/wit-component/tests/components/error-missing-module-metadata/error.txt +1 -0
- data/rust-vendor/wit-component/tests/components/error-missing-module-metadata/module.wat +4 -0
- data/rust-vendor/wit-component/tests/components/error-missing-module-metadata/module.wit +4 -0
- data/rust-vendor/wit-component/tests/components/export-interface-using-import/component.wat +37 -0
- data/rust-vendor/wit-component/tests/components/export-interface-using-import/component.wit.print +9 -0
- data/rust-vendor/wit-component/tests/components/export-interface-using-import/module.wat +1 -0
- data/rust-vendor/wit-component/tests/components/export-interface-using-import/module.wit +17 -0
- data/rust-vendor/wit-component/tests/components/export-name-shuffling/component.wat +43 -0
- data/rust-vendor/wit-component/tests/components/export-name-shuffling/component.wit.print +10 -0
- data/rust-vendor/wit-component/tests/components/export-name-shuffling/module.wat +3 -0
- data/rust-vendor/wit-component/tests/components/export-name-shuffling/module.wit +17 -0
- data/rust-vendor/wit-component/tests/components/export-resource/component.wat +102 -0
- data/rust-vendor/wit-component/tests/components/export-resource/component.wit.print +10 -0
- data/rust-vendor/wit-component/tests/components/export-resource/module.wat +15 -0
- data/rust-vendor/wit-component/tests/components/export-resource/module.wit +11 -0
- data/rust-vendor/wit-component/tests/components/export-type-name-conflict/component.wat +46 -0
- data/rust-vendor/wit-component/tests/components/export-type-name-conflict/component.wit.print +11 -0
- data/rust-vendor/wit-component/tests/components/export-type-name-conflict/module.wat +5 -0
- data/rust-vendor/wit-component/tests/components/export-type-name-conflict/module.wit +15 -0
- data/rust-vendor/wit-component/tests/components/export-with-type-alias/component.wat +40 -0
- data/rust-vendor/wit-component/tests/components/export-with-type-alias/component.wit.print +5 -0
- data/rust-vendor/wit-component/tests/components/export-with-type-alias/module.wat +3 -0
- data/rust-vendor/wit-component/tests/components/export-with-type-alias/module.wit +11 -0
- data/rust-vendor/wit-component/tests/components/exports/component.wat +139 -0
- data/rust-vendor/wit-component/tests/components/exports/component.wit.print +29 -0
- data/rust-vendor/wit-component/tests/components/exports/module.wat +14 -0
- data/rust-vendor/wit-component/tests/components/exports/module.wit +29 -0
- data/rust-vendor/wit-component/tests/components/fallible-constructor/component.wat +73 -0
- data/rust-vendor/wit-component/tests/components/fallible-constructor/component.wit.print +9 -0
- data/rust-vendor/wit-component/tests/components/fallible-constructor/module.wat +5 -0
- data/rust-vendor/wit-component/tests/components/fallible-constructor/module.wit +9 -0
- data/rust-vendor/wit-component/tests/components/import-and-export-resource/component.wat +53 -0
- data/rust-vendor/wit-component/tests/components/import-and-export-resource/component.wit.print +8 -0
- data/rust-vendor/wit-component/tests/components/import-and-export-resource/module.wat +6 -0
- data/rust-vendor/wit-component/tests/components/import-and-export-resource/module.wit +12 -0
- data/rust-vendor/wit-component/tests/components/import-conflict/component.wat +118 -0
- data/rust-vendor/wit-component/tests/components/import-conflict/component.wit.print +7 -0
- data/rust-vendor/wit-component/tests/components/import-conflict/module.wat +7 -0
- data/rust-vendor/wit-component/tests/components/import-conflict/module.wit +19 -0
- data/rust-vendor/wit-component/tests/components/import-empty-interface/component.wat +12 -0
- data/rust-vendor/wit-component/tests/components/import-empty-interface/component.wit.print +4 -0
- data/rust-vendor/wit-component/tests/components/import-empty-interface/module.wat +1 -0
- data/rust-vendor/wit-component/tests/components/import-empty-interface/module.wit +5 -0
- data/rust-vendor/wit-component/tests/components/import-export/component.wat +124 -0
- data/rust-vendor/wit-component/tests/components/import-export/component.wit.print +14 -0
- data/rust-vendor/wit-component/tests/components/import-export/module.wat +10 -0
- data/rust-vendor/wit-component/tests/components/import-export/module.wit +14 -0
- data/rust-vendor/wit-component/tests/components/import-export-same-iface-name/component.wat +59 -0
- data/rust-vendor/wit-component/tests/components/import-export-same-iface-name/component.wit.print +8 -0
- data/rust-vendor/wit-component/tests/components/import-export-same-iface-name/deps/dep/foo.wit +5 -0
- data/rust-vendor/wit-component/tests/components/import-export-same-iface-name/module.wat +5 -0
- data/rust-vendor/wit-component/tests/components/import-export-same-iface-name/module.wit +11 -0
- data/rust-vendor/wit-component/tests/components/import-in-adapter-and-main-module/adapt-old.wat +23 -0
- data/rust-vendor/wit-component/tests/components/import-in-adapter-and-main-module/adapt-old.wit +9 -0
- data/rust-vendor/wit-component/tests/components/import-in-adapter-and-main-module/component.wat +220 -0
- data/rust-vendor/wit-component/tests/components/import-in-adapter-and-main-module/component.wit.print +16 -0
- data/rust-vendor/wit-component/tests/components/import-in-adapter-and-main-module/deps/shared-dependency/doc.wit +13 -0
- data/rust-vendor/wit-component/tests/components/import-in-adapter-and-main-module/deps/shared-dependency/types.wit +3 -0
- data/rust-vendor/wit-component/tests/components/import-in-adapter-and-main-module/module.wat +15 -0
- data/rust-vendor/wit-component/tests/components/import-in-adapter-and-main-module/module.wit +11 -0
- data/rust-vendor/wit-component/tests/components/import-only-resource-static-function/component.wat +30 -0
- data/rust-vendor/wit-component/tests/components/import-only-resource-static-function/component.wit.print +5 -0
- data/rust-vendor/wit-component/tests/components/import-only-resource-static-function/module.wat +3 -0
- data/rust-vendor/wit-component/tests/components/import-only-resource-static-function/module.wit +11 -0
- data/rust-vendor/wit-component/tests/components/import-partial-export-full/component.wat +34 -0
- data/rust-vendor/wit-component/tests/components/import-partial-export-full/component.wit.print +8 -0
- data/rust-vendor/wit-component/tests/components/import-partial-export-full/module.wat +1 -0
- data/rust-vendor/wit-component/tests/components/import-partial-export-full/module.wit +19 -0
- data/rust-vendor/wit-component/tests/components/import-resource-in-interface/component.wat +41 -0
- data/rust-vendor/wit-component/tests/components/import-resource-in-interface/component.wit.print +10 -0
- data/rust-vendor/wit-component/tests/components/import-resource-in-interface/module.wat +5 -0
- data/rust-vendor/wit-component/tests/components/import-resource-in-interface/module.wit +11 -0
- data/rust-vendor/wit-component/tests/components/import-resource-simple/component.wat +33 -0
- data/rust-vendor/wit-component/tests/components/import-resource-simple/component.wit.print +8 -0
- data/rust-vendor/wit-component/tests/components/import-resource-simple/module.wat +5 -0
- data/rust-vendor/wit-component/tests/components/import-resource-simple/module.wit +9 -0
- data/rust-vendor/wit-component/tests/components/imports/component.wat +149 -0
- data/rust-vendor/wit-component/tests/components/imports/component.wit.print +29 -0
- data/rust-vendor/wit-component/tests/components/imports/module.wat +12 -0
- data/rust-vendor/wit-component/tests/components/imports/module.wit +33 -0
- data/rust-vendor/wit-component/tests/components/initialize/component.wat +38 -0
- data/rust-vendor/wit-component/tests/components/initialize/component.wit.print +5 -0
- data/rust-vendor/wit-component/tests/components/initialize/module.wat +6 -0
- data/rust-vendor/wit-component/tests/components/initialize/module.wit +5 -0
- data/rust-vendor/wit-component/tests/components/lift-options/component.wat +286 -0
- data/rust-vendor/wit-component/tests/components/lift-options/component.wit.print +5 -0
- data/rust-vendor/wit-component/tests/components/lift-options/module.wat +24 -0
- data/rust-vendor/wit-component/tests/components/lift-options/module.wit +40 -0
- data/rust-vendor/wit-component/tests/components/link/component.wat +271 -0
- data/rust-vendor/wit-component/tests/components/link/component.wit.print +7 -0
- data/rust-vendor/wit-component/tests/components/link/lib-bar.wat +29 -0
- data/rust-vendor/wit-component/tests/components/link/lib-bar.wit +10 -0
- data/rust-vendor/wit-component/tests/components/link/lib-c.wat +27 -0
- data/rust-vendor/wit-component/tests/components/link/lib-c.wit +3 -0
- data/rust-vendor/wit-component/tests/components/link/lib-foo.wat +55 -0
- data/rust-vendor/wit-component/tests/components/link/lib-foo.wit +3 -0
- data/rust-vendor/wit-component/tests/components/link/lib-unused.wat +55 -0
- data/rust-vendor/wit-component/tests/components/link/lib-unused.wit +3 -0
- data/rust-vendor/wit-component/tests/components/link-asyncify/component.wat +267 -0
- data/rust-vendor/wit-component/tests/components/link-asyncify/component.wit.print +5 -0
- data/rust-vendor/wit-component/tests/components/link-asyncify/lib-bar.wat +81 -0
- data/rust-vendor/wit-component/tests/components/link-asyncify/lib-bar.wit +9 -0
- data/rust-vendor/wit-component/tests/components/link-asyncify/lib-foo.wat +78 -0
- data/rust-vendor/wit-component/tests/components/link-asyncify/lib-foo.wit +3 -0
- data/rust-vendor/wit-component/tests/components/link-bare-funcs/component.wat +212 -0
- data/rust-vendor/wit-component/tests/components/link-bare-funcs/component.wit.print +9 -0
- data/rust-vendor/wit-component/tests/components/link-bare-funcs/lib-c.wat +27 -0
- data/rust-vendor/wit-component/tests/components/link-bare-funcs/lib-c.wit +3 -0
- data/rust-vendor/wit-component/tests/components/link-bare-funcs/lib-foo.wat +18 -0
- data/rust-vendor/wit-component/tests/components/link-bare-funcs/lib-foo.wit +7 -0
- data/rust-vendor/wit-component/tests/components/link-circular/component.wat +133 -0
- data/rust-vendor/wit-component/tests/components/link-circular/component.wit.print +7 -0
- data/rust-vendor/wit-component/tests/components/link-circular/lib-bar.wat +12 -0
- data/rust-vendor/wit-component/tests/components/link-circular/lib-bar.wit +3 -0
- data/rust-vendor/wit-component/tests/components/link-circular/lib-foo.wat +15 -0
- data/rust-vendor/wit-component/tests/components/link-circular/lib-foo.wit +10 -0
- data/rust-vendor/wit-component/tests/components/link-dl-openable/component.wat +108 -0
- data/rust-vendor/wit-component/tests/components/link-dl-openable/component.wit.print +7 -0
- data/rust-vendor/wit-component/tests/components/link-dl-openable/dlopen-lib-foo.wat +15 -0
- data/rust-vendor/wit-component/tests/components/link-dl-openable/dlopen-lib-foo.wit +10 -0
- data/rust-vendor/wit-component/tests/components/link-dl-openable-builtin-libdl/component.wat +657 -0
- data/rust-vendor/wit-component/tests/components/link-dl-openable-builtin-libdl/component.wit.print +7 -0
- data/rust-vendor/wit-component/tests/components/link-dl-openable-builtin-libdl/dlopen-lib-foo.wat +17 -0
- data/rust-vendor/wit-component/tests/components/link-dl-openable-builtin-libdl/dlopen-lib-foo.wit +10 -0
- data/rust-vendor/wit-component/tests/components/link-dl-openable-builtin-libdl/lib-c.wat +30 -0
- data/rust-vendor/wit-component/tests/components/link-dl-openable-builtin-libdl/lib-c.wit +3 -0
- data/rust-vendor/wit-component/tests/components/link-dl-openable-builtin-libdl/stub-missing-functions +0 -0
- data/rust-vendor/wit-component/tests/components/link-dl-openable-builtin-libdl/use-built-in-libdl +0 -0
- data/rust-vendor/wit-component/tests/components/link-dl-openable-builtin-libdl-with-unused/component.wat +654 -0
- data/rust-vendor/wit-component/tests/components/link-dl-openable-builtin-libdl-with-unused/component.wit.print +7 -0
- data/rust-vendor/wit-component/tests/components/link-dl-openable-builtin-libdl-with-unused/dlopen-lib-foo.wat +19 -0
- data/rust-vendor/wit-component/tests/components/link-dl-openable-builtin-libdl-with-unused/dlopen-lib-foo.wit +10 -0
- data/rust-vendor/wit-component/tests/components/link-dl-openable-builtin-libdl-with-unused/lib-c.wat +39 -0
- data/rust-vendor/wit-component/tests/components/link-dl-openable-builtin-libdl-with-unused/lib-c.wit +3 -0
- data/rust-vendor/wit-component/tests/components/link-dl-openable-builtin-libdl-with-unused/lib-unused.wat +55 -0
- data/rust-vendor/wit-component/tests/components/link-dl-openable-builtin-libdl-with-unused/lib-unused.wit +3 -0
- data/rust-vendor/wit-component/tests/components/link-dl-openable-builtin-libdl-with-unused/use-built-in-libdl +0 -0
- data/rust-vendor/wit-component/tests/components/link-duplicate-symbols/component.wat +135 -0
- data/rust-vendor/wit-component/tests/components/link-duplicate-symbols/component.wit.print +7 -0
- data/rust-vendor/wit-component/tests/components/link-duplicate-symbols/lib-bar.wat +13 -0
- data/rust-vendor/wit-component/tests/components/link-duplicate-symbols/lib-bar.wit +3 -0
- data/rust-vendor/wit-component/tests/components/link-duplicate-symbols/lib-foo.wat +15 -0
- data/rust-vendor/wit-component/tests/components/link-duplicate-symbols/lib-foo.wit +10 -0
- data/rust-vendor/wit-component/tests/components/link-got-func/component.wat +125 -0
- data/rust-vendor/wit-component/tests/components/link-got-func/component.wit.print +7 -0
- data/rust-vendor/wit-component/tests/components/link-got-func/lib-bar.wat +10 -0
- data/rust-vendor/wit-component/tests/components/link-got-func/lib-bar.wit +3 -0
- data/rust-vendor/wit-component/tests/components/link-got-func/lib-foo.wat +10 -0
- data/rust-vendor/wit-component/tests/components/link-got-func/lib-foo.wit +10 -0
- data/rust-vendor/wit-component/tests/components/link-initialize/component.wat +271 -0
- data/rust-vendor/wit-component/tests/components/link-initialize/component.wit.print +7 -0
- data/rust-vendor/wit-component/tests/components/link-initialize/lib-bar.wat +29 -0
- data/rust-vendor/wit-component/tests/components/link-initialize/lib-bar.wit +10 -0
- data/rust-vendor/wit-component/tests/components/link-initialize/lib-c.wat +27 -0
- data/rust-vendor/wit-component/tests/components/link-initialize/lib-c.wit +3 -0
- data/rust-vendor/wit-component/tests/components/link-initialize/lib-foo.wat +55 -0
- data/rust-vendor/wit-component/tests/components/link-initialize/lib-foo.wit +3 -0
- data/rust-vendor/wit-component/tests/components/link-lib-with-async-export/component.wat +148 -0
- data/rust-vendor/wit-component/tests/components/link-lib-with-async-export/component.wit.print +19 -0
- data/rust-vendor/wit-component/tests/components/link-lib-with-async-export/lib-c.wat +4 -0
- data/rust-vendor/wit-component/tests/components/link-lib-with-async-export/lib-c.wit +3 -0
- data/rust-vendor/wit-component/tests/components/link-lib-with-async-export/lib-foo.wat +12 -0
- data/rust-vendor/wit-component/tests/components/link-lib-with-async-export/lib-foo.wit +16 -0
- data/rust-vendor/wit-component/tests/components/link-resources/component.wat +150 -0
- data/rust-vendor/wit-component/tests/components/link-resources/component.wit.print +6 -0
- data/rust-vendor/wit-component/tests/components/link-resources/lib-bar.wat +15 -0
- data/rust-vendor/wit-component/tests/components/link-resources/lib-bar.wit +13 -0
- data/rust-vendor/wit-component/tests/components/link-resources/lib-foo.wat +17 -0
- data/rust-vendor/wit-component/tests/components/link-resources/lib-foo.wit +13 -0
- data/rust-vendor/wit-component/tests/components/link-stack-high-and-low/component.wat +146 -0
- data/rust-vendor/wit-component/tests/components/link-stack-high-and-low/component.wit.print +5 -0
- data/rust-vendor/wit-component/tests/components/link-stack-high-and-low/lib-bar.wat +19 -0
- data/rust-vendor/wit-component/tests/components/link-stack-high-and-low/lib-bar.wit +9 -0
- data/rust-vendor/wit-component/tests/components/link-stack-high-and-low/lib-foo.wat +17 -0
- data/rust-vendor/wit-component/tests/components/link-stack-high-and-low/lib-foo.wit +3 -0
- data/rust-vendor/wit-component/tests/components/link-stub-wasip2/adapt-wasip2.wat +8 -0
- data/rust-vendor/wit-component/tests/components/link-stub-wasip2/adapt-wasip2.wit +1 -0
- data/rust-vendor/wit-component/tests/components/link-stub-wasip2/component.wat +330 -0
- data/rust-vendor/wit-component/tests/components/link-stub-wasip2/component.wit.print +7 -0
- data/rust-vendor/wit-component/tests/components/link-stub-wasip2/deps/cli/environment.wit +5 -0
- data/rust-vendor/wit-component/tests/components/link-stub-wasip2/lib-bar.wat +29 -0
- data/rust-vendor/wit-component/tests/components/link-stub-wasip2/lib-bar.wit +10 -0
- data/rust-vendor/wit-component/tests/components/link-stub-wasip2/lib-c.wat +29 -0
- data/rust-vendor/wit-component/tests/components/link-stub-wasip2/lib-c.wit +5 -0
- data/rust-vendor/wit-component/tests/components/link-stub-wasip2/lib-foo.wat +55 -0
- data/rust-vendor/wit-component/tests/components/link-stub-wasip2/lib-foo.wit +3 -0
- data/rust-vendor/wit-component/tests/components/link-stub-wasip2/lib-unused.wat +55 -0
- data/rust-vendor/wit-component/tests/components/link-stub-wasip2/lib-unused.wit +3 -0
- data/rust-vendor/wit-component/tests/components/link-stubs/component.wat +118 -0
- data/rust-vendor/wit-component/tests/components/link-stubs/component.wit.print +7 -0
- data/rust-vendor/wit-component/tests/components/link-stubs/lib-foo.wat +13 -0
- data/rust-vendor/wit-component/tests/components/link-stubs/lib-foo.wit +10 -0
- data/rust-vendor/wit-component/tests/components/link-stubs/stub-missing-functions +0 -0
- data/rust-vendor/wit-component/tests/components/link-tag/component.wat +123 -0
- data/rust-vendor/wit-component/tests/components/link-tag/component.wit.print +5 -0
- data/rust-vendor/wit-component/tests/components/link-tag/lib-bar.wat +6 -0
- data/rust-vendor/wit-component/tests/components/link-tag/lib-bar.wit +3 -0
- data/rust-vendor/wit-component/tests/components/link-tag/lib-foo.wat +7 -0
- data/rust-vendor/wit-component/tests/components/link-tag/lib-foo.wit +5 -0
- data/rust-vendor/wit-component/tests/components/link-weak-cabi-realloc/component.wat +99 -0
- data/rust-vendor/wit-component/tests/components/link-weak-cabi-realloc/component.wit.print +5 -0
- data/rust-vendor/wit-component/tests/components/link-weak-cabi-realloc/lib-foo.wat +14 -0
- data/rust-vendor/wit-component/tests/components/link-weak-cabi-realloc/lib-foo.wit +9 -0
- data/rust-vendor/wit-component/tests/components/link-weak-import/component.wat +120 -0
- data/rust-vendor/wit-component/tests/components/link-weak-import/component.wit.print +7 -0
- data/rust-vendor/wit-component/tests/components/link-weak-import/lib-foo.wat +15 -0
- data/rust-vendor/wit-component/tests/components/link-weak-import/lib-foo.wit +10 -0
- data/rust-vendor/wit-component/tests/components/live-exports-dead-imports/component.wat +38 -0
- data/rust-vendor/wit-component/tests/components/live-exports-dead-imports/component.wit.print +5 -0
- data/rust-vendor/wit-component/tests/components/live-exports-dead-imports/module.wat +4 -0
- data/rust-vendor/wit-component/tests/components/live-exports-dead-imports/module.wit +12 -0
- data/rust-vendor/wit-component/tests/components/lower-options/component.wat +281 -0
- data/rust-vendor/wit-component/tests/components/lower-options/component.wit.print +5 -0
- data/rust-vendor/wit-component/tests/components/lower-options/module.wat +20 -0
- data/rust-vendor/wit-component/tests/components/lower-options/module.wit +40 -0
- data/rust-vendor/wit-component/tests/components/many-same-names/component.wat +48 -0
- data/rust-vendor/wit-component/tests/components/many-same-names/component.wit.print +10 -0
- data/rust-vendor/wit-component/tests/components/many-same-names/module.wat +3 -0
- data/rust-vendor/wit-component/tests/components/many-same-names/module.wit +21 -0
- data/rust-vendor/wit-component/tests/components/merge-import-versions/component.wat +125 -0
- data/rust-vendor/wit-component/tests/components/merge-import-versions/component.wit.print +5 -0
- data/rust-vendor/wit-component/tests/components/merge-import-versions/module.wat +15 -0
- data/rust-vendor/wit-component/tests/components/merge-import-versions/module.wit +30 -0
- data/rust-vendor/wit-component/tests/components/merge-import-versions-with-adapter/adapt-old.wat +10 -0
- data/rust-vendor/wit-component/tests/components/merge-import-versions-with-adapter/adapt-old.wit +19 -0
- data/rust-vendor/wit-component/tests/components/merge-import-versions-with-adapter/component.wat +104 -0
- data/rust-vendor/wit-component/tests/components/merge-import-versions-with-adapter/component.wit.print +5 -0
- data/rust-vendor/wit-component/tests/components/merge-import-versions-with-adapter/module.wat +9 -0
- data/rust-vendor/wit-component/tests/components/merge-import-versions-with-adapter/module.wit +14 -0
- data/rust-vendor/wit-component/tests/components/multi-package/baz/qux/component.wat +90 -0
- data/rust-vendor/wit-component/tests/components/multi-package/baz/qux/component.wit.print +13 -0
- data/rust-vendor/wit-component/tests/components/multi-package/baz/qux/module.wat +7 -0
- data/rust-vendor/wit-component/tests/components/multi-package/component.wat +44 -0
- data/rust-vendor/wit-component/tests/components/multi-package/component.wit.print +4 -0
- data/rust-vendor/wit-component/tests/components/multi-package/foo/bar/component.wat +82 -0
- data/rust-vendor/wit-component/tests/components/multi-package/foo/bar/component.wit.print +13 -0
- data/rust-vendor/wit-component/tests/components/multi-package/foo/bar/module.wat +6 -0
- data/rust-vendor/wit-component/tests/components/multi-package/module.wit +25 -0
- data/rust-vendor/wit-component/tests/components/no-realloc-required/component.wat +67 -0
- data/rust-vendor/wit-component/tests/components/no-realloc-required/component.wit.print +7 -0
- data/rust-vendor/wit-component/tests/components/no-realloc-required/module.wat +4 -0
- data/rust-vendor/wit-component/tests/components/no-realloc-required/module.wit +7 -0
- data/rust-vendor/wit-component/tests/components/post-return/component.wat +36 -0
- data/rust-vendor/wit-component/tests/components/post-return/component.wit.print +5 -0
- data/rust-vendor/wit-component/tests/components/post-return/module.wat +6 -0
- data/rust-vendor/wit-component/tests/components/post-return/module.wit +5 -0
- data/rust-vendor/wit-component/tests/components/rename-import-interface/component.wat +29 -0
- data/rust-vendor/wit-component/tests/components/rename-import-interface/component.wit.print +5 -0
- data/rust-vendor/wit-component/tests/components/rename-import-interface/module.wat +3 -0
- data/rust-vendor/wit-component/tests/components/rename-import-interface/module.wit +9 -0
- data/rust-vendor/wit-component/tests/components/rename-interface/component.wat +39 -0
- data/rust-vendor/wit-component/tests/components/rename-interface/component.wit.print +10 -0
- data/rust-vendor/wit-component/tests/components/rename-interface/module.wat +3 -0
- data/rust-vendor/wit-component/tests/components/rename-interface/module.wit +18 -0
- data/rust-vendor/wit-component/tests/components/resource-intrinsics-with-just-import/component.wat +28 -0
- data/rust-vendor/wit-component/tests/components/resource-intrinsics-with-just-import/component.wit.print +7 -0
- data/rust-vendor/wit-component/tests/components/resource-intrinsics-with-just-import/module.wat +3 -0
- data/rust-vendor/wit-component/tests/components/resource-intrinsics-with-just-import/module.wit +7 -0
- data/rust-vendor/wit-component/tests/components/resource-used-through-import/component.wat +57 -0
- data/rust-vendor/wit-component/tests/components/resource-used-through-import/component.wit.print +11 -0
- data/rust-vendor/wit-component/tests/components/resource-used-through-import/module.wat +6 -0
- data/rust-vendor/wit-component/tests/components/resource-used-through-import/module.wit +13 -0
- data/rust-vendor/wit-component/tests/components/resource-using-export/component.wat +64 -0
- data/rust-vendor/wit-component/tests/components/resource-using-export/component.wit.print +10 -0
- data/rust-vendor/wit-component/tests/components/resource-using-export/module.wat +6 -0
- data/rust-vendor/wit-component/tests/components/resource-using-export/module.wit +16 -0
- data/rust-vendor/wit-component/tests/components/simple/component.wat +64 -0
- data/rust-vendor/wit-component/tests/components/simple/component.wit.print +7 -0
- data/rust-vendor/wit-component/tests/components/simple/module.wat +10 -0
- data/rust-vendor/wit-component/tests/components/simple/module.wit +7 -0
- data/rust-vendor/wit-component/tests/components/threading/component.wat +163 -0
- data/rust-vendor/wit-component/tests/components/threading/component.wit.print +6 -0
- data/rust-vendor/wit-component/tests/components/threading/module.wat +22 -0
- data/rust-vendor/wit-component/tests/components/threading/module.wit +10 -0
- data/rust-vendor/wit-component/tests/components/tricky-order/component.wat +44 -0
- data/rust-vendor/wit-component/tests/components/tricky-order/component.wit.print +11 -0
- data/rust-vendor/wit-component/tests/components/tricky-order/module.wat +1 -0
- data/rust-vendor/wit-component/tests/components/tricky-order/module.wit +20 -0
- data/rust-vendor/wit-component/tests/components/tricky-resources/component.wat +75 -0
- data/rust-vendor/wit-component/tests/components/tricky-resources/component.wit.print +11 -0
- data/rust-vendor/wit-component/tests/components/tricky-resources/module.wat +7 -0
- data/rust-vendor/wit-component/tests/components/tricky-resources/module.wit +19 -0
- data/rust-vendor/wit-component/tests/components/tricky-resources2/component.wat +50 -0
- data/rust-vendor/wit-component/tests/components/tricky-resources2/component.wit.print +10 -0
- data/rust-vendor/wit-component/tests/components/tricky-resources2/module.wat +4 -0
- data/rust-vendor/wit-component/tests/components/tricky-resources2/module.wit +14 -0
- data/rust-vendor/wit-component/tests/components/tricky-resources3/component.wat +44 -0
- data/rust-vendor/wit-component/tests/components/tricky-resources3/component.wit.print +9 -0
- data/rust-vendor/wit-component/tests/components/tricky-resources3/module.wat +1 -0
- data/rust-vendor/wit-component/tests/components/tricky-resources3/module.wit +17 -0
- data/rust-vendor/wit-component/tests/components/tricky-resources4/component.wat +64 -0
- data/rust-vendor/wit-component/tests/components/tricky-resources4/component.wit.print +8 -0
- data/rust-vendor/wit-component/tests/components/tricky-resources4/module.wat +6 -0
- data/rust-vendor/wit-component/tests/components/tricky-resources4/module.wit +16 -0
- data/rust-vendor/wit-component/tests/components/unused-import/component.wat +29 -0
- data/rust-vendor/wit-component/tests/components/unused-import/component.wit.print +5 -0
- data/rust-vendor/wit-component/tests/components/unused-import/module.wat +3 -0
- data/rust-vendor/wit-component/tests/components/unused-import/module.wit +12 -0
- data/rust-vendor/wit-component/tests/components/worlds-with-type-renamings/component.wat +67 -0
- data/rust-vendor/wit-component/tests/components/worlds-with-type-renamings/component.wit.print +8 -0
- data/rust-vendor/wit-component/tests/components/worlds-with-type-renamings/module.wat +12 -0
- data/rust-vendor/wit-component/tests/components/worlds-with-type-renamings/module.wit +17 -0
- data/rust-vendor/wit-component/tests/components/worlds-with-types/component.wat +25 -0
- data/rust-vendor/wit-component/tests/components/worlds-with-types/component.wit.print +11 -0
- data/rust-vendor/wit-component/tests/components/worlds-with-types/module.wat +3 -0
- data/rust-vendor/wit-component/tests/components/worlds-with-types/module.wit +10 -0
- data/rust-vendor/wit-component/tests/components.rs +291 -0
- data/rust-vendor/wit-component/tests/interfaces/console.wat +18 -0
- data/rust-vendor/wit-component/tests/interfaces/console.wit +5 -0
- data/rust-vendor/wit-component/tests/interfaces/console.wit.print +6 -0
- data/rust-vendor/wit-component/tests/interfaces/diamond-disambiguate/foo.wit.print +20 -0
- data/rust-vendor/wit-component/tests/interfaces/diamond-disambiguate/join.wit +10 -0
- data/rust-vendor/wit-component/tests/interfaces/diamond-disambiguate/shared1.wit +3 -0
- data/rust-vendor/wit-component/tests/interfaces/diamond-disambiguate/shared2.wit +3 -0
- data/rust-vendor/wit-component/tests/interfaces/diamond-disambiguate.wat +70 -0
- data/rust-vendor/wit-component/tests/interfaces/diamond.wat +107 -0
- data/rust-vendor/wit-component/tests/interfaces/diamond.wit +31 -0
- data/rust-vendor/wit-component/tests/interfaces/diamond.wit.print +34 -0
- data/rust-vendor/wit-component/tests/interfaces/doc-comments/foo.wit +79 -0
- data/rust-vendor/wit-component/tests/interfaces/doc-comments/foo.wit.print +78 -0
- data/rust-vendor/wit-component/tests/interfaces/doc-comments.wat +73 -0
- data/rust-vendor/wit-component/tests/interfaces/empty.wat +50 -0
- data/rust-vendor/wit-component/tests/interfaces/empty.wit +12 -0
- data/rust-vendor/wit-component/tests/interfaces/empty.wit.print +16 -0
- data/rust-vendor/wit-component/tests/interfaces/export-other-packages-interface/deps/the-dep/the-doc.wit +9 -0
- data/rust-vendor/wit-component/tests/interfaces/export-other-packages-interface/foo.wit +5 -0
- data/rust-vendor/wit-component/tests/interfaces/export-other-packages-interface/foo.wit.print +5 -0
- data/rust-vendor/wit-component/tests/interfaces/export-other-packages-interface.wat +23 -0
- data/rust-vendor/wit-component/tests/interfaces/exports.wat +39 -0
- data/rust-vendor/wit-component/tests/interfaces/exports.wit +13 -0
- data/rust-vendor/wit-component/tests/interfaces/exports.wit.print +13 -0
- data/rust-vendor/wit-component/tests/interfaces/flags.wat +79 -0
- data/rust-vendor/wit-component/tests/interfaces/flags.wit +100 -0
- data/rust-vendor/wit-component/tests/interfaces/flags.wit.print +100 -0
- data/rust-vendor/wit-component/tests/interfaces/floats.wat +47 -0
- data/rust-vendor/wit-component/tests/interfaces/floats.wit +12 -0
- data/rust-vendor/wit-component/tests/interfaces/floats.wit.print +15 -0
- data/rust-vendor/wit-component/tests/interfaces/foreign-use-chain/deps/bar/bar.wit +9 -0
- data/rust-vendor/wit-component/tests/interfaces/foreign-use-chain/foo.wit +5 -0
- data/rust-vendor/wit-component/tests/interfaces/foreign-use-chain/foo.wit.print +6 -0
- data/rust-vendor/wit-component/tests/interfaces/foreign-use-chain.wat +31 -0
- data/rust-vendor/wit-component/tests/interfaces/import-and-export.wat +54 -0
- data/rust-vendor/wit-component/tests/interfaces/import-and-export.wit +14 -0
- data/rust-vendor/wit-component/tests/interfaces/import-and-export.wit.print +15 -0
- data/rust-vendor/wit-component/tests/interfaces/integers.wat +107 -0
- data/rust-vendor/wit-component/tests/interfaces/integers.wit +27 -0
- data/rust-vendor/wit-component/tests/interfaces/integers.wit.print +45 -0
- data/rust-vendor/wit-component/tests/interfaces/lists.wat +211 -0
- data/rust-vendor/wit-component/tests/interfaces/lists.wit +96 -0
- data/rust-vendor/wit-component/tests/interfaces/lists.wit.print +96 -0
- data/rust-vendor/wit-component/tests/interfaces/maps.wat +186 -0
- data/rust-vendor/wit-component/tests/interfaces/maps.wit +38 -0
- data/rust-vendor/wit-component/tests/interfaces/maps.wit.print +57 -0
- data/rust-vendor/wit-component/tests/interfaces/multi-doc/a.wit +9 -0
- data/rust-vendor/wit-component/tests/interfaces/multi-doc/b.wit +9 -0
- data/rust-vendor/wit-component/tests/interfaces/multi-doc/foo.wit.print +20 -0
- data/rust-vendor/wit-component/tests/interfaces/multi-doc.wat +78 -0
- data/rust-vendor/wit-component/tests/interfaces/multiple-use.wat +67 -0
- data/rust-vendor/wit-component/tests/interfaces/multiple-use.wit +16 -0
- data/rust-vendor/wit-component/tests/interfaces/multiple-use.wit.print +18 -0
- data/rust-vendor/wit-component/tests/interfaces/pkg-use-chain/chain.wit.print +18 -0
- data/rust-vendor/wit-component/tests/interfaces/pkg-use-chain/def.wit +13 -0
- data/rust-vendor/wit-component/tests/interfaces/pkg-use-chain/the-use.wit +5 -0
- data/rust-vendor/wit-component/tests/interfaces/pkg-use-chain.wat +70 -0
- data/rust-vendor/wit-component/tests/interfaces/pkg-use-chain2/bar.wit +13 -0
- data/rust-vendor/wit-component/tests/interfaces/pkg-use-chain2/foo.wit +5 -0
- data/rust-vendor/wit-component/tests/interfaces/pkg-use-chain2/foo.wit.print +20 -0
- data/rust-vendor/wit-component/tests/interfaces/pkg-use-chain2.wat +70 -0
- data/rust-vendor/wit-component/tests/interfaces/preserve-dep-type-order/deps/dep/foo.wit +11 -0
- data/rust-vendor/wit-component/tests/interfaces/preserve-dep-type-order/foo.wit +9 -0
- data/rust-vendor/wit-component/tests/interfaces/preserve-dep-type-order/foo.wit.print +9 -0
- data/rust-vendor/wit-component/tests/interfaces/preserve-dep-type-order.wat +47 -0
- data/rust-vendor/wit-component/tests/interfaces/preserve-foreign-reexport/deps/my-dep/my-doc.wit +8 -0
- data/rust-vendor/wit-component/tests/interfaces/preserve-foreign-reexport/foo.wit +5 -0
- data/rust-vendor/wit-component/tests/interfaces/preserve-foreign-reexport/foo.wit.print +5 -0
- data/rust-vendor/wit-component/tests/interfaces/preserve-foreign-reexport.wat +24 -0
- data/rust-vendor/wit-component/tests/interfaces/print-keyword.wat +21 -0
- data/rust-vendor/wit-component/tests/interfaces/print-keyword.wit +10 -0
- data/rust-vendor/wit-component/tests/interfaces/print-keyword.wit.print +12 -0
- data/rust-vendor/wit-component/tests/interfaces/records.wat +141 -0
- data/rust-vendor/wit-component/tests/interfaces/records.wit +63 -0
- data/rust-vendor/wit-component/tests/interfaces/records.wit.print +64 -0
- data/rust-vendor/wit-component/tests/interfaces/reference-out-of-order.wat +63 -0
- data/rust-vendor/wit-component/tests/interfaces/reference-out-of-order.wit +28 -0
- data/rust-vendor/wit-component/tests/interfaces/reference-out-of-order.wit.print +31 -0
- data/rust-vendor/wit-component/tests/interfaces/resources.wat +192 -0
- data/rust-vendor/wit-component/tests/interfaces/resources.wit +80 -0
- data/rust-vendor/wit-component/tests/interfaces/resources.wit.print +81 -0
- data/rust-vendor/wit-component/tests/interfaces/simple-deps/deps/some-dep/types.wit +5 -0
- data/rust-vendor/wit-component/tests/interfaces/simple-deps/foo.wit +4 -0
- data/rust-vendor/wit-component/tests/interfaces/simple-deps/foo.wit.print +6 -0
- data/rust-vendor/wit-component/tests/interfaces/simple-deps.wat +26 -0
- data/rust-vendor/wit-component/tests/interfaces/simple-multi/bar.wit +1 -0
- data/rust-vendor/wit-component/tests/interfaces/simple-multi/foo.wit +3 -0
- data/rust-vendor/wit-component/tests/interfaces/simple-multi/foo.wit.print +8 -0
- data/rust-vendor/wit-component/tests/interfaces/simple-multi.wat +24 -0
- data/rust-vendor/wit-component/tests/interfaces/simple-use.wat +40 -0
- data/rust-vendor/wit-component/tests/interfaces/simple-use.wit +13 -0
- data/rust-vendor/wit-component/tests/interfaces/simple-use.wit.print +15 -0
- data/rust-vendor/wit-component/tests/interfaces/simple-world.wat +35 -0
- data/rust-vendor/wit-component/tests/interfaces/simple-world.wit +9 -0
- data/rust-vendor/wit-component/tests/interfaces/simple-world.wit.print +9 -0
- data/rust-vendor/wit-component/tests/interfaces/single-named-result.wat +18 -0
- data/rust-vendor/wit-component/tests/interfaces/type-alias.wat +51 -0
- data/rust-vendor/wit-component/tests/interfaces/type-alias.wit +13 -0
- data/rust-vendor/wit-component/tests/interfaces/type-alias.wit.print +15 -0
- data/rust-vendor/wit-component/tests/interfaces/type-alias2.wat +41 -0
- data/rust-vendor/wit-component/tests/interfaces/type-alias2.wit +15 -0
- data/rust-vendor/wit-component/tests/interfaces/type-alias2.wit.print +15 -0
- data/rust-vendor/wit-component/tests/interfaces/upstream-deps-same-name/deps/a/the-name.wit +4 -0
- data/rust-vendor/wit-component/tests/interfaces/upstream-deps-same-name/deps/b/the-name.wit +4 -0
- data/rust-vendor/wit-component/tests/interfaces/upstream-deps-same-name/foo.wit +6 -0
- data/rust-vendor/wit-component/tests/interfaces/upstream-deps-same-name/foo.wit.print +7 -0
- data/rust-vendor/wit-component/tests/interfaces/upstream-deps-same-name.wat +36 -0
- data/rust-vendor/wit-component/tests/interfaces/use-chain.wat +72 -0
- data/rust-vendor/wit-component/tests/interfaces/use-chain.wit +15 -0
- data/rust-vendor/wit-component/tests/interfaces/use-chain.wit.print +18 -0
- data/rust-vendor/wit-component/tests/interfaces/use-for-type.wat +49 -0
- data/rust-vendor/wit-component/tests/interfaces/use-for-type.wit +16 -0
- data/rust-vendor/wit-component/tests/interfaces/use-for-type.wit.print +17 -0
- data/rust-vendor/wit-component/tests/interfaces/variants.wat +197 -0
- data/rust-vendor/wit-component/tests/interfaces/variants.wit +78 -0
- data/rust-vendor/wit-component/tests/interfaces/variants.wit.print +95 -0
- data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/cli/command.wit +7 -0
- data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/cli/environment.wit +18 -0
- data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/cli/exit.wit +4 -0
- data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/cli/imports.wit +20 -0
- data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/cli/run.wit +4 -0
- data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/cli/stdio.wit +17 -0
- data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/cli/terminal.wit +47 -0
- data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/clocks/monotonic-clock.wit +45 -0
- data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/clocks/wall-clock.wit +42 -0
- data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/clocks/world.wit +6 -0
- data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/filesystem/preopens.wit +8 -0
- data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/filesystem/types.wit +634 -0
- data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/filesystem/world.wit +6 -0
- data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/io/error.wit +34 -0
- data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/io/poll.wit +41 -0
- data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/io/streams.wit +251 -0
- data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/io/world.wit +6 -0
- data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/random/insecure-seed.wit +25 -0
- data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/random/insecure.wit +22 -0
- data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/random/random.wit +26 -0
- data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/random/world.wit +7 -0
- data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/sockets/instance-network.wit +9 -0
- data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/sockets/ip-name-lookup.wit +51 -0
- data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/sockets/network.wit +147 -0
- data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/sockets/tcp-create-socket.wit +26 -0
- data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/sockets/tcp.wit +321 -0
- data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/sockets/udp-create-socket.wit +26 -0
- data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/sockets/udp.wit +277 -0
- data/rust-vendor/wit-component/tests/interfaces/wasi-http/deps/sockets/world.wit +11 -0
- data/rust-vendor/wit-component/tests/interfaces/wasi-http/handler.wit +43 -0
- data/rust-vendor/wit-component/tests/interfaces/wasi-http/http.wit.print +571 -0
- data/rust-vendor/wit-component/tests/interfaces/wasi-http/proxy.wit +32 -0
- data/rust-vendor/wit-component/tests/interfaces/wasi-http/types.wit +570 -0
- data/rust-vendor/wit-component/tests/interfaces/wasi-http.wat +881 -0
- data/rust-vendor/wit-component/tests/interfaces/world-inline-interface.wat +24 -0
- data/rust-vendor/wit-component/tests/interfaces/world-inline-interface.wit +6 -0
- data/rust-vendor/wit-component/tests/interfaces/world-inline-interface.wit.print +9 -0
- data/rust-vendor/wit-component/tests/interfaces/world-pkg-conflict/bar.wit +3 -0
- data/rust-vendor/wit-component/tests/interfaces/world-pkg-conflict/foo.wit +9 -0
- data/rust-vendor/wit-component/tests/interfaces/world-pkg-conflict/foo.wit.print +12 -0
- data/rust-vendor/wit-component/tests/interfaces/world-pkg-conflict.wat +47 -0
- data/rust-vendor/wit-component/tests/interfaces/world-top-level.wat +55 -0
- data/rust-vendor/wit-component/tests/interfaces/world-top-level.wit +20 -0
- data/rust-vendor/wit-component/tests/interfaces/world-top-level.wit.print +19 -0
- data/rust-vendor/wit-component/tests/interfaces/worlds-with-types.wat +56 -0
- data/rust-vendor/wit-component/tests/interfaces/worlds-with-types.wit +23 -0
- data/rust-vendor/wit-component/tests/interfaces/worlds-with-types.wit.print +23 -0
- data/rust-vendor/wit-component/tests/interfaces.rs +123 -0
- data/rust-vendor/wit-component/tests/linking.rs +299 -0
- data/rust-vendor/wit-component/tests/merge/bad-interface1/error.txt +1 -0
- data/rust-vendor/wit-component/tests/merge/bad-interface1/from/a.wit +5 -0
- data/rust-vendor/wit-component/tests/merge/bad-interface1/from/deps/foo/a.wit +5 -0
- data/rust-vendor/wit-component/tests/merge/bad-interface1/into/a.wit +5 -0
- data/rust-vendor/wit-component/tests/merge/bad-interface1/into/deps/foo/a.wit +5 -0
- data/rust-vendor/wit-component/tests/merge/bad-interface2/error.txt +1 -0
- data/rust-vendor/wit-component/tests/merge/bad-interface2/from/a.wit +5 -0
- data/rust-vendor/wit-component/tests/merge/bad-interface2/from/deps/foo/a.wit +7 -0
- data/rust-vendor/wit-component/tests/merge/bad-interface2/into/a.wit +5 -0
- data/rust-vendor/wit-component/tests/merge/bad-interface2/into/deps/foo/a.wit +7 -0
- data/rust-vendor/wit-component/tests/merge/bad-world1/error.txt +1 -0
- data/rust-vendor/wit-component/tests/merge/bad-world1/from/a.wit +4 -0
- data/rust-vendor/wit-component/tests/merge/bad-world1/from/deps/foo/a.wit +11 -0
- data/rust-vendor/wit-component/tests/merge/bad-world1/into/a.wit +4 -0
- data/rust-vendor/wit-component/tests/merge/bad-world1/into/deps/foo/a.wit +9 -0
- data/rust-vendor/wit-component/tests/merge/bad-world2/error.txt +1 -0
- data/rust-vendor/wit-component/tests/merge/bad-world2/from/a.wit +5 -0
- data/rust-vendor/wit-component/tests/merge/bad-world2/from/deps/foo/a.wit +8 -0
- data/rust-vendor/wit-component/tests/merge/bad-world2/into/a.wit +5 -0
- data/rust-vendor/wit-component/tests/merge/bad-world2/into/deps/foo/a.wit +9 -0
- data/rust-vendor/wit-component/tests/merge/bad-world3/error.txt +1 -0
- data/rust-vendor/wit-component/tests/merge/bad-world3/from/a.wit +5 -0
- data/rust-vendor/wit-component/tests/merge/bad-world3/from/deps/foo/a.wit +8 -0
- data/rust-vendor/wit-component/tests/merge/bad-world3/into/a.wit +5 -0
- data/rust-vendor/wit-component/tests/merge/bad-world3/into/deps/foo/a.wit +9 -0
- data/rust-vendor/wit-component/tests/merge/bad-world4/error.txt +1 -0
- data/rust-vendor/wit-component/tests/merge/bad-world4/from/a.wit +5 -0
- data/rust-vendor/wit-component/tests/merge/bad-world4/from/deps/foo/a.wit +11 -0
- data/rust-vendor/wit-component/tests/merge/bad-world4/into/a.wit +5 -0
- data/rust-vendor/wit-component/tests/merge/bad-world4/into/deps/foo/a.wit +9 -0
- data/rust-vendor/wit-component/tests/merge/bad-world5/error.txt +1 -0
- data/rust-vendor/wit-component/tests/merge/bad-world5/from/a.wit +5 -0
- data/rust-vendor/wit-component/tests/merge/bad-world5/from/deps/foo/a.wit +11 -0
- data/rust-vendor/wit-component/tests/merge/bad-world5/into/a.wit +5 -0
- data/rust-vendor/wit-component/tests/merge/bad-world5/into/deps/foo/a.wit +9 -0
- data/rust-vendor/wit-component/tests/merge/success/from/a.wit +7 -0
- data/rust-vendor/wit-component/tests/merge/success/from/deps/foo/only-from.wit +5 -0
- data/rust-vendor/wit-component/tests/merge/success/from/deps/foo/shared.wit +46 -0
- data/rust-vendor/wit-component/tests/merge/success/from/deps/only-from-dep/a.wit +5 -0
- data/rust-vendor/wit-component/tests/merge/success/into/b.wit +7 -0
- data/rust-vendor/wit-component/tests/merge/success/into/deps/foo/only-into.wit +5 -0
- data/rust-vendor/wit-component/tests/merge/success/into/deps/foo/shared.wit +44 -0
- data/rust-vendor/wit-component/tests/merge/success/merge/foo.wit +77 -0
- data/rust-vendor/wit-component/tests/merge/success/merge/from.wit +8 -0
- data/rust-vendor/wit-component/tests/merge/success/merge/into.wit +8 -0
- data/rust-vendor/wit-component/tests/merge/success/merge/only-from-dep.wit +6 -0
- data/rust-vendor/wit-component/tests/merge.rs +80 -0
- data/rust-vendor/wit-component/tests/targets/error-missing-export/error.txt +2 -0
- data/rust-vendor/wit-component/tests/targets/error-missing-export/test.wat +39 -0
- data/rust-vendor/wit-component/tests/targets/error-missing-export/test.wit +18 -0
- data/rust-vendor/wit-component/tests/targets/error-missing-import/error.txt +2 -0
- data/rust-vendor/wit-component/tests/targets/error-missing-import/test.wat +37 -0
- data/rust-vendor/wit-component/tests/targets/error-missing-import/test.wit +13 -0
- data/rust-vendor/wit-component/tests/targets/success/test.wat +56 -0
- data/rust-vendor/wit-component/tests/targets/success/test.wit +14 -0
- data/rust-vendor/wit-component/tests/targets/success-empty/test.wat +1 -0
- data/rust-vendor/wit-component/tests/targets/success-empty/test.wit +9 -0
- data/rust-vendor/wit-component/tests/targets.rs +89 -0
- data/rust-vendor/wit-component/tests/wit/parse-dir/wit/deps/bar/bar.wit +9 -0
- data/rust-vendor/wit-component/tests/wit/parse-dir/wit/world.wit +5 -0
- data/rust-vendor/wit-component/tests/wit.rs +49 -0
- data/rust-vendor/wit-parser/.cargo-checksum.json +1 -0
- data/rust-vendor/wit-parser/.cargo_vcs_info.json +6 -0
- data/rust-vendor/wit-parser/Cargo.lock +576 -0
- data/rust-vendor/wit-parser/Cargo.toml +157 -0
- data/rust-vendor/wit-parser/Cargo.toml.orig +56 -0
- data/rust-vendor/wit-parser/README.md +13 -0
- data/rust-vendor/wit-parser/src/abi.rs +410 -0
- data/rust-vendor/wit-parser/src/ast/lex.rs +751 -0
- data/rust-vendor/wit-parser/src/ast/resolve.rs +1813 -0
- data/rust-vendor/wit-parser/src/ast/toposort.rs +249 -0
- data/rust-vendor/wit-parser/src/ast.rs +1958 -0
- data/rust-vendor/wit-parser/src/decoding.rs +1864 -0
- data/rust-vendor/wit-parser/src/lib.rs +1413 -0
- data/rust-vendor/wit-parser/src/live.rs +264 -0
- data/rust-vendor/wit-parser/src/metadata.rs +772 -0
- data/rust-vendor/wit-parser/src/resolve/clone.rs +227 -0
- data/rust-vendor/wit-parser/src/resolve.rs +4636 -0
- data/rust-vendor/wit-parser/src/serde_.rs +140 -0
- data/rust-vendor/wit-parser/src/sizealign.rs +626 -0
- data/rust-vendor/wit-parser/tests/.gitignore +2 -0
- data/rust-vendor/wit-parser/tests/all.rs +153 -0
- data/rust-vendor/wit-parser/tests/ui/async.wit +24 -0
- data/rust-vendor/wit-parser/tests/ui/async.wit.json +151 -0
- data/rust-vendor/wit-parser/tests/ui/comments.wit +25 -0
- data/rust-vendor/wit-parser/tests/ui/comments.wit.json +46 -0
- data/rust-vendor/wit-parser/tests/ui/complex-include/deps/bar/root.wit +9 -0
- data/rust-vendor/wit-parser/tests/ui/complex-include/deps/baz/root.wit +9 -0
- data/rust-vendor/wit-parser/tests/ui/complex-include/root.wit +26 -0
- data/rust-vendor/wit-parser/tests/ui/complex-include.wit.json +200 -0
- data/rust-vendor/wit-parser/tests/ui/cross-package-resource/deps/foo/foo.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/cross-package-resource/foo.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/cross-package-resource.wit.json +67 -0
- data/rust-vendor/wit-parser/tests/ui/diamond1/deps/dep1/types.wit +2 -0
- data/rust-vendor/wit-parser/tests/ui/diamond1/deps/dep2/types.wit +2 -0
- data/rust-vendor/wit-parser/tests/ui/diamond1/join.wit +6 -0
- data/rust-vendor/wit-parser/tests/ui/diamond1.wit.json +59 -0
- data/rust-vendor/wit-parser/tests/ui/disambiguate-diamond/shared1.wit +3 -0
- data/rust-vendor/wit-parser/tests/ui/disambiguate-diamond/shared2.wit +3 -0
- data/rust-vendor/wit-parser/tests/ui/disambiguate-diamond/world.wit +13 -0
- data/rust-vendor/wit-parser/tests/ui/disambiguate-diamond.wit.json +115 -0
- data/rust-vendor/wit-parser/tests/ui/empty.wit +1 -0
- data/rust-vendor/wit-parser/tests/ui/empty.wit.json +12 -0
- data/rust-vendor/wit-parser/tests/ui/error-context.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/error-context.wit.json +59 -0
- data/rust-vendor/wit-parser/tests/ui/feature-gates.wit +118 -0
- data/rust-vendor/wit-parser/tests/ui/feature-gates.wit.json +301 -0
- data/rust-vendor/wit-parser/tests/ui/feature-types.wit +13 -0
- data/rust-vendor/wit-parser/tests/ui/feature-types.wit.json +66 -0
- data/rust-vendor/wit-parser/tests/ui/foreign-deps/deps/another-pkg/other-doc.wit +3 -0
- data/rust-vendor/wit-parser/tests/ui/foreign-deps/deps/corp/saas.wit +4 -0
- data/rust-vendor/wit-parser/tests/ui/foreign-deps/deps/different-pkg/the-doc.wit +2 -0
- data/rust-vendor/wit-parser/tests/ui/foreign-deps/deps/foreign-pkg/the-doc.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/foreign-deps/deps/some-pkg/some-doc.wit +13 -0
- data/rust-vendor/wit-parser/tests/ui/foreign-deps/deps/wasi/clocks.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/foreign-deps/deps/wasi/filesystem.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/foreign-deps/root.wit +44 -0
- data/rust-vendor/wit-parser/tests/ui/foreign-deps-union/deps/another-pkg/other-doc.wit +3 -0
- data/rust-vendor/wit-parser/tests/ui/foreign-deps-union/deps/corp/saas.wit +4 -0
- data/rust-vendor/wit-parser/tests/ui/foreign-deps-union/deps/different-pkg/the-doc.wit +2 -0
- data/rust-vendor/wit-parser/tests/ui/foreign-deps-union/deps/foreign-pkg/the-doc.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/foreign-deps-union/deps/some-pkg/some-doc.wit +13 -0
- data/rust-vendor/wit-parser/tests/ui/foreign-deps-union/deps/wasi/clocks.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/foreign-deps-union/deps/wasi/filesystem.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/foreign-deps-union/deps/wasi/wasi.wit +6 -0
- data/rust-vendor/wit-parser/tests/ui/foreign-deps-union/root.wit +50 -0
- data/rust-vendor/wit-parser/tests/ui/foreign-deps-union.wit.json +410 -0
- data/rust-vendor/wit-parser/tests/ui/foreign-deps.wit.json +362 -0
- data/rust-vendor/wit-parser/tests/ui/foreign-interface-dep-gated.wit +17 -0
- data/rust-vendor/wit-parser/tests/ui/foreign-interface-dep-gated.wit.json +39 -0
- data/rust-vendor/wit-parser/tests/ui/foreign-world-dep-gated.wit +17 -0
- data/rust-vendor/wit-parser/tests/ui/foreign-world-dep-gated.wit.json +39 -0
- data/rust-vendor/wit-parser/tests/ui/functions.wit +11 -0
- data/rust-vendor/wit-parser/tests/ui/functions.wit.json +115 -0
- data/rust-vendor/wit-parser/tests/ui/gated-include.wit +67 -0
- data/rust-vendor/wit-parser/tests/ui/gated-include.wit.json +346 -0
- data/rust-vendor/wit-parser/tests/ui/gated-use.wit +13 -0
- data/rust-vendor/wit-parser/tests/ui/gated-use.wit.json +34 -0
- data/rust-vendor/wit-parser/tests/ui/ignore-files-deps/deps/bar/types.wit +2 -0
- data/rust-vendor/wit-parser/tests/ui/ignore-files-deps/deps/ignore-me.txt +1 -0
- data/rust-vendor/wit-parser/tests/ui/ignore-files-deps/world.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/ignore-files-deps.wit.json +41 -0
- data/rust-vendor/wit-parser/tests/ui/import-export-overlap1.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/import-export-overlap1.wit.json +37 -0
- data/rust-vendor/wit-parser/tests/ui/import-export-overlap2.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/import-export-overlap2.wit.json +42 -0
- data/rust-vendor/wit-parser/tests/ui/include-reps.wit +15 -0
- data/rust-vendor/wit-parser/tests/ui/include-reps.wit.json +68 -0
- data/rust-vendor/wit-parser/tests/ui/kebab-name-include-with.wit +8 -0
- data/rust-vendor/wit-parser/tests/ui/kebab-name-include-with.wit.json +66 -0
- data/rust-vendor/wit-parser/tests/ui/kinds-of-deps/a.wit +8 -0
- data/rust-vendor/wit-parser/tests/ui/kinds-of-deps/deps/b/root.wit +3 -0
- data/rust-vendor/wit-parser/tests/ui/kinds-of-deps/deps/c.wit +3 -0
- data/rust-vendor/wit-parser/tests/ui/kinds-of-deps/deps/d.wat +6 -0
- data/rust-vendor/wit-parser/tests/ui/kinds-of-deps/deps/e.wasm +0 -0
- data/rust-vendor/wit-parser/tests/ui/kinds-of-deps.wit.json +95 -0
- data/rust-vendor/wit-parser/tests/ui/many-names/a.wit +2 -0
- data/rust-vendor/wit-parser/tests/ui/many-names/b.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/many-names.wit.json +42 -0
- data/rust-vendor/wit-parser/tests/ui/maps.wit +34 -0
- data/rust-vendor/wit-parser/tests/ui/maps.wit.json +255 -0
- data/rust-vendor/wit-parser/tests/ui/multi-file/bar.wit +21 -0
- data/rust-vendor/wit-parser/tests/ui/multi-file/cycle-a.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/multi-file/cycle-b.wit +3 -0
- data/rust-vendor/wit-parser/tests/ui/multi-file/foo.wit +31 -0
- data/rust-vendor/wit-parser/tests/ui/multi-file-multi-package/a.wit +24 -0
- data/rust-vendor/wit-parser/tests/ui/multi-file-multi-package/b.wit +23 -0
- data/rust-vendor/wit-parser/tests/ui/multi-file-multi-package.wit.json +255 -0
- data/rust-vendor/wit-parser/tests/ui/multi-file.wit.json +300 -0
- data/rust-vendor/wit-parser/tests/ui/multi-package-deps/deps/dep.wit +13 -0
- data/rust-vendor/wit-parser/tests/ui/multi-package-deps/root.wit +16 -0
- data/rust-vendor/wit-parser/tests/ui/multi-package-deps.wit.json +161 -0
- data/rust-vendor/wit-parser/tests/ui/multi-package-gated-include.wit +114 -0
- data/rust-vendor/wit-parser/tests/ui/multi-package-gated-include.wit.json +697 -0
- data/rust-vendor/wit-parser/tests/ui/multi-package-shared-deps/deps/dep1/types.wit +4 -0
- data/rust-vendor/wit-parser/tests/ui/multi-package-shared-deps/deps/dep2/types.wit +4 -0
- data/rust-vendor/wit-parser/tests/ui/multi-package-shared-deps/packages.wit +41 -0
- data/rust-vendor/wit-parser/tests/ui/multi-package-shared-deps.wit.json +261 -0
- data/rust-vendor/wit-parser/tests/ui/multi-package-transitive-deps/deps/dep1/types.wit +8 -0
- data/rust-vendor/wit-parser/tests/ui/multi-package-transitive-deps/deps/dep2/types.wit +14 -0
- data/rust-vendor/wit-parser/tests/ui/multi-package-transitive-deps/packages.wit +12 -0
- data/rust-vendor/wit-parser/tests/ui/multi-package-transitive-deps.wit.json +174 -0
- data/rust-vendor/wit-parser/tests/ui/name-both-resource-and-type/deps/dep/foo.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/name-both-resource-and-type/foo.wit +9 -0
- data/rust-vendor/wit-parser/tests/ui/name-both-resource-and-type.wit.json +89 -0
- data/rust-vendor/wit-parser/tests/ui/package-syntax1.wit +1 -0
- data/rust-vendor/wit-parser/tests/ui/package-syntax1.wit.json +12 -0
- data/rust-vendor/wit-parser/tests/ui/package-syntax3.wit +1 -0
- data/rust-vendor/wit-parser/tests/ui/package-syntax3.wit.json +12 -0
- data/rust-vendor/wit-parser/tests/ui/package-syntax4.wit +1 -0
- data/rust-vendor/wit-parser/tests/ui/package-syntax4.wit.json +12 -0
- data/rust-vendor/wit-parser/tests/ui/packages-multiple-nested.wit +35 -0
- data/rust-vendor/wit-parser/tests/ui/packages-multiple-nested.wit.json +184 -0
- data/rust-vendor/wit-parser/tests/ui/packages-nested-colliding-decl-names.wit +24 -0
- data/rust-vendor/wit-parser/tests/ui/packages-nested-colliding-decl-names.wit.json +135 -0
- data/rust-vendor/wit-parser/tests/ui/packages-nested-internal-references.wit +16 -0
- data/rust-vendor/wit-parser/tests/ui/packages-nested-internal-references.wit.json +91 -0
- data/rust-vendor/wit-parser/tests/ui/packages-nested-with-semver.wit +24 -0
- data/rust-vendor/wit-parser/tests/ui/packages-nested-with-semver.wit.json +135 -0
- data/rust-vendor/wit-parser/tests/ui/packages-single-nested.wit +12 -0
- data/rust-vendor/wit-parser/tests/ui/packages-single-nested.wit.json +75 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/alias-no-type.wit +6 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/alias-no-type.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/async-bad-world.wit +6 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/async-bad-world.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/async-bad-world2.wit +6 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/async-bad-world2.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/async-bad-world3.wit +6 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/async-bad-world3.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/async-bad-world4.wit +11 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/async-bad-world4.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/async-bad1.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/async-bad1.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/async-bad2.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/async-bad2.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/async.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/async1.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-deprecated1.wit +4 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-deprecated1.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-deprecated2.wit +4 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-deprecated2.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-deprecated3.wit +4 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-deprecated3.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-deprecated4.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-deprecated4.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-function.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-function.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-function2.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-function2.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-gate1.wit +8 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-gate1.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-gate2.wit +8 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-gate2.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-gate3.wit +6 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-gate3.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-gate4.wit +8 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-gate4.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-gate5.wit +11 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-gate5.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-include1.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-include1.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-include2.wit +9 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-include2.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-include3.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-include3.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-list.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-list.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-list2.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-list2.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-list3.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-list3.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-list4.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-list4.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg1/root.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg1.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg2/deps/bar/empty.wit +1 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg2/root.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg2.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg3/deps/bar/.gitkeep +0 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg3/deps/bar/baz.wit +2 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg3/root.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg3.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg4/deps/bar/.gitkeep +0 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg4/deps/bar/baz.wit +4 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg4/root.wit +4 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg4.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg5/deps/bar/.gitkeep +0 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg5/deps/bar/baz.wit +3 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg5/root.wit +4 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg5.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg6/deps/bar/.gitkeep +0 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg6/deps/bar/baz.wit +4 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg6/root.wit +4 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-pkg6.wit.result +8 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource1.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource1.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource10.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource10.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource11.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource11.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource12.wit +6 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource12.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource13.wit +6 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource13.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource14.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource14.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource15/deps/foo/foo.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource15/foo.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource15.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource16.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource16.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource17.wit +8 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource17.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource2.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource2.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource3.wit +6 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource3.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource4.wit +6 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource4.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource5.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource5.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource6.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource6.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource7.wit +8 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource7.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource8.wit +8 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource8.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource9.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-resource9.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-since1.wit +4 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-since1.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-since3.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-since3.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-world-type1.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/bad-world-type1.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/case-insensitive-duplicates.wit +9 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/case-insensitive-duplicates.wit.result +1 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/conflicting-package/a.wit +1 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/conflicting-package/b.wit +1 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/conflicting-package.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/cycle.wit +6 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/cycle.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/cycle2.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/cycle2.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/cycle3.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/cycle3.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/cycle4.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/cycle4.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/cycle5.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/cycle5.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/dangling-type.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/dangling-type.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/duplicate-function-params.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/duplicate-function-params.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/duplicate-functions.wit +8 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/duplicate-functions.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/duplicate-interface.wit +6 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/duplicate-interface.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/duplicate-interface2/foo.wit +3 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/duplicate-interface2/foo2.wit +3 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/duplicate-interface2.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/duplicate-type.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/duplicate-type.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/empty-enum.wit +6 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/empty-enum.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/empty-variant1.wit +6 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/empty-variant1.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/export-twice.wit +8 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/export-twice.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/import-and-export1.wit +17 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/import-and-export1.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/import-and-export2.wit +18 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/import-and-export2.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/import-and-export3.wit +37 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/import-and-export3.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/import-and-export4.wit +44 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/import-and-export4.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/import-and-export5.wit +18 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/import-and-export5.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/import-twice.wit +8 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/import-twice.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/include-cycle.wit +9 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/include-cycle.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/include-foreign/deps/bar/empty.wit +3 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/include-foreign/root.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/include-foreign.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/include-with-id.wit +11 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/include-with-id.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/include-with-on-id.wit +11 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/include-with-on-id.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/invalid-toplevel.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/invalid-toplevel.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/invalid-type-reference.wit +10 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/invalid-type-reference.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/invalid-type-reference2.wit +6 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/invalid-type-reference2.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/kebab-name-include-not-found.wit +8 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/kebab-name-include-not-found.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/kebab-name-include.wit +8 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/kebab-name-include.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/keyword.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/keyword.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/map-invalid-key.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/map-invalid-key.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/missing-main-declaration-initial-main.wit +23 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/missing-main-declaration-initial-main.wit.result +1 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/missing-main-declaration-initial-nested.wit +23 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/missing-main-declaration-initial-nested.wit.result +1 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/missing-package.wit +0 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/missing-package.wit.result +1 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/multi-file-missing-delimiter/observe.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/multi-file-missing-delimiter/world.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/multi-file-missing-delimiter.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/multi-package-deps-share-nest/deps/dep1/types.wit +12 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/multi-package-deps-share-nest/deps/dep2/types.wit +12 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/multi-package-deps-share-nest/root.wit +8 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/multi-package-deps-share-nest.wit.result +3 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/multiple-package-docs/a.wit +2 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/multiple-package-docs/b.wit +2 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/multiple-package-docs.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/multiple-package-inline-cycle.wit +12 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/multiple-package-inline-cycle.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/multiple-packages-no-scope-blocks.wit +15 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/multiple-packages-no-scope-blocks.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/nested-packages-colliding-names.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/nested-packages-colliding-names.wit.result +3 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/nested-packages-with-error.wit +14 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/nested-packages-with-error.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/no-access-to-sibling-use/bar.wit +1 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/no-access-to-sibling-use/foo.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/no-access-to-sibling-use.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/non-existance-world-include/deps/bar/.gitkeep +0 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/non-existance-world-include/deps/bar/baz.wit +4 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/non-existance-world-include/root.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/non-existance-world-include.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/old-float-types.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/old-float-types.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/pkg-cycle/deps/a1/root.wit +4 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/pkg-cycle/root.wit +4 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/pkg-cycle.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/pkg-cycle2/deps/a1/root.wit +4 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/pkg-cycle2/deps/a2/root.wit +4 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/pkg-cycle2/root.wit +4 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/pkg-cycle2.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/resources-multiple-returns-borrow.wit +10 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/resources-multiple-returns-borrow.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/resources-return-borrow.wit +10 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/resources-return-borrow.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/return-borrow1.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/return-borrow1.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/return-borrow2.wit +8 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/return-borrow2.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/return-borrow3.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/return-borrow3.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/return-borrow4.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/return-borrow4.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/return-borrow5.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/return-borrow5.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/return-borrow6.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/return-borrow6.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/return-borrow7.wit +11 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/return-borrow7.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/return-borrow8/deps/baz.wit +9 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/return-borrow8/foo.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/return-borrow8.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/type-and-resource-same-name/deps/dep/foo.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/type-and-resource-same-name/foo.wit +8 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/type-and-resource-same-name.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/undefined-typed.wit +6 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/undefined-typed.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/unknown-interface.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/unknown-interface.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-interface1.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-interface1.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-interface2.wit +8 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-interface2.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-interface3.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-interface3.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-interface4.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-interface4.wit.result +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-use1.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-use1.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-use10/bar.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-use10/foo.wit +2 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-use10.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-use2.wit +10 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-use2.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-use3.wit +11 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-use3.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-use7.wit +10 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-use7.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-use8.wit +9 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-use8.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-use9.wit +9 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/unresolved-use9.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/unterminated-string.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/use-and-include-world/deps/bar/.gitkeep +0 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/use-and-include-world/deps/bar/baz.wit +4 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/use-and-include-world/root.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/use-and-include-world.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/use-conflict.wit +11 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/use-conflict.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/use-conflict2.wit +13 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/use-conflict2.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/use-conflict3.wit +13 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/use-conflict3.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/use-cycle1.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/use-cycle1.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/use-cycle4.wit +14 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/use-cycle4.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/use-shadow1.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/use-shadow1.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/use-world/deps/bar/.gitkeep +0 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/use-world/deps/bar/baz.wit +4 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/use-world/root.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/use-world.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/very-nested-packages.wit +8 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/very-nested-packages.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/world-interface-clash.wit +3 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/world-interface-clash.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/world-same-fields2.wit +8 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/world-same-fields2.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/world-same-fields3.wit +8 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/world-same-fields3.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/world-top-level-func.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/world-top-level-func.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/world-top-level-func2.wit +4 -0
- data/rust-vendor/wit-parser/tests/ui/parse-fail/world-top-level-func2.wit.result +5 -0
- data/rust-vendor/wit-parser/tests/ui/random.wit +27 -0
- data/rust-vendor/wit-parser/tests/ui/random.wit.json +56 -0
- data/rust-vendor/wit-parser/tests/ui/resources-empty.wit +10 -0
- data/rust-vendor/wit-parser/tests/ui/resources-empty.wit.json +70 -0
- data/rust-vendor/wit-parser/tests/ui/resources-multiple-returns-own.wit +10 -0
- data/rust-vendor/wit-parser/tests/ui/resources-multiple-returns-own.wit.json +85 -0
- data/rust-vendor/wit-parser/tests/ui/resources-multiple.wit +17 -0
- data/rust-vendor/wit-parser/tests/ui/resources-multiple.wit.json +207 -0
- data/rust-vendor/wit-parser/tests/ui/resources-return-own.wit +10 -0
- data/rust-vendor/wit-parser/tests/ui/resources-return-own.wit.json +73 -0
- data/rust-vendor/wit-parser/tests/ui/resources.wit +55 -0
- data/rust-vendor/wit-parser/tests/ui/resources.wit.json +387 -0
- data/rust-vendor/wit-parser/tests/ui/resources1.wit +12 -0
- data/rust-vendor/wit-parser/tests/ui/resources1.wit.json +92 -0
- data/rust-vendor/wit-parser/tests/ui/same-name-import-export.wit +6 -0
- data/rust-vendor/wit-parser/tests/ui/same-name-import-export.wit.json +39 -0
- data/rust-vendor/wit-parser/tests/ui/shared-types.wit +10 -0
- data/rust-vendor/wit-parser/tests/ui/shared-types.wit.json +79 -0
- data/rust-vendor/wit-parser/tests/ui/simple-wasm-text.wat +6 -0
- data/rust-vendor/wit-parser/tests/ui/simple-wasm-text.wit.json +21 -0
- data/rust-vendor/wit-parser/tests/ui/since-and-unstable.wit +107 -0
- data/rust-vendor/wit-parser/tests/ui/since-and-unstable.wit.json +608 -0
- data/rust-vendor/wit-parser/tests/ui/streams-and-futures.wit +15 -0
- data/rust-vendor/wit-parser/tests/ui/streams-and-futures.wit.json +205 -0
- data/rust-vendor/wit-parser/tests/ui/stress-export-elaborate.wit +54 -0
- data/rust-vendor/wit-parser/tests/ui/stress-export-elaborate.wit.json +1156 -0
- data/rust-vendor/wit-parser/tests/ui/type-then-eof.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/type-then-eof.wit.json +28 -0
- data/rust-vendor/wit-parser/tests/ui/types.wit +59 -0
- data/rust-vendor/wit-parser/tests/ui/types.wit.json +768 -0
- data/rust-vendor/wit-parser/tests/ui/union-fuzz-1.wit +9 -0
- data/rust-vendor/wit-parser/tests/ui/union-fuzz-1.wit.json +35 -0
- data/rust-vendor/wit-parser/tests/ui/union-fuzz-2.wit +12 -0
- data/rust-vendor/wit-parser/tests/ui/union-fuzz-2.wit.json +62 -0
- data/rust-vendor/wit-parser/tests/ui/unstable-resource.wit +17 -0
- data/rust-vendor/wit-parser/tests/ui/unstable-resource.wit.json +44 -0
- data/rust-vendor/wit-parser/tests/ui/use-chain.wit +11 -0
- data/rust-vendor/wit-parser/tests/ui/use-chain.wit.json +53 -0
- data/rust-vendor/wit-parser/tests/ui/use.wit +34 -0
- data/rust-vendor/wit-parser/tests/ui/use.wit.json +168 -0
- data/rust-vendor/wit-parser/tests/ui/version-syntax.wit +10 -0
- data/rust-vendor/wit-parser/tests/ui/version-syntax.wit.json +57 -0
- data/rust-vendor/wit-parser/tests/ui/versions/deps/a1/foo.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/versions/deps/a2/foo.wit +5 -0
- data/rust-vendor/wit-parser/tests/ui/versions/foo.wit +7 -0
- data/rust-vendor/wit-parser/tests/ui/versions.wit.json +91 -0
- data/rust-vendor/wit-parser/tests/ui/wasi.wit +178 -0
- data/rust-vendor/wit-parser/tests/ui/wasi.wit.json +539 -0
- data/rust-vendor/wit-parser/tests/ui/with-resource-as.wit +15 -0
- data/rust-vendor/wit-parser/tests/ui/with-resource-as.wit.json +221 -0
- data/rust-vendor/wit-parser/tests/ui/world-diamond.wit +23 -0
- data/rust-vendor/wit-parser/tests/ui/world-diamond.wit.json +115 -0
- data/rust-vendor/wit-parser/tests/ui/world-iface-no-collide.wit +11 -0
- data/rust-vendor/wit-parser/tests/ui/world-iface-no-collide.wit.json +67 -0
- data/rust-vendor/wit-parser/tests/ui/world-implicit-import1.wit +12 -0
- data/rust-vendor/wit-parser/tests/ui/world-implicit-import1.wit.json +81 -0
- data/rust-vendor/wit-parser/tests/ui/world-implicit-import2.wit +11 -0
- data/rust-vendor/wit-parser/tests/ui/world-implicit-import2.wit.json +68 -0
- data/rust-vendor/wit-parser/tests/ui/world-implicit-import3.wit +11 -0
- data/rust-vendor/wit-parser/tests/ui/world-implicit-import3.wit.json +69 -0
- data/rust-vendor/wit-parser/tests/ui/world-same-fields4.wit +13 -0
- data/rust-vendor/wit-parser/tests/ui/world-same-fields4.wit.json +82 -0
- data/rust-vendor/wit-parser/tests/ui/world-top-level-funcs.wit +9 -0
- data/rust-vendor/wit-parser/tests/ui/world-top-level-funcs.wit.json +79 -0
- data/rust-vendor/wit-parser/tests/ui/world-top-level-resources.wit +24 -0
- data/rust-vendor/wit-parser/tests/ui/world-top-level-resources.wit.json +225 -0
- data/rust-vendor/wit-parser/tests/ui/worlds-union-dedup.wit +23 -0
- data/rust-vendor/wit-parser/tests/ui/worlds-union-dedup.wit.json +112 -0
- data/rust-vendor/wit-parser/tests/ui/worlds-with-types.wit +34 -0
- data/rust-vendor/wit-parser/tests/ui/worlds-with-types.wit.json +188 -0
- data/rust-vendor/zerocopy/.cargo-checksum.json +1 -1
- data/rust-vendor/zerocopy/.cargo_vcs_info.json +1 -2
- data/rust-vendor/zerocopy/Cargo.lock +3 -3
- data/rust-vendor/zerocopy/Cargo.toml +4 -4
- data/rust-vendor/zerocopy/Cargo.toml.orig +4 -4
- data/rust-vendor/zerocopy/agent_docs/reviewing.md +8 -0
- data/rust-vendor/zerocopy/build.rs +1 -0
- data/rust-vendor/zerocopy/ci/release_crate_version.sh +3 -0
- data/rust-vendor/zerocopy/src/doctests.rs +18 -2
- data/rust-vendor/zerocopy/src/impls.rs +7 -4
- data/rust-vendor/zerocopy/src/lib.rs +60 -28
- data/rust-vendor/zerocopy/src/macros.rs +24 -4
- data/rust-vendor/zerocopy/src/pointer/invariant.rs +31 -3
- data/rust-vendor/zerocopy/src/pointer/mod.rs +2 -2
- data/rust-vendor/zerocopy/src/pointer/ptr.rs +3 -3
- data/rust-vendor/zerocopy/src/util/macros.rs +21 -6
- data/rust-vendor/zerocopy/tests/trybuild.rs +3 -18
- data/rust-vendor/zerocopy-derive/.cargo-checksum.json +1 -1
- data/rust-vendor/zerocopy-derive/.cargo_vcs_info.json +1 -1
- data/rust-vendor/zerocopy-derive/Cargo.lock +1 -1
- data/rust-vendor/zerocopy-derive/Cargo.toml +9 -2
- data/rust-vendor/zerocopy-derive/Cargo.toml.orig +5 -2
- data/rust-vendor/zerocopy-derive/src/derive/from_bytes.rs +9 -7
- data/rust-vendor/zerocopy-derive/src/derive/into_bytes.rs +8 -4
- data/rust-vendor/zerocopy-derive/src/derive/try_from_bytes.rs +52 -18
- data/rust-vendor/zerocopy-derive/src/derive/unaligned.rs +3 -3
- data/rust-vendor/zerocopy-derive/src/output_tests/expected/from_bytes_enum.expected.rs +7 -3
- data/rust-vendor/zerocopy-derive/src/output_tests/expected/from_bytes_struct.expected.rs +7 -3
- data/rust-vendor/zerocopy-derive/src/output_tests/expected/from_bytes_union.expected.rs +7 -3
- data/rust-vendor/zerocopy-derive/src/output_tests/expected/from_zeros.expected.rs +7 -3
- data/rust-vendor/zerocopy-derive/src/output_tests/expected/try_from_bytes.expected.rs +7 -3
- data/rust-vendor/zerocopy-derive/src/output_tests/expected/try_from_bytes_enum_1.expected.rs +22 -10
- data/rust-vendor/zerocopy-derive/src/output_tests/expected/try_from_bytes_enum_2.expected.rs +22 -10
- data/rust-vendor/zerocopy-derive/src/output_tests/expected/try_from_bytes_enum_3.expected.rs +22 -10
- data/rust-vendor/zerocopy-derive/src/output_tests/expected/try_from_bytes_trivial_is_bit_valid_enum.expected.rs +7 -3
- data/rust-vendor/zerocopy-derive/src/util.rs +72 -5
- data/rust-vendor/zerocopy-derive/tests/on_error.rs +169 -0
- data/rust-vendor/zerocopy-derive/tests/trybuild.rs +9 -7
- data/rust-vendor/zerocopy-derive/tests/ui-msrv/cfgs/on_error.rs +19 -0
- data/rust-vendor/zerocopy-derive/tests/ui-msrv/cfgs/on_error.stderr +16 -0
- data/rust-vendor/zerocopy-derive/tests/ui-msrv/{union_into_bytes_cfg → cfgs}/union_into_bytes_cfg.stderr +1 -1
- data/rust-vendor/zerocopy-derive/tests/ui-nightly/cfgs/on_error.rs +19 -0
- data/rust-vendor/zerocopy-derive/tests/ui-nightly/cfgs/on_error.stderr +31 -0
- data/rust-vendor/zerocopy-derive/tests/ui-nightly/cfgs/union_into_bytes_cfg.stderr +8 -0
- data/rust-vendor/zerocopy-derive/tests/ui-nightly/union.stderr +0 -14
- data/rust-vendor/zerocopy-derive/tests/ui-stable/cfgs/on_error.rs +19 -0
- data/rust-vendor/zerocopy-derive/tests/ui-stable/cfgs/on_error.stderr +27 -0
- data/rust-vendor/zerocopy-derive/tests/ui-stable/cfgs/union_into_bytes_cfg.stderr +8 -0
- data/rust-vendor/zerocopy-derive/tests/ui-stable/union.stderr +0 -14
- data/rust-vendor/zmij/.cargo-checksum.json +1 -1
- data/rust-vendor/zmij/.cargo_vcs_info.json +1 -1
- data/rust-vendor/zmij/.github/workflows/ci.yml +9 -6
- data/rust-vendor/zmij/Cargo.lock +281 -58
- data/rust-vendor/zmij/Cargo.toml +3 -3
- data/rust-vendor/zmij/Cargo.toml.orig +3 -3
- data/rust-vendor/zmij/README.md +1 -1
- data/rust-vendor/zmij/src/lib.rs +124 -79
- data/rust-vendor/zmij/src/tests.rs +11 -5
- data/rust-vendor/zmij/tests/ryu_comparison.rs +3 -3
- metadata +1841 -55
- data/rust-vendor/libc/src/qurt/hexagon.rs +0 -340
- data/rust-vendor/regex/.vim/coc-settings.json +0 -6
- data/rust-vendor/regex/Cross.toml +0 -7
- data/rust-vendor/regex/rustfmt.toml +0 -2
- data/rust-vendor/regex/test +0 -46
- data/rust-vendor/regex/testdata/README.md +0 -22
- data/rust-vendor/regex/testdata/fowler/basic.toml +0 -1611
- data/rust-vendor/regex/testdata/fowler/dat/README +0 -25
- data/rust-vendor/regex/testdata/fowler/dat/basic.dat +0 -223
- data/rust-vendor/regex/testdata/fowler/dat/nullsubexpr.dat +0 -74
- data/rust-vendor/regex/testdata/fowler/dat/repetition.dat +0 -169
- data/rust-vendor/regex/testdata/fowler/nullsubexpr.toml +0 -405
- data/rust-vendor/regex/testdata/fowler/repetition.toml +0 -746
- data/rust-vendor/regex-automata/test +0 -95
- data/rust-vendor/regex-automata/tests/fuzz/mod.rs +0 -2
- data/rust-vendor/regex-automata/tests/fuzz/testdata/deserialize_dense_crash-9486fb7c8a93b12c12a62166b43d31640c0208a9 +0 -0
- data/rust-vendor/regex-automata/tests/fuzz/testdata/deserialize_dense_minimized-from-9486fb7c8a93b12c12a62166b43d31640c0208a9 +0 -0
- data/rust-vendor/regex-automata/tests/fuzz/testdata/deserialize_sparse_crash-0da59c0434eaf35e5a6b470fa9244bb79c72b000 +0 -0
- data/rust-vendor/regex-automata/tests/fuzz/testdata/deserialize_sparse_crash-18cfc246f2ddfc3dfc92b0c7893178c7cf65efa9 +0 -0
- data/rust-vendor/regex-automata/tests/fuzz/testdata/deserialize_sparse_crash-61fd8e3003bf9d99f6c1e5a8488727eefd234b98 +0 -0
- data/rust-vendor/regex-automata/tests/fuzz/testdata/deserialize_sparse_crash-a1b839d899ced76d5d7d0f78f9edb7a421505838 +0 -0
- data/rust-vendor/regex-automata/tests/fuzz/testdata/deserialize_sparse_crash-c383ae07ec5e191422eadc492117439011816570 +0 -0
- data/rust-vendor/regex-automata/tests/fuzz/testdata/deserialize_sparse_crash-d07703ceb94b10dcd9e4acb809f2051420449e2b +0 -0
- data/rust-vendor/regex-automata/tests/fuzz/testdata/deserialize_sparse_crash-dbb8172d3984e7e7d03f4b5f8bb86ecd1460eff9 +0 -0
- data/rust-vendor/regex-automata/tests/gen/README.md +0 -65
- data/rust-vendor/regex-automata/tests/gen/dense/multi_pattern_v2_fwd.bigendian.dfa +0 -0
- data/rust-vendor/regex-automata/tests/gen/dense/multi_pattern_v2_fwd.littleendian.dfa +0 -0
- data/rust-vendor/regex-automata/tests/gen/dense/multi_pattern_v2_rev.bigendian.dfa +0 -0
- data/rust-vendor/regex-automata/tests/gen/dense/multi_pattern_v2_rev.littleendian.dfa +0 -0
- data/rust-vendor/regex-automata/tests/gen/sparse/multi_pattern_v2_fwd.bigendian.dfa +0 -0
- data/rust-vendor/regex-automata/tests/gen/sparse/multi_pattern_v2_fwd.littleendian.dfa +0 -0
- data/rust-vendor/regex-automata/tests/gen/sparse/multi_pattern_v2_rev.bigendian.dfa +0 -0
- data/rust-vendor/regex-automata/tests/gen/sparse/multi_pattern_v2_rev.littleendian.dfa +0 -0
- data/rust-vendor/regex-syntax/benches/bench.rs +0 -63
- data/rust-vendor/regex-syntax/test +0 -30
- data/rust-vendor/zerocopy/tests/ui-msrv/invalid-impls/invalid-impls.rs +0 -31
- data/rust-vendor/zerocopy/tests/ui-msrv/invalid-impls/invalid-impls.stderr +0 -159
- data/rust-vendor/zerocopy/tests/ui-nightly/invalid-impls/invalid-impls.rs +0 -31
- data/rust-vendor/zerocopy/tests/ui-nightly/invalid-impls/invalid-impls.stderr +0 -139
- data/rust-vendor/zerocopy/tests/ui-stable/invalid-impls/invalid-impls.rs +0 -31
- data/rust-vendor/zerocopy/tests/ui-stable/invalid-impls/invalid-impls.stderr +0 -155
- data/rust-vendor/zerocopy-derive/tests/ui-nightly/union_into_bytes_cfg/union_into_bytes_cfg.stderr +0 -22
- data/rust-vendor/zerocopy-derive/tests/ui-stable/union_into_bytes_cfg/union_into_bytes_cfg.stderr +0 -22
- /data/rust-vendor/{getrandom → getrandom-0.3.4}/src/backends/sanitizer.rs +0 -0
- /data/rust-vendor/{getrandom → getrandom-0.3.4}/src/backends/wasi_p2.rs +0 -0
- /data/rust-vendor/{getrandom → getrandom-0.3.4}/src/lazy.rs +0 -0
- /data/rust-vendor/{getrandom → getrandom-0.3.4}/src/util_libc.rs +0 -0
- /data/rust-vendor/{wit-bindgen → wit-bindgen-0.46.0}/src/rt/wit_bindgen_cabi.c +0 -0
- /data/rust-vendor/{wit-bindgen → wit-bindgen-0.46.0}/src/rt/wit_bindgen_cabi.o +0 -0
- /data/rust-vendor/zerocopy-derive/tests/ui-msrv/{union_into_bytes_cfg → cfgs}/union_into_bytes_cfg.rs +0 -0
- /data/rust-vendor/zerocopy-derive/tests/ui-nightly/{union_into_bytes_cfg → cfgs}/union_into_bytes_cfg.rs +0 -0
- /data/rust-vendor/zerocopy-derive/tests/ui-stable/{union_into_bytes_cfg → cfgs}/union_into_bytes_cfg.rs +0 -0
|
@@ -0,0 +1,2249 @@
|
|
|
1
|
+
/* Copyright 2018 Mozilla Foundation
|
|
2
|
+
*
|
|
3
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License.
|
|
5
|
+
* You may obtain a copy of the License at
|
|
6
|
+
*
|
|
7
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
* See the License for the specific language governing permissions and
|
|
13
|
+
* limitations under the License.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
use crate::binary_reader::BinaryReaderErrorKind;
|
|
17
|
+
use crate::limits::{
|
|
18
|
+
MAX_WASM_FUNCTION_PARAMS, MAX_WASM_FUNCTION_RETURNS, MAX_WASM_STRUCT_FIELDS,
|
|
19
|
+
MAX_WASM_SUPERTYPES, MAX_WASM_TYPES,
|
|
20
|
+
};
|
|
21
|
+
use crate::prelude::*;
|
|
22
|
+
#[cfg(feature = "validate")]
|
|
23
|
+
use crate::types::CoreTypeId;
|
|
24
|
+
use crate::{BinaryReader, BinaryReaderError, FromReader, Result, SectionLimited};
|
|
25
|
+
use core::cmp::Ordering;
|
|
26
|
+
use core::fmt::{self, Debug};
|
|
27
|
+
use core::hash::{Hash, Hasher};
|
|
28
|
+
|
|
29
|
+
#[cfg(feature = "validate")]
|
|
30
|
+
mod matches;
|
|
31
|
+
#[cfg(feature = "validate")]
|
|
32
|
+
pub(crate) use self::matches::{Matches, WithRecGroup};
|
|
33
|
+
|
|
34
|
+
/// A packed representation of a type index.
|
|
35
|
+
///
|
|
36
|
+
/// This type is morally an `enum` of either:
|
|
37
|
+
///
|
|
38
|
+
/// 1. An index into a Wasm module's type space.
|
|
39
|
+
///
|
|
40
|
+
/// 2. A `CoreTypeId` identifier.
|
|
41
|
+
///
|
|
42
|
+
/// 3. An index into a recursion group's elements.
|
|
43
|
+
///
|
|
44
|
+
/// The latter two variants are *canonical* while the first is not. Reading raw
|
|
45
|
+
/// types will produce (1), while working with types after validation will
|
|
46
|
+
/// produce (2) and (3).
|
|
47
|
+
//
|
|
48
|
+
// This is a bit-packed `u32` with the following layout:
|
|
49
|
+
//
|
|
50
|
+
// [ unused:u10 kind:u2 index:u20 ]
|
|
51
|
+
//
|
|
52
|
+
// It must fit in 22 bits to keep `RefType` in 24 bits and `ValType` in 32 bits,
|
|
53
|
+
// so the top ten bits are unused.
|
|
54
|
+
//
|
|
55
|
+
// The `index` field's interpretation depends on the `kind` field, which may be
|
|
56
|
+
// one of the following:
|
|
57
|
+
//
|
|
58
|
+
// * `00`: The `index` is an index into the module's type space.
|
|
59
|
+
//
|
|
60
|
+
// * `01`: The `index` is an index into the containing type's recursion group.
|
|
61
|
+
//
|
|
62
|
+
// * `10`: The `index` is a `CoreTypeId`.
|
|
63
|
+
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
|
64
|
+
pub struct PackedIndex(u32);
|
|
65
|
+
|
|
66
|
+
// Assert that we can fit indices up to `MAX_WASM_TYPES` inside `RefType`.
|
|
67
|
+
#[test]
|
|
68
|
+
fn can_fit_max_wasm_types_in_packed_index() {
|
|
69
|
+
assert!(PackedIndex::can_represent_index(
|
|
70
|
+
crate::limits::MAX_WASM_TYPES as u32
|
|
71
|
+
));
|
|
72
|
+
assert!(PackedIndex::can_represent_index(
|
|
73
|
+
0b00000000_00001111_00000000_00000000
|
|
74
|
+
));
|
|
75
|
+
assert!(PackedIndex::can_represent_index(
|
|
76
|
+
0b00000000_00000000_11111111_00000000
|
|
77
|
+
));
|
|
78
|
+
assert!(PackedIndex::can_represent_index(
|
|
79
|
+
0b00000000_00000000_00000000_11111111
|
|
80
|
+
));
|
|
81
|
+
assert!(PackedIndex::can_represent_index(0));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
impl PackedIndex {
|
|
85
|
+
const UNUSED_MASK: u32 = u32::MAX & !(Self::KIND_MASK | Self::INDEX_MASK);
|
|
86
|
+
const KIND_MASK: u32 = 0b11 << 20;
|
|
87
|
+
const INDEX_MASK: u32 = (1 << 20) - 1;
|
|
88
|
+
|
|
89
|
+
const MODULE_KIND: u32 = 0b00 << 20;
|
|
90
|
+
const REC_GROUP_KIND: u32 = 0b01 << 20;
|
|
91
|
+
#[cfg(feature = "validate")]
|
|
92
|
+
const ID_KIND: u32 = 0b10 << 20;
|
|
93
|
+
|
|
94
|
+
#[inline]
|
|
95
|
+
pub(crate) fn unchecked_from_u32(x: u32) -> Self {
|
|
96
|
+
debug_assert_eq!(Self::UNUSED_MASK & x, 0);
|
|
97
|
+
Self(x)
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
#[inline]
|
|
101
|
+
pub(crate) fn to_u32(id: Self) -> u32 {
|
|
102
|
+
let x = id.0;
|
|
103
|
+
debug_assert_eq!(Self::UNUSED_MASK & x, 0);
|
|
104
|
+
x
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
#[inline]
|
|
108
|
+
fn can_represent_index(index: u32) -> bool {
|
|
109
|
+
index & Self::INDEX_MASK == index
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
#[inline]
|
|
113
|
+
fn kind(&self) -> u32 {
|
|
114
|
+
self.0 & Self::KIND_MASK
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
#[inline]
|
|
118
|
+
fn index(&self) -> u32 {
|
|
119
|
+
self.0 & Self::INDEX_MASK
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/// Construct a `PackedIndex` from an index into a module's types space.
|
|
123
|
+
#[inline]
|
|
124
|
+
pub fn from_module_index(index: u32) -> Option<Self> {
|
|
125
|
+
if PackedIndex::can_represent_index(index) {
|
|
126
|
+
Some(PackedIndex(PackedIndex::MODULE_KIND | index))
|
|
127
|
+
} else {
|
|
128
|
+
None
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/// Construct a `PackedIndex` from an index into the index's containing
|
|
133
|
+
/// recursion group.
|
|
134
|
+
#[inline]
|
|
135
|
+
pub fn from_rec_group_index(index: u32) -> Option<Self> {
|
|
136
|
+
if PackedIndex::can_represent_index(index) {
|
|
137
|
+
Some(PackedIndex(PackedIndex::REC_GROUP_KIND | index))
|
|
138
|
+
} else {
|
|
139
|
+
None
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/// Construct a `PackedIndex` from the given `CoreTypeId`.
|
|
144
|
+
#[inline]
|
|
145
|
+
#[cfg(feature = "validate")]
|
|
146
|
+
pub fn from_id(id: CoreTypeId) -> Option<Self> {
|
|
147
|
+
let index = u32::try_from(crate::types::TypeIdentifier::index(&id)).unwrap();
|
|
148
|
+
if PackedIndex::can_represent_index(index) {
|
|
149
|
+
Some(PackedIndex(PackedIndex::ID_KIND | index))
|
|
150
|
+
} else {
|
|
151
|
+
None
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/// Is this index in canonical form?
|
|
156
|
+
#[inline]
|
|
157
|
+
#[cfg(feature = "validate")]
|
|
158
|
+
pub fn is_canonical(&self) -> bool {
|
|
159
|
+
match self.kind() {
|
|
160
|
+
Self::REC_GROUP_KIND | Self::ID_KIND => true,
|
|
161
|
+
Self::MODULE_KIND => false,
|
|
162
|
+
_ => unreachable!(),
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/// Uncompress this packed index into an actual `enum` that can be matched
|
|
167
|
+
/// on.
|
|
168
|
+
#[inline]
|
|
169
|
+
pub fn unpack(&self) -> UnpackedIndex {
|
|
170
|
+
match self.kind() {
|
|
171
|
+
Self::MODULE_KIND => UnpackedIndex::Module(self.index()),
|
|
172
|
+
Self::REC_GROUP_KIND => UnpackedIndex::RecGroup(self.index()),
|
|
173
|
+
#[cfg(feature = "validate")]
|
|
174
|
+
Self::ID_KIND => UnpackedIndex::Id(
|
|
175
|
+
<CoreTypeId as crate::types::TypeIdentifier>::from_index(self.index()),
|
|
176
|
+
),
|
|
177
|
+
_ => unreachable!(),
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/// Get the underlying index into a module's types space, if any.
|
|
182
|
+
#[inline]
|
|
183
|
+
pub fn as_module_index(&self) -> Option<u32> {
|
|
184
|
+
if self.kind() == Self::MODULE_KIND {
|
|
185
|
+
Some(self.index())
|
|
186
|
+
} else {
|
|
187
|
+
None
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/// Get the underlying index into the containing recursion group, if any.
|
|
192
|
+
#[inline]
|
|
193
|
+
pub fn as_rec_group_index(&self) -> Option<u32> {
|
|
194
|
+
if self.kind() == Self::REC_GROUP_KIND {
|
|
195
|
+
Some(self.index())
|
|
196
|
+
} else {
|
|
197
|
+
None
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/// Get the underlying `CoreTypeId`, if any.
|
|
202
|
+
#[inline]
|
|
203
|
+
#[cfg(feature = "validate")]
|
|
204
|
+
pub fn as_core_type_id(&self) -> Option<CoreTypeId> {
|
|
205
|
+
if self.kind() == Self::ID_KIND {
|
|
206
|
+
Some(<CoreTypeId as crate::types::TypeIdentifier>::from_index(
|
|
207
|
+
self.index(),
|
|
208
|
+
))
|
|
209
|
+
} else {
|
|
210
|
+
None
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
impl fmt::Debug for PackedIndex {
|
|
216
|
+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> core::fmt::Result {
|
|
217
|
+
f.debug_struct("CoreTypeIndex")
|
|
218
|
+
.field(
|
|
219
|
+
"kind",
|
|
220
|
+
match self.kind() {
|
|
221
|
+
Self::MODULE_KIND => &"module",
|
|
222
|
+
Self::REC_GROUP_KIND => &"recgroup",
|
|
223
|
+
#[cfg(feature = "validate")]
|
|
224
|
+
Self::ID_KIND => &"id",
|
|
225
|
+
_ => unreachable!(),
|
|
226
|
+
},
|
|
227
|
+
)
|
|
228
|
+
.field("index", &self.index())
|
|
229
|
+
.finish()
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
impl fmt::Display for PackedIndex {
|
|
234
|
+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> core::fmt::Result {
|
|
235
|
+
fmt::Display::fmt(&self.unpack(), f)
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/// The uncompressed form of a `PackedIndex`.
|
|
240
|
+
///
|
|
241
|
+
/// Can be used for `match` statements.
|
|
242
|
+
#[derive(Clone, Copy, Debug, PartialEq, Eq, Ord, PartialOrd, Hash)]
|
|
243
|
+
pub enum UnpackedIndex {
|
|
244
|
+
/// An index into a Wasm module's types space.
|
|
245
|
+
Module(u32),
|
|
246
|
+
|
|
247
|
+
/// An index into the containing recursion group's elements.
|
|
248
|
+
RecGroup(u32),
|
|
249
|
+
|
|
250
|
+
/// A type identifier.
|
|
251
|
+
#[cfg(feature = "validate")]
|
|
252
|
+
Id(CoreTypeId),
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
impl UnpackedIndex {
|
|
256
|
+
/// Compress this index into its packed form.
|
|
257
|
+
///
|
|
258
|
+
/// Returns `None` if an index is beyond implementation limits.
|
|
259
|
+
pub fn pack(&self) -> Option<PackedIndex> {
|
|
260
|
+
match self {
|
|
261
|
+
UnpackedIndex::Module(i) => PackedIndex::from_module_index(*i),
|
|
262
|
+
UnpackedIndex::RecGroup(i) => PackedIndex::from_rec_group_index(*i),
|
|
263
|
+
#[cfg(feature = "validate")]
|
|
264
|
+
UnpackedIndex::Id(id) => PackedIndex::from_id(*id),
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/// Is this index in canonical form?
|
|
269
|
+
#[inline]
|
|
270
|
+
#[cfg(feature = "validate")]
|
|
271
|
+
pub fn is_canonical(&self) -> bool {
|
|
272
|
+
matches!(self, UnpackedIndex::RecGroup(_) | UnpackedIndex::Id(_))
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/// Get the underlying index into a module's types space, if any.
|
|
276
|
+
#[inline]
|
|
277
|
+
pub fn as_module_index(&self) -> Option<u32> {
|
|
278
|
+
if let Self::Module(i) = *self {
|
|
279
|
+
Some(i)
|
|
280
|
+
} else {
|
|
281
|
+
None
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/// Get the underlying index into the containing recursion group, if any.
|
|
286
|
+
#[inline]
|
|
287
|
+
pub fn as_rec_group_index(&self) -> Option<u32> {
|
|
288
|
+
if let Self::RecGroup(i) = *self {
|
|
289
|
+
Some(i)
|
|
290
|
+
} else {
|
|
291
|
+
None
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/// Get the underlying `CoreTypeId`, if any.
|
|
296
|
+
#[inline]
|
|
297
|
+
#[cfg(feature = "validate")]
|
|
298
|
+
pub fn as_core_type_id(&self) -> Option<CoreTypeId> {
|
|
299
|
+
if let Self::Id(id) = *self {
|
|
300
|
+
Some(id)
|
|
301
|
+
} else {
|
|
302
|
+
None
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
impl fmt::Display for UnpackedIndex {
|
|
308
|
+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> core::fmt::Result {
|
|
309
|
+
match self {
|
|
310
|
+
UnpackedIndex::Module(i) => write!(f, "(module {i})"),
|
|
311
|
+
UnpackedIndex::RecGroup(i) => write!(f, "(recgroup {i})"),
|
|
312
|
+
#[cfg(feature = "validate")]
|
|
313
|
+
UnpackedIndex::Id(id) => write!(f, "(id {})", crate::types::TypeIdentifier::index(id)),
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/// Represents a recursive type group in a WebAssembly module.
|
|
319
|
+
#[derive(Debug, Clone)]
|
|
320
|
+
pub struct RecGroup {
|
|
321
|
+
inner: RecGroupInner,
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
#[derive(Debug, Clone)]
|
|
325
|
+
enum RecGroupInner {
|
|
326
|
+
Implicit((usize, SubType)),
|
|
327
|
+
Explicit(Vec<(usize, SubType)>),
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
impl RecGroup {
|
|
331
|
+
/// Create an explicit `RecGroup` for the given types.
|
|
332
|
+
pub(crate) fn explicit(types: Vec<(usize, SubType)>) -> Self {
|
|
333
|
+
RecGroup {
|
|
334
|
+
inner: RecGroupInner::Explicit(types),
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/// Create an implicit `RecGroup` for a type that was not contained
|
|
339
|
+
/// in a `(rec ...)`.
|
|
340
|
+
pub(crate) fn implicit(offset: usize, ty: SubType) -> Self {
|
|
341
|
+
RecGroup {
|
|
342
|
+
inner: RecGroupInner::Implicit((offset, ty)),
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
/// Is this an explicit recursion group?
|
|
347
|
+
pub fn is_explicit_rec_group(&self) -> bool {
|
|
348
|
+
matches!(self.inner, RecGroupInner::Explicit(..))
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/// Returns the list of subtypes in the recursive type group.
|
|
352
|
+
pub fn types(&self) -> impl ExactSizeIterator<Item = &SubType> + '_ {
|
|
353
|
+
let types = match &self.inner {
|
|
354
|
+
RecGroupInner::Implicit(ty) => core::slice::from_ref(ty),
|
|
355
|
+
RecGroupInner::Explicit(types) => types,
|
|
356
|
+
};
|
|
357
|
+
types.iter().map(|(_, ty)| ty)
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/// Return a mutable borrow of the list of subtypes in this
|
|
361
|
+
/// recursive type group.
|
|
362
|
+
#[cfg(feature = "validate")]
|
|
363
|
+
pub(crate) fn types_mut(&mut self) -> impl ExactSizeIterator<Item = &mut SubType> + '_ {
|
|
364
|
+
let types = match &mut self.inner {
|
|
365
|
+
RecGroupInner::Implicit(ty) => core::slice::from_mut(ty),
|
|
366
|
+
RecGroupInner::Explicit(types) => types,
|
|
367
|
+
};
|
|
368
|
+
types.iter_mut().map(|(_, ty)| ty)
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/// Returns an owning iterator of all subtypes in this recursion
|
|
372
|
+
/// group.
|
|
373
|
+
pub fn into_types(self) -> impl ExactSizeIterator<Item = SubType> {
|
|
374
|
+
self.into_types_and_offsets().map(|(_, ty)| ty)
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
/// Returns an owning iterator of all subtypes in this recursion
|
|
378
|
+
/// group, along with their offset.
|
|
379
|
+
pub fn into_types_and_offsets(self) -> impl ExactSizeIterator<Item = (usize, SubType)> {
|
|
380
|
+
return match self.inner {
|
|
381
|
+
RecGroupInner::Implicit(tup) => Iter::Implicit(Some(tup)),
|
|
382
|
+
RecGroupInner::Explicit(types) => Iter::Explicit(types.into_iter()),
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
enum Iter {
|
|
386
|
+
Implicit(Option<(usize, SubType)>),
|
|
387
|
+
Explicit(alloc::vec::IntoIter<(usize, SubType)>),
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
impl Iterator for Iter {
|
|
391
|
+
type Item = (usize, SubType);
|
|
392
|
+
|
|
393
|
+
fn next(&mut self) -> Option<(usize, SubType)> {
|
|
394
|
+
match self {
|
|
395
|
+
Self::Implicit(ty) => ty.take(),
|
|
396
|
+
Self::Explicit(types) => types.next(),
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
fn size_hint(&self) -> (usize, Option<usize>) {
|
|
401
|
+
match self {
|
|
402
|
+
Self::Implicit(None) => (0, Some(0)),
|
|
403
|
+
Self::Implicit(Some(_)) => (1, Some(1)),
|
|
404
|
+
Self::Explicit(types) => types.size_hint(),
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
impl ExactSizeIterator for Iter {}
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
impl Hash for RecGroup {
|
|
414
|
+
fn hash<H: Hasher>(&self, hasher: &mut H) {
|
|
415
|
+
let types = self.types();
|
|
416
|
+
types.len().hash(hasher);
|
|
417
|
+
for ty in types {
|
|
418
|
+
ty.hash(hasher);
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
impl PartialEq for RecGroup {
|
|
424
|
+
fn eq(&self, other: &RecGroup) -> bool {
|
|
425
|
+
let self_tys = self.types();
|
|
426
|
+
let other_tys = other.types();
|
|
427
|
+
self_tys.len() == other_tys.len() && self_tys.zip(other_tys).all(|(a, b)| a == b)
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
impl Eq for RecGroup {}
|
|
432
|
+
|
|
433
|
+
impl Ord for RecGroup {
|
|
434
|
+
fn cmp(&self, other: &Self) -> Ordering {
|
|
435
|
+
let self_tys = self.types();
|
|
436
|
+
let other_tys = other.types();
|
|
437
|
+
self_tys.cmp(other_tys)
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
impl PartialOrd for RecGroup {
|
|
442
|
+
fn partial_cmp(&self, other: &Self) -> Option<core::cmp::Ordering> {
|
|
443
|
+
Some(self.cmp(other))
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
/// Represents a subtype of possible other types in a WebAssembly module.
|
|
448
|
+
#[derive(Debug, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)]
|
|
449
|
+
pub struct SubType {
|
|
450
|
+
/// Is the subtype final.
|
|
451
|
+
pub is_final: bool,
|
|
452
|
+
/// The list of supertype indexes. As of GC MVP, there can be at most one supertype.
|
|
453
|
+
pub supertype_idx: Option<PackedIndex>,
|
|
454
|
+
/// The composite type of the subtype.
|
|
455
|
+
pub composite_type: CompositeType,
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
impl fmt::Display for SubType {
|
|
459
|
+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
460
|
+
if self.is_final && self.supertype_idx.is_none() {
|
|
461
|
+
fmt::Display::fmt(&self.composite_type, f)
|
|
462
|
+
} else {
|
|
463
|
+
write!(f, "(sub ")?;
|
|
464
|
+
if self.is_final {
|
|
465
|
+
write!(f, "final ")?;
|
|
466
|
+
}
|
|
467
|
+
if let Some(idx) = self.supertype_idx {
|
|
468
|
+
write!(f, "{idx} ")?;
|
|
469
|
+
}
|
|
470
|
+
fmt::Display::fmt(&self.composite_type, f)?;
|
|
471
|
+
write!(f, ")")
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
impl SubType {
|
|
477
|
+
/// Unwrap an `ArrayType` or panic.
|
|
478
|
+
///
|
|
479
|
+
/// Does not check finality or whether there is a supertype.
|
|
480
|
+
pub fn unwrap_array(&self) -> &ArrayType {
|
|
481
|
+
self.composite_type.unwrap_array()
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
/// Construct a function `SubType`.
|
|
485
|
+
pub fn func(signature: FuncType, shared: bool) -> Self {
|
|
486
|
+
Self {
|
|
487
|
+
is_final: true,
|
|
488
|
+
supertype_idx: None,
|
|
489
|
+
composite_type: CompositeType {
|
|
490
|
+
inner: CompositeInnerType::Func(signature),
|
|
491
|
+
shared,
|
|
492
|
+
descriptor_idx: None,
|
|
493
|
+
describes_idx: None,
|
|
494
|
+
},
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
/// Unwrap an `FuncType` or panic.
|
|
499
|
+
///
|
|
500
|
+
/// Does not check finality or whether there is a supertype.
|
|
501
|
+
pub fn unwrap_func(&self) -> &FuncType {
|
|
502
|
+
self.composite_type.unwrap_func()
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
/// Unwrap an `StructType` or panic.
|
|
506
|
+
///
|
|
507
|
+
/// Does not check finality or whether there is a supertype.
|
|
508
|
+
pub fn unwrap_struct(&self) -> &StructType {
|
|
509
|
+
self.composite_type.unwrap_struct()
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/// Unwrap an `ContType` or panic.
|
|
513
|
+
///
|
|
514
|
+
/// Does not check finality or whether there is a supertype.
|
|
515
|
+
pub fn unwrap_cont(&self) -> &ContType {
|
|
516
|
+
self.composite_type.unwrap_cont()
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
/// Maps any `UnpackedIndex` via the specified closure.
|
|
520
|
+
#[cfg(feature = "validate")]
|
|
521
|
+
pub(crate) fn remap_indices(
|
|
522
|
+
&mut self,
|
|
523
|
+
f: &mut dyn FnMut(&mut PackedIndex) -> Result<()>,
|
|
524
|
+
) -> Result<()> {
|
|
525
|
+
if let Some(idx) = &mut self.supertype_idx {
|
|
526
|
+
f(idx)?;
|
|
527
|
+
}
|
|
528
|
+
if let Some(idx) = &mut self.composite_type.descriptor_idx {
|
|
529
|
+
f(idx)?;
|
|
530
|
+
}
|
|
531
|
+
if let Some(idx) = &mut self.composite_type.describes_idx {
|
|
532
|
+
f(idx)?;
|
|
533
|
+
}
|
|
534
|
+
match &mut self.composite_type.inner {
|
|
535
|
+
CompositeInnerType::Func(ty) => {
|
|
536
|
+
for ty in ty.params_mut() {
|
|
537
|
+
ty.remap_indices(f)?;
|
|
538
|
+
}
|
|
539
|
+
for ty in ty.results_mut() {
|
|
540
|
+
ty.remap_indices(f)?;
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
CompositeInnerType::Array(ty) => {
|
|
544
|
+
ty.0.remap_indices(f)?;
|
|
545
|
+
}
|
|
546
|
+
CompositeInnerType::Struct(ty) => {
|
|
547
|
+
for field in ty.fields.iter_mut() {
|
|
548
|
+
field.remap_indices(f)?;
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
CompositeInnerType::Cont(ty) => {
|
|
552
|
+
ty.remap_indices(f)?;
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
Ok(())
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
/// A [`CompositeType`] can contain one of these types.
|
|
560
|
+
#[derive(Debug, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)]
|
|
561
|
+
pub enum CompositeInnerType {
|
|
562
|
+
/// The type is for a function.
|
|
563
|
+
Func(FuncType),
|
|
564
|
+
/// The type is for an array.
|
|
565
|
+
Array(ArrayType),
|
|
566
|
+
/// The type is for a struct.
|
|
567
|
+
Struct(StructType),
|
|
568
|
+
/// The type is for a continuation.
|
|
569
|
+
Cont(ContType),
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
impl fmt::Display for CompositeInnerType {
|
|
573
|
+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
574
|
+
match self {
|
|
575
|
+
CompositeInnerType::Func(ty) => write!(f, "{ty}"),
|
|
576
|
+
CompositeInnerType::Array(ty) => write!(f, "{ty}"),
|
|
577
|
+
CompositeInnerType::Struct(ty) => write!(f, "{ty}"),
|
|
578
|
+
CompositeInnerType::Cont(ty) => write!(f, "{ty}"),
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
/// Represents a composite type in a WebAssembly module.
|
|
584
|
+
#[derive(Debug, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)]
|
|
585
|
+
pub struct CompositeType {
|
|
586
|
+
/// The type defined inside the composite type.
|
|
587
|
+
pub inner: CompositeInnerType,
|
|
588
|
+
/// Is the composite type shared? This is part of the
|
|
589
|
+
/// shared-everything-threads proposal.
|
|
590
|
+
pub shared: bool,
|
|
591
|
+
/// The descriptor type.
|
|
592
|
+
pub descriptor_idx: Option<PackedIndex>,
|
|
593
|
+
/// The descriptor for type.
|
|
594
|
+
pub describes_idx: Option<PackedIndex>,
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
impl fmt::Display for CompositeType {
|
|
598
|
+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
599
|
+
if self.shared {
|
|
600
|
+
write!(f, "(shared ")?;
|
|
601
|
+
}
|
|
602
|
+
write!(f, "{}", self.inner)?;
|
|
603
|
+
if self.shared {
|
|
604
|
+
write!(f, ")")?;
|
|
605
|
+
}
|
|
606
|
+
Ok(())
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
impl CompositeType {
|
|
611
|
+
/// Unwrap a `FuncType` or panic.
|
|
612
|
+
pub fn unwrap_func(&self) -> &FuncType {
|
|
613
|
+
match &self.inner {
|
|
614
|
+
CompositeInnerType::Func(f) => f,
|
|
615
|
+
_ => panic!("not a func"),
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
/// Unwrap a `ArrayType` or panic.
|
|
620
|
+
pub fn unwrap_array(&self) -> &ArrayType {
|
|
621
|
+
match &self.inner {
|
|
622
|
+
CompositeInnerType::Array(a) => a,
|
|
623
|
+
_ => panic!("not a array"),
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
/// Unwrap a `StructType` or panic.
|
|
628
|
+
pub fn unwrap_struct(&self) -> &StructType {
|
|
629
|
+
match &self.inner {
|
|
630
|
+
CompositeInnerType::Struct(s) => s,
|
|
631
|
+
_ => panic!("not a struct"),
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
/// Unwrap a `ContType` or panic.
|
|
636
|
+
pub fn unwrap_cont(&self) -> &ContType {
|
|
637
|
+
match &self.inner {
|
|
638
|
+
CompositeInnerType::Cont(c) => c,
|
|
639
|
+
_ => panic!("not a cont"),
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
/// Represents a type of a function in a WebAssembly module.
|
|
645
|
+
#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
|
646
|
+
pub struct FuncType {
|
|
647
|
+
/// The combined parameters and result types.
|
|
648
|
+
params_results: Box<[ValType]>,
|
|
649
|
+
/// The number of parameter types.
|
|
650
|
+
len_params: usize,
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
impl fmt::Debug for FuncType {
|
|
654
|
+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
655
|
+
f.debug_struct("FuncType")
|
|
656
|
+
.field("params", &self.params())
|
|
657
|
+
.field("results", &self.results())
|
|
658
|
+
.finish()
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
impl fmt::Display for FuncType {
|
|
663
|
+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
664
|
+
write!(f, "(func")?;
|
|
665
|
+
if self.params().len() > 0 {
|
|
666
|
+
write!(f, " (param")?;
|
|
667
|
+
for p in self.params() {
|
|
668
|
+
write!(f, " {p}")?;
|
|
669
|
+
}
|
|
670
|
+
write!(f, ")")?;
|
|
671
|
+
}
|
|
672
|
+
if self.results().len() > 0 {
|
|
673
|
+
write!(f, " (result")?;
|
|
674
|
+
for p in self.results() {
|
|
675
|
+
write!(f, " {p}")?;
|
|
676
|
+
}
|
|
677
|
+
write!(f, ")")?;
|
|
678
|
+
}
|
|
679
|
+
write!(f, ")")?;
|
|
680
|
+
Ok(())
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
impl FuncType {
|
|
685
|
+
/// Creates a new [`FuncType`] from the given `params` and `results`.
|
|
686
|
+
pub fn new<P, R>(params: P, results: R) -> Self
|
|
687
|
+
where
|
|
688
|
+
P: IntoIterator<Item = ValType>,
|
|
689
|
+
R: IntoIterator<Item = ValType>,
|
|
690
|
+
{
|
|
691
|
+
let mut buffer = params.into_iter().collect::<Vec<_>>();
|
|
692
|
+
let len_params = buffer.len();
|
|
693
|
+
buffer.extend(results);
|
|
694
|
+
Self {
|
|
695
|
+
params_results: buffer.into(),
|
|
696
|
+
len_params,
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
/// Creates a new [`FuncType`] fom its raw parts.
|
|
701
|
+
///
|
|
702
|
+
/// # Panics
|
|
703
|
+
///
|
|
704
|
+
/// If `len_params` is greater than the length of `params_results` combined.
|
|
705
|
+
pub(crate) fn from_raw_parts(params_results: Box<[ValType]>, len_params: usize) -> Self {
|
|
706
|
+
assert!(len_params <= params_results.len());
|
|
707
|
+
Self {
|
|
708
|
+
params_results,
|
|
709
|
+
len_params,
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
/// Returns a shared slice to the parameter types of the [`FuncType`].
|
|
714
|
+
#[inline]
|
|
715
|
+
pub fn params(&self) -> &[ValType] {
|
|
716
|
+
&self.params_results[..self.len_params]
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
/// Returns an exclusive slice to the parameter types of the
|
|
720
|
+
/// [`FuncType`].
|
|
721
|
+
#[inline]
|
|
722
|
+
#[cfg(feature = "validate")]
|
|
723
|
+
pub(crate) fn params_mut(&mut self) -> &mut [ValType] {
|
|
724
|
+
&mut self.params_results[..self.len_params]
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
/// Returns a shared slice to the result types of the [`FuncType`].
|
|
728
|
+
#[inline]
|
|
729
|
+
pub fn results(&self) -> &[ValType] {
|
|
730
|
+
&self.params_results[self.len_params..]
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
/// Returns an exclusive slice to the result types of the
|
|
734
|
+
/// [`FuncType`].
|
|
735
|
+
#[inline]
|
|
736
|
+
#[cfg(feature = "validate")]
|
|
737
|
+
pub(crate) fn results_mut(&mut self) -> &mut [ValType] {
|
|
738
|
+
&mut self.params_results[self.len_params..]
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
/// Represents a type of an array in a WebAssembly module.
|
|
743
|
+
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
|
744
|
+
pub struct ArrayType(pub FieldType);
|
|
745
|
+
|
|
746
|
+
impl fmt::Display for ArrayType {
|
|
747
|
+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
748
|
+
write!(f, "(array {})", self.0)
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
/// Represents a field type of an array or a struct.
|
|
753
|
+
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
|
754
|
+
pub struct FieldType {
|
|
755
|
+
/// Array element type.
|
|
756
|
+
pub element_type: StorageType,
|
|
757
|
+
/// Are elements mutable.
|
|
758
|
+
pub mutable: bool,
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
impl fmt::Display for FieldType {
|
|
762
|
+
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
763
|
+
if self.mutable {
|
|
764
|
+
write!(f, "(mut {})", self.element_type)
|
|
765
|
+
} else {
|
|
766
|
+
fmt::Display::fmt(&self.element_type, f)
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
impl FieldType {
|
|
772
|
+
/// Maps any `UnpackedIndex` via the specified closure.
|
|
773
|
+
#[cfg(feature = "validate")]
|
|
774
|
+
pub(crate) fn remap_indices(
|
|
775
|
+
&mut self,
|
|
776
|
+
f: &mut dyn FnMut(&mut PackedIndex) -> Result<()>,
|
|
777
|
+
) -> Result<()> {
|
|
778
|
+
match &mut self.element_type {
|
|
779
|
+
StorageType::I8 | StorageType::I16 => Ok(()),
|
|
780
|
+
StorageType::Val(ty) => ty.remap_indices(f),
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
/// Represents storage types introduced in the GC spec for array and struct fields.
|
|
786
|
+
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
|
787
|
+
pub enum StorageType {
|
|
788
|
+
/// The storage type is i8.
|
|
789
|
+
I8,
|
|
790
|
+
/// The storage type is i16.
|
|
791
|
+
I16,
|
|
792
|
+
/// The storage type is a value type.
|
|
793
|
+
Val(ValType),
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
impl fmt::Display for StorageType {
|
|
797
|
+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
798
|
+
match self {
|
|
799
|
+
Self::I8 => write!(f, "i8"),
|
|
800
|
+
Self::I16 => write!(f, "i16"),
|
|
801
|
+
Self::Val(v) => fmt::Display::fmt(v, f),
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
impl StorageType {
|
|
807
|
+
/// Is this a packed storage type, i.e. one that must be sign- or
|
|
808
|
+
/// zero-extended when converted to a `ValType`?
|
|
809
|
+
pub fn is_packed(&self) -> bool {
|
|
810
|
+
match self {
|
|
811
|
+
Self::I8 | Self::I16 => true,
|
|
812
|
+
Self::Val(_) => false,
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
/// Unpack this storage type into the valtype that it is represented as on
|
|
817
|
+
/// the operand stack.
|
|
818
|
+
pub fn unpack(&self) -> ValType {
|
|
819
|
+
match *self {
|
|
820
|
+
Self::Val(ty) => ty,
|
|
821
|
+
Self::I8 | Self::I16 => ValType::I32,
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
/// Represents a type of a struct in a WebAssembly module.
|
|
827
|
+
#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
|
828
|
+
pub struct StructType {
|
|
829
|
+
/// Struct fields.
|
|
830
|
+
pub fields: Box<[FieldType]>,
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
impl fmt::Display for StructType {
|
|
834
|
+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
835
|
+
write!(f, "(struct")?;
|
|
836
|
+
for field in self.fields.iter() {
|
|
837
|
+
write!(f, " {field}")?;
|
|
838
|
+
}
|
|
839
|
+
write!(f, ")")?;
|
|
840
|
+
Ok(())
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
/// Represents a type of a continuation in a WebAssembly module.
|
|
845
|
+
#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
|
846
|
+
pub struct ContType(pub PackedIndex);
|
|
847
|
+
|
|
848
|
+
impl fmt::Display for ContType {
|
|
849
|
+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
850
|
+
write!(f, "(cont {})", self.0)
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
impl ContType {
|
|
855
|
+
/// Maps any `UnpackedIndex` via the specified closure.
|
|
856
|
+
#[cfg(feature = "validate")]
|
|
857
|
+
pub(crate) fn remap_indices(
|
|
858
|
+
&mut self,
|
|
859
|
+
map: &mut dyn FnMut(&mut PackedIndex) -> Result<()>,
|
|
860
|
+
) -> Result<()> {
|
|
861
|
+
map(&mut self.0)?;
|
|
862
|
+
Ok(())
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
/// Represents the types of values in a WebAssembly module.
|
|
867
|
+
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
|
868
|
+
pub enum ValType {
|
|
869
|
+
/// The value type is i32.
|
|
870
|
+
I32,
|
|
871
|
+
/// The value type is i64.
|
|
872
|
+
I64,
|
|
873
|
+
/// The value type is f32.
|
|
874
|
+
F32,
|
|
875
|
+
/// The value type is f64.
|
|
876
|
+
F64,
|
|
877
|
+
/// The value type is v128.
|
|
878
|
+
V128,
|
|
879
|
+
/// The value type is a reference.
|
|
880
|
+
Ref(RefType),
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
impl From<RefType> for ValType {
|
|
884
|
+
#[inline]
|
|
885
|
+
fn from(ty: RefType) -> ValType {
|
|
886
|
+
ValType::Ref(ty)
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
impl fmt::Display for ValType {
|
|
891
|
+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
892
|
+
match self {
|
|
893
|
+
ValType::I32 => f.write_str("i32"),
|
|
894
|
+
ValType::I64 => f.write_str("i64"),
|
|
895
|
+
ValType::F32 => f.write_str("f32"),
|
|
896
|
+
ValType::F64 => f.write_str("f64"),
|
|
897
|
+
ValType::V128 => f.write_str("v128"),
|
|
898
|
+
ValType::Ref(r) => fmt::Display::fmt(r, f),
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
impl ValType {
|
|
904
|
+
/// Alias for the wasm `funcref` type.
|
|
905
|
+
pub const FUNCREF: ValType = ValType::Ref(RefType::FUNCREF);
|
|
906
|
+
|
|
907
|
+
/// Alias for the wasm `externref` type.
|
|
908
|
+
pub const EXTERNREF: ValType = ValType::Ref(RefType::EXTERNREF);
|
|
909
|
+
|
|
910
|
+
/// Alias for the wasm `exnref` type.
|
|
911
|
+
pub const EXNREF: ValType = ValType::Ref(RefType::EXNREF);
|
|
912
|
+
|
|
913
|
+
/// Alias for the wasm `contref` type.
|
|
914
|
+
pub const CONTREF: ValType = ValType::Ref(RefType::CONTREF);
|
|
915
|
+
|
|
916
|
+
/// Returns whether this value type is a "reference type".
|
|
917
|
+
///
|
|
918
|
+
/// Only reference types are allowed in tables, for example, and with some
|
|
919
|
+
/// instructions. Current reference types include `funcref` and `externref`.
|
|
920
|
+
pub fn is_reference_type(&self) -> bool {
|
|
921
|
+
matches!(self, ValType::Ref(_))
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
/// Get the underlying reference type, if any.
|
|
925
|
+
pub fn as_reference_type(&self) -> Option<RefType> {
|
|
926
|
+
match *self {
|
|
927
|
+
ValType::Ref(r) => Some(r),
|
|
928
|
+
ValType::I32 | ValType::I64 | ValType::F32 | ValType::F64 | ValType::V128 => None,
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
/// Whether the type is defaultable, i.e. it is not a non-nullable reference
|
|
933
|
+
/// type.
|
|
934
|
+
pub fn is_defaultable(&self) -> bool {
|
|
935
|
+
match *self {
|
|
936
|
+
Self::I32 | Self::I64 | Self::F32 | Self::F64 | Self::V128 => true,
|
|
937
|
+
Self::Ref(rt) => rt.is_nullable(),
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
/// Maps any `UnpackedIndex` via the specified closure.
|
|
942
|
+
#[cfg(feature = "validate")]
|
|
943
|
+
pub(crate) fn remap_indices(
|
|
944
|
+
&mut self,
|
|
945
|
+
map: &mut dyn FnMut(&mut PackedIndex) -> Result<()>,
|
|
946
|
+
) -> Result<()> {
|
|
947
|
+
match self {
|
|
948
|
+
ValType::Ref(r) => {
|
|
949
|
+
if let Some(mut idx) = r.type_index() {
|
|
950
|
+
map(&mut idx)?;
|
|
951
|
+
*r = if r.is_exact_type_ref() {
|
|
952
|
+
RefType::exact(r.is_nullable(), idx)
|
|
953
|
+
} else {
|
|
954
|
+
RefType::concrete(r.is_nullable(), idx)
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
ValType::I32 | ValType::I64 | ValType::F32 | ValType::F64 | ValType::V128 => {}
|
|
959
|
+
}
|
|
960
|
+
Ok(())
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
/// A reference type.
|
|
965
|
+
///
|
|
966
|
+
/// The reference types proposal first introduced `externref` and
|
|
967
|
+
/// `funcref`.
|
|
968
|
+
///
|
|
969
|
+
/// The function references proposal introduced typed function
|
|
970
|
+
/// references.
|
|
971
|
+
///
|
|
972
|
+
/// The GC proposal introduces heap types: any, eq, i31, struct, array,
|
|
973
|
+
/// nofunc, noextern, none.
|
|
974
|
+
//
|
|
975
|
+
// RefType is a bit-packed enum that fits in a u32. Note that
|
|
976
|
+
// its content is opaque (and subject to change), but its API is stable.
|
|
977
|
+
//
|
|
978
|
+
// It has the following internal structure:
|
|
979
|
+
//
|
|
980
|
+
// ```
|
|
981
|
+
// [concrete==1:u1 exact:u1 nullable:u1 index:u22]
|
|
982
|
+
// [concrete==0:u1 (unused):u1 nullable:u1 shared:u1 abstype:u4 (unused):u17]
|
|
983
|
+
// ```
|
|
984
|
+
//
|
|
985
|
+
// Where
|
|
986
|
+
//
|
|
987
|
+
// - `nullable` determines nullability of the ref,
|
|
988
|
+
//
|
|
989
|
+
// - `concrete` determines if the ref is of a dynamically defined type with an
|
|
990
|
+
// index (encoded in a following bit-packing section) or of a known fixed
|
|
991
|
+
// type,
|
|
992
|
+
//
|
|
993
|
+
// - `exact` determites if the ref is of an exact type,
|
|
994
|
+
//
|
|
995
|
+
// - `index` is the type index,
|
|
996
|
+
//
|
|
997
|
+
// - `shared` determines if the ref is shared, but only if it is not concrete in
|
|
998
|
+
// which case we would need to examine the type at the concrete index,
|
|
999
|
+
//
|
|
1000
|
+
// - `abstype` is an enumeration of abstract types:
|
|
1001
|
+
//
|
|
1002
|
+
// ```
|
|
1003
|
+
// 1111 = any
|
|
1004
|
+
//
|
|
1005
|
+
// 1101 = eq
|
|
1006
|
+
// 1000 = i31
|
|
1007
|
+
// 1001 = struct
|
|
1008
|
+
// 1100 = array
|
|
1009
|
+
//
|
|
1010
|
+
// 0101 = func
|
|
1011
|
+
// 0100 = nofunc
|
|
1012
|
+
//
|
|
1013
|
+
// 0011 = extern
|
|
1014
|
+
// 0010 = noextern
|
|
1015
|
+
//
|
|
1016
|
+
// 0111 = cont
|
|
1017
|
+
// 0110 = nocont
|
|
1018
|
+
//
|
|
1019
|
+
// 0001 = exn
|
|
1020
|
+
//
|
|
1021
|
+
// 0000 = none
|
|
1022
|
+
// ```
|
|
1023
|
+
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
|
1024
|
+
pub struct RefType(u32);
|
|
1025
|
+
|
|
1026
|
+
impl fmt::Debug for RefType {
|
|
1027
|
+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
1028
|
+
let heap_type = self.heap_type();
|
|
1029
|
+
match heap_type {
|
|
1030
|
+
// All abstract types follow the same general pattern.
|
|
1031
|
+
HeapType::Abstract { shared, ty } => {
|
|
1032
|
+
let nullable = self.is_nullable();
|
|
1033
|
+
|
|
1034
|
+
let name = ty.as_str(nullable);
|
|
1035
|
+
match (nullable, shared) {
|
|
1036
|
+
// Print the shortened form if nullable; i.e., `*ref`.
|
|
1037
|
+
(true, true) => write!(f, "(shared {name}ref)"),
|
|
1038
|
+
(true, false) => write!(f, "{name}ref"),
|
|
1039
|
+
// Print the long form otherwise; i.e., `(ref *)`.
|
|
1040
|
+
(false, true) => write!(f, "(ref (shared {name}))"),
|
|
1041
|
+
(false, false) => write!(f, "(ref {name})"),
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
// Handle concrete types separately; they always use the long form
|
|
1045
|
+
// and don't show `shared`-ness.
|
|
1046
|
+
HeapType::Concrete(index) => {
|
|
1047
|
+
if self.is_nullable() {
|
|
1048
|
+
write!(f, "(ref null {index})")
|
|
1049
|
+
} else {
|
|
1050
|
+
write!(f, "(ref {index})")
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
HeapType::Exact(index) => {
|
|
1054
|
+
write!(f, "(ref (exact {index}))")
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
impl fmt::Display for RefType {
|
|
1061
|
+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
1062
|
+
fmt::Debug::fmt(self, f)
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
// Assert that we can fit indices up to `MAX_WASM_TYPES` inside `RefType`.
|
|
1067
|
+
#[test]
|
|
1068
|
+
fn can_fit_max_wasm_types_in_ref_type() {
|
|
1069
|
+
fn can_roundtrip_index(index: u32) -> bool {
|
|
1070
|
+
assert!(RefType::can_represent_type_index(index));
|
|
1071
|
+
let rt = RefType::concrete(true, PackedIndex::from_module_index(index).unwrap());
|
|
1072
|
+
assert!(rt.is_nullable());
|
|
1073
|
+
let actual_index = match rt.type_index() {
|
|
1074
|
+
Some(i) => i,
|
|
1075
|
+
None => panic!(),
|
|
1076
|
+
};
|
|
1077
|
+
actual_index.as_module_index() == Some(index)
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
assert!(can_roundtrip_index(crate::limits::MAX_WASM_TYPES as u32));
|
|
1081
|
+
assert!(can_roundtrip_index(0b00000000_00001111_00000000_00000000));
|
|
1082
|
+
assert!(can_roundtrip_index(0b00000000_00000000_11111111_00000000));
|
|
1083
|
+
assert!(can_roundtrip_index(0b00000000_00000000_00000000_11111111));
|
|
1084
|
+
assert!(can_roundtrip_index(0));
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
impl RefType {
|
|
1088
|
+
// These bits are valid for all `RefType`s.
|
|
1089
|
+
const CONCRETE_BIT: u32 = 1 << 24;
|
|
1090
|
+
const EXACT_BIT: u32 = 1 << 23;
|
|
1091
|
+
const NULLABLE_BIT: u32 = 1 << 22;
|
|
1092
|
+
|
|
1093
|
+
// The `abstype` field is valid only when `concrete == 0`.
|
|
1094
|
+
const SHARED_BIT: u32 = 1 << 21;
|
|
1095
|
+
const ABSTYPE_MASK: u32 = 0b1111 << 17;
|
|
1096
|
+
const ANY_ABSTYPE: u32 = 0b1111 << 17;
|
|
1097
|
+
const EQ_ABSTYPE: u32 = 0b1101 << 17;
|
|
1098
|
+
const I31_ABSTYPE: u32 = 0b1000 << 17;
|
|
1099
|
+
const STRUCT_ABSTYPE: u32 = 0b1001 << 17;
|
|
1100
|
+
const ARRAY_ABSTYPE: u32 = 0b1100 << 17;
|
|
1101
|
+
const FUNC_ABSTYPE: u32 = 0b0101 << 17;
|
|
1102
|
+
const NOFUNC_ABSTYPE: u32 = 0b0100 << 17;
|
|
1103
|
+
const EXTERN_ABSTYPE: u32 = 0b0011 << 17;
|
|
1104
|
+
const NOEXTERN_ABSTYPE: u32 = 0b0010 << 17;
|
|
1105
|
+
const EXN_ABSTYPE: u32 = 0b0001 << 17;
|
|
1106
|
+
const NOEXN_ABSTYPE: u32 = 0b1110 << 17;
|
|
1107
|
+
const NONE_ABSTYPE: u32 = 0b0000 << 17;
|
|
1108
|
+
const CONT_ABSTYPE: u32 = 0b0111 << 17;
|
|
1109
|
+
const NOCONT_ABSTYPE: u32 = 0b0110 << 17;
|
|
1110
|
+
|
|
1111
|
+
// The `index` is valid only when `concrete == 1`.
|
|
1112
|
+
const INDEX_MASK: u32 = (1 << 22) - 1;
|
|
1113
|
+
|
|
1114
|
+
/// A nullable untyped function reference aka `(ref null func)` aka
|
|
1115
|
+
/// `funcref` aka `anyfunc`.
|
|
1116
|
+
pub const FUNCREF: Self = RefType::FUNC.nullable();
|
|
1117
|
+
|
|
1118
|
+
/// A nullable reference to an extern object aka `(ref null extern)` aka
|
|
1119
|
+
/// `externref`.
|
|
1120
|
+
pub const EXTERNREF: Self = RefType::EXTERN.nullable();
|
|
1121
|
+
|
|
1122
|
+
/// A nullable reference to any object aka `(ref null any)` aka `anyref`.
|
|
1123
|
+
pub const ANYREF: Self = RefType::ANY.nullable();
|
|
1124
|
+
|
|
1125
|
+
/// A nullable reference to no object aka `(ref null none)` aka `nullref`.
|
|
1126
|
+
pub const NULLREF: Self = RefType::NONE.nullable();
|
|
1127
|
+
|
|
1128
|
+
/// A nullable reference to a noextern object aka `(ref null noextern)` aka
|
|
1129
|
+
/// `nullexternref`.
|
|
1130
|
+
pub const NULLEXTERNREF: Self = RefType::NOEXTERN.nullable();
|
|
1131
|
+
|
|
1132
|
+
/// A nullable reference to a nofunc object aka `(ref null nofunc)` aka
|
|
1133
|
+
/// `nullfuncref`.
|
|
1134
|
+
pub const NULLFUNCREF: Self = RefType::NOFUNC.nullable();
|
|
1135
|
+
|
|
1136
|
+
/// A nullable reference to an eq object aka `(ref null eq)` aka `eqref`.
|
|
1137
|
+
pub const EQREF: Self = RefType::EQ.nullable();
|
|
1138
|
+
|
|
1139
|
+
/// A nullable reference to a struct aka `(ref null struct)` aka
|
|
1140
|
+
/// `structref`.
|
|
1141
|
+
pub const STRUCTREF: Self = RefType::STRUCT.nullable();
|
|
1142
|
+
|
|
1143
|
+
/// A nullable reference to an array aka `(ref null array)` aka `arrayref`.
|
|
1144
|
+
pub const ARRAYREF: Self = RefType::ARRAY.nullable();
|
|
1145
|
+
|
|
1146
|
+
/// A nullable reference to an i31 object aka `(ref null i31)` aka `i31ref`.
|
|
1147
|
+
pub const I31REF: Self = RefType::I31.nullable();
|
|
1148
|
+
|
|
1149
|
+
/// A nullable reference to an exception object aka `(ref null exn)` aka
|
|
1150
|
+
/// `exnref`.
|
|
1151
|
+
pub const EXNREF: Self = RefType::EXN.nullable();
|
|
1152
|
+
|
|
1153
|
+
/// A nullable reference to a noexn object aka `(ref null noexn)` aka
|
|
1154
|
+
/// `nullexnref`.
|
|
1155
|
+
pub const NULLEXNREF: Self = RefType::NOEXN.nullable();
|
|
1156
|
+
|
|
1157
|
+
/// A nullable reference to a cont object aka `(ref null cont)` aka
|
|
1158
|
+
/// `contref`.
|
|
1159
|
+
pub const CONTREF: Self = RefType::CONT.nullable();
|
|
1160
|
+
|
|
1161
|
+
/// A nullable reference to a nocont object aka `(ref null nocont)` aka
|
|
1162
|
+
/// `nullcontref`.
|
|
1163
|
+
pub const NULLCONTREF: Self = RefType::NOCONT.nullable();
|
|
1164
|
+
|
|
1165
|
+
/// A non-nullable untyped function reference aka `(ref func)`.
|
|
1166
|
+
pub const FUNC: Self = RefType::from_u32(Self::FUNC_ABSTYPE);
|
|
1167
|
+
|
|
1168
|
+
/// A non-nullable reference to an extern object aka `(ref extern)`.
|
|
1169
|
+
pub const EXTERN: Self = RefType::from_u32(Self::EXTERN_ABSTYPE);
|
|
1170
|
+
|
|
1171
|
+
/// A non-nullable reference to any object aka `(ref any)`.
|
|
1172
|
+
pub const ANY: Self = RefType::from_u32(Self::ANY_ABSTYPE);
|
|
1173
|
+
|
|
1174
|
+
/// A non-nullable reference to no object aka `(ref none)`.
|
|
1175
|
+
pub const NONE: Self = RefType::from_u32(Self::NONE_ABSTYPE);
|
|
1176
|
+
|
|
1177
|
+
/// A non-nullable reference to a noextern object aka `(ref noextern)`.
|
|
1178
|
+
pub const NOEXTERN: Self = RefType::from_u32(Self::NOEXTERN_ABSTYPE);
|
|
1179
|
+
|
|
1180
|
+
/// A non-nullable reference to a nofunc object aka `(ref nofunc)`.
|
|
1181
|
+
pub const NOFUNC: Self = RefType::from_u32(Self::NOFUNC_ABSTYPE);
|
|
1182
|
+
|
|
1183
|
+
/// A non-nullable reference to an eq object aka `(ref eq)`.
|
|
1184
|
+
pub const EQ: Self = RefType::from_u32(Self::EQ_ABSTYPE);
|
|
1185
|
+
|
|
1186
|
+
/// A non-nullable reference to a struct aka `(ref struct)`.
|
|
1187
|
+
pub const STRUCT: Self = RefType::from_u32(Self::STRUCT_ABSTYPE);
|
|
1188
|
+
|
|
1189
|
+
/// A non-nullable reference to an array aka `(ref array)`.
|
|
1190
|
+
pub const ARRAY: Self = RefType::from_u32(Self::ARRAY_ABSTYPE);
|
|
1191
|
+
|
|
1192
|
+
/// A non-nullable reference to an i31 object aka `(ref i31)`.
|
|
1193
|
+
pub const I31: Self = RefType::from_u32(Self::I31_ABSTYPE);
|
|
1194
|
+
|
|
1195
|
+
/// A non-nullable reference to an exn object aka `(ref exn)`.
|
|
1196
|
+
pub const EXN: Self = RefType::from_u32(Self::EXN_ABSTYPE);
|
|
1197
|
+
|
|
1198
|
+
/// A non-nullable reference to a noexn object aka `(ref noexn)`.
|
|
1199
|
+
pub const NOEXN: Self = RefType::from_u32(Self::NOEXN_ABSTYPE);
|
|
1200
|
+
|
|
1201
|
+
/// A non-nullable reference to a cont object aka `(ref cont)`.
|
|
1202
|
+
pub const CONT: Self = RefType::from_u32(Self::CONT_ABSTYPE);
|
|
1203
|
+
|
|
1204
|
+
/// A non-nullable reference to a nocont object aka `(ref nocont)`.
|
|
1205
|
+
pub const NOCONT: Self = RefType::from_u32(Self::NOCONT_ABSTYPE);
|
|
1206
|
+
|
|
1207
|
+
const fn can_represent_type_index(index: u32) -> bool {
|
|
1208
|
+
index & Self::INDEX_MASK == index
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
#[inline]
|
|
1212
|
+
const fn as_u32(&self) -> u32 {
|
|
1213
|
+
self.0
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
#[inline]
|
|
1217
|
+
const fn from_u32(x: u32) -> Self {
|
|
1218
|
+
debug_assert!(x & (0b1111111 << 25) == 0);
|
|
1219
|
+
|
|
1220
|
+
// Either concrete or it must be a known abstract type.
|
|
1221
|
+
debug_assert!(
|
|
1222
|
+
x & Self::CONCRETE_BIT != 0
|
|
1223
|
+
|| matches!(
|
|
1224
|
+
x & Self::ABSTYPE_MASK,
|
|
1225
|
+
Self::ANY_ABSTYPE
|
|
1226
|
+
| Self::EQ_ABSTYPE
|
|
1227
|
+
| Self::I31_ABSTYPE
|
|
1228
|
+
| Self::STRUCT_ABSTYPE
|
|
1229
|
+
| Self::ARRAY_ABSTYPE
|
|
1230
|
+
| Self::FUNC_ABSTYPE
|
|
1231
|
+
| Self::NOFUNC_ABSTYPE
|
|
1232
|
+
| Self::EXTERN_ABSTYPE
|
|
1233
|
+
| Self::NOEXTERN_ABSTYPE
|
|
1234
|
+
| Self::NONE_ABSTYPE
|
|
1235
|
+
| Self::EXN_ABSTYPE
|
|
1236
|
+
| Self::NOEXN_ABSTYPE
|
|
1237
|
+
| Self::CONT_ABSTYPE
|
|
1238
|
+
| Self::NOCONT_ABSTYPE
|
|
1239
|
+
)
|
|
1240
|
+
);
|
|
1241
|
+
|
|
1242
|
+
RefType(x)
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
/// Create a reference to a concrete Wasm-defined type at the given
|
|
1246
|
+
/// index.
|
|
1247
|
+
///
|
|
1248
|
+
/// Returns `None` when the type index is beyond this crate's
|
|
1249
|
+
/// implementation limits and therefore is not representable.
|
|
1250
|
+
pub fn concrete(nullable: bool, index: PackedIndex) -> Self {
|
|
1251
|
+
let index: u32 = PackedIndex::to_u32(index);
|
|
1252
|
+
debug_assert!(Self::can_represent_type_index(index));
|
|
1253
|
+
let nullable32 = Self::NULLABLE_BIT * nullable as u32;
|
|
1254
|
+
RefType::from_u32(nullable32 | Self::CONCRETE_BIT | index)
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
/// Create a reference to exact type.
|
|
1258
|
+
pub fn exact(nullable: bool, index: PackedIndex) -> Self {
|
|
1259
|
+
let index: u32 = PackedIndex::to_u32(index);
|
|
1260
|
+
debug_assert!(Self::can_represent_type_index(index));
|
|
1261
|
+
let nullable32 = Self::NULLABLE_BIT * nullable as u32;
|
|
1262
|
+
RefType::from_u32(nullable32 | Self::EXACT_BIT | Self::CONCRETE_BIT | index)
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
/// Create a new `RefType`.
|
|
1266
|
+
///
|
|
1267
|
+
/// Returns `None` when the heap type's type index (if any) is beyond this
|
|
1268
|
+
/// crate's implementation limits and therefore is not representable.
|
|
1269
|
+
pub fn new(nullable: bool, heap_type: HeapType) -> Option<Self> {
|
|
1270
|
+
let base32 = Self::NULLABLE_BIT * (nullable as u32);
|
|
1271
|
+
match heap_type {
|
|
1272
|
+
HeapType::Concrete(index) => Some(RefType::concrete(nullable, index.pack()?)),
|
|
1273
|
+
HeapType::Exact(index) => Some(RefType::exact(nullable, index.pack()?)),
|
|
1274
|
+
HeapType::Abstract { shared, ty } => {
|
|
1275
|
+
use AbstractHeapType::*;
|
|
1276
|
+
let base32 = base32 | (Self::SHARED_BIT * (shared as u32));
|
|
1277
|
+
match ty {
|
|
1278
|
+
Func => Some(Self::from_u32(base32 | Self::FUNC_ABSTYPE)),
|
|
1279
|
+
Extern => Some(Self::from_u32(base32 | Self::EXTERN_ABSTYPE)),
|
|
1280
|
+
Any => Some(Self::from_u32(base32 | Self::ANY_ABSTYPE)),
|
|
1281
|
+
None => Some(Self::from_u32(base32 | Self::NONE_ABSTYPE)),
|
|
1282
|
+
NoExtern => Some(Self::from_u32(base32 | Self::NOEXTERN_ABSTYPE)),
|
|
1283
|
+
NoFunc => Some(Self::from_u32(base32 | Self::NOFUNC_ABSTYPE)),
|
|
1284
|
+
Eq => Some(Self::from_u32(base32 | Self::EQ_ABSTYPE)),
|
|
1285
|
+
Struct => Some(Self::from_u32(base32 | Self::STRUCT_ABSTYPE)),
|
|
1286
|
+
Array => Some(Self::from_u32(base32 | Self::ARRAY_ABSTYPE)),
|
|
1287
|
+
I31 => Some(Self::from_u32(base32 | Self::I31_ABSTYPE)),
|
|
1288
|
+
Exn => Some(Self::from_u32(base32 | Self::EXN_ABSTYPE)),
|
|
1289
|
+
NoExn => Some(Self::from_u32(base32 | Self::NOEXN_ABSTYPE)),
|
|
1290
|
+
Cont => Some(Self::from_u32(base32 | Self::CONT_ABSTYPE)),
|
|
1291
|
+
NoCont => Some(Self::from_u32(base32 | Self::NOCONT_ABSTYPE)),
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
}
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
/// Compute the [type difference] between the two given ref types.
|
|
1298
|
+
///
|
|
1299
|
+
/// [type difference]: https://webassembly.github.io/gc/core/valid/conventions.html#aux-reftypediff
|
|
1300
|
+
pub fn difference(a: RefType, b: RefType) -> RefType {
|
|
1301
|
+
RefType::new(
|
|
1302
|
+
if b.is_nullable() {
|
|
1303
|
+
false
|
|
1304
|
+
} else {
|
|
1305
|
+
a.is_nullable()
|
|
1306
|
+
},
|
|
1307
|
+
a.heap_type(),
|
|
1308
|
+
)
|
|
1309
|
+
.unwrap()
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
/// Is this a reference to an concrete type?
|
|
1313
|
+
pub const fn is_concrete_type_ref(&self) -> bool {
|
|
1314
|
+
self.as_u32() & Self::CONCRETE_BIT != 0
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
/// Is this an exact reference to a type?
|
|
1318
|
+
pub const fn is_exact_type_ref(&self) -> bool {
|
|
1319
|
+
!self.as_u32() & (Self::EXACT_BIT | Self::CONCRETE_BIT) == 0
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
/// If this is a reference to a concrete Wasm-defined type, get its
|
|
1323
|
+
/// type index.
|
|
1324
|
+
pub fn type_index(&self) -> Option<PackedIndex> {
|
|
1325
|
+
if self.is_concrete_type_ref() {
|
|
1326
|
+
let index = self.as_u32() & Self::INDEX_MASK;
|
|
1327
|
+
Some(PackedIndex::unchecked_from_u32(index))
|
|
1328
|
+
} else {
|
|
1329
|
+
None
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
const fn abstype(&self) -> u32 {
|
|
1334
|
+
debug_assert!(!self.is_concrete_type_ref());
|
|
1335
|
+
self.as_u32() & Self::ABSTYPE_MASK
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
/// Is this the abstract untyped function reference type aka `(ref
|
|
1339
|
+
/// null func)` aka `funcref` aka `anyfunc`?
|
|
1340
|
+
pub const fn is_func_ref(&self) -> bool {
|
|
1341
|
+
!self.is_concrete_type_ref() && self.abstype() == Self::FUNC_ABSTYPE
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
/// Is this the abstract external reference type aka `(ref null
|
|
1345
|
+
/// extern)` aka `externref`?
|
|
1346
|
+
pub const fn is_extern_ref(&self) -> bool {
|
|
1347
|
+
!self.is_concrete_type_ref() && self.abstype() == Self::EXTERN_ABSTYPE
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
/// Is this the abstract untyped array reference type aka `(ref null
|
|
1351
|
+
/// array)` aka `arrayref`?
|
|
1352
|
+
pub const fn is_array_ref(&self) -> bool {
|
|
1353
|
+
!self.is_concrete_type_ref() && self.abstype() == Self::ARRAY_ABSTYPE
|
|
1354
|
+
}
|
|
1355
|
+
|
|
1356
|
+
/// Is this the abstract untyped struct reference type aka `(ref
|
|
1357
|
+
/// null struct)` aka `structref`?
|
|
1358
|
+
pub const fn is_struct_ref(&self) -> bool {
|
|
1359
|
+
!self.is_concrete_type_ref() && self.abstype() == Self::STRUCT_ABSTYPE
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1362
|
+
/// Is this the abstract untyped cont reference type aka `(ref
|
|
1363
|
+
/// null cont)` aka `contref`?
|
|
1364
|
+
pub const fn is_cont_ref(&self) -> bool {
|
|
1365
|
+
!self.is_concrete_type_ref() && self.abstype() == Self::CONT_ABSTYPE
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
/// Is this none type?
|
|
1369
|
+
pub const fn is_none_ref(&self) -> bool {
|
|
1370
|
+
!self.is_concrete_type_ref() && self.abstype() == Self::NONE_ABSTYPE
|
|
1371
|
+
}
|
|
1372
|
+
|
|
1373
|
+
/// Is this ref type nullable?
|
|
1374
|
+
pub const fn is_nullable(&self) -> bool {
|
|
1375
|
+
self.as_u32() & Self::NULLABLE_BIT != 0
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
/// Get the non-nullable version of this ref type.
|
|
1379
|
+
pub const fn as_non_null(&self) -> Self {
|
|
1380
|
+
Self::from_u32(self.as_u32() & !Self::NULLABLE_BIT)
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
/// Get the nullable version of this ref type.
|
|
1384
|
+
pub const fn nullable(&self) -> Self {
|
|
1385
|
+
Self::from_u32(self.as_u32() | Self::NULLABLE_BIT)
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
/// Get the shared version of this ref type as long as it is abstract.
|
|
1389
|
+
pub const fn shared(&self) -> Option<Self> {
|
|
1390
|
+
if self.is_concrete_type_ref() {
|
|
1391
|
+
None
|
|
1392
|
+
} else {
|
|
1393
|
+
Some(Self::from_u32(self.as_u32() | Self::SHARED_BIT))
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1397
|
+
/// Get the heap type that this is a reference to.
|
|
1398
|
+
pub fn heap_type(&self) -> HeapType {
|
|
1399
|
+
let s = self.as_u32();
|
|
1400
|
+
if self.is_concrete_type_ref() {
|
|
1401
|
+
if !self.is_exact_type_ref() {
|
|
1402
|
+
HeapType::Concrete(self.type_index().unwrap().unpack())
|
|
1403
|
+
} else {
|
|
1404
|
+
HeapType::Exact(self.type_index().unwrap().unpack())
|
|
1405
|
+
}
|
|
1406
|
+
} else {
|
|
1407
|
+
use AbstractHeapType::*;
|
|
1408
|
+
let shared = s & Self::SHARED_BIT != 0;
|
|
1409
|
+
let ty = match s & Self::ABSTYPE_MASK {
|
|
1410
|
+
Self::FUNC_ABSTYPE => Func,
|
|
1411
|
+
Self::EXTERN_ABSTYPE => Extern,
|
|
1412
|
+
Self::ANY_ABSTYPE => Any,
|
|
1413
|
+
Self::NONE_ABSTYPE => None,
|
|
1414
|
+
Self::NOEXTERN_ABSTYPE => NoExtern,
|
|
1415
|
+
Self::NOFUNC_ABSTYPE => NoFunc,
|
|
1416
|
+
Self::EQ_ABSTYPE => Eq,
|
|
1417
|
+
Self::STRUCT_ABSTYPE => Struct,
|
|
1418
|
+
Self::ARRAY_ABSTYPE => Array,
|
|
1419
|
+
Self::I31_ABSTYPE => I31,
|
|
1420
|
+
Self::EXN_ABSTYPE => Exn,
|
|
1421
|
+
Self::NOEXN_ABSTYPE => NoExn,
|
|
1422
|
+
Self::CONT_ABSTYPE => Cont,
|
|
1423
|
+
Self::NOCONT_ABSTYPE => NoCont,
|
|
1424
|
+
_ => unreachable!(),
|
|
1425
|
+
};
|
|
1426
|
+
HeapType::Abstract { shared, ty }
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
// Note that this is similar to `Display for RefType` except that it has
|
|
1431
|
+
// the indexes stubbed out.
|
|
1432
|
+
#[cfg(feature = "validate")]
|
|
1433
|
+
pub(crate) fn wat(&self) -> &'static str {
|
|
1434
|
+
let nullable = self.is_nullable();
|
|
1435
|
+
match self.heap_type() {
|
|
1436
|
+
HeapType::Abstract { shared, ty } => {
|
|
1437
|
+
use AbstractHeapType::*;
|
|
1438
|
+
match (shared, nullable, ty) {
|
|
1439
|
+
// Shared and nullable.
|
|
1440
|
+
(true, true, Func) => "(shared funcref)",
|
|
1441
|
+
(true, true, Extern) => "(shared externref)",
|
|
1442
|
+
(true, true, Any) => "(shared anyref)",
|
|
1443
|
+
(true, true, None) => "(shared nullref)",
|
|
1444
|
+
(true, true, NoExtern) => "(shared nullexternref)",
|
|
1445
|
+
(true, true, NoFunc) => "(shared nullfuncref)",
|
|
1446
|
+
(true, true, Eq) => "(shared eqref)",
|
|
1447
|
+
(true, true, Struct) => "(shared structref)",
|
|
1448
|
+
(true, true, Array) => "(shared arrayref)",
|
|
1449
|
+
(true, true, I31) => "(shared i31ref)",
|
|
1450
|
+
(true, true, Exn) => "(shared exnref)",
|
|
1451
|
+
(true, true, NoExn) => "(shared nullexnref)",
|
|
1452
|
+
(true, true, Cont) => "(shared contref)",
|
|
1453
|
+
(true, true, NoCont) => "(shared nullcontref)",
|
|
1454
|
+
// Unshared but nullable.
|
|
1455
|
+
(false, true, Func) => "funcref",
|
|
1456
|
+
(false, true, Extern) => "externref",
|
|
1457
|
+
(false, true, Any) => "anyref",
|
|
1458
|
+
(false, true, None) => "nullref",
|
|
1459
|
+
(false, true, NoExtern) => "nullexternref",
|
|
1460
|
+
(false, true, NoFunc) => "nullfuncref",
|
|
1461
|
+
(false, true, Eq) => "eqref",
|
|
1462
|
+
(false, true, Struct) => "structref",
|
|
1463
|
+
(false, true, Array) => "arrayref",
|
|
1464
|
+
(false, true, I31) => "i31ref",
|
|
1465
|
+
(false, true, Exn) => "exnref",
|
|
1466
|
+
(false, true, NoExn) => "nullexnref",
|
|
1467
|
+
(false, true, Cont) => "contref",
|
|
1468
|
+
(false, true, NoCont) => "nullcontref",
|
|
1469
|
+
// Shared but not nullable.
|
|
1470
|
+
(true, false, Func) => "(ref (shared func))",
|
|
1471
|
+
(true, false, Extern) => "(ref (shared extern))",
|
|
1472
|
+
(true, false, Any) => "(ref (shared any))",
|
|
1473
|
+
(true, false, None) => "(ref (shared none))",
|
|
1474
|
+
(true, false, NoExtern) => "(ref (shared noextern))",
|
|
1475
|
+
(true, false, NoFunc) => "(ref (shared nofunc))",
|
|
1476
|
+
(true, false, Eq) => "(ref (shared eq))",
|
|
1477
|
+
(true, false, Struct) => "(ref (shared struct))",
|
|
1478
|
+
(true, false, Array) => "(ref (shared array))",
|
|
1479
|
+
(true, false, I31) => "(ref (shared i31))",
|
|
1480
|
+
(true, false, Exn) => "(ref (shared exn))",
|
|
1481
|
+
(true, false, NoExn) => "(ref (shared noexn))",
|
|
1482
|
+
(true, false, Cont) => "(ref (shared cont))",
|
|
1483
|
+
(true, false, NoCont) => "(ref (shared nocont))",
|
|
1484
|
+
// Neither shared nor nullable.
|
|
1485
|
+
(false, false, Func) => "(ref func)",
|
|
1486
|
+
(false, false, Extern) => "(ref extern)",
|
|
1487
|
+
(false, false, Any) => "(ref any)",
|
|
1488
|
+
(false, false, None) => "(ref none)",
|
|
1489
|
+
(false, false, NoExtern) => "(ref noextern)",
|
|
1490
|
+
(false, false, NoFunc) => "(ref nofunc)",
|
|
1491
|
+
(false, false, Eq) => "(ref eq)",
|
|
1492
|
+
(false, false, Struct) => "(ref struct)",
|
|
1493
|
+
(false, false, Array) => "(ref array)",
|
|
1494
|
+
(false, false, I31) => "(ref i31)",
|
|
1495
|
+
(false, false, Exn) => "(ref exn)",
|
|
1496
|
+
(false, false, NoExn) => "(ref noexn)",
|
|
1497
|
+
(false, false, Cont) => "(ref cont)",
|
|
1498
|
+
(false, false, NoCont) => "(ref nocont)",
|
|
1499
|
+
}
|
|
1500
|
+
}
|
|
1501
|
+
HeapType::Concrete(_) => {
|
|
1502
|
+
if nullable {
|
|
1503
|
+
"(ref null $type)"
|
|
1504
|
+
} else {
|
|
1505
|
+
"(ref $type)"
|
|
1506
|
+
}
|
|
1507
|
+
}
|
|
1508
|
+
HeapType::Exact(_) => {
|
|
1509
|
+
if nullable {
|
|
1510
|
+
"(ref null (exact $type))"
|
|
1511
|
+
} else {
|
|
1512
|
+
"(ref (exact $type))"
|
|
1513
|
+
}
|
|
1514
|
+
}
|
|
1515
|
+
}
|
|
1516
|
+
}
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
/// A heap type.
|
|
1520
|
+
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
|
1521
|
+
pub enum HeapType {
|
|
1522
|
+
/// An abstract heap type; e.g., `anyref`.
|
|
1523
|
+
Abstract {
|
|
1524
|
+
/// Whether the type is shared.
|
|
1525
|
+
///
|
|
1526
|
+
/// Introduced in the shared-everything-threads proposal.
|
|
1527
|
+
shared: bool,
|
|
1528
|
+
/// The actual heap type.
|
|
1529
|
+
ty: AbstractHeapType,
|
|
1530
|
+
},
|
|
1531
|
+
/// A concrete, user-defined type.
|
|
1532
|
+
///
|
|
1533
|
+
/// Introduced in the function-references proposal.
|
|
1534
|
+
Concrete(UnpackedIndex),
|
|
1535
|
+
/// An exact, user-defined type.
|
|
1536
|
+
///
|
|
1537
|
+
/// Introduced in the custom-descriptors proposal.
|
|
1538
|
+
Exact(UnpackedIndex),
|
|
1539
|
+
}
|
|
1540
|
+
|
|
1541
|
+
impl HeapType {
|
|
1542
|
+
/// Alias for an unshared `func` heap type.
|
|
1543
|
+
pub const FUNC: Self = Self::Abstract {
|
|
1544
|
+
shared: false,
|
|
1545
|
+
ty: AbstractHeapType::Func,
|
|
1546
|
+
};
|
|
1547
|
+
|
|
1548
|
+
/// Alias for an unshared `extern` heap type.
|
|
1549
|
+
pub const EXTERN: Self = Self::Abstract {
|
|
1550
|
+
shared: false,
|
|
1551
|
+
ty: AbstractHeapType::Extern,
|
|
1552
|
+
};
|
|
1553
|
+
}
|
|
1554
|
+
|
|
1555
|
+
/// An abstract heap type.
|
|
1556
|
+
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
|
1557
|
+
pub enum AbstractHeapType {
|
|
1558
|
+
/// The abstract, untyped (any) function.
|
|
1559
|
+
///
|
|
1560
|
+
/// Introduced in the references-types proposal.
|
|
1561
|
+
Func,
|
|
1562
|
+
|
|
1563
|
+
/// The abstract, external heap type.
|
|
1564
|
+
///
|
|
1565
|
+
/// Introduced in the references-types proposal.
|
|
1566
|
+
Extern,
|
|
1567
|
+
|
|
1568
|
+
/// The abstract `any` heap type.
|
|
1569
|
+
///
|
|
1570
|
+
/// The common supertype (a.k.a. top) of all internal types.
|
|
1571
|
+
///
|
|
1572
|
+
/// Introduced in the GC proposal.
|
|
1573
|
+
Any,
|
|
1574
|
+
|
|
1575
|
+
/// The abstract `none` heap type.
|
|
1576
|
+
///
|
|
1577
|
+
/// The common subtype (a.k.a. bottom) of all internal types.
|
|
1578
|
+
///
|
|
1579
|
+
/// Introduced in the GC proposal.
|
|
1580
|
+
None,
|
|
1581
|
+
|
|
1582
|
+
/// The abstract `noextern` heap type.
|
|
1583
|
+
///
|
|
1584
|
+
/// The common subtype (a.k.a. bottom) of all external types.
|
|
1585
|
+
///
|
|
1586
|
+
/// Introduced in the GC proposal.
|
|
1587
|
+
NoExtern,
|
|
1588
|
+
|
|
1589
|
+
/// The abstract `nofunc` heap type.
|
|
1590
|
+
///
|
|
1591
|
+
/// The common subtype (a.k.a. bottom) of all function types.
|
|
1592
|
+
///
|
|
1593
|
+
/// Introduced in the GC proposal.
|
|
1594
|
+
NoFunc,
|
|
1595
|
+
|
|
1596
|
+
/// The abstract `eq` heap type.
|
|
1597
|
+
///
|
|
1598
|
+
/// The common supertype of all heap types on which the `ref.eq`
|
|
1599
|
+
/// instruction is allowed.
|
|
1600
|
+
///
|
|
1601
|
+
/// Introduced in the GC proposal.
|
|
1602
|
+
Eq,
|
|
1603
|
+
|
|
1604
|
+
/// The abstract `struct` heap type.
|
|
1605
|
+
///
|
|
1606
|
+
/// The common supertype of all struct types.
|
|
1607
|
+
///
|
|
1608
|
+
/// Introduced in the GC proposal.
|
|
1609
|
+
Struct,
|
|
1610
|
+
|
|
1611
|
+
/// The abstract `array` heap type.
|
|
1612
|
+
///
|
|
1613
|
+
/// The common supertype of all array types.
|
|
1614
|
+
///
|
|
1615
|
+
/// Introduced in the GC proposal.
|
|
1616
|
+
Array,
|
|
1617
|
+
|
|
1618
|
+
/// The abstract `i31` heap type.
|
|
1619
|
+
///
|
|
1620
|
+
/// It is not expected that Wasm runtimes actually store these
|
|
1621
|
+
/// values on the heap, but unbox them inline into the `i31ref`s
|
|
1622
|
+
/// themselves instead.
|
|
1623
|
+
///
|
|
1624
|
+
/// Introduced in the GC proposal.
|
|
1625
|
+
I31,
|
|
1626
|
+
|
|
1627
|
+
/// The abstraction `exception` heap type.
|
|
1628
|
+
///
|
|
1629
|
+
/// Introduced in the exception-handling proposal.
|
|
1630
|
+
Exn,
|
|
1631
|
+
|
|
1632
|
+
/// The abstract `noexn` heap type.
|
|
1633
|
+
///
|
|
1634
|
+
/// The common subtype (a.k.a. bottom) of all exception types.
|
|
1635
|
+
///
|
|
1636
|
+
/// Introduced in the exception-handling proposal.
|
|
1637
|
+
NoExn,
|
|
1638
|
+
|
|
1639
|
+
/// The abstract `continuation` heap type.
|
|
1640
|
+
///
|
|
1641
|
+
/// Introduced in the stack-switching proposal.
|
|
1642
|
+
Cont,
|
|
1643
|
+
|
|
1644
|
+
/// The abstract `noexn` heap type.
|
|
1645
|
+
///
|
|
1646
|
+
/// The common subtype (a.k.a. bottom) of all continuation types.
|
|
1647
|
+
///
|
|
1648
|
+
/// Introduced in the stack-switching proposal.
|
|
1649
|
+
NoCont,
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1652
|
+
impl AbstractHeapType {
|
|
1653
|
+
pub(crate) const fn as_str(&self, nullable: bool) -> &str {
|
|
1654
|
+
use AbstractHeapType::*;
|
|
1655
|
+
match (nullable, self) {
|
|
1656
|
+
(_, Any) => "any",
|
|
1657
|
+
(true, None) => "null",
|
|
1658
|
+
(false, None) => "none",
|
|
1659
|
+
(true, NoExtern) => "nullextern",
|
|
1660
|
+
(false, NoExtern) => "noextern",
|
|
1661
|
+
(true, NoFunc) => "nullfunc",
|
|
1662
|
+
(false, NoFunc) => "nofunc",
|
|
1663
|
+
(_, Eq) => "eq",
|
|
1664
|
+
(_, Struct) => "struct",
|
|
1665
|
+
(_, Array) => "array",
|
|
1666
|
+
(_, I31) => "i31",
|
|
1667
|
+
(_, Extern) => "extern",
|
|
1668
|
+
(_, Func) => "func",
|
|
1669
|
+
(_, Exn) => "exn",
|
|
1670
|
+
(true, NoExn) => "nullexn",
|
|
1671
|
+
(false, NoExn) => "noexn",
|
|
1672
|
+
(_, Cont) => "cont",
|
|
1673
|
+
(true, NoCont) => "nullcont",
|
|
1674
|
+
(false, NoCont) => "nocont",
|
|
1675
|
+
}
|
|
1676
|
+
}
|
|
1677
|
+
|
|
1678
|
+
#[cfg(feature = "validate")]
|
|
1679
|
+
pub(crate) fn is_subtype_of(&self, other: AbstractHeapType) -> bool {
|
|
1680
|
+
use AbstractHeapType::*;
|
|
1681
|
+
|
|
1682
|
+
match (self, other) {
|
|
1683
|
+
(a, b) if *a == b => true,
|
|
1684
|
+
(Eq | I31 | Struct | Array | None, Any) => true,
|
|
1685
|
+
(I31 | Struct | Array | None, Eq) => true,
|
|
1686
|
+
(NoExtern, Extern) => true,
|
|
1687
|
+
(NoFunc, Func) => true,
|
|
1688
|
+
(None, I31 | Array | Struct) => true,
|
|
1689
|
+
(NoExn, Exn) => true,
|
|
1690
|
+
(NoCont, Cont) => true,
|
|
1691
|
+
// Nothing else matches. (Avoid full wildcard matches so
|
|
1692
|
+
// that adding/modifying variants is easier in the
|
|
1693
|
+
// future.)
|
|
1694
|
+
(
|
|
1695
|
+
Func | Extern | Exn | Any | Eq | Array | I31 | Struct | Cont | None | NoFunc
|
|
1696
|
+
| NoExtern | NoExn | NoCont,
|
|
1697
|
+
_,
|
|
1698
|
+
) => false,
|
|
1699
|
+
}
|
|
1700
|
+
}
|
|
1701
|
+
}
|
|
1702
|
+
|
|
1703
|
+
impl<'a> FromReader<'a> for StorageType {
|
|
1704
|
+
fn from_reader(reader: &mut BinaryReader<'a>) -> Result<Self> {
|
|
1705
|
+
// NB: See `FromReader<'a> for ValType` for a table of how this
|
|
1706
|
+
// interacts with other value encodings.
|
|
1707
|
+
match reader.peek()? {
|
|
1708
|
+
0x78 => {
|
|
1709
|
+
reader.read_u8()?;
|
|
1710
|
+
Ok(StorageType::I8)
|
|
1711
|
+
}
|
|
1712
|
+
0x77 => {
|
|
1713
|
+
reader.read_u8()?;
|
|
1714
|
+
Ok(StorageType::I16)
|
|
1715
|
+
}
|
|
1716
|
+
_ => Ok(StorageType::Val(reader.read()?)),
|
|
1717
|
+
}
|
|
1718
|
+
}
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
impl<'a> FromReader<'a> for ValType {
|
|
1722
|
+
fn from_reader(reader: &mut BinaryReader<'a>) -> Result<Self> {
|
|
1723
|
+
// Decoding value types is sort of subtle because the space of what's
|
|
1724
|
+
// being decoded here is actually spread out across an number of
|
|
1725
|
+
// locations. This comment here is intended to serve as a bit of a
|
|
1726
|
+
// reference to what's being decoded here and how it interacts with
|
|
1727
|
+
// other locations.
|
|
1728
|
+
//
|
|
1729
|
+
// Note that all value types are encoded as canonical-form negative
|
|
1730
|
+
// numbers in the sleb128 encoding scheme. Currently in the wasm spec
|
|
1731
|
+
// sleb128 isn't actually used but it looks to be modelled to allow it
|
|
1732
|
+
// one day. In the meantime the current values used are:
|
|
1733
|
+
//
|
|
1734
|
+
// | sleb128 | decimal | type | notes |
|
|
1735
|
+
// |---------|---------|--------------|------------------------------|
|
|
1736
|
+
// | 0x7F | -1 | i32 | |
|
|
1737
|
+
// | 0x7E | -2 | i64 | |
|
|
1738
|
+
// | 0x7D | -3 | f32 | |
|
|
1739
|
+
// | 0x7C | -4 | f64 | |
|
|
1740
|
+
// | 0x7B | -5 | v128 | simd proposal |
|
|
1741
|
+
// | 0x78 | -8 | i8 | gc proposal, in `FieldType` |
|
|
1742
|
+
// | 0x77 | -9 | i16 | gc proposal, in `FieldType` |
|
|
1743
|
+
// | 0x75 | -11 | nocont | stack switching proposal |
|
|
1744
|
+
// | 0x74 | -12 | noexn | gc + exceptions proposal |
|
|
1745
|
+
// | 0x73 | -13 | nofunc | gc proposal |
|
|
1746
|
+
// | 0x72 | -14 | noextern | gc proposal |
|
|
1747
|
+
// | 0x71 | -15 | nullref | gc proposal |
|
|
1748
|
+
// | 0x70 | -16 | func | reference types proposal |
|
|
1749
|
+
// | 0x6F | -17 | extern | reference types proposal |
|
|
1750
|
+
// | 0x6E | -18 | any | gc proposal |
|
|
1751
|
+
// | 0x6D | -19 | eq | gc proposal |
|
|
1752
|
+
// | 0x6C | -20 | i31 | gc proposal |
|
|
1753
|
+
// | 0x6B | -21 | struct | gc proposal |
|
|
1754
|
+
// | 0x6A | -22 | array | gc proposal |
|
|
1755
|
+
// | 0x69 | -23 | exnref | gc + exceptions proposal |
|
|
1756
|
+
// | 0x68 | -24 | contref | stack switching proposal |
|
|
1757
|
+
// | 0x65 | -27 | shared $t | shared-everything proposal |
|
|
1758
|
+
// | 0x64 | -28 | ref $t | gc proposal, prefix byte |
|
|
1759
|
+
// | 0x63 | -29 | ref null $t | gc proposal, prefix byte |
|
|
1760
|
+
// | 0x62 | -30 | exact $t | custom descriptor proposal |
|
|
1761
|
+
// | 0x60 | -32 | func $t | prefix byte |
|
|
1762
|
+
// | 0x5f | -33 | struct $t | gc proposal, prefix byte |
|
|
1763
|
+
// | 0x5e | -34 | array $t | gc proposal, prefix byte |
|
|
1764
|
+
// | 0x5d | -35 | cont $t | stack switching proposal |
|
|
1765
|
+
// | 0x50 | -48 | sub $t | gc proposal, prefix byte |
|
|
1766
|
+
// | 0x4F | -49 | sub final $t | gc proposal, prefix byte |
|
|
1767
|
+
// | 0x4E | -50 | rec $t | gc proposal, prefix byte |
|
|
1768
|
+
// | 0x40 | -64 | ε | empty block type |
|
|
1769
|
+
//
|
|
1770
|
+
// Note that not all of these encodings are parsed here, for example
|
|
1771
|
+
// 0x78 as the encoding for `i8` is parsed only in `FieldType`. The
|
|
1772
|
+
// parsing of `FieldType` will delegate here without actually consuming
|
|
1773
|
+
// anything though so the encoding 0x78 still must be disjoint and not
|
|
1774
|
+
// read here otherwise.
|
|
1775
|
+
match reader.peek()? {
|
|
1776
|
+
0x7F => {
|
|
1777
|
+
reader.read_u8()?;
|
|
1778
|
+
Ok(ValType::I32)
|
|
1779
|
+
}
|
|
1780
|
+
0x7E => {
|
|
1781
|
+
reader.read_u8()?;
|
|
1782
|
+
Ok(ValType::I64)
|
|
1783
|
+
}
|
|
1784
|
+
0x7D => {
|
|
1785
|
+
reader.read_u8()?;
|
|
1786
|
+
Ok(ValType::F32)
|
|
1787
|
+
}
|
|
1788
|
+
0x7C => {
|
|
1789
|
+
reader.read_u8()?;
|
|
1790
|
+
Ok(ValType::F64)
|
|
1791
|
+
}
|
|
1792
|
+
0x7B => {
|
|
1793
|
+
reader.read_u8()?;
|
|
1794
|
+
Ok(ValType::V128)
|
|
1795
|
+
}
|
|
1796
|
+
_ => {
|
|
1797
|
+
// Reclassify errors as invalid value types here because
|
|
1798
|
+
// that's the "root" of what was being parsed rather than
|
|
1799
|
+
// reference types.
|
|
1800
|
+
let refty = reader.read().map_err(|mut e| {
|
|
1801
|
+
if let BinaryReaderErrorKind::Invalid = e.kind() {
|
|
1802
|
+
e.set_message("invalid value type");
|
|
1803
|
+
}
|
|
1804
|
+
e
|
|
1805
|
+
})?;
|
|
1806
|
+
Ok(ValType::Ref(refty))
|
|
1807
|
+
}
|
|
1808
|
+
}
|
|
1809
|
+
}
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1812
|
+
impl<'a> FromReader<'a> for RefType {
|
|
1813
|
+
fn from_reader(reader: &mut BinaryReader<'a>) -> Result<Self> {
|
|
1814
|
+
// NB: See `FromReader<'a> for ValType` for a table of how this
|
|
1815
|
+
// interacts with other value encodings.
|
|
1816
|
+
let pos = reader.original_position();
|
|
1817
|
+
match reader.peek()? {
|
|
1818
|
+
0x63 | 0x64 => {
|
|
1819
|
+
let nullable = reader.read_u8()? == 0x63;
|
|
1820
|
+
RefType::new(nullable, reader.read()?)
|
|
1821
|
+
.ok_or_else(|| crate::BinaryReaderError::new("type index too large", pos))
|
|
1822
|
+
}
|
|
1823
|
+
0x62 => Err(crate::BinaryReaderError::new("unexpected exact type", pos)),
|
|
1824
|
+
_ => {
|
|
1825
|
+
// Reclassify errors as invalid reference types here because
|
|
1826
|
+
// that's the "root" of what was being parsed rather than
|
|
1827
|
+
// heap types.
|
|
1828
|
+
let hty = reader.read().map_err(|mut e| {
|
|
1829
|
+
if let BinaryReaderErrorKind::Invalid = e.kind() {
|
|
1830
|
+
e.set_message("malformed reference type");
|
|
1831
|
+
}
|
|
1832
|
+
e
|
|
1833
|
+
})?;
|
|
1834
|
+
RefType::new(true, hty)
|
|
1835
|
+
.ok_or_else(|| crate::BinaryReaderError::new("type index too large", pos))
|
|
1836
|
+
}
|
|
1837
|
+
}
|
|
1838
|
+
}
|
|
1839
|
+
}
|
|
1840
|
+
|
|
1841
|
+
impl<'a> FromReader<'a> for HeapType {
|
|
1842
|
+
fn from_reader(reader: &mut BinaryReader<'a>) -> Result<Self> {
|
|
1843
|
+
// Unconditionally read a `s33` value. If it's positive then that means
|
|
1844
|
+
// it fits in a `u32` meaning that this is a valid concrete type index.
|
|
1845
|
+
// If it's negative, however, then it must be an abstract heap type due
|
|
1846
|
+
// to how non-concrete types are encoded (see `ValType` comments). In
|
|
1847
|
+
// that situation "rewind" the reader and go back to the original bytes
|
|
1848
|
+
// to parse them as an abstract heap type.
|
|
1849
|
+
let mut clone = reader.clone();
|
|
1850
|
+
let s33 = clone.read_var_s33()?;
|
|
1851
|
+
match u32::try_from(s33) {
|
|
1852
|
+
Ok(idx) => {
|
|
1853
|
+
// Be sure to update `reader` with the state after the s33 was
|
|
1854
|
+
// read.
|
|
1855
|
+
*reader = clone;
|
|
1856
|
+
let idx = PackedIndex::from_module_index(idx).ok_or_else(|| {
|
|
1857
|
+
BinaryReaderError::new(
|
|
1858
|
+
"type index greater than implementation limits",
|
|
1859
|
+
reader.original_position(),
|
|
1860
|
+
)
|
|
1861
|
+
})?;
|
|
1862
|
+
Ok(HeapType::Concrete(idx.unpack()))
|
|
1863
|
+
}
|
|
1864
|
+
Err(_) => match reader.peek()? {
|
|
1865
|
+
0x65 => {
|
|
1866
|
+
reader.read_u8()?;
|
|
1867
|
+
let ty = reader.read()?;
|
|
1868
|
+
Ok(HeapType::Abstract { shared: true, ty })
|
|
1869
|
+
}
|
|
1870
|
+
0x62 => {
|
|
1871
|
+
reader.read_u8()?;
|
|
1872
|
+
let idx = reader.read_var_u32()?;
|
|
1873
|
+
Ok(HeapType::Exact(UnpackedIndex::Module(idx)))
|
|
1874
|
+
}
|
|
1875
|
+
_ => {
|
|
1876
|
+
// Reclassify errors as "invalid heap type" here because
|
|
1877
|
+
// that's the "root" of what was being parsed rather than
|
|
1878
|
+
// abstract heap types.
|
|
1879
|
+
let ty = reader.read().map_err(|mut e| {
|
|
1880
|
+
if let BinaryReaderErrorKind::Invalid = e.kind() {
|
|
1881
|
+
e.set_message("invalid heap type");
|
|
1882
|
+
}
|
|
1883
|
+
e
|
|
1884
|
+
})?;
|
|
1885
|
+
Ok(HeapType::Abstract { shared: false, ty })
|
|
1886
|
+
}
|
|
1887
|
+
},
|
|
1888
|
+
}
|
|
1889
|
+
}
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1892
|
+
impl<'a> FromReader<'a> for AbstractHeapType {
|
|
1893
|
+
fn from_reader(reader: &mut BinaryReader<'a>) -> Result<Self> {
|
|
1894
|
+
use AbstractHeapType::*;
|
|
1895
|
+
match reader.read_u8()? {
|
|
1896
|
+
0x70 => Ok(Func),
|
|
1897
|
+
0x6F => Ok(Extern),
|
|
1898
|
+
0x6E => Ok(Any),
|
|
1899
|
+
0x71 => Ok(None),
|
|
1900
|
+
0x72 => Ok(NoExtern),
|
|
1901
|
+
0x73 => Ok(NoFunc),
|
|
1902
|
+
0x6D => Ok(Eq),
|
|
1903
|
+
0x6B => Ok(Struct),
|
|
1904
|
+
0x6A => Ok(Array),
|
|
1905
|
+
0x6C => Ok(I31),
|
|
1906
|
+
0x69 => Ok(Exn),
|
|
1907
|
+
0x74 => Ok(NoExn),
|
|
1908
|
+
0x68 => Ok(Cont),
|
|
1909
|
+
0x75 => Ok(NoCont),
|
|
1910
|
+
_ => {
|
|
1911
|
+
return Err(BinaryReaderError::invalid(
|
|
1912
|
+
"invalid abstract heap type",
|
|
1913
|
+
reader.original_position() - 1,
|
|
1914
|
+
));
|
|
1915
|
+
}
|
|
1916
|
+
}
|
|
1917
|
+
}
|
|
1918
|
+
}
|
|
1919
|
+
|
|
1920
|
+
/// Represents a table's type.
|
|
1921
|
+
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
|
1922
|
+
pub struct TableType {
|
|
1923
|
+
/// The table's element type.
|
|
1924
|
+
pub element_type: RefType,
|
|
1925
|
+
/// Whether or not this is a 64-bit table.
|
|
1926
|
+
///
|
|
1927
|
+
/// This is part of the memory64 proposal in WebAssembly.
|
|
1928
|
+
pub table64: bool,
|
|
1929
|
+
/// Initial size of this table, in elements.
|
|
1930
|
+
///
|
|
1931
|
+
/// For 32-bit tables (when `table64` is `false`) this is guaranteed to
|
|
1932
|
+
/// be at most `u32::MAX` for valid types.
|
|
1933
|
+
pub initial: u64,
|
|
1934
|
+
/// Optional maximum size of the table, in elements.
|
|
1935
|
+
///
|
|
1936
|
+
/// For 32-bit tables (when `table64` is `false`) this is guaranteed to
|
|
1937
|
+
/// be at most `u32::MAX` for valid types.
|
|
1938
|
+
pub maximum: Option<u64>,
|
|
1939
|
+
/// Whether this table is shared or not.
|
|
1940
|
+
///
|
|
1941
|
+
/// This is included the shared-everything-threads proposal.
|
|
1942
|
+
pub shared: bool,
|
|
1943
|
+
}
|
|
1944
|
+
|
|
1945
|
+
impl TableType {
|
|
1946
|
+
/// Gets the index type for the table.
|
|
1947
|
+
pub fn index_type(&self) -> ValType {
|
|
1948
|
+
if self.table64 {
|
|
1949
|
+
ValType::I64
|
|
1950
|
+
} else {
|
|
1951
|
+
ValType::I32
|
|
1952
|
+
}
|
|
1953
|
+
}
|
|
1954
|
+
}
|
|
1955
|
+
|
|
1956
|
+
/// Represents a memory's type.
|
|
1957
|
+
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
|
1958
|
+
pub struct MemoryType {
|
|
1959
|
+
/// Whether or not this is a 64-bit memory, using i64 as an index. If this
|
|
1960
|
+
/// is false it's a 32-bit memory using i32 as an index.
|
|
1961
|
+
///
|
|
1962
|
+
/// This is part of the memory64 proposal in WebAssembly.
|
|
1963
|
+
pub memory64: bool,
|
|
1964
|
+
|
|
1965
|
+
/// Whether or not this is a "shared" memory, indicating that it should be
|
|
1966
|
+
/// send-able across threads and the `maximum` field is always present for
|
|
1967
|
+
/// valid types.
|
|
1968
|
+
///
|
|
1969
|
+
/// This is part of the threads proposal in WebAssembly.
|
|
1970
|
+
pub shared: bool,
|
|
1971
|
+
|
|
1972
|
+
/// Initial size of this memory, in wasm pages.
|
|
1973
|
+
///
|
|
1974
|
+
/// For 32-bit memories (when `memory64` is `false`) this is guaranteed to
|
|
1975
|
+
/// be at most `u32::MAX` for valid types.
|
|
1976
|
+
pub initial: u64,
|
|
1977
|
+
|
|
1978
|
+
/// Optional maximum size of this memory, in wasm pages.
|
|
1979
|
+
///
|
|
1980
|
+
/// For 32-bit memories (when `memory64` is `false`) this is guaranteed to
|
|
1981
|
+
/// be at most `u32::MAX` for valid types. This field is always present for
|
|
1982
|
+
/// valid wasm memories when `shared` is `true`.
|
|
1983
|
+
pub maximum: Option<u64>,
|
|
1984
|
+
|
|
1985
|
+
/// The log base 2 of the memory's custom page size.
|
|
1986
|
+
///
|
|
1987
|
+
/// Memory pages are, by default, 64KiB large (i.e. 2<sup>16</sup> or
|
|
1988
|
+
/// `65536`).
|
|
1989
|
+
///
|
|
1990
|
+
/// [The custom-page-sizes proposal] allows changing it to other values.
|
|
1991
|
+
///
|
|
1992
|
+
/// [The custom-page-sizes proposal]: https://github.com/WebAssembly/custom-page-sizes
|
|
1993
|
+
pub page_size_log2: Option<u32>,
|
|
1994
|
+
}
|
|
1995
|
+
|
|
1996
|
+
impl MemoryType {
|
|
1997
|
+
/// Gets the index type for the memory.
|
|
1998
|
+
pub fn index_type(&self) -> ValType {
|
|
1999
|
+
if self.memory64 {
|
|
2000
|
+
ValType::I64
|
|
2001
|
+
} else {
|
|
2002
|
+
ValType::I32
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
}
|
|
2006
|
+
|
|
2007
|
+
/// Represents a global's type.
|
|
2008
|
+
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
|
2009
|
+
pub struct GlobalType {
|
|
2010
|
+
/// The global's type.
|
|
2011
|
+
pub content_type: ValType,
|
|
2012
|
+
/// Whether or not the global is mutable.
|
|
2013
|
+
pub mutable: bool,
|
|
2014
|
+
/// Whether or not the global is shared.
|
|
2015
|
+
pub shared: bool,
|
|
2016
|
+
}
|
|
2017
|
+
|
|
2018
|
+
/// Represents a tag kind.
|
|
2019
|
+
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
|
2020
|
+
pub enum TagKind {
|
|
2021
|
+
/// The tag is an exception type.
|
|
2022
|
+
Exception,
|
|
2023
|
+
}
|
|
2024
|
+
|
|
2025
|
+
/// A tag's type.
|
|
2026
|
+
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
|
2027
|
+
pub struct TagType {
|
|
2028
|
+
/// The kind of tag
|
|
2029
|
+
pub kind: TagKind,
|
|
2030
|
+
/// The function type this tag uses.
|
|
2031
|
+
pub func_type_idx: u32,
|
|
2032
|
+
}
|
|
2033
|
+
|
|
2034
|
+
/// A reader for the type section of a WebAssembly module.
|
|
2035
|
+
pub type TypeSectionReader<'a> = SectionLimited<'a, RecGroup>;
|
|
2036
|
+
|
|
2037
|
+
impl<'a> TypeSectionReader<'a> {
|
|
2038
|
+
/// Returns an iterator over this type section which will only yield
|
|
2039
|
+
/// function types and any usage of GC types from the GC proposal will
|
|
2040
|
+
/// be translated into an error.
|
|
2041
|
+
pub fn into_iter_err_on_gc_types(self) -> impl Iterator<Item = Result<FuncType>> + 'a {
|
|
2042
|
+
self.into_iter_with_offsets().map(|item| {
|
|
2043
|
+
let (offset, group) = item?;
|
|
2044
|
+
let mut types = group.into_types();
|
|
2045
|
+
let ty = match (types.next(), types.next()) {
|
|
2046
|
+
(Some(ty), None) => ty,
|
|
2047
|
+
_ => bail!(offset, "gc proposal not supported"),
|
|
2048
|
+
};
|
|
2049
|
+
if !ty.is_final || ty.supertype_idx.is_some() {
|
|
2050
|
+
bail!(offset, "gc proposal not supported");
|
|
2051
|
+
}
|
|
2052
|
+
match ty.composite_type.inner {
|
|
2053
|
+
CompositeInnerType::Func(f) => Ok(f),
|
|
2054
|
+
CompositeInnerType::Array(_) | CompositeInnerType::Struct(_) => {
|
|
2055
|
+
bail!(offset, "gc proposal not supported");
|
|
2056
|
+
}
|
|
2057
|
+
CompositeInnerType::Cont(_) => {
|
|
2058
|
+
bail!(offset, "stack switching proposal not supported");
|
|
2059
|
+
}
|
|
2060
|
+
}
|
|
2061
|
+
})
|
|
2062
|
+
}
|
|
2063
|
+
}
|
|
2064
|
+
|
|
2065
|
+
impl<'a> FromReader<'a> for CompositeType {
|
|
2066
|
+
fn from_reader(reader: &mut BinaryReader<'a>) -> Result<Self> {
|
|
2067
|
+
read_composite_type(reader.read_u8()?, reader)
|
|
2068
|
+
}
|
|
2069
|
+
}
|
|
2070
|
+
|
|
2071
|
+
fn read_composite_type(
|
|
2072
|
+
opcode: u8,
|
|
2073
|
+
reader: &mut BinaryReader,
|
|
2074
|
+
) -> Result<CompositeType, BinaryReaderError> {
|
|
2075
|
+
// NB: See `FromReader<'a> for ValType` for a table of how this
|
|
2076
|
+
// interacts with other value encodings.
|
|
2077
|
+
let (shared, opcode) = if opcode == 0x65 {
|
|
2078
|
+
(true, reader.read_u8()?)
|
|
2079
|
+
} else {
|
|
2080
|
+
(false, opcode)
|
|
2081
|
+
};
|
|
2082
|
+
let (describes_idx, opcode) = if opcode == 0x4c {
|
|
2083
|
+
let idx = PackedIndex::from_module_index(reader.read_var_u32()?).ok_or_else(|| {
|
|
2084
|
+
BinaryReaderError::new(
|
|
2085
|
+
"type index greater than implementation limits",
|
|
2086
|
+
reader.original_position(),
|
|
2087
|
+
)
|
|
2088
|
+
})?;
|
|
2089
|
+
(Some(idx), reader.read_u8()?)
|
|
2090
|
+
} else {
|
|
2091
|
+
(None, opcode)
|
|
2092
|
+
};
|
|
2093
|
+
let (descriptor_idx, opcode) = if opcode == 0x4d {
|
|
2094
|
+
let idx = PackedIndex::from_module_index(reader.read_var_u32()?).ok_or_else(|| {
|
|
2095
|
+
BinaryReaderError::new(
|
|
2096
|
+
"type index greater than implementation limits",
|
|
2097
|
+
reader.original_position(),
|
|
2098
|
+
)
|
|
2099
|
+
})?;
|
|
2100
|
+
(Some(idx), reader.read_u8()?)
|
|
2101
|
+
} else {
|
|
2102
|
+
(None, opcode)
|
|
2103
|
+
};
|
|
2104
|
+
let inner = match opcode {
|
|
2105
|
+
0x60 => CompositeInnerType::Func(reader.read()?),
|
|
2106
|
+
0x5e => CompositeInnerType::Array(reader.read()?),
|
|
2107
|
+
0x5f => CompositeInnerType::Struct(reader.read()?),
|
|
2108
|
+
0x5d => CompositeInnerType::Cont(reader.read()?),
|
|
2109
|
+
x => return reader.invalid_leading_byte(x, "type"),
|
|
2110
|
+
};
|
|
2111
|
+
Ok(CompositeType {
|
|
2112
|
+
shared,
|
|
2113
|
+
inner,
|
|
2114
|
+
descriptor_idx,
|
|
2115
|
+
describes_idx,
|
|
2116
|
+
})
|
|
2117
|
+
}
|
|
2118
|
+
|
|
2119
|
+
impl<'a> FromReader<'a> for RecGroup {
|
|
2120
|
+
fn from_reader(reader: &mut BinaryReader<'a>) -> Result<Self> {
|
|
2121
|
+
// NB: See `FromReader<'a> for ValType` for a table of how this
|
|
2122
|
+
// interacts with other value encodings.
|
|
2123
|
+
match reader.peek()? {
|
|
2124
|
+
0x4e => {
|
|
2125
|
+
reader.read_u8()?;
|
|
2126
|
+
let mut iter = reader.read_iter(MAX_WASM_TYPES, "rec group types")?;
|
|
2127
|
+
let mut types = Vec::with_capacity(iter.size_hint().0);
|
|
2128
|
+
let mut offset = iter.reader.original_position();
|
|
2129
|
+
while let Some(ty) = iter.next() {
|
|
2130
|
+
types.push((offset, ty?));
|
|
2131
|
+
offset = iter.reader.original_position();
|
|
2132
|
+
}
|
|
2133
|
+
Ok(RecGroup::explicit(types))
|
|
2134
|
+
}
|
|
2135
|
+
_ => Ok(RecGroup::implicit(
|
|
2136
|
+
reader.original_position(),
|
|
2137
|
+
reader.read()?,
|
|
2138
|
+
)),
|
|
2139
|
+
}
|
|
2140
|
+
}
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2143
|
+
impl<'a> FromReader<'a> for SubType {
|
|
2144
|
+
fn from_reader(reader: &mut BinaryReader<'a>) -> Result<Self> {
|
|
2145
|
+
let pos = reader.original_position();
|
|
2146
|
+
// NB: See `FromReader<'a> for ValType` for a table of how this
|
|
2147
|
+
// interacts with other value encodings.
|
|
2148
|
+
Ok(match reader.read_u8()? {
|
|
2149
|
+
opcode @ (0x4f | 0x50) => {
|
|
2150
|
+
let idx_iter = reader.read_iter(MAX_WASM_SUPERTYPES, "supertype idxs")?;
|
|
2151
|
+
let idxs = idx_iter.collect::<Result<Vec<u32>>>()?;
|
|
2152
|
+
if idxs.len() > 1 {
|
|
2153
|
+
return Err(BinaryReaderError::new(
|
|
2154
|
+
"multiple supertypes not supported",
|
|
2155
|
+
pos,
|
|
2156
|
+
));
|
|
2157
|
+
}
|
|
2158
|
+
let supertype_idx = idxs
|
|
2159
|
+
.first()
|
|
2160
|
+
.copied()
|
|
2161
|
+
.map(|idx| {
|
|
2162
|
+
PackedIndex::from_module_index(idx).ok_or_else(|| {
|
|
2163
|
+
BinaryReaderError::new(
|
|
2164
|
+
"type index greater than implementation limits",
|
|
2165
|
+
reader.original_position(),
|
|
2166
|
+
)
|
|
2167
|
+
})
|
|
2168
|
+
})
|
|
2169
|
+
.transpose()?;
|
|
2170
|
+
SubType {
|
|
2171
|
+
is_final: opcode == 0x4f,
|
|
2172
|
+
supertype_idx,
|
|
2173
|
+
composite_type: read_composite_type(reader.read_u8()?, reader)?,
|
|
2174
|
+
}
|
|
2175
|
+
}
|
|
2176
|
+
opcode => SubType {
|
|
2177
|
+
is_final: true,
|
|
2178
|
+
supertype_idx: None,
|
|
2179
|
+
composite_type: read_composite_type(opcode, reader)?,
|
|
2180
|
+
},
|
|
2181
|
+
})
|
|
2182
|
+
}
|
|
2183
|
+
}
|
|
2184
|
+
|
|
2185
|
+
impl<'a> FromReader<'a> for FuncType {
|
|
2186
|
+
fn from_reader(reader: &mut BinaryReader<'a>) -> Result<Self> {
|
|
2187
|
+
let mut params_results = reader
|
|
2188
|
+
.read_iter(MAX_WASM_FUNCTION_PARAMS, "function params")?
|
|
2189
|
+
.collect::<Result<Vec<_>>>()?;
|
|
2190
|
+
let len_params = params_results.len();
|
|
2191
|
+
let results = reader.read_iter(MAX_WASM_FUNCTION_RETURNS, "function returns")?;
|
|
2192
|
+
params_results.reserve(results.size_hint().0);
|
|
2193
|
+
for result in results {
|
|
2194
|
+
params_results.push(result?);
|
|
2195
|
+
}
|
|
2196
|
+
Ok(FuncType::from_raw_parts(params_results.into(), len_params))
|
|
2197
|
+
}
|
|
2198
|
+
}
|
|
2199
|
+
|
|
2200
|
+
impl<'a> FromReader<'a> for FieldType {
|
|
2201
|
+
fn from_reader(reader: &mut BinaryReader<'a>) -> Result<Self> {
|
|
2202
|
+
let element_type = reader.read()?;
|
|
2203
|
+
let mutable = reader.read_u8()?;
|
|
2204
|
+
Ok(FieldType {
|
|
2205
|
+
element_type,
|
|
2206
|
+
mutable: match mutable {
|
|
2207
|
+
0 => false,
|
|
2208
|
+
1 => true,
|
|
2209
|
+
_ => bail!(
|
|
2210
|
+
reader.original_position(),
|
|
2211
|
+
"malformed mutability byte for field type"
|
|
2212
|
+
),
|
|
2213
|
+
},
|
|
2214
|
+
})
|
|
2215
|
+
}
|
|
2216
|
+
}
|
|
2217
|
+
|
|
2218
|
+
impl<'a> FromReader<'a> for ArrayType {
|
|
2219
|
+
fn from_reader(reader: &mut BinaryReader<'a>) -> Result<Self> {
|
|
2220
|
+
Ok(ArrayType(FieldType::from_reader(reader)?))
|
|
2221
|
+
}
|
|
2222
|
+
}
|
|
2223
|
+
|
|
2224
|
+
impl<'a> FromReader<'a> for StructType {
|
|
2225
|
+
fn from_reader(reader: &mut BinaryReader<'a>) -> Result<Self> {
|
|
2226
|
+
let fields = reader.read_iter(MAX_WASM_STRUCT_FIELDS, "struct fields")?;
|
|
2227
|
+
Ok(StructType {
|
|
2228
|
+
fields: fields.collect::<Result<_>>()?,
|
|
2229
|
+
})
|
|
2230
|
+
}
|
|
2231
|
+
}
|
|
2232
|
+
|
|
2233
|
+
impl<'a> FromReader<'a> for ContType {
|
|
2234
|
+
fn from_reader(reader: &mut BinaryReader<'a>) -> Result<Self> {
|
|
2235
|
+
let idx = match u32::try_from(reader.read_var_s33()?) {
|
|
2236
|
+
Ok(idx) => idx,
|
|
2237
|
+
Err(_) => {
|
|
2238
|
+
bail!(reader.original_position(), "invalid continuation type");
|
|
2239
|
+
}
|
|
2240
|
+
};
|
|
2241
|
+
let idx = PackedIndex::from_module_index(idx).ok_or_else(|| {
|
|
2242
|
+
BinaryReaderError::new(
|
|
2243
|
+
"type index greater than implementation limits",
|
|
2244
|
+
reader.original_position(),
|
|
2245
|
+
)
|
|
2246
|
+
})?;
|
|
2247
|
+
Ok(ContType(idx))
|
|
2248
|
+
}
|
|
2249
|
+
}
|