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,1925 @@
|
|
|
1
|
+
#[cfg(feature = "features")]
|
|
2
|
+
use crate::WasmFeatures;
|
|
3
|
+
use crate::binary_reader::WASM_MAGIC_NUMBER;
|
|
4
|
+
use crate::prelude::*;
|
|
5
|
+
use crate::{
|
|
6
|
+
BinaryReader, BinaryReaderError, CustomSectionReader, DataSectionReader, ElementSectionReader,
|
|
7
|
+
ExportSectionReader, FromReader, FunctionBody, FunctionSectionReader, GlobalSectionReader,
|
|
8
|
+
ImportSectionReader, MemorySectionReader, Result, TableSectionReader, TagSectionReader,
|
|
9
|
+
TypeSectionReader,
|
|
10
|
+
};
|
|
11
|
+
#[cfg(feature = "component-model")]
|
|
12
|
+
use crate::{
|
|
13
|
+
ComponentCanonicalSectionReader, ComponentExportSectionReader, ComponentImportSectionReader,
|
|
14
|
+
ComponentInstanceSectionReader, ComponentStartFunction, ComponentTypeSectionReader,
|
|
15
|
+
CoreTypeSectionReader, InstanceSectionReader, SectionLimited, limits::MAX_WASM_MODULE_SIZE,
|
|
16
|
+
};
|
|
17
|
+
use core::fmt;
|
|
18
|
+
use core::iter;
|
|
19
|
+
use core::ops::Range;
|
|
20
|
+
|
|
21
|
+
pub(crate) const WASM_MODULE_VERSION: u16 = 0x1;
|
|
22
|
+
|
|
23
|
+
// Note that this started at `0xa` and we're incrementing up from there. When
|
|
24
|
+
// the component model is stabilized this will become 0x1. The changes here are:
|
|
25
|
+
//
|
|
26
|
+
// * [????-??-??] 0xa - original version
|
|
27
|
+
// * [2023-01-05] 0xb - `export` introduces an alias
|
|
28
|
+
// * [2023-02-06] 0xc - `export` has an optional type ascribed to it
|
|
29
|
+
// * [2023-05-10] 0xd - imports/exports drop URLs, new discriminator byte which
|
|
30
|
+
// allows for `(import (interface "...") ...)` syntax.
|
|
31
|
+
pub(crate) const WASM_COMPONENT_VERSION: u16 = 0xd;
|
|
32
|
+
|
|
33
|
+
const KIND_MODULE: u16 = 0x00;
|
|
34
|
+
const KIND_COMPONENT: u16 = 0x01;
|
|
35
|
+
|
|
36
|
+
/// The supported encoding formats for the parser.
|
|
37
|
+
#[derive(Debug, Clone, Copy, Eq, PartialEq)]
|
|
38
|
+
pub enum Encoding {
|
|
39
|
+
/// The encoding format is a WebAssembly module.
|
|
40
|
+
Module,
|
|
41
|
+
/// The encoding format is a WebAssembly component.
|
|
42
|
+
Component,
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
#[derive(Debug, Clone, Default)]
|
|
46
|
+
struct ParserCounts {
|
|
47
|
+
function_entries: Option<u32>,
|
|
48
|
+
code_entries: Option<u32>,
|
|
49
|
+
data_entries: Option<u32>,
|
|
50
|
+
data_count: Option<u32>,
|
|
51
|
+
#[cfg(feature = "component-model")]
|
|
52
|
+
component_start_sections: bool,
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Section order for WebAssembly modules.
|
|
56
|
+
//
|
|
57
|
+
// Component sections are unordered and allow for duplicates,
|
|
58
|
+
// so this isn't used for components.
|
|
59
|
+
#[derive(Copy, Clone, Default, PartialOrd, Ord, PartialEq, Eq, Debug)]
|
|
60
|
+
pub(crate) enum Order {
|
|
61
|
+
#[default]
|
|
62
|
+
Initial,
|
|
63
|
+
Type,
|
|
64
|
+
Import,
|
|
65
|
+
Function,
|
|
66
|
+
Table,
|
|
67
|
+
Memory,
|
|
68
|
+
Tag,
|
|
69
|
+
Global,
|
|
70
|
+
Export,
|
|
71
|
+
Start,
|
|
72
|
+
Element,
|
|
73
|
+
DataCount,
|
|
74
|
+
Code,
|
|
75
|
+
Data,
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/// An incremental parser of a binary WebAssembly module or component.
|
|
79
|
+
///
|
|
80
|
+
/// This type is intended to be used to incrementally parse a WebAssembly module
|
|
81
|
+
/// or component as bytes become available for the module. This can also be used
|
|
82
|
+
/// to parse modules or components that are already entirely resident within memory.
|
|
83
|
+
///
|
|
84
|
+
/// This primary function for a parser is the [`Parser::parse`] function which
|
|
85
|
+
/// will incrementally consume input. You can also use the [`Parser::parse_all`]
|
|
86
|
+
/// function to parse a module or component that is entirely resident in memory.
|
|
87
|
+
#[derive(Debug, Clone)]
|
|
88
|
+
pub struct Parser {
|
|
89
|
+
state: State,
|
|
90
|
+
offset: u64,
|
|
91
|
+
max_size: u64,
|
|
92
|
+
encoding: Encoding,
|
|
93
|
+
#[cfg(feature = "features")]
|
|
94
|
+
features: WasmFeatures,
|
|
95
|
+
counts: ParserCounts,
|
|
96
|
+
order: (Order, u64),
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
#[derive(Debug, Clone)]
|
|
100
|
+
enum State {
|
|
101
|
+
Header,
|
|
102
|
+
SectionStart,
|
|
103
|
+
FunctionBody { remaining: u32, len: u32 },
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/// A successful return payload from [`Parser::parse`].
|
|
107
|
+
///
|
|
108
|
+
/// On success one of two possible values can be returned, either that more data
|
|
109
|
+
/// is needed to continue parsing or a chunk of the input was parsed, indicating
|
|
110
|
+
/// how much of it was parsed.
|
|
111
|
+
#[derive(Debug)]
|
|
112
|
+
pub enum Chunk<'a> {
|
|
113
|
+
/// This can be returned at any time and indicates that more data is needed
|
|
114
|
+
/// to proceed with parsing. Zero bytes were consumed from the input to
|
|
115
|
+
/// [`Parser::parse`]. The `u64` value here is a hint as to how many more
|
|
116
|
+
/// bytes are needed to continue parsing.
|
|
117
|
+
NeedMoreData(u64),
|
|
118
|
+
|
|
119
|
+
/// A chunk was successfully parsed.
|
|
120
|
+
Parsed {
|
|
121
|
+
/// This many bytes of the `data` input to [`Parser::parse`] were
|
|
122
|
+
/// consumed to produce `payload`.
|
|
123
|
+
consumed: usize,
|
|
124
|
+
/// The value that we actually parsed.
|
|
125
|
+
payload: Payload<'a>,
|
|
126
|
+
},
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/// Values that can be parsed from a WebAssembly module or component.
|
|
130
|
+
///
|
|
131
|
+
/// This enumeration is all possible chunks of pieces that can be parsed by a
|
|
132
|
+
/// [`Parser`] from a binary WebAssembly module or component. Note that for many
|
|
133
|
+
/// sections the entire section is parsed all at once, whereas other functions,
|
|
134
|
+
/// like the code section, are parsed incrementally. This is a distinction where some
|
|
135
|
+
/// sections, like the type section, are required to be fully resident in memory
|
|
136
|
+
/// (fully downloaded) before proceeding. Other sections, like the code section,
|
|
137
|
+
/// can be processed in a streaming fashion where each function is extracted
|
|
138
|
+
/// individually so it can possibly be shipped to another thread while you wait
|
|
139
|
+
/// for more functions to get downloaded.
|
|
140
|
+
///
|
|
141
|
+
/// Note that payloads, when returned, do not indicate that the module or component
|
|
142
|
+
/// is valid. For example when you receive a `Payload::TypeSection` the type
|
|
143
|
+
/// section itself has not yet actually been parsed. The reader returned will be
|
|
144
|
+
/// able to parse it, but you'll have to actually iterate the reader to do the
|
|
145
|
+
/// full parse. Each payload returned is intended to be a *window* into the
|
|
146
|
+
/// original `data` passed to [`Parser::parse`] which can be further processed
|
|
147
|
+
/// if necessary.
|
|
148
|
+
#[non_exhaustive]
|
|
149
|
+
pub enum Payload<'a> {
|
|
150
|
+
/// Indicates the header of a WebAssembly module or component.
|
|
151
|
+
Version {
|
|
152
|
+
/// The version number found in the header.
|
|
153
|
+
num: u16,
|
|
154
|
+
/// The encoding format being parsed.
|
|
155
|
+
encoding: Encoding,
|
|
156
|
+
/// The range of bytes that were parsed to consume the header of the
|
|
157
|
+
/// module or component. Note that this range is relative to the start
|
|
158
|
+
/// of the byte stream.
|
|
159
|
+
range: Range<usize>,
|
|
160
|
+
},
|
|
161
|
+
|
|
162
|
+
/// A module type section was received and the provided reader can be
|
|
163
|
+
/// used to parse the contents of the type section.
|
|
164
|
+
TypeSection(TypeSectionReader<'a>),
|
|
165
|
+
/// A module import section was received and the provided reader can be
|
|
166
|
+
/// used to parse the contents of the import section.
|
|
167
|
+
ImportSection(ImportSectionReader<'a>),
|
|
168
|
+
/// A module function section was received and the provided reader can be
|
|
169
|
+
/// used to parse the contents of the function section.
|
|
170
|
+
FunctionSection(FunctionSectionReader<'a>),
|
|
171
|
+
/// A module table section was received and the provided reader can be
|
|
172
|
+
/// used to parse the contents of the table section.
|
|
173
|
+
TableSection(TableSectionReader<'a>),
|
|
174
|
+
/// A module memory section was received and the provided reader can be
|
|
175
|
+
/// used to parse the contents of the memory section.
|
|
176
|
+
MemorySection(MemorySectionReader<'a>),
|
|
177
|
+
/// A module tag section was received, and the provided reader can be
|
|
178
|
+
/// used to parse the contents of the tag section.
|
|
179
|
+
TagSection(TagSectionReader<'a>),
|
|
180
|
+
/// A module global section was received and the provided reader can be
|
|
181
|
+
/// used to parse the contents of the global section.
|
|
182
|
+
GlobalSection(GlobalSectionReader<'a>),
|
|
183
|
+
/// A module export section was received, and the provided reader can be
|
|
184
|
+
/// used to parse the contents of the export section.
|
|
185
|
+
ExportSection(ExportSectionReader<'a>),
|
|
186
|
+
/// A module start section was received.
|
|
187
|
+
StartSection {
|
|
188
|
+
/// The start function index
|
|
189
|
+
func: u32,
|
|
190
|
+
/// The range of bytes that specify the `func` field, specified in
|
|
191
|
+
/// offsets relative to the start of the byte stream.
|
|
192
|
+
range: Range<usize>,
|
|
193
|
+
},
|
|
194
|
+
/// A module element section was received and the provided reader can be
|
|
195
|
+
/// used to parse the contents of the element section.
|
|
196
|
+
ElementSection(ElementSectionReader<'a>),
|
|
197
|
+
/// A module data count section was received.
|
|
198
|
+
DataCountSection {
|
|
199
|
+
/// The number of data segments.
|
|
200
|
+
count: u32,
|
|
201
|
+
/// The range of bytes that specify the `count` field, specified in
|
|
202
|
+
/// offsets relative to the start of the byte stream.
|
|
203
|
+
range: Range<usize>,
|
|
204
|
+
},
|
|
205
|
+
/// A module data section was received and the provided reader can be
|
|
206
|
+
/// used to parse the contents of the data section.
|
|
207
|
+
DataSection(DataSectionReader<'a>),
|
|
208
|
+
/// Indicator of the start of the code section of a WebAssembly module.
|
|
209
|
+
///
|
|
210
|
+
/// This entry is returned whenever the code section starts. The `count`
|
|
211
|
+
/// field indicates how many entries are in this code section. After
|
|
212
|
+
/// receiving this start marker you're guaranteed that the next `count`
|
|
213
|
+
/// items will be either `CodeSectionEntry` or an error will be returned.
|
|
214
|
+
///
|
|
215
|
+
/// This, unlike other sections, is intended to be used for streaming the
|
|
216
|
+
/// contents of the code section. The code section is not required to be
|
|
217
|
+
/// fully resident in memory when we parse it. Instead a [`Parser`] is
|
|
218
|
+
/// capable of parsing piece-by-piece of a code section.
|
|
219
|
+
CodeSectionStart {
|
|
220
|
+
/// The number of functions in this section.
|
|
221
|
+
count: u32,
|
|
222
|
+
/// The range of bytes that represent this section, specified in
|
|
223
|
+
/// offsets relative to the start of the byte stream.
|
|
224
|
+
range: Range<usize>,
|
|
225
|
+
/// The size, in bytes, of the remaining contents of this section.
|
|
226
|
+
///
|
|
227
|
+
/// This can be used in combination with [`Parser::skip_section`]
|
|
228
|
+
/// where the caller will know how many bytes to skip before feeding
|
|
229
|
+
/// bytes into `Parser` again.
|
|
230
|
+
size: u32,
|
|
231
|
+
},
|
|
232
|
+
/// An entry of the code section, a function, was parsed from a WebAssembly
|
|
233
|
+
/// module.
|
|
234
|
+
///
|
|
235
|
+
/// This entry indicates that a function was successfully received from the
|
|
236
|
+
/// code section, and the payload here is the window into the original input
|
|
237
|
+
/// where the function resides. Note that the function itself has not been
|
|
238
|
+
/// parsed, it's only been outlined. You'll need to process the
|
|
239
|
+
/// `FunctionBody` provided to test whether it parses and/or is valid.
|
|
240
|
+
CodeSectionEntry(FunctionBody<'a>),
|
|
241
|
+
|
|
242
|
+
/// A core module section was received and the provided parser can be
|
|
243
|
+
/// used to parse the nested module.
|
|
244
|
+
///
|
|
245
|
+
/// This variant is special in that it returns a sub-`Parser`. Upon
|
|
246
|
+
/// receiving a `ModuleSection` it is expected that the returned
|
|
247
|
+
/// `Parser` will be used instead of the parent `Parser` until the parse has
|
|
248
|
+
/// finished. You'll need to feed data into the `Parser` returned until it
|
|
249
|
+
/// returns `Payload::End`. After that you'll switch back to the parent
|
|
250
|
+
/// parser to resume parsing the rest of the current component.
|
|
251
|
+
///
|
|
252
|
+
/// Note that binaries will not be parsed correctly if you feed the data for
|
|
253
|
+
/// a nested module into the parent [`Parser`].
|
|
254
|
+
#[cfg(feature = "component-model")]
|
|
255
|
+
ModuleSection {
|
|
256
|
+
/// The parser for the nested module.
|
|
257
|
+
parser: Parser,
|
|
258
|
+
/// The range of bytes that represent the nested module in the
|
|
259
|
+
/// original byte stream.
|
|
260
|
+
///
|
|
261
|
+
/// Note that, to better support streaming parsing and validation, the
|
|
262
|
+
/// validator does *not* check that this range is in bounds.
|
|
263
|
+
unchecked_range: Range<usize>,
|
|
264
|
+
},
|
|
265
|
+
/// A core instance section was received and the provided parser can be
|
|
266
|
+
/// used to parse the contents of the core instance section.
|
|
267
|
+
///
|
|
268
|
+
/// Currently this section is only parsed in a component.
|
|
269
|
+
#[cfg(feature = "component-model")]
|
|
270
|
+
InstanceSection(InstanceSectionReader<'a>),
|
|
271
|
+
/// A core type section was received and the provided parser can be
|
|
272
|
+
/// used to parse the contents of the core type section.
|
|
273
|
+
///
|
|
274
|
+
/// Currently this section is only parsed in a component.
|
|
275
|
+
#[cfg(feature = "component-model")]
|
|
276
|
+
CoreTypeSection(CoreTypeSectionReader<'a>),
|
|
277
|
+
/// A component section from a WebAssembly component was received and the
|
|
278
|
+
/// provided parser can be used to parse the nested component.
|
|
279
|
+
///
|
|
280
|
+
/// This variant is special in that it returns a sub-`Parser`. Upon
|
|
281
|
+
/// receiving a `ComponentSection` it is expected that the returned
|
|
282
|
+
/// `Parser` will be used instead of the parent `Parser` until the parse has
|
|
283
|
+
/// finished. You'll need to feed data into the `Parser` returned until it
|
|
284
|
+
/// returns `Payload::End`. After that you'll switch back to the parent
|
|
285
|
+
/// parser to resume parsing the rest of the current component.
|
|
286
|
+
///
|
|
287
|
+
/// Note that binaries will not be parsed correctly if you feed the data for
|
|
288
|
+
/// a nested component into the parent [`Parser`].
|
|
289
|
+
#[cfg(feature = "component-model")]
|
|
290
|
+
ComponentSection {
|
|
291
|
+
/// The parser for the nested component.
|
|
292
|
+
parser: Parser,
|
|
293
|
+
/// The range of bytes that represent the nested component in the
|
|
294
|
+
/// original byte stream.
|
|
295
|
+
///
|
|
296
|
+
/// Note that, to better support streaming parsing and validation, the
|
|
297
|
+
/// validator does *not* check that this range is in bounds.
|
|
298
|
+
unchecked_range: Range<usize>,
|
|
299
|
+
},
|
|
300
|
+
/// A component instance section was received and the provided reader can be
|
|
301
|
+
/// used to parse the contents of the component instance section.
|
|
302
|
+
#[cfg(feature = "component-model")]
|
|
303
|
+
ComponentInstanceSection(ComponentInstanceSectionReader<'a>),
|
|
304
|
+
/// A component alias section was received and the provided reader can be
|
|
305
|
+
/// used to parse the contents of the component alias section.
|
|
306
|
+
#[cfg(feature = "component-model")]
|
|
307
|
+
ComponentAliasSection(SectionLimited<'a, crate::ComponentAlias<'a>>),
|
|
308
|
+
/// A component type section was received and the provided reader can be
|
|
309
|
+
/// used to parse the contents of the component type section.
|
|
310
|
+
#[cfg(feature = "component-model")]
|
|
311
|
+
ComponentTypeSection(ComponentTypeSectionReader<'a>),
|
|
312
|
+
/// A component canonical section was received and the provided reader can be
|
|
313
|
+
/// used to parse the contents of the component canonical section.
|
|
314
|
+
#[cfg(feature = "component-model")]
|
|
315
|
+
ComponentCanonicalSection(ComponentCanonicalSectionReader<'a>),
|
|
316
|
+
/// A component start section was received.
|
|
317
|
+
#[cfg(feature = "component-model")]
|
|
318
|
+
ComponentStartSection {
|
|
319
|
+
/// The start function description.
|
|
320
|
+
start: ComponentStartFunction,
|
|
321
|
+
/// The range of bytes that specify the `start` field.
|
|
322
|
+
range: Range<usize>,
|
|
323
|
+
},
|
|
324
|
+
/// A component import section was received and the provided reader can be
|
|
325
|
+
/// used to parse the contents of the component import section.
|
|
326
|
+
#[cfg(feature = "component-model")]
|
|
327
|
+
ComponentImportSection(ComponentImportSectionReader<'a>),
|
|
328
|
+
/// A component export section was received, and the provided reader can be
|
|
329
|
+
/// used to parse the contents of the component export section.
|
|
330
|
+
#[cfg(feature = "component-model")]
|
|
331
|
+
ComponentExportSection(ComponentExportSectionReader<'a>),
|
|
332
|
+
|
|
333
|
+
/// A module or component custom section was received.
|
|
334
|
+
CustomSection(CustomSectionReader<'a>),
|
|
335
|
+
|
|
336
|
+
/// An unknown section was found.
|
|
337
|
+
///
|
|
338
|
+
/// This variant is returned for all unknown sections encountered. This
|
|
339
|
+
/// likely wants to be interpreted as an error by consumers of the parser,
|
|
340
|
+
/// but this can also be used to parse sections currently unsupported by
|
|
341
|
+
/// the parser.
|
|
342
|
+
UnknownSection {
|
|
343
|
+
/// The 8-bit identifier for this section.
|
|
344
|
+
id: u8,
|
|
345
|
+
/// The contents of this section.
|
|
346
|
+
contents: &'a [u8],
|
|
347
|
+
/// The range of bytes, relative to the start of the original data
|
|
348
|
+
/// stream, that the contents of this section reside in.
|
|
349
|
+
range: Range<usize>,
|
|
350
|
+
},
|
|
351
|
+
|
|
352
|
+
/// The end of the WebAssembly module or component was reached.
|
|
353
|
+
///
|
|
354
|
+
/// The value is the offset in the input byte stream where the end
|
|
355
|
+
/// was reached.
|
|
356
|
+
End(usize),
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
const CUSTOM_SECTION: u8 = 0;
|
|
360
|
+
const TYPE_SECTION: u8 = 1;
|
|
361
|
+
const IMPORT_SECTION: u8 = 2;
|
|
362
|
+
const FUNCTION_SECTION: u8 = 3;
|
|
363
|
+
const TABLE_SECTION: u8 = 4;
|
|
364
|
+
const MEMORY_SECTION: u8 = 5;
|
|
365
|
+
const GLOBAL_SECTION: u8 = 6;
|
|
366
|
+
const EXPORT_SECTION: u8 = 7;
|
|
367
|
+
const START_SECTION: u8 = 8;
|
|
368
|
+
const ELEMENT_SECTION: u8 = 9;
|
|
369
|
+
const CODE_SECTION: u8 = 10;
|
|
370
|
+
const DATA_SECTION: u8 = 11;
|
|
371
|
+
const DATA_COUNT_SECTION: u8 = 12;
|
|
372
|
+
const TAG_SECTION: u8 = 13;
|
|
373
|
+
|
|
374
|
+
#[cfg(feature = "component-model")]
|
|
375
|
+
const COMPONENT_MODULE_SECTION: u8 = 1;
|
|
376
|
+
#[cfg(feature = "component-model")]
|
|
377
|
+
const COMPONENT_CORE_INSTANCE_SECTION: u8 = 2;
|
|
378
|
+
#[cfg(feature = "component-model")]
|
|
379
|
+
const COMPONENT_CORE_TYPE_SECTION: u8 = 3;
|
|
380
|
+
#[cfg(feature = "component-model")]
|
|
381
|
+
const COMPONENT_SECTION: u8 = 4;
|
|
382
|
+
#[cfg(feature = "component-model")]
|
|
383
|
+
const COMPONENT_INSTANCE_SECTION: u8 = 5;
|
|
384
|
+
#[cfg(feature = "component-model")]
|
|
385
|
+
const COMPONENT_ALIAS_SECTION: u8 = 6;
|
|
386
|
+
#[cfg(feature = "component-model")]
|
|
387
|
+
const COMPONENT_TYPE_SECTION: u8 = 7;
|
|
388
|
+
#[cfg(feature = "component-model")]
|
|
389
|
+
const COMPONENT_CANONICAL_SECTION: u8 = 8;
|
|
390
|
+
#[cfg(feature = "component-model")]
|
|
391
|
+
const COMPONENT_START_SECTION: u8 = 9;
|
|
392
|
+
#[cfg(feature = "component-model")]
|
|
393
|
+
const COMPONENT_IMPORT_SECTION: u8 = 10;
|
|
394
|
+
#[cfg(feature = "component-model")]
|
|
395
|
+
const COMPONENT_EXPORT_SECTION: u8 = 11;
|
|
396
|
+
|
|
397
|
+
impl Parser {
|
|
398
|
+
/// Creates a new parser.
|
|
399
|
+
///
|
|
400
|
+
/// Reports errors and ranges relative to `offset` provided, where `offset`
|
|
401
|
+
/// is some logical offset within the input stream that we're parsing.
|
|
402
|
+
pub fn new(offset: u64) -> Parser {
|
|
403
|
+
Parser {
|
|
404
|
+
state: State::Header,
|
|
405
|
+
offset,
|
|
406
|
+
max_size: u64::MAX,
|
|
407
|
+
// Assume the encoding is a module until we know otherwise
|
|
408
|
+
encoding: Encoding::Module,
|
|
409
|
+
#[cfg(feature = "features")]
|
|
410
|
+
features: WasmFeatures::all(),
|
|
411
|
+
counts: ParserCounts::default(),
|
|
412
|
+
order: (Order::default(), offset),
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
/// Tests whether `bytes` looks like a core WebAssembly module.
|
|
417
|
+
///
|
|
418
|
+
/// This will inspect the first 8 bytes of `bytes` and return `true` if it
|
|
419
|
+
/// starts with the standard core WebAssembly header.
|
|
420
|
+
pub fn is_core_wasm(bytes: &[u8]) -> bool {
|
|
421
|
+
const HEADER: [u8; 8] = [
|
|
422
|
+
WASM_MAGIC_NUMBER[0],
|
|
423
|
+
WASM_MAGIC_NUMBER[1],
|
|
424
|
+
WASM_MAGIC_NUMBER[2],
|
|
425
|
+
WASM_MAGIC_NUMBER[3],
|
|
426
|
+
WASM_MODULE_VERSION.to_le_bytes()[0],
|
|
427
|
+
WASM_MODULE_VERSION.to_le_bytes()[1],
|
|
428
|
+
KIND_MODULE.to_le_bytes()[0],
|
|
429
|
+
KIND_MODULE.to_le_bytes()[1],
|
|
430
|
+
];
|
|
431
|
+
bytes.starts_with(&HEADER)
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
/// Tests whether `bytes` looks like a WebAssembly component.
|
|
435
|
+
///
|
|
436
|
+
/// This will inspect the first 8 bytes of `bytes` and return `true` if it
|
|
437
|
+
/// starts with the standard WebAssembly component header.
|
|
438
|
+
pub fn is_component(bytes: &[u8]) -> bool {
|
|
439
|
+
const HEADER: [u8; 8] = [
|
|
440
|
+
WASM_MAGIC_NUMBER[0],
|
|
441
|
+
WASM_MAGIC_NUMBER[1],
|
|
442
|
+
WASM_MAGIC_NUMBER[2],
|
|
443
|
+
WASM_MAGIC_NUMBER[3],
|
|
444
|
+
WASM_COMPONENT_VERSION.to_le_bytes()[0],
|
|
445
|
+
WASM_COMPONENT_VERSION.to_le_bytes()[1],
|
|
446
|
+
KIND_COMPONENT.to_le_bytes()[0],
|
|
447
|
+
KIND_COMPONENT.to_le_bytes()[1],
|
|
448
|
+
];
|
|
449
|
+
bytes.starts_with(&HEADER)
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
/// Returns the currently active set of wasm features that this parser is
|
|
453
|
+
/// using while parsing.
|
|
454
|
+
///
|
|
455
|
+
/// The default set of features is [`WasmFeatures::all()`] for new parsers.
|
|
456
|
+
///
|
|
457
|
+
/// For more information see [`BinaryReader::new`].
|
|
458
|
+
#[cfg(feature = "features")]
|
|
459
|
+
pub fn features(&self) -> WasmFeatures {
|
|
460
|
+
self.features
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
/// Sets the wasm features active while parsing to the `features` specified.
|
|
464
|
+
///
|
|
465
|
+
/// The default set of features is [`WasmFeatures::all()`] for new parsers.
|
|
466
|
+
///
|
|
467
|
+
/// For more information see [`BinaryReader::new`].
|
|
468
|
+
#[cfg(feature = "features")]
|
|
469
|
+
pub fn set_features(&mut self, features: WasmFeatures) {
|
|
470
|
+
self.features = features;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
/// Returns the original offset that this parser is currently at.
|
|
474
|
+
pub fn offset(&self) -> u64 {
|
|
475
|
+
self.offset
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
/// Attempts to parse a chunk of data.
|
|
479
|
+
///
|
|
480
|
+
/// This method will attempt to parse the next incremental portion of a
|
|
481
|
+
/// WebAssembly binary. Data available for the module or component is
|
|
482
|
+
/// provided as `data`, and the data can be incomplete if more data has yet
|
|
483
|
+
/// to arrive. The `eof` flag indicates whether more data will ever be received.
|
|
484
|
+
///
|
|
485
|
+
/// There are two ways parsing can succeed with this method:
|
|
486
|
+
///
|
|
487
|
+
/// * `Chunk::NeedMoreData` - this indicates that there is not enough bytes
|
|
488
|
+
/// in `data` to parse a payload. The caller needs to wait for more data to
|
|
489
|
+
/// be available in this situation before calling this method again. It is
|
|
490
|
+
/// guaranteed that this is only returned if `eof` is `false`.
|
|
491
|
+
///
|
|
492
|
+
/// * `Chunk::Parsed` - this indicates that a chunk of the input was
|
|
493
|
+
/// successfully parsed. The payload is available in this variant of what
|
|
494
|
+
/// was parsed, and this also indicates how many bytes of `data` was
|
|
495
|
+
/// consumed. It's expected that the caller will not provide these bytes
|
|
496
|
+
/// back to the [`Parser`] again.
|
|
497
|
+
///
|
|
498
|
+
/// Note that all `Chunk` return values are connected, with a lifetime, to
|
|
499
|
+
/// the input buffer. Each parsed chunk borrows the input buffer and is a
|
|
500
|
+
/// view into it for successfully parsed chunks.
|
|
501
|
+
///
|
|
502
|
+
/// It is expected that you'll call this method until `Payload::End` is
|
|
503
|
+
/// reached, at which point you're guaranteed that the parse has completed.
|
|
504
|
+
/// Note that complete parsing, for the top-level module or component,
|
|
505
|
+
/// implies that `data` is empty and `eof` is `true`.
|
|
506
|
+
///
|
|
507
|
+
/// # Errors
|
|
508
|
+
///
|
|
509
|
+
/// Parse errors are returned as an `Err`. Errors can happen when the
|
|
510
|
+
/// structure of the data is unexpected or if sections are too large for
|
|
511
|
+
/// example. Note that errors are not returned for malformed *contents* of
|
|
512
|
+
/// sections here. Sections are generally not individually parsed and each
|
|
513
|
+
/// returned [`Payload`] needs to be iterated over further to detect all
|
|
514
|
+
/// errors.
|
|
515
|
+
///
|
|
516
|
+
/// # Examples
|
|
517
|
+
///
|
|
518
|
+
/// An example of reading a wasm file from a stream (`std::io::Read`) and
|
|
519
|
+
/// incrementally parsing it.
|
|
520
|
+
///
|
|
521
|
+
/// ```
|
|
522
|
+
/// use std::io::Read;
|
|
523
|
+
/// use anyhow::Result;
|
|
524
|
+
/// use wasmparser::{Parser, Chunk, Payload::*};
|
|
525
|
+
///
|
|
526
|
+
/// fn parse(mut reader: impl Read) -> Result<()> {
|
|
527
|
+
/// let mut buf = Vec::new();
|
|
528
|
+
/// let mut cur = Parser::new(0);
|
|
529
|
+
/// let mut eof = false;
|
|
530
|
+
/// let mut stack = Vec::new();
|
|
531
|
+
///
|
|
532
|
+
/// loop {
|
|
533
|
+
/// let (payload, consumed) = match cur.parse(&buf, eof)? {
|
|
534
|
+
/// Chunk::NeedMoreData(hint) => {
|
|
535
|
+
/// assert!(!eof); // otherwise an error would be returned
|
|
536
|
+
///
|
|
537
|
+
/// // Use the hint to preallocate more space, then read
|
|
538
|
+
/// // some more data into our buffer.
|
|
539
|
+
/// //
|
|
540
|
+
/// // Note that the buffer management here is not ideal,
|
|
541
|
+
/// // but it's compact enough to fit in an example!
|
|
542
|
+
/// let len = buf.len();
|
|
543
|
+
/// buf.extend((0..hint).map(|_| 0u8));
|
|
544
|
+
/// let n = reader.read(&mut buf[len..])?;
|
|
545
|
+
/// buf.truncate(len + n);
|
|
546
|
+
/// eof = n == 0;
|
|
547
|
+
/// continue;
|
|
548
|
+
/// }
|
|
549
|
+
///
|
|
550
|
+
/// Chunk::Parsed { consumed, payload } => (payload, consumed),
|
|
551
|
+
/// };
|
|
552
|
+
///
|
|
553
|
+
/// match payload {
|
|
554
|
+
/// // Sections for WebAssembly modules
|
|
555
|
+
/// Version { .. } => { /* ... */ }
|
|
556
|
+
/// TypeSection(_) => { /* ... */ }
|
|
557
|
+
/// ImportSection(_) => { /* ... */ }
|
|
558
|
+
/// FunctionSection(_) => { /* ... */ }
|
|
559
|
+
/// TableSection(_) => { /* ... */ }
|
|
560
|
+
/// MemorySection(_) => { /* ... */ }
|
|
561
|
+
/// TagSection(_) => { /* ... */ }
|
|
562
|
+
/// GlobalSection(_) => { /* ... */ }
|
|
563
|
+
/// ExportSection(_) => { /* ... */ }
|
|
564
|
+
/// StartSection { .. } => { /* ... */ }
|
|
565
|
+
/// ElementSection(_) => { /* ... */ }
|
|
566
|
+
/// DataCountSection { .. } => { /* ... */ }
|
|
567
|
+
/// DataSection(_) => { /* ... */ }
|
|
568
|
+
///
|
|
569
|
+
/// // Here we know how many functions we'll be receiving as
|
|
570
|
+
/// // `CodeSectionEntry`, so we can prepare for that, and
|
|
571
|
+
/// // afterwards we can parse and handle each function
|
|
572
|
+
/// // individually.
|
|
573
|
+
/// CodeSectionStart { .. } => { /* ... */ }
|
|
574
|
+
/// CodeSectionEntry(body) => {
|
|
575
|
+
/// // here we can iterate over `body` to parse the function
|
|
576
|
+
/// // and its locals
|
|
577
|
+
/// }
|
|
578
|
+
///
|
|
579
|
+
/// // Sections for WebAssembly components
|
|
580
|
+
/// InstanceSection(_) => { /* ... */ }
|
|
581
|
+
/// CoreTypeSection(_) => { /* ... */ }
|
|
582
|
+
/// ComponentInstanceSection(_) => { /* ... */ }
|
|
583
|
+
/// ComponentAliasSection(_) => { /* ... */ }
|
|
584
|
+
/// ComponentTypeSection(_) => { /* ... */ }
|
|
585
|
+
/// ComponentCanonicalSection(_) => { /* ... */ }
|
|
586
|
+
/// ComponentStartSection { .. } => { /* ... */ }
|
|
587
|
+
/// ComponentImportSection(_) => { /* ... */ }
|
|
588
|
+
/// ComponentExportSection(_) => { /* ... */ }
|
|
589
|
+
///
|
|
590
|
+
/// ModuleSection { parser, .. }
|
|
591
|
+
/// | ComponentSection { parser, .. } => {
|
|
592
|
+
/// stack.push(cur.clone());
|
|
593
|
+
/// cur = parser.clone();
|
|
594
|
+
/// }
|
|
595
|
+
///
|
|
596
|
+
/// CustomSection(_) => { /* ... */ }
|
|
597
|
+
///
|
|
598
|
+
/// // Once we've reached the end of a parser we either resume
|
|
599
|
+
/// // at the parent parser or we break out of the loop because
|
|
600
|
+
/// // we're done.
|
|
601
|
+
/// End(_) => {
|
|
602
|
+
/// if let Some(parent_parser) = stack.pop() {
|
|
603
|
+
/// cur = parent_parser;
|
|
604
|
+
/// } else {
|
|
605
|
+
/// break;
|
|
606
|
+
/// }
|
|
607
|
+
/// }
|
|
608
|
+
///
|
|
609
|
+
/// // most likely you'd return an error here
|
|
610
|
+
/// _ => { /* ... */ }
|
|
611
|
+
/// }
|
|
612
|
+
///
|
|
613
|
+
/// // once we're done processing the payload we can forget the
|
|
614
|
+
/// // original.
|
|
615
|
+
/// buf.drain(..consumed);
|
|
616
|
+
/// }
|
|
617
|
+
///
|
|
618
|
+
/// Ok(())
|
|
619
|
+
/// }
|
|
620
|
+
///
|
|
621
|
+
/// # parse(&b"\0asm\x01\0\0\0"[..]).unwrap();
|
|
622
|
+
/// ```
|
|
623
|
+
pub fn parse<'a>(&mut self, data: &'a [u8], eof: bool) -> Result<Chunk<'a>> {
|
|
624
|
+
let (data, eof) = if usize_to_u64(data.len()) > self.max_size {
|
|
625
|
+
(&data[..(self.max_size as usize)], true)
|
|
626
|
+
} else {
|
|
627
|
+
(data, eof)
|
|
628
|
+
};
|
|
629
|
+
// TODO: thread through `offset: u64` to `BinaryReader`, remove
|
|
630
|
+
// the cast here.
|
|
631
|
+
let starting_offset = self.offset as usize;
|
|
632
|
+
let mut reader = BinaryReader::new(data, starting_offset);
|
|
633
|
+
#[cfg(feature = "features")]
|
|
634
|
+
{
|
|
635
|
+
reader.set_features(self.features);
|
|
636
|
+
}
|
|
637
|
+
match self.parse_reader(&mut reader, eof) {
|
|
638
|
+
Ok(payload) => {
|
|
639
|
+
// Be sure to update our offset with how far we got in the
|
|
640
|
+
// reader
|
|
641
|
+
let consumed = reader.original_position() - starting_offset;
|
|
642
|
+
self.offset += usize_to_u64(consumed);
|
|
643
|
+
self.max_size -= usize_to_u64(consumed);
|
|
644
|
+
Ok(Chunk::Parsed {
|
|
645
|
+
consumed: consumed,
|
|
646
|
+
payload,
|
|
647
|
+
})
|
|
648
|
+
}
|
|
649
|
+
Err(e) => {
|
|
650
|
+
// If we're at EOF then there's no way we can recover from any
|
|
651
|
+
// error, so continue to propagate it.
|
|
652
|
+
if eof {
|
|
653
|
+
return Err(e);
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
// If our error doesn't look like it can be resolved with more
|
|
657
|
+
// data being pulled down, then propagate it, otherwise switch
|
|
658
|
+
// the error to "feed me please"
|
|
659
|
+
match e.inner.needed_hint {
|
|
660
|
+
Some(hint) => Ok(Chunk::NeedMoreData(usize_to_u64(hint))),
|
|
661
|
+
None => Err(e),
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
fn update_order(&mut self, order: Order, pos: usize) -> Result<()> {
|
|
668
|
+
let pos_u64 = usize_to_u64(pos);
|
|
669
|
+
if self.encoding == Encoding::Module {
|
|
670
|
+
match self.order {
|
|
671
|
+
(last_order, last_pos) if last_order >= order && last_pos < pos_u64 => {
|
|
672
|
+
bail!(pos, "section out of order")
|
|
673
|
+
}
|
|
674
|
+
_ => (),
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
self.order = (order, pos_u64);
|
|
679
|
+
|
|
680
|
+
Ok(())
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
fn parse_reader<'a>(
|
|
684
|
+
&mut self,
|
|
685
|
+
reader: &mut BinaryReader<'a>,
|
|
686
|
+
eof: bool,
|
|
687
|
+
) -> Result<Payload<'a>> {
|
|
688
|
+
use Payload::*;
|
|
689
|
+
|
|
690
|
+
match self.state {
|
|
691
|
+
State::Header => {
|
|
692
|
+
let start = reader.original_position();
|
|
693
|
+
let header_version = reader.read_header_version()?;
|
|
694
|
+
let num = header_version as u16;
|
|
695
|
+
self.encoding = match (num, (header_version >> 16) as u16) {
|
|
696
|
+
(WASM_MODULE_VERSION, KIND_MODULE) => Encoding::Module,
|
|
697
|
+
(WASM_COMPONENT_VERSION, KIND_COMPONENT) => Encoding::Component,
|
|
698
|
+
_ => bail!(start + 4, "unknown binary version: {header_version:#10x}"),
|
|
699
|
+
};
|
|
700
|
+
self.state = State::SectionStart;
|
|
701
|
+
Ok(Version {
|
|
702
|
+
num,
|
|
703
|
+
encoding: self.encoding,
|
|
704
|
+
range: start..reader.original_position(),
|
|
705
|
+
})
|
|
706
|
+
}
|
|
707
|
+
State::SectionStart => {
|
|
708
|
+
// If we're at eof and there are no bytes in our buffer, then
|
|
709
|
+
// that means we reached the end of the data since it's
|
|
710
|
+
// just a bunch of sections concatenated after the header.
|
|
711
|
+
if eof && reader.bytes_remaining() == 0 {
|
|
712
|
+
self.check_function_code_counts(reader.original_position())?;
|
|
713
|
+
self.check_data_count(reader.original_position())?;
|
|
714
|
+
return Ok(Payload::End(reader.original_position()));
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
// Corrupted binaries containing multiple modules or
|
|
718
|
+
// components will fail because a section can never start with
|
|
719
|
+
// the magic number: 0 is custom section, 'a' is section len
|
|
720
|
+
// of 97, `s` is section name string len of 115, at which
|
|
721
|
+
// point validation will fail because name string is bigger
|
|
722
|
+
// than section. Report a better error instead:
|
|
723
|
+
match reader.peek_bytes(4) {
|
|
724
|
+
Ok(peek) if peek == WASM_MAGIC_NUMBER => {
|
|
725
|
+
return Err(BinaryReaderError::new(
|
|
726
|
+
"expected section, got wasm magic number",
|
|
727
|
+
reader.original_position(),
|
|
728
|
+
));
|
|
729
|
+
}
|
|
730
|
+
_ => {}
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
let id_pos = reader.original_position();
|
|
734
|
+
let id = reader.read_u8()?;
|
|
735
|
+
if id & 0x80 != 0 {
|
|
736
|
+
return Err(BinaryReaderError::new("malformed section id", id_pos));
|
|
737
|
+
}
|
|
738
|
+
let len_pos = reader.original_position();
|
|
739
|
+
let mut len = reader.read_var_u32()?;
|
|
740
|
+
|
|
741
|
+
// Test to make sure that this section actually fits within
|
|
742
|
+
// `Parser::max_size`. This doesn't matter for top-level modules
|
|
743
|
+
// but it is required for nested modules/components to correctly ensure
|
|
744
|
+
// that all sections live entirely within their section of the
|
|
745
|
+
// file.
|
|
746
|
+
let consumed = reader.original_position() - id_pos;
|
|
747
|
+
let section_overflow = self
|
|
748
|
+
.max_size
|
|
749
|
+
.checked_sub(usize_to_u64(consumed))
|
|
750
|
+
.and_then(|s| s.checked_sub(len.into()))
|
|
751
|
+
.is_none();
|
|
752
|
+
if section_overflow {
|
|
753
|
+
return Err(BinaryReaderError::new("section too large", len_pos));
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
match (self.encoding, id) {
|
|
757
|
+
// Custom sections for both modules and components.
|
|
758
|
+
(_, 0) => section(reader, len, CustomSectionReader::new, CustomSection),
|
|
759
|
+
|
|
760
|
+
// Module sections
|
|
761
|
+
(Encoding::Module, TYPE_SECTION) => {
|
|
762
|
+
self.update_order(Order::Type, reader.original_position())?;
|
|
763
|
+
section(reader, len, TypeSectionReader::new, TypeSection)
|
|
764
|
+
}
|
|
765
|
+
(Encoding::Module, IMPORT_SECTION) => {
|
|
766
|
+
self.update_order(Order::Import, reader.original_position())?;
|
|
767
|
+
section(reader, len, ImportSectionReader::new, ImportSection)
|
|
768
|
+
}
|
|
769
|
+
(Encoding::Module, FUNCTION_SECTION) => {
|
|
770
|
+
self.update_order(Order::Function, reader.original_position())?;
|
|
771
|
+
let s = section(reader, len, FunctionSectionReader::new, FunctionSection)?;
|
|
772
|
+
match &s {
|
|
773
|
+
FunctionSection(f) => self.counts.function_entries = Some(f.count()),
|
|
774
|
+
_ => unreachable!(),
|
|
775
|
+
}
|
|
776
|
+
Ok(s)
|
|
777
|
+
}
|
|
778
|
+
(Encoding::Module, TABLE_SECTION) => {
|
|
779
|
+
self.update_order(Order::Table, reader.original_position())?;
|
|
780
|
+
section(reader, len, TableSectionReader::new, TableSection)
|
|
781
|
+
}
|
|
782
|
+
(Encoding::Module, MEMORY_SECTION) => {
|
|
783
|
+
self.update_order(Order::Memory, reader.original_position())?;
|
|
784
|
+
section(reader, len, MemorySectionReader::new, MemorySection)
|
|
785
|
+
}
|
|
786
|
+
(Encoding::Module, GLOBAL_SECTION) => {
|
|
787
|
+
self.update_order(Order::Global, reader.original_position())?;
|
|
788
|
+
section(reader, len, GlobalSectionReader::new, GlobalSection)
|
|
789
|
+
}
|
|
790
|
+
(Encoding::Module, EXPORT_SECTION) => {
|
|
791
|
+
self.update_order(Order::Export, reader.original_position())?;
|
|
792
|
+
section(reader, len, ExportSectionReader::new, ExportSection)
|
|
793
|
+
}
|
|
794
|
+
(Encoding::Module, START_SECTION) => {
|
|
795
|
+
self.update_order(Order::Start, reader.original_position())?;
|
|
796
|
+
let (func, range) = single_item(reader, len, "start")?;
|
|
797
|
+
Ok(StartSection { func, range })
|
|
798
|
+
}
|
|
799
|
+
(Encoding::Module, ELEMENT_SECTION) => {
|
|
800
|
+
self.update_order(Order::Element, reader.original_position())?;
|
|
801
|
+
section(reader, len, ElementSectionReader::new, ElementSection)
|
|
802
|
+
}
|
|
803
|
+
(Encoding::Module, CODE_SECTION) => {
|
|
804
|
+
self.update_order(Order::Code, reader.original_position())?;
|
|
805
|
+
let start = reader.original_position();
|
|
806
|
+
let count = delimited(reader, &mut len, |r| r.read_var_u32())?;
|
|
807
|
+
self.counts.code_entries = Some(count);
|
|
808
|
+
self.check_function_code_counts(start)?;
|
|
809
|
+
let range = start..reader.original_position() + len as usize;
|
|
810
|
+
self.state = State::FunctionBody {
|
|
811
|
+
remaining: count,
|
|
812
|
+
len,
|
|
813
|
+
};
|
|
814
|
+
Ok(CodeSectionStart {
|
|
815
|
+
count,
|
|
816
|
+
range,
|
|
817
|
+
size: len,
|
|
818
|
+
})
|
|
819
|
+
}
|
|
820
|
+
(Encoding::Module, DATA_SECTION) => {
|
|
821
|
+
self.update_order(Order::Data, reader.original_position())?;
|
|
822
|
+
let s = section(reader, len, DataSectionReader::new, DataSection)?;
|
|
823
|
+
match &s {
|
|
824
|
+
DataSection(d) => self.counts.data_entries = Some(d.count()),
|
|
825
|
+
_ => unreachable!(),
|
|
826
|
+
}
|
|
827
|
+
self.check_data_count(reader.original_position())?;
|
|
828
|
+
Ok(s)
|
|
829
|
+
}
|
|
830
|
+
(Encoding::Module, DATA_COUNT_SECTION) => {
|
|
831
|
+
self.update_order(Order::DataCount, reader.original_position())?;
|
|
832
|
+
let (count, range) = single_item(reader, len, "data count")?;
|
|
833
|
+
self.counts.data_count = Some(count);
|
|
834
|
+
Ok(DataCountSection { count, range })
|
|
835
|
+
}
|
|
836
|
+
(Encoding::Module, TAG_SECTION) => {
|
|
837
|
+
self.update_order(Order::Tag, reader.original_position())?;
|
|
838
|
+
section(reader, len, TagSectionReader::new, TagSection)
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
// Component sections
|
|
842
|
+
#[cfg(feature = "component-model")]
|
|
843
|
+
(Encoding::Component, COMPONENT_MODULE_SECTION)
|
|
844
|
+
| (Encoding::Component, COMPONENT_SECTION) => {
|
|
845
|
+
if len as usize > MAX_WASM_MODULE_SIZE {
|
|
846
|
+
bail!(
|
|
847
|
+
len_pos,
|
|
848
|
+
"{} section is too large",
|
|
849
|
+
if id == 1 { "module" } else { "component " }
|
|
850
|
+
);
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
let range = reader.original_position()
|
|
854
|
+
..reader.original_position() + usize::try_from(len).unwrap();
|
|
855
|
+
self.max_size -= u64::from(len);
|
|
856
|
+
self.offset += u64::from(len);
|
|
857
|
+
let mut parser = Parser::new(usize_to_u64(reader.original_position()));
|
|
858
|
+
#[cfg(feature = "features")]
|
|
859
|
+
{
|
|
860
|
+
parser.features = self.features;
|
|
861
|
+
}
|
|
862
|
+
parser.max_size = u64::from(len);
|
|
863
|
+
|
|
864
|
+
Ok(match id {
|
|
865
|
+
1 => ModuleSection {
|
|
866
|
+
parser,
|
|
867
|
+
unchecked_range: range,
|
|
868
|
+
},
|
|
869
|
+
4 => ComponentSection {
|
|
870
|
+
parser,
|
|
871
|
+
unchecked_range: range,
|
|
872
|
+
},
|
|
873
|
+
_ => unreachable!(),
|
|
874
|
+
})
|
|
875
|
+
}
|
|
876
|
+
#[cfg(feature = "component-model")]
|
|
877
|
+
(Encoding::Component, COMPONENT_CORE_INSTANCE_SECTION) => {
|
|
878
|
+
section(reader, len, InstanceSectionReader::new, InstanceSection)
|
|
879
|
+
}
|
|
880
|
+
#[cfg(feature = "component-model")]
|
|
881
|
+
(Encoding::Component, COMPONENT_CORE_TYPE_SECTION) => {
|
|
882
|
+
section(reader, len, CoreTypeSectionReader::new, CoreTypeSection)
|
|
883
|
+
}
|
|
884
|
+
#[cfg(feature = "component-model")]
|
|
885
|
+
(Encoding::Component, COMPONENT_INSTANCE_SECTION) => section(
|
|
886
|
+
reader,
|
|
887
|
+
len,
|
|
888
|
+
ComponentInstanceSectionReader::new,
|
|
889
|
+
ComponentInstanceSection,
|
|
890
|
+
),
|
|
891
|
+
#[cfg(feature = "component-model")]
|
|
892
|
+
(Encoding::Component, COMPONENT_ALIAS_SECTION) => {
|
|
893
|
+
section(reader, len, SectionLimited::new, ComponentAliasSection)
|
|
894
|
+
}
|
|
895
|
+
#[cfg(feature = "component-model")]
|
|
896
|
+
(Encoding::Component, COMPONENT_TYPE_SECTION) => section(
|
|
897
|
+
reader,
|
|
898
|
+
len,
|
|
899
|
+
ComponentTypeSectionReader::new,
|
|
900
|
+
ComponentTypeSection,
|
|
901
|
+
),
|
|
902
|
+
#[cfg(feature = "component-model")]
|
|
903
|
+
(Encoding::Component, COMPONENT_CANONICAL_SECTION) => section(
|
|
904
|
+
reader,
|
|
905
|
+
len,
|
|
906
|
+
ComponentCanonicalSectionReader::new,
|
|
907
|
+
ComponentCanonicalSection,
|
|
908
|
+
),
|
|
909
|
+
#[cfg(feature = "component-model")]
|
|
910
|
+
(Encoding::Component, COMPONENT_START_SECTION) => {
|
|
911
|
+
match self.counts.component_start_sections {
|
|
912
|
+
false => self.counts.component_start_sections = true,
|
|
913
|
+
true => {
|
|
914
|
+
bail!(
|
|
915
|
+
reader.original_position(),
|
|
916
|
+
"component cannot have more than one start function"
|
|
917
|
+
)
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
let (start, range) = single_item(reader, len, "component start")?;
|
|
921
|
+
Ok(ComponentStartSection { start, range })
|
|
922
|
+
}
|
|
923
|
+
#[cfg(feature = "component-model")]
|
|
924
|
+
(Encoding::Component, COMPONENT_IMPORT_SECTION) => section(
|
|
925
|
+
reader,
|
|
926
|
+
len,
|
|
927
|
+
ComponentImportSectionReader::new,
|
|
928
|
+
ComponentImportSection,
|
|
929
|
+
),
|
|
930
|
+
#[cfg(feature = "component-model")]
|
|
931
|
+
(Encoding::Component, COMPONENT_EXPORT_SECTION) => section(
|
|
932
|
+
reader,
|
|
933
|
+
len,
|
|
934
|
+
ComponentExportSectionReader::new,
|
|
935
|
+
ComponentExportSection,
|
|
936
|
+
),
|
|
937
|
+
(_, id) => {
|
|
938
|
+
let offset = reader.original_position();
|
|
939
|
+
let contents = reader.read_bytes(len as usize)?;
|
|
940
|
+
let range = offset..offset + len as usize;
|
|
941
|
+
Ok(UnknownSection {
|
|
942
|
+
id,
|
|
943
|
+
contents,
|
|
944
|
+
range,
|
|
945
|
+
})
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
// Once we hit 0 remaining incrementally parsed items, with 0
|
|
951
|
+
// remaining bytes in each section, we're done and can switch back
|
|
952
|
+
// to parsing sections.
|
|
953
|
+
State::FunctionBody {
|
|
954
|
+
remaining: 0,
|
|
955
|
+
len: 0,
|
|
956
|
+
} => {
|
|
957
|
+
self.state = State::SectionStart;
|
|
958
|
+
self.parse_reader(reader, eof)
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
// ... otherwise trailing bytes with no remaining entries in these
|
|
962
|
+
// sections indicates an error.
|
|
963
|
+
State::FunctionBody { remaining: 0, len } => {
|
|
964
|
+
debug_assert!(len > 0);
|
|
965
|
+
let offset = reader.original_position();
|
|
966
|
+
Err(BinaryReaderError::new(
|
|
967
|
+
"trailing bytes at end of section",
|
|
968
|
+
offset,
|
|
969
|
+
))
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
// Functions are relatively easy to parse when we know there's at
|
|
973
|
+
// least one remaining and at least one byte available to read
|
|
974
|
+
// things.
|
|
975
|
+
//
|
|
976
|
+
// We use the remaining length try to read a u32 size of the
|
|
977
|
+
// function, and using that size we require the entire function be
|
|
978
|
+
// resident in memory. This means that we're reading whole chunks of
|
|
979
|
+
// functions at a time.
|
|
980
|
+
//
|
|
981
|
+
// Limiting via `Parser::max_size` (nested parsing) happens above in
|
|
982
|
+
// `fn parse`, and limiting by our section size happens via
|
|
983
|
+
// `delimited`. Actual parsing of the function body is delegated to
|
|
984
|
+
// the caller to iterate over the `FunctionBody` structure.
|
|
985
|
+
State::FunctionBody { remaining, mut len } => {
|
|
986
|
+
let body = delimited(reader, &mut len, |r| {
|
|
987
|
+
Ok(FunctionBody::new(r.read_reader()?))
|
|
988
|
+
})?;
|
|
989
|
+
self.state = State::FunctionBody {
|
|
990
|
+
remaining: remaining - 1,
|
|
991
|
+
len,
|
|
992
|
+
};
|
|
993
|
+
Ok(CodeSectionEntry(body))
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
/// Convenience function that can be used to parse a module or component
|
|
999
|
+
/// that is entirely resident in memory.
|
|
1000
|
+
///
|
|
1001
|
+
/// This function will parse the `data` provided as a WebAssembly module
|
|
1002
|
+
/// or component.
|
|
1003
|
+
///
|
|
1004
|
+
/// Note that when this function yields sections that provide parsers,
|
|
1005
|
+
/// no further action is required for those sections as payloads from
|
|
1006
|
+
/// those parsers will be automatically returned.
|
|
1007
|
+
///
|
|
1008
|
+
/// # Examples
|
|
1009
|
+
///
|
|
1010
|
+
/// An example of reading a wasm file from a stream (`std::io::Read`) into
|
|
1011
|
+
/// a buffer and then parsing it.
|
|
1012
|
+
///
|
|
1013
|
+
/// ```
|
|
1014
|
+
/// use std::io::Read;
|
|
1015
|
+
/// use anyhow::Result;
|
|
1016
|
+
/// use wasmparser::{Parser, Chunk, Payload::*};
|
|
1017
|
+
///
|
|
1018
|
+
/// fn parse(mut reader: impl Read) -> Result<()> {
|
|
1019
|
+
/// let mut buf = Vec::new();
|
|
1020
|
+
/// reader.read_to_end(&mut buf)?;
|
|
1021
|
+
/// let parser = Parser::new(0);
|
|
1022
|
+
///
|
|
1023
|
+
/// for payload in parser.parse_all(&buf) {
|
|
1024
|
+
/// match payload? {
|
|
1025
|
+
/// // Sections for WebAssembly modules
|
|
1026
|
+
/// Version { .. } => { /* ... */ }
|
|
1027
|
+
/// TypeSection(_) => { /* ... */ }
|
|
1028
|
+
/// ImportSection(_) => { /* ... */ }
|
|
1029
|
+
/// FunctionSection(_) => { /* ... */ }
|
|
1030
|
+
/// TableSection(_) => { /* ... */ }
|
|
1031
|
+
/// MemorySection(_) => { /* ... */ }
|
|
1032
|
+
/// TagSection(_) => { /* ... */ }
|
|
1033
|
+
/// GlobalSection(_) => { /* ... */ }
|
|
1034
|
+
/// ExportSection(_) => { /* ... */ }
|
|
1035
|
+
/// StartSection { .. } => { /* ... */ }
|
|
1036
|
+
/// ElementSection(_) => { /* ... */ }
|
|
1037
|
+
/// DataCountSection { .. } => { /* ... */ }
|
|
1038
|
+
/// DataSection(_) => { /* ... */ }
|
|
1039
|
+
///
|
|
1040
|
+
/// // Here we know how many functions we'll be receiving as
|
|
1041
|
+
/// // `CodeSectionEntry`, so we can prepare for that, and
|
|
1042
|
+
/// // afterwards we can parse and handle each function
|
|
1043
|
+
/// // individually.
|
|
1044
|
+
/// CodeSectionStart { .. } => { /* ... */ }
|
|
1045
|
+
/// CodeSectionEntry(body) => {
|
|
1046
|
+
/// // here we can iterate over `body` to parse the function
|
|
1047
|
+
/// // and its locals
|
|
1048
|
+
/// }
|
|
1049
|
+
///
|
|
1050
|
+
/// // Sections for WebAssembly components
|
|
1051
|
+
/// ModuleSection { .. } => { /* ... */ }
|
|
1052
|
+
/// InstanceSection(_) => { /* ... */ }
|
|
1053
|
+
/// CoreTypeSection(_) => { /* ... */ }
|
|
1054
|
+
/// ComponentSection { .. } => { /* ... */ }
|
|
1055
|
+
/// ComponentInstanceSection(_) => { /* ... */ }
|
|
1056
|
+
/// ComponentAliasSection(_) => { /* ... */ }
|
|
1057
|
+
/// ComponentTypeSection(_) => { /* ... */ }
|
|
1058
|
+
/// ComponentCanonicalSection(_) => { /* ... */ }
|
|
1059
|
+
/// ComponentStartSection { .. } => { /* ... */ }
|
|
1060
|
+
/// ComponentImportSection(_) => { /* ... */ }
|
|
1061
|
+
/// ComponentExportSection(_) => { /* ... */ }
|
|
1062
|
+
///
|
|
1063
|
+
/// CustomSection(_) => { /* ... */ }
|
|
1064
|
+
///
|
|
1065
|
+
/// // Once we've reached the end of a parser we either resume
|
|
1066
|
+
/// // at the parent parser or the payload iterator is at its
|
|
1067
|
+
/// // end and we're done.
|
|
1068
|
+
/// End(_) => {}
|
|
1069
|
+
///
|
|
1070
|
+
/// // most likely you'd return an error here, but if you want
|
|
1071
|
+
/// // you can also inspect the raw contents of unknown sections
|
|
1072
|
+
/// other => {
|
|
1073
|
+
/// match other.as_section() {
|
|
1074
|
+
/// Some((id, range)) => { /* ... */ }
|
|
1075
|
+
/// None => { /* ... */ }
|
|
1076
|
+
/// }
|
|
1077
|
+
/// }
|
|
1078
|
+
/// }
|
|
1079
|
+
/// }
|
|
1080
|
+
///
|
|
1081
|
+
/// Ok(())
|
|
1082
|
+
/// }
|
|
1083
|
+
///
|
|
1084
|
+
/// # parse(&b"\0asm\x01\0\0\0"[..]).unwrap();
|
|
1085
|
+
/// ```
|
|
1086
|
+
pub fn parse_all(self, mut data: &[u8]) -> impl Iterator<Item = Result<Payload<'_>>> {
|
|
1087
|
+
let mut stack = Vec::new();
|
|
1088
|
+
let mut cur = self;
|
|
1089
|
+
let mut done = false;
|
|
1090
|
+
iter::from_fn(move || {
|
|
1091
|
+
if done {
|
|
1092
|
+
return None;
|
|
1093
|
+
}
|
|
1094
|
+
let payload = match cur.parse(data, true) {
|
|
1095
|
+
// Propagate all errors
|
|
1096
|
+
Err(e) => {
|
|
1097
|
+
done = true;
|
|
1098
|
+
return Some(Err(e));
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
// This isn't possible because `eof` is always true.
|
|
1102
|
+
Ok(Chunk::NeedMoreData(_)) => unreachable!(),
|
|
1103
|
+
|
|
1104
|
+
Ok(Chunk::Parsed { payload, consumed }) => {
|
|
1105
|
+
data = &data[consumed..];
|
|
1106
|
+
payload
|
|
1107
|
+
}
|
|
1108
|
+
};
|
|
1109
|
+
|
|
1110
|
+
match &payload {
|
|
1111
|
+
#[cfg(feature = "component-model")]
|
|
1112
|
+
Payload::ModuleSection { parser, .. }
|
|
1113
|
+
| Payload::ComponentSection { parser, .. } => {
|
|
1114
|
+
stack.push(cur.clone());
|
|
1115
|
+
cur = parser.clone();
|
|
1116
|
+
}
|
|
1117
|
+
Payload::End(_) => match stack.pop() {
|
|
1118
|
+
Some(p) => cur = p,
|
|
1119
|
+
None => done = true,
|
|
1120
|
+
},
|
|
1121
|
+
|
|
1122
|
+
_ => {}
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
Some(Ok(payload))
|
|
1126
|
+
})
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
/// Skip parsing the code section entirely.
|
|
1130
|
+
///
|
|
1131
|
+
/// This function can be used to indicate, after receiving
|
|
1132
|
+
/// `CodeSectionStart`, that the section will not be parsed.
|
|
1133
|
+
///
|
|
1134
|
+
/// The caller will be responsible for skipping `size` bytes (found in the
|
|
1135
|
+
/// `CodeSectionStart` payload). Bytes should only be fed into `parse`
|
|
1136
|
+
/// after the `size` bytes have been skipped.
|
|
1137
|
+
///
|
|
1138
|
+
/// # Panics
|
|
1139
|
+
///
|
|
1140
|
+
/// This function will panic if the parser is not in a state where it's
|
|
1141
|
+
/// parsing the code section.
|
|
1142
|
+
///
|
|
1143
|
+
/// # Examples
|
|
1144
|
+
///
|
|
1145
|
+
/// ```
|
|
1146
|
+
/// use wasmparser::{Result, Parser, Chunk, Payload::*};
|
|
1147
|
+
/// use core::ops::Range;
|
|
1148
|
+
///
|
|
1149
|
+
/// fn objdump_headers(mut wasm: &[u8]) -> Result<()> {
|
|
1150
|
+
/// let mut parser = Parser::new(0);
|
|
1151
|
+
/// loop {
|
|
1152
|
+
/// let payload = match parser.parse(wasm, true)? {
|
|
1153
|
+
/// Chunk::Parsed { consumed, payload } => {
|
|
1154
|
+
/// wasm = &wasm[consumed..];
|
|
1155
|
+
/// payload
|
|
1156
|
+
/// }
|
|
1157
|
+
/// // this state isn't possible with `eof = true`
|
|
1158
|
+
/// Chunk::NeedMoreData(_) => unreachable!(),
|
|
1159
|
+
/// };
|
|
1160
|
+
/// match payload {
|
|
1161
|
+
/// TypeSection(s) => print_range("type section", &s.range()),
|
|
1162
|
+
/// ImportSection(s) => print_range("import section", &s.range()),
|
|
1163
|
+
/// // .. other sections
|
|
1164
|
+
///
|
|
1165
|
+
/// // Print the range of the code section we see, but don't
|
|
1166
|
+
/// // actually iterate over each individual function.
|
|
1167
|
+
/// CodeSectionStart { range, size, .. } => {
|
|
1168
|
+
/// print_range("code section", &range);
|
|
1169
|
+
/// parser.skip_section();
|
|
1170
|
+
/// wasm = &wasm[size as usize..];
|
|
1171
|
+
/// }
|
|
1172
|
+
/// End(_) => break,
|
|
1173
|
+
/// _ => {}
|
|
1174
|
+
/// }
|
|
1175
|
+
/// }
|
|
1176
|
+
/// Ok(())
|
|
1177
|
+
/// }
|
|
1178
|
+
///
|
|
1179
|
+
/// fn print_range(section: &str, range: &Range<usize>) {
|
|
1180
|
+
/// println!("{:>40}: {:#010x} - {:#010x}", section, range.start, range.end);
|
|
1181
|
+
/// }
|
|
1182
|
+
/// ```
|
|
1183
|
+
pub fn skip_section(&mut self) {
|
|
1184
|
+
let skip = match self.state {
|
|
1185
|
+
State::FunctionBody { remaining: _, len } => len,
|
|
1186
|
+
_ => panic!("wrong state to call `skip_section`"),
|
|
1187
|
+
};
|
|
1188
|
+
self.offset += u64::from(skip);
|
|
1189
|
+
self.max_size -= u64::from(skip);
|
|
1190
|
+
self.state = State::SectionStart;
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
fn check_function_code_counts(&self, pos: usize) -> Result<()> {
|
|
1194
|
+
match (self.counts.function_entries, self.counts.code_entries) {
|
|
1195
|
+
(Some(n), Some(m)) if n != m => {
|
|
1196
|
+
bail!(pos, "function and code section have inconsistent lengths")
|
|
1197
|
+
}
|
|
1198
|
+
(Some(n), None) if n > 0 => bail!(
|
|
1199
|
+
pos,
|
|
1200
|
+
"function section has non-zero count but code section is absent"
|
|
1201
|
+
),
|
|
1202
|
+
(None, Some(m)) if m > 0 => bail!(
|
|
1203
|
+
pos,
|
|
1204
|
+
"function section is absent but code section has non-zero count"
|
|
1205
|
+
),
|
|
1206
|
+
_ => Ok(()),
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
fn check_data_count(&self, pos: usize) -> Result<()> {
|
|
1211
|
+
match (self.counts.data_count, self.counts.data_entries) {
|
|
1212
|
+
(Some(n), Some(m)) if n != m => {
|
|
1213
|
+
bail!(pos, "data count and data section have inconsistent lengths")
|
|
1214
|
+
}
|
|
1215
|
+
(Some(n), None) if n > 0 => {
|
|
1216
|
+
bail!(pos, "data count is non-zero but data section is absent")
|
|
1217
|
+
}
|
|
1218
|
+
_ => Ok(()),
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
fn usize_to_u64(a: usize) -> u64 {
|
|
1224
|
+
a.try_into().unwrap()
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
/// Parses an entire section resident in memory into a `Payload`.
|
|
1228
|
+
///
|
|
1229
|
+
/// Requires that `len` bytes are resident in `reader` and uses `ctor`/`variant`
|
|
1230
|
+
/// to construct the section to return.
|
|
1231
|
+
fn section<'a, T>(
|
|
1232
|
+
reader: &mut BinaryReader<'a>,
|
|
1233
|
+
len: u32,
|
|
1234
|
+
ctor: fn(BinaryReader<'a>) -> Result<T>,
|
|
1235
|
+
variant: fn(T) -> Payload<'a>,
|
|
1236
|
+
) -> Result<Payload<'a>> {
|
|
1237
|
+
let reader = reader.skip(|r| {
|
|
1238
|
+
r.read_bytes(len as usize)?;
|
|
1239
|
+
Ok(())
|
|
1240
|
+
})?;
|
|
1241
|
+
// clear the hint for "need this many more bytes" here because we already
|
|
1242
|
+
// read all the bytes, so it's not possible to read more bytes if this
|
|
1243
|
+
// fails.
|
|
1244
|
+
let reader = ctor(reader).map_err(clear_hint)?;
|
|
1245
|
+
Ok(variant(reader))
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
/// Reads a section that is represented by a single uleb-encoded `u32`.
|
|
1249
|
+
fn single_item<'a, T>(
|
|
1250
|
+
reader: &mut BinaryReader<'a>,
|
|
1251
|
+
len: u32,
|
|
1252
|
+
desc: &str,
|
|
1253
|
+
) -> Result<(T, Range<usize>)>
|
|
1254
|
+
where
|
|
1255
|
+
T: FromReader<'a>,
|
|
1256
|
+
{
|
|
1257
|
+
let range = reader.original_position()..reader.original_position() + len as usize;
|
|
1258
|
+
let mut content = reader.skip(|r| {
|
|
1259
|
+
r.read_bytes(len as usize)?;
|
|
1260
|
+
Ok(())
|
|
1261
|
+
})?;
|
|
1262
|
+
// We can't recover from "unexpected eof" here because our entire section is
|
|
1263
|
+
// already resident in memory, so clear the hint for how many more bytes are
|
|
1264
|
+
// expected.
|
|
1265
|
+
let ret = content.read().map_err(clear_hint)?;
|
|
1266
|
+
if !content.eof() {
|
|
1267
|
+
bail!(
|
|
1268
|
+
content.original_position(),
|
|
1269
|
+
"unexpected content in the {desc} section",
|
|
1270
|
+
);
|
|
1271
|
+
}
|
|
1272
|
+
Ok((ret, range))
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
/// Attempts to parse using `f`.
|
|
1276
|
+
///
|
|
1277
|
+
/// This will update `*len` with the number of bytes consumed, and it will cause
|
|
1278
|
+
/// a failure to be returned instead of the number of bytes consumed exceeds
|
|
1279
|
+
/// what `*len` currently is.
|
|
1280
|
+
fn delimited<'a, T>(
|
|
1281
|
+
reader: &mut BinaryReader<'a>,
|
|
1282
|
+
len: &mut u32,
|
|
1283
|
+
f: impl FnOnce(&mut BinaryReader<'a>) -> Result<T>,
|
|
1284
|
+
) -> Result<T> {
|
|
1285
|
+
let start = reader.original_position();
|
|
1286
|
+
let ret = f(reader)?;
|
|
1287
|
+
*len = match (reader.original_position() - start)
|
|
1288
|
+
.try_into()
|
|
1289
|
+
.ok()
|
|
1290
|
+
.and_then(|i| len.checked_sub(i))
|
|
1291
|
+
{
|
|
1292
|
+
Some(i) => i,
|
|
1293
|
+
None => return Err(BinaryReaderError::new("unexpected end-of-file", start)),
|
|
1294
|
+
};
|
|
1295
|
+
Ok(ret)
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
impl Default for Parser {
|
|
1299
|
+
fn default() -> Parser {
|
|
1300
|
+
Parser::new(0)
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
impl Payload<'_> {
|
|
1305
|
+
/// If this `Payload` represents a section in the original wasm module then
|
|
1306
|
+
/// the section's id and range within the original wasm binary are returned.
|
|
1307
|
+
///
|
|
1308
|
+
/// Not all payloads refer to entire sections, such as the `Version` and
|
|
1309
|
+
/// `CodeSectionEntry` variants. These variants will return `None` from this
|
|
1310
|
+
/// function.
|
|
1311
|
+
///
|
|
1312
|
+
/// Otherwise this function will return `Some` where the first element is
|
|
1313
|
+
/// the byte identifier for the section and the second element is the range
|
|
1314
|
+
/// of the contents of the section within the original wasm binary.
|
|
1315
|
+
///
|
|
1316
|
+
/// The purpose of this method is to enable tools to easily iterate over
|
|
1317
|
+
/// entire sections if necessary and handle sections uniformly, for example
|
|
1318
|
+
/// dropping custom sections while preserving all other sections.
|
|
1319
|
+
pub fn as_section(&self) -> Option<(u8, Range<usize>)> {
|
|
1320
|
+
use Payload::*;
|
|
1321
|
+
|
|
1322
|
+
match self {
|
|
1323
|
+
Version { .. } => None,
|
|
1324
|
+
TypeSection(s) => Some((TYPE_SECTION, s.range())),
|
|
1325
|
+
ImportSection(s) => Some((IMPORT_SECTION, s.range())),
|
|
1326
|
+
FunctionSection(s) => Some((FUNCTION_SECTION, s.range())),
|
|
1327
|
+
TableSection(s) => Some((TABLE_SECTION, s.range())),
|
|
1328
|
+
MemorySection(s) => Some((MEMORY_SECTION, s.range())),
|
|
1329
|
+
TagSection(s) => Some((TAG_SECTION, s.range())),
|
|
1330
|
+
GlobalSection(s) => Some((GLOBAL_SECTION, s.range())),
|
|
1331
|
+
ExportSection(s) => Some((EXPORT_SECTION, s.range())),
|
|
1332
|
+
ElementSection(s) => Some((ELEMENT_SECTION, s.range())),
|
|
1333
|
+
DataSection(s) => Some((DATA_SECTION, s.range())),
|
|
1334
|
+
StartSection { range, .. } => Some((START_SECTION, range.clone())),
|
|
1335
|
+
DataCountSection { range, .. } => Some((DATA_COUNT_SECTION, range.clone())),
|
|
1336
|
+
CodeSectionStart { range, .. } => Some((CODE_SECTION, range.clone())),
|
|
1337
|
+
CodeSectionEntry(_) => None,
|
|
1338
|
+
|
|
1339
|
+
#[cfg(feature = "component-model")]
|
|
1340
|
+
ModuleSection {
|
|
1341
|
+
unchecked_range: range,
|
|
1342
|
+
..
|
|
1343
|
+
} => Some((COMPONENT_MODULE_SECTION, range.clone())),
|
|
1344
|
+
#[cfg(feature = "component-model")]
|
|
1345
|
+
InstanceSection(s) => Some((COMPONENT_CORE_INSTANCE_SECTION, s.range())),
|
|
1346
|
+
#[cfg(feature = "component-model")]
|
|
1347
|
+
CoreTypeSection(s) => Some((COMPONENT_CORE_TYPE_SECTION, s.range())),
|
|
1348
|
+
#[cfg(feature = "component-model")]
|
|
1349
|
+
ComponentSection {
|
|
1350
|
+
unchecked_range: range,
|
|
1351
|
+
..
|
|
1352
|
+
} => Some((COMPONENT_SECTION, range.clone())),
|
|
1353
|
+
#[cfg(feature = "component-model")]
|
|
1354
|
+
ComponentInstanceSection(s) => Some((COMPONENT_INSTANCE_SECTION, s.range())),
|
|
1355
|
+
#[cfg(feature = "component-model")]
|
|
1356
|
+
ComponentAliasSection(s) => Some((COMPONENT_ALIAS_SECTION, s.range())),
|
|
1357
|
+
#[cfg(feature = "component-model")]
|
|
1358
|
+
ComponentTypeSection(s) => Some((COMPONENT_TYPE_SECTION, s.range())),
|
|
1359
|
+
#[cfg(feature = "component-model")]
|
|
1360
|
+
ComponentCanonicalSection(s) => Some((COMPONENT_CANONICAL_SECTION, s.range())),
|
|
1361
|
+
#[cfg(feature = "component-model")]
|
|
1362
|
+
ComponentStartSection { range, .. } => Some((COMPONENT_START_SECTION, range.clone())),
|
|
1363
|
+
#[cfg(feature = "component-model")]
|
|
1364
|
+
ComponentImportSection(s) => Some((COMPONENT_IMPORT_SECTION, s.range())),
|
|
1365
|
+
#[cfg(feature = "component-model")]
|
|
1366
|
+
ComponentExportSection(s) => Some((COMPONENT_EXPORT_SECTION, s.range())),
|
|
1367
|
+
|
|
1368
|
+
CustomSection(c) => Some((CUSTOM_SECTION, c.range())),
|
|
1369
|
+
|
|
1370
|
+
UnknownSection { id, range, .. } => Some((*id, range.clone())),
|
|
1371
|
+
|
|
1372
|
+
End(_) => None,
|
|
1373
|
+
}
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
impl fmt::Debug for Payload<'_> {
|
|
1378
|
+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
1379
|
+
use Payload::*;
|
|
1380
|
+
match self {
|
|
1381
|
+
Version {
|
|
1382
|
+
num,
|
|
1383
|
+
encoding,
|
|
1384
|
+
range,
|
|
1385
|
+
} => f
|
|
1386
|
+
.debug_struct("Version")
|
|
1387
|
+
.field("num", num)
|
|
1388
|
+
.field("encoding", encoding)
|
|
1389
|
+
.field("range", range)
|
|
1390
|
+
.finish(),
|
|
1391
|
+
|
|
1392
|
+
// Module sections
|
|
1393
|
+
TypeSection(_) => f.debug_tuple("TypeSection").field(&"...").finish(),
|
|
1394
|
+
ImportSection(_) => f.debug_tuple("ImportSection").field(&"...").finish(),
|
|
1395
|
+
FunctionSection(_) => f.debug_tuple("FunctionSection").field(&"...").finish(),
|
|
1396
|
+
TableSection(_) => f.debug_tuple("TableSection").field(&"...").finish(),
|
|
1397
|
+
MemorySection(_) => f.debug_tuple("MemorySection").field(&"...").finish(),
|
|
1398
|
+
TagSection(_) => f.debug_tuple("TagSection").field(&"...").finish(),
|
|
1399
|
+
GlobalSection(_) => f.debug_tuple("GlobalSection").field(&"...").finish(),
|
|
1400
|
+
ExportSection(_) => f.debug_tuple("ExportSection").field(&"...").finish(),
|
|
1401
|
+
ElementSection(_) => f.debug_tuple("ElementSection").field(&"...").finish(),
|
|
1402
|
+
DataSection(_) => f.debug_tuple("DataSection").field(&"...").finish(),
|
|
1403
|
+
StartSection { func, range } => f
|
|
1404
|
+
.debug_struct("StartSection")
|
|
1405
|
+
.field("func", func)
|
|
1406
|
+
.field("range", range)
|
|
1407
|
+
.finish(),
|
|
1408
|
+
DataCountSection { count, range } => f
|
|
1409
|
+
.debug_struct("DataCountSection")
|
|
1410
|
+
.field("count", count)
|
|
1411
|
+
.field("range", range)
|
|
1412
|
+
.finish(),
|
|
1413
|
+
CodeSectionStart { count, range, size } => f
|
|
1414
|
+
.debug_struct("CodeSectionStart")
|
|
1415
|
+
.field("count", count)
|
|
1416
|
+
.field("range", range)
|
|
1417
|
+
.field("size", size)
|
|
1418
|
+
.finish(),
|
|
1419
|
+
CodeSectionEntry(_) => f.debug_tuple("CodeSectionEntry").field(&"...").finish(),
|
|
1420
|
+
|
|
1421
|
+
// Component sections
|
|
1422
|
+
#[cfg(feature = "component-model")]
|
|
1423
|
+
ModuleSection {
|
|
1424
|
+
parser: _,
|
|
1425
|
+
unchecked_range: range,
|
|
1426
|
+
} => f
|
|
1427
|
+
.debug_struct("ModuleSection")
|
|
1428
|
+
.field("range", range)
|
|
1429
|
+
.finish(),
|
|
1430
|
+
#[cfg(feature = "component-model")]
|
|
1431
|
+
InstanceSection(_) => f.debug_tuple("InstanceSection").field(&"...").finish(),
|
|
1432
|
+
#[cfg(feature = "component-model")]
|
|
1433
|
+
CoreTypeSection(_) => f.debug_tuple("CoreTypeSection").field(&"...").finish(),
|
|
1434
|
+
#[cfg(feature = "component-model")]
|
|
1435
|
+
ComponentSection {
|
|
1436
|
+
parser: _,
|
|
1437
|
+
unchecked_range: range,
|
|
1438
|
+
} => f
|
|
1439
|
+
.debug_struct("ComponentSection")
|
|
1440
|
+
.field("range", range)
|
|
1441
|
+
.finish(),
|
|
1442
|
+
#[cfg(feature = "component-model")]
|
|
1443
|
+
ComponentInstanceSection(_) => f
|
|
1444
|
+
.debug_tuple("ComponentInstanceSection")
|
|
1445
|
+
.field(&"...")
|
|
1446
|
+
.finish(),
|
|
1447
|
+
#[cfg(feature = "component-model")]
|
|
1448
|
+
ComponentAliasSection(_) => f
|
|
1449
|
+
.debug_tuple("ComponentAliasSection")
|
|
1450
|
+
.field(&"...")
|
|
1451
|
+
.finish(),
|
|
1452
|
+
#[cfg(feature = "component-model")]
|
|
1453
|
+
ComponentTypeSection(_) => f.debug_tuple("ComponentTypeSection").field(&"...").finish(),
|
|
1454
|
+
#[cfg(feature = "component-model")]
|
|
1455
|
+
ComponentCanonicalSection(_) => f
|
|
1456
|
+
.debug_tuple("ComponentCanonicalSection")
|
|
1457
|
+
.field(&"...")
|
|
1458
|
+
.finish(),
|
|
1459
|
+
#[cfg(feature = "component-model")]
|
|
1460
|
+
ComponentStartSection { .. } => f
|
|
1461
|
+
.debug_tuple("ComponentStartSection")
|
|
1462
|
+
.field(&"...")
|
|
1463
|
+
.finish(),
|
|
1464
|
+
#[cfg(feature = "component-model")]
|
|
1465
|
+
ComponentImportSection(_) => f
|
|
1466
|
+
.debug_tuple("ComponentImportSection")
|
|
1467
|
+
.field(&"...")
|
|
1468
|
+
.finish(),
|
|
1469
|
+
#[cfg(feature = "component-model")]
|
|
1470
|
+
ComponentExportSection(_) => f
|
|
1471
|
+
.debug_tuple("ComponentExportSection")
|
|
1472
|
+
.field(&"...")
|
|
1473
|
+
.finish(),
|
|
1474
|
+
|
|
1475
|
+
CustomSection(c) => f.debug_tuple("CustomSection").field(c).finish(),
|
|
1476
|
+
|
|
1477
|
+
UnknownSection { id, range, .. } => f
|
|
1478
|
+
.debug_struct("UnknownSection")
|
|
1479
|
+
.field("id", id)
|
|
1480
|
+
.field("range", range)
|
|
1481
|
+
.finish(),
|
|
1482
|
+
|
|
1483
|
+
End(offset) => f.debug_tuple("End").field(offset).finish(),
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
}
|
|
1487
|
+
|
|
1488
|
+
fn clear_hint(mut err: BinaryReaderError) -> BinaryReaderError {
|
|
1489
|
+
err.inner.needed_hint = None;
|
|
1490
|
+
err
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
#[cfg(test)]
|
|
1494
|
+
mod tests {
|
|
1495
|
+
use super::*;
|
|
1496
|
+
|
|
1497
|
+
macro_rules! assert_matches {
|
|
1498
|
+
($a:expr, $b:pat $(,)?) => {
|
|
1499
|
+
match $a {
|
|
1500
|
+
$b => {}
|
|
1501
|
+
a => panic!("`{:?}` doesn't match `{}`", a, stringify!($b)),
|
|
1502
|
+
}
|
|
1503
|
+
};
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
#[test]
|
|
1507
|
+
fn header() {
|
|
1508
|
+
assert!(Parser::default().parse(&[], true).is_err());
|
|
1509
|
+
assert_matches!(
|
|
1510
|
+
Parser::default().parse(&[], false),
|
|
1511
|
+
Ok(Chunk::NeedMoreData(4)),
|
|
1512
|
+
);
|
|
1513
|
+
assert_matches!(
|
|
1514
|
+
Parser::default().parse(b"\0", false),
|
|
1515
|
+
Ok(Chunk::NeedMoreData(3)),
|
|
1516
|
+
);
|
|
1517
|
+
assert_matches!(
|
|
1518
|
+
Parser::default().parse(b"\0asm", false),
|
|
1519
|
+
Ok(Chunk::NeedMoreData(4)),
|
|
1520
|
+
);
|
|
1521
|
+
assert_matches!(
|
|
1522
|
+
Parser::default().parse(b"\0asm\x01\0\0\0", false),
|
|
1523
|
+
Ok(Chunk::Parsed {
|
|
1524
|
+
consumed: 8,
|
|
1525
|
+
payload: Payload::Version { num: 1, .. },
|
|
1526
|
+
}),
|
|
1527
|
+
);
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
#[test]
|
|
1531
|
+
fn header_iter() {
|
|
1532
|
+
for _ in Parser::default().parse_all(&[]) {}
|
|
1533
|
+
for _ in Parser::default().parse_all(b"\0") {}
|
|
1534
|
+
for _ in Parser::default().parse_all(b"\0asm") {}
|
|
1535
|
+
for _ in Parser::default().parse_all(b"\0asm\x01\x01\x01\x01") {}
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1538
|
+
fn parser_after_header() -> Parser {
|
|
1539
|
+
let mut p = Parser::default();
|
|
1540
|
+
assert_matches!(
|
|
1541
|
+
p.parse(b"\0asm\x01\0\0\0", false),
|
|
1542
|
+
Ok(Chunk::Parsed {
|
|
1543
|
+
consumed: 8,
|
|
1544
|
+
payload: Payload::Version {
|
|
1545
|
+
num: WASM_MODULE_VERSION,
|
|
1546
|
+
encoding: Encoding::Module,
|
|
1547
|
+
..
|
|
1548
|
+
},
|
|
1549
|
+
}),
|
|
1550
|
+
);
|
|
1551
|
+
p
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
fn parser_after_component_header() -> Parser {
|
|
1555
|
+
let mut p = Parser::default();
|
|
1556
|
+
assert_matches!(
|
|
1557
|
+
p.parse(b"\0asm\x0d\0\x01\0", false),
|
|
1558
|
+
Ok(Chunk::Parsed {
|
|
1559
|
+
consumed: 8,
|
|
1560
|
+
payload: Payload::Version {
|
|
1561
|
+
num: WASM_COMPONENT_VERSION,
|
|
1562
|
+
encoding: Encoding::Component,
|
|
1563
|
+
..
|
|
1564
|
+
},
|
|
1565
|
+
}),
|
|
1566
|
+
);
|
|
1567
|
+
p
|
|
1568
|
+
}
|
|
1569
|
+
|
|
1570
|
+
#[test]
|
|
1571
|
+
fn start_section() {
|
|
1572
|
+
assert_matches!(
|
|
1573
|
+
parser_after_header().parse(&[], false),
|
|
1574
|
+
Ok(Chunk::NeedMoreData(1)),
|
|
1575
|
+
);
|
|
1576
|
+
assert!(parser_after_header().parse(&[8], true).is_err());
|
|
1577
|
+
assert!(parser_after_header().parse(&[8, 1], true).is_err());
|
|
1578
|
+
assert!(parser_after_header().parse(&[8, 2], true).is_err());
|
|
1579
|
+
assert_matches!(
|
|
1580
|
+
parser_after_header().parse(&[8], false),
|
|
1581
|
+
Ok(Chunk::NeedMoreData(1)),
|
|
1582
|
+
);
|
|
1583
|
+
assert_matches!(
|
|
1584
|
+
parser_after_header().parse(&[8, 1], false),
|
|
1585
|
+
Ok(Chunk::NeedMoreData(1)),
|
|
1586
|
+
);
|
|
1587
|
+
assert_matches!(
|
|
1588
|
+
parser_after_header().parse(&[8, 2], false),
|
|
1589
|
+
Ok(Chunk::NeedMoreData(2)),
|
|
1590
|
+
);
|
|
1591
|
+
assert_matches!(
|
|
1592
|
+
parser_after_header().parse(&[8, 1, 1], false),
|
|
1593
|
+
Ok(Chunk::Parsed {
|
|
1594
|
+
consumed: 3,
|
|
1595
|
+
payload: Payload::StartSection { func: 1, .. },
|
|
1596
|
+
}),
|
|
1597
|
+
);
|
|
1598
|
+
assert!(parser_after_header().parse(&[8, 2, 1, 1], false).is_err());
|
|
1599
|
+
assert!(parser_after_header().parse(&[8, 0], false).is_err());
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
#[test]
|
|
1603
|
+
fn end_works() {
|
|
1604
|
+
assert_matches!(
|
|
1605
|
+
parser_after_header().parse(&[], true),
|
|
1606
|
+
Ok(Chunk::Parsed {
|
|
1607
|
+
consumed: 0,
|
|
1608
|
+
payload: Payload::End(8),
|
|
1609
|
+
}),
|
|
1610
|
+
);
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1613
|
+
#[test]
|
|
1614
|
+
fn type_section() {
|
|
1615
|
+
assert!(parser_after_header().parse(&[1], true).is_err());
|
|
1616
|
+
assert!(parser_after_header().parse(&[1, 0], false).is_err());
|
|
1617
|
+
assert!(parser_after_header().parse(&[8, 2], true).is_err());
|
|
1618
|
+
assert_matches!(
|
|
1619
|
+
parser_after_header().parse(&[1], false),
|
|
1620
|
+
Ok(Chunk::NeedMoreData(1)),
|
|
1621
|
+
);
|
|
1622
|
+
assert_matches!(
|
|
1623
|
+
parser_after_header().parse(&[1, 1], false),
|
|
1624
|
+
Ok(Chunk::NeedMoreData(1)),
|
|
1625
|
+
);
|
|
1626
|
+
assert_matches!(
|
|
1627
|
+
parser_after_header().parse(&[1, 1, 1], false),
|
|
1628
|
+
Ok(Chunk::Parsed {
|
|
1629
|
+
consumed: 3,
|
|
1630
|
+
payload: Payload::TypeSection(_),
|
|
1631
|
+
}),
|
|
1632
|
+
);
|
|
1633
|
+
assert_matches!(
|
|
1634
|
+
parser_after_header().parse(&[1, 1, 1, 2, 3, 4], false),
|
|
1635
|
+
Ok(Chunk::Parsed {
|
|
1636
|
+
consumed: 3,
|
|
1637
|
+
payload: Payload::TypeSection(_),
|
|
1638
|
+
}),
|
|
1639
|
+
);
|
|
1640
|
+
}
|
|
1641
|
+
|
|
1642
|
+
#[test]
|
|
1643
|
+
fn custom_section() {
|
|
1644
|
+
assert!(parser_after_header().parse(&[0], true).is_err());
|
|
1645
|
+
assert!(parser_after_header().parse(&[0, 0], false).is_err());
|
|
1646
|
+
assert!(parser_after_header().parse(&[0, 1, 1], false).is_err());
|
|
1647
|
+
assert_matches!(
|
|
1648
|
+
parser_after_header().parse(&[0, 2, 1], false),
|
|
1649
|
+
Ok(Chunk::NeedMoreData(1)),
|
|
1650
|
+
);
|
|
1651
|
+
assert_custom(
|
|
1652
|
+
parser_after_header().parse(&[0, 1, 0], false).unwrap(),
|
|
1653
|
+
3,
|
|
1654
|
+
"",
|
|
1655
|
+
11,
|
|
1656
|
+
b"",
|
|
1657
|
+
Range { start: 10, end: 11 },
|
|
1658
|
+
);
|
|
1659
|
+
assert_custom(
|
|
1660
|
+
parser_after_header()
|
|
1661
|
+
.parse(&[0, 2, 1, b'a'], false)
|
|
1662
|
+
.unwrap(),
|
|
1663
|
+
4,
|
|
1664
|
+
"a",
|
|
1665
|
+
12,
|
|
1666
|
+
b"",
|
|
1667
|
+
Range { start: 10, end: 12 },
|
|
1668
|
+
);
|
|
1669
|
+
assert_custom(
|
|
1670
|
+
parser_after_header()
|
|
1671
|
+
.parse(&[0, 2, 0, b'a'], false)
|
|
1672
|
+
.unwrap(),
|
|
1673
|
+
4,
|
|
1674
|
+
"",
|
|
1675
|
+
11,
|
|
1676
|
+
b"a",
|
|
1677
|
+
Range { start: 10, end: 12 },
|
|
1678
|
+
);
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
fn assert_custom(
|
|
1682
|
+
chunk: Chunk<'_>,
|
|
1683
|
+
expected_consumed: usize,
|
|
1684
|
+
expected_name: &str,
|
|
1685
|
+
expected_data_offset: usize,
|
|
1686
|
+
expected_data: &[u8],
|
|
1687
|
+
expected_range: Range<usize>,
|
|
1688
|
+
) {
|
|
1689
|
+
let (consumed, s) = match chunk {
|
|
1690
|
+
Chunk::Parsed {
|
|
1691
|
+
consumed,
|
|
1692
|
+
payload: Payload::CustomSection(s),
|
|
1693
|
+
} => (consumed, s),
|
|
1694
|
+
_ => panic!("not a custom section payload"),
|
|
1695
|
+
};
|
|
1696
|
+
assert_eq!(consumed, expected_consumed);
|
|
1697
|
+
assert_eq!(s.name(), expected_name);
|
|
1698
|
+
assert_eq!(s.data_offset(), expected_data_offset);
|
|
1699
|
+
assert_eq!(s.data(), expected_data);
|
|
1700
|
+
assert_eq!(s.range(), expected_range);
|
|
1701
|
+
}
|
|
1702
|
+
|
|
1703
|
+
#[test]
|
|
1704
|
+
fn function_section() {
|
|
1705
|
+
assert!(parser_after_header().parse(&[10], true).is_err());
|
|
1706
|
+
assert!(parser_after_header().parse(&[10, 0], true).is_err());
|
|
1707
|
+
assert!(parser_after_header().parse(&[10, 1], true).is_err());
|
|
1708
|
+
assert_matches!(
|
|
1709
|
+
parser_after_header().parse(&[10], false),
|
|
1710
|
+
Ok(Chunk::NeedMoreData(1))
|
|
1711
|
+
);
|
|
1712
|
+
assert_matches!(
|
|
1713
|
+
parser_after_header().parse(&[10, 1], false),
|
|
1714
|
+
Ok(Chunk::NeedMoreData(1))
|
|
1715
|
+
);
|
|
1716
|
+
let mut p = parser_after_header();
|
|
1717
|
+
assert_matches!(
|
|
1718
|
+
p.parse(&[10, 1, 0], false),
|
|
1719
|
+
Ok(Chunk::Parsed {
|
|
1720
|
+
consumed: 3,
|
|
1721
|
+
payload: Payload::CodeSectionStart { count: 0, .. },
|
|
1722
|
+
}),
|
|
1723
|
+
);
|
|
1724
|
+
assert_matches!(
|
|
1725
|
+
p.parse(&[], true),
|
|
1726
|
+
Ok(Chunk::Parsed {
|
|
1727
|
+
consumed: 0,
|
|
1728
|
+
payload: Payload::End(11),
|
|
1729
|
+
}),
|
|
1730
|
+
);
|
|
1731
|
+
let mut p = parser_after_header();
|
|
1732
|
+
assert_matches!(
|
|
1733
|
+
p.parse(&[3, 2, 1, 0], false),
|
|
1734
|
+
Ok(Chunk::Parsed {
|
|
1735
|
+
consumed: 4,
|
|
1736
|
+
payload: Payload::FunctionSection { .. },
|
|
1737
|
+
}),
|
|
1738
|
+
);
|
|
1739
|
+
assert_matches!(
|
|
1740
|
+
p.parse(&[10, 2, 1, 0], false),
|
|
1741
|
+
Ok(Chunk::Parsed {
|
|
1742
|
+
consumed: 3,
|
|
1743
|
+
payload: Payload::CodeSectionStart { count: 1, .. },
|
|
1744
|
+
}),
|
|
1745
|
+
);
|
|
1746
|
+
assert_matches!(
|
|
1747
|
+
p.parse(&[0], false),
|
|
1748
|
+
Ok(Chunk::Parsed {
|
|
1749
|
+
consumed: 1,
|
|
1750
|
+
payload: Payload::CodeSectionEntry(_),
|
|
1751
|
+
}),
|
|
1752
|
+
);
|
|
1753
|
+
assert_matches!(
|
|
1754
|
+
p.parse(&[], true),
|
|
1755
|
+
Ok(Chunk::Parsed {
|
|
1756
|
+
consumed: 0,
|
|
1757
|
+
payload: Payload::End(16),
|
|
1758
|
+
}),
|
|
1759
|
+
);
|
|
1760
|
+
|
|
1761
|
+
// 1 byte section with 1 function can't read the function body because
|
|
1762
|
+
// the section is too small
|
|
1763
|
+
let mut p = parser_after_header();
|
|
1764
|
+
assert_matches!(
|
|
1765
|
+
p.parse(&[3, 2, 1, 0], false),
|
|
1766
|
+
Ok(Chunk::Parsed {
|
|
1767
|
+
consumed: 4,
|
|
1768
|
+
payload: Payload::FunctionSection { .. },
|
|
1769
|
+
}),
|
|
1770
|
+
);
|
|
1771
|
+
assert_matches!(
|
|
1772
|
+
p.parse(&[10, 1, 1], false),
|
|
1773
|
+
Ok(Chunk::Parsed {
|
|
1774
|
+
consumed: 3,
|
|
1775
|
+
payload: Payload::CodeSectionStart { count: 1, .. },
|
|
1776
|
+
}),
|
|
1777
|
+
);
|
|
1778
|
+
assert_eq!(
|
|
1779
|
+
p.parse(&[0], false).unwrap_err().message(),
|
|
1780
|
+
"unexpected end-of-file"
|
|
1781
|
+
);
|
|
1782
|
+
|
|
1783
|
+
// section with 2 functions but section is cut off
|
|
1784
|
+
let mut p = parser_after_header();
|
|
1785
|
+
assert_matches!(
|
|
1786
|
+
p.parse(&[3, 2, 2, 0], false),
|
|
1787
|
+
Ok(Chunk::Parsed {
|
|
1788
|
+
consumed: 4,
|
|
1789
|
+
payload: Payload::FunctionSection { .. },
|
|
1790
|
+
}),
|
|
1791
|
+
);
|
|
1792
|
+
assert_matches!(
|
|
1793
|
+
p.parse(&[10, 2, 2], false),
|
|
1794
|
+
Ok(Chunk::Parsed {
|
|
1795
|
+
consumed: 3,
|
|
1796
|
+
payload: Payload::CodeSectionStart { count: 2, .. },
|
|
1797
|
+
}),
|
|
1798
|
+
);
|
|
1799
|
+
assert_matches!(
|
|
1800
|
+
p.parse(&[0], false),
|
|
1801
|
+
Ok(Chunk::Parsed {
|
|
1802
|
+
consumed: 1,
|
|
1803
|
+
payload: Payload::CodeSectionEntry(_),
|
|
1804
|
+
}),
|
|
1805
|
+
);
|
|
1806
|
+
assert_matches!(p.parse(&[], false), Ok(Chunk::NeedMoreData(1)));
|
|
1807
|
+
assert_eq!(
|
|
1808
|
+
p.parse(&[0], false).unwrap_err().message(),
|
|
1809
|
+
"unexpected end-of-file",
|
|
1810
|
+
);
|
|
1811
|
+
|
|
1812
|
+
// trailing data is bad
|
|
1813
|
+
let mut p = parser_after_header();
|
|
1814
|
+
assert_matches!(
|
|
1815
|
+
p.parse(&[3, 2, 1, 0], false),
|
|
1816
|
+
Ok(Chunk::Parsed {
|
|
1817
|
+
consumed: 4,
|
|
1818
|
+
payload: Payload::FunctionSection { .. },
|
|
1819
|
+
}),
|
|
1820
|
+
);
|
|
1821
|
+
assert_matches!(
|
|
1822
|
+
p.parse(&[10, 3, 1], false),
|
|
1823
|
+
Ok(Chunk::Parsed {
|
|
1824
|
+
consumed: 3,
|
|
1825
|
+
payload: Payload::CodeSectionStart { count: 1, .. },
|
|
1826
|
+
}),
|
|
1827
|
+
);
|
|
1828
|
+
assert_matches!(
|
|
1829
|
+
p.parse(&[0], false),
|
|
1830
|
+
Ok(Chunk::Parsed {
|
|
1831
|
+
consumed: 1,
|
|
1832
|
+
payload: Payload::CodeSectionEntry(_),
|
|
1833
|
+
}),
|
|
1834
|
+
);
|
|
1835
|
+
assert_eq!(
|
|
1836
|
+
p.parse(&[0], false).unwrap_err().message(),
|
|
1837
|
+
"trailing bytes at end of section",
|
|
1838
|
+
);
|
|
1839
|
+
}
|
|
1840
|
+
|
|
1841
|
+
#[test]
|
|
1842
|
+
fn single_module() {
|
|
1843
|
+
let mut p = parser_after_component_header();
|
|
1844
|
+
assert_matches!(p.parse(&[4], false), Ok(Chunk::NeedMoreData(1)));
|
|
1845
|
+
|
|
1846
|
+
// A module that's 8 bytes in length
|
|
1847
|
+
let mut sub = match p.parse(&[1, 8], false) {
|
|
1848
|
+
Ok(Chunk::Parsed {
|
|
1849
|
+
consumed: 2,
|
|
1850
|
+
payload: Payload::ModuleSection { parser, .. },
|
|
1851
|
+
}) => parser,
|
|
1852
|
+
other => panic!("bad parse {other:?}"),
|
|
1853
|
+
};
|
|
1854
|
+
|
|
1855
|
+
// Parse the header of the submodule with the sub-parser.
|
|
1856
|
+
assert_matches!(sub.parse(&[], false), Ok(Chunk::NeedMoreData(4)));
|
|
1857
|
+
assert_matches!(sub.parse(b"\0asm", false), Ok(Chunk::NeedMoreData(4)));
|
|
1858
|
+
assert_matches!(
|
|
1859
|
+
sub.parse(b"\0asm\x01\0\0\0", false),
|
|
1860
|
+
Ok(Chunk::Parsed {
|
|
1861
|
+
consumed: 8,
|
|
1862
|
+
payload: Payload::Version {
|
|
1863
|
+
num: 1,
|
|
1864
|
+
encoding: Encoding::Module,
|
|
1865
|
+
..
|
|
1866
|
+
},
|
|
1867
|
+
}),
|
|
1868
|
+
);
|
|
1869
|
+
|
|
1870
|
+
// The sub-parser should be byte-limited so the next byte shouldn't get
|
|
1871
|
+
// consumed, it's intended for the parent parser.
|
|
1872
|
+
assert_matches!(
|
|
1873
|
+
sub.parse(&[10], false),
|
|
1874
|
+
Ok(Chunk::Parsed {
|
|
1875
|
+
consumed: 0,
|
|
1876
|
+
payload: Payload::End(18),
|
|
1877
|
+
}),
|
|
1878
|
+
);
|
|
1879
|
+
|
|
1880
|
+
// The parent parser should now be back to resuming, and we simulate it
|
|
1881
|
+
// being done with bytes to ensure that it's safely at the end,
|
|
1882
|
+
// completing the module code section.
|
|
1883
|
+
assert_matches!(p.parse(&[], false), Ok(Chunk::NeedMoreData(1)));
|
|
1884
|
+
assert_matches!(
|
|
1885
|
+
p.parse(&[], true),
|
|
1886
|
+
Ok(Chunk::Parsed {
|
|
1887
|
+
consumed: 0,
|
|
1888
|
+
payload: Payload::End(18),
|
|
1889
|
+
}),
|
|
1890
|
+
);
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
#[test]
|
|
1894
|
+
fn nested_section_too_big() {
|
|
1895
|
+
let mut p = parser_after_component_header();
|
|
1896
|
+
|
|
1897
|
+
// A module that's 10 bytes in length
|
|
1898
|
+
let mut sub = match p.parse(&[1, 10], false) {
|
|
1899
|
+
Ok(Chunk::Parsed {
|
|
1900
|
+
consumed: 2,
|
|
1901
|
+
payload: Payload::ModuleSection { parser, .. },
|
|
1902
|
+
}) => parser,
|
|
1903
|
+
other => panic!("bad parse {other:?}"),
|
|
1904
|
+
};
|
|
1905
|
+
|
|
1906
|
+
// use 8 bytes to parse the header, leaving 2 remaining bytes in our
|
|
1907
|
+
// module.
|
|
1908
|
+
assert_matches!(
|
|
1909
|
+
sub.parse(b"\0asm\x01\0\0\0", false),
|
|
1910
|
+
Ok(Chunk::Parsed {
|
|
1911
|
+
consumed: 8,
|
|
1912
|
+
payload: Payload::Version { num: 1, .. },
|
|
1913
|
+
}),
|
|
1914
|
+
);
|
|
1915
|
+
|
|
1916
|
+
// We can't parse a section which declares its bigger than the outer
|
|
1917
|
+
// module. This is a custom section, one byte big, with one content byte. The
|
|
1918
|
+
// content byte, however, lives outside of the parent's module code
|
|
1919
|
+
// section.
|
|
1920
|
+
assert_eq!(
|
|
1921
|
+
sub.parse(&[0, 1, 0], false).unwrap_err().message(),
|
|
1922
|
+
"section too large",
|
|
1923
|
+
);
|
|
1924
|
+
}
|
|
1925
|
+
}
|