Repository: bytecodealliance/wasm-tools
Pull request #1727 (2024-08-20 16:58:02)

Update Wasmtime to 24.0.0 in testing


Patch:
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 8458229d..03fbea0c 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -85,6 +85,9 @@ jobs:
             rust: default
           - os: ubuntu-latest
             rust: msrv
+            # skip testing crates that require wasmtime since wasmtime has a
+            # more aggressive msrv than wasm-tools
+            flags: --exclude fuzz-stats --exclude wit-component --exclude wasm-mutate-stats
     steps:
     - uses: actions/checkout@v4
       with:
@@ -92,7 +95,7 @@ jobs:
     - uses: bytecodealliance/wasmtime/.github/actions/install-rust@v20.0.0
       with:
         toolchain: ${{ matrix.rust }}
-    - run: cargo test --locked --all
+    - run: cargo test --locked --all ${{ matrix.flags }}
 
   test_extra_features:
     name: Test with extra Cargo features
@@ -260,10 +263,10 @@ jobs:
         submodules: true
     - uses: bytecodealliance/wasmtime/.github/actions/install-rust@v20.0.0
     - run: rustc ci/publish.rs
-    # Make sure the tree is publish-able as-is
-    - run: ./publish verify
     # Make sure we can bump version numbers for the next release
     - run: ./publish bump
+    # Make sure the tree is publish-able as-is
+    - run: ./publish verify
 
   # "Join node" which the merge queue waits on.
   ci-status:
diff --git a/Cargo.lock b/Cargo.lock
index abdab3dd..ff7ac34c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -19,10 +19,10 @@ dependencies = [
 ]
 
 [[package]]
-name = "adler"
-version = "1.0.2"
+name = "adler2"
+version = "2.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
+checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
 
 [[package]]
 name = "ahash"
@@ -87,7 +87,7 @@ version = "1.1.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a"
 dependencies = [
- "windows-sys",
+ "windows-sys 0.52.0",
 ]
 
 [[package]]
@@ -97,7 +97,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8"
 dependencies = [
  "anstyle",
- "windows-sys",
+ "windows-sys 0.52.0",
 ]
 
 [[package]]
@@ -123,9 +123,9 @@ checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a"
 
 [[package]]
 name = "arrayvec"
-version = "0.7.4"
+version = "0.7.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
+checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50"
 
 [[package]]
 name = "autocfg"
@@ -156,9 +156,9 @@ dependencies = [
 
 [[package]]
 name = "blake3"
-version = "1.5.3"
+version = "1.5.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e9ec96fe9a81b5e365f9db71fe00edc4fe4ca2cc7dcb7861f0603012a7caa210"
+checksum = "d82033247fd8e890df8f740e407ad4d038debb9eb1f40533fffb32e7d17dc6f7"
 dependencies = [
  "arrayref",
  "arrayvec",
@@ -187,12 +187,13 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"
 
 [[package]]
 name = "cc"
-version = "1.1.6"
+version = "1.1.13"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2aba8f4e9906c7ce3c73463f62a7f0c65183ada1a2d47e397cc8810827f9694f"
+checksum = "72db2f7947ecee9b03b510377e8bb9077afa27176fdbff55c51027e976fdcc48"
 dependencies = [
  "jobserver",
  "libc",
+ "shlex",
 ]
 
 [[package]]
@@ -230,9 +231,9 @@ dependencies = [
 
 [[package]]
 name = "clap"
-version = "4.5.11"
+version = "4.5.16"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "35723e6a11662c2afb578bcf0b88bf6ea8e21282a953428f240574fcc3a2b5b3"
+checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019"
 dependencies = [
  "clap_builder",
  "clap_derive",
@@ -240,9 +241,9 @@ dependencies = [
 
 [[package]]
 name = "clap_builder"
-version = "4.5.11"
+version = "4.5.15"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "49eb96cbfa7cfa35017b7cd548c75b14c3118c98b423041d70562665e07fb0fa"
+checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6"
 dependencies = [
  "anstream",
  "anstyle",
@@ -252,18 +253,18 @@ dependencies = [
 
 [[package]]
 name = "clap_complete"
-version = "4.5.11"
+version = "4.5.20"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c6ae69fbb0833c6fcd5a8d4b8609f108c7ad95fc11e248d853ff2c42a90df26a"
+checksum = "2aedc27e53da9ff495f5da6f4325390e71f46f886022b618303042e8ccf4bcac"
 dependencies = [
  "clap",
 ]
 
 [[package]]
 name = "clap_derive"
-version = "4.5.11"
+version = "4.5.13"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5d029b67f89d30bbb547c89fd5161293c0aec155fc691d7924b64550662db93e"
+checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0"
 dependencies = [
  "heck 0.5.0",
  "proc-macro2",
@@ -315,27 +316,38 @@ dependencies = [
 
 [[package]]
 name = "cranelift-bforest"
-version = "0.109.0"
+version = "0.111.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b6b33d7e757a887989eb18b35712b2a67d96171ec3149d1bfb657b29b7b367c"
+checksum = "b80c3a50b9c4c7e5b5f73c0ed746687774fc9e36ef652b110da8daebf0c6e0e6"
 dependencies = [
  "cranelift-entity",
 ]
 
+[[package]]
+name = "cranelift-bitset"
+version = "0.111.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "38778758c2ca918b05acb2199134e0c561fb577c50574259b26190b6c2d95ded"
+dependencies = [
+ "serde",
+ "serde_derive",
+]
+
 [[package]]
 name = "cranelift-codegen"
-version = "0.109.0"
+version = "0.111.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b9acf15cb22be42d07c3b57d7856329cb228b7315d385346149df2566ad5e4aa"
+checksum = "58258667ad10e468bfc13a8d620f50dfcd4bb35d668123e97defa2549b9ad397"
 dependencies = [
  "bumpalo",
  "cranelift-bforest",
+ "cranelift-bitset",
  "cranelift-codegen-meta",
  "cranelift-codegen-shared",
  "cranelift-control",
  "cranelift-entity",
  "cranelift-isle",
- "gimli 0.28.1",
+ "gimli 0.29.0",
  "hashbrown 0.14.5",
  "log",
  "regalloc2",
@@ -346,43 +358,44 @@ dependencies = [
 
 [[package]]
 name = "cranelift-codegen-meta"
-version = "0.109.0"
+version = "0.111.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e934d301392b73b3f8b0540391fb82465a0f179a3cee7c726482ac4727efcc97"
+checksum = "043f0b702e529dcb07ff92bd7d40e7d5317b5493595172c5eb0983343751ee06"
 dependencies = [
  "cranelift-codegen-shared",
 ]
 
 [[package]]
 name = "cranelift-codegen-shared"
-version = "0.109.0"
+version = "0.111.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8afb2a2566b3d54b854dfb288b3b187f6d3d17d6f762c92898207eba302931da"
+checksum = "7763578888ab53eca5ce7da141953f828e82c2bfadcffc106d10d1866094ffbb"
 
 [[package]]
 name = "cranelift-control"
-version = "0.109.0"
+version = "0.111.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0100f33b704cdacd01ad66ff41f8c5030d57cbff078e2a4e49ab1822591299fa"
+checksum = "32db15f08c05df570f11e8ab33cb1ec449a64b37c8a3498377b77650bef33d8b"
 dependencies = [
  "arbitrary",
 ]
 
 [[package]]
 name = "cranelift-entity"
-version = "0.109.0"
+version = "0.111.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a8cfdc315e5d18997093e040a8d234bea1ac1e118a716d3e30f40d449e78207b"
+checksum = "5289cdb399381a27e7bbfa1b42185916007c3d49aeef70b1d01cb4caa8010130"
 dependencies = [
+ "cranelift-bitset",
  "serde",
  "serde_derive",
 ]
 
 [[package]]
 name = "cranelift-frontend"
-version = "0.109.0"
+version = "0.111.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0f74b84f16af2e982b0c0c72233503d9d55cbfe3865dbe807ca28dc6642a28b5"
+checksum = "31ba8ab24eb9470477e98ddfa3c799a649ac5a0d9a2042868c4c952133c234e8"
 dependencies = [
  "cranelift-codegen",
  "log",
@@ -392,15 +405,15 @@ dependencies = [
 
 [[package]]
 name = "cranelift-isle"
-version = "0.109.0"
+version = "0.111.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "adf306d3dde705fb94bd48082f01d38c4ededc74293a4c007805f610bf08bc6e"
+checksum = "2b72a3c5c166a70426dcb209bdd0bb71a787c1ea76023dc0974fbabca770e8f9"
 
 [[package]]
 name = "cranelift-native"
-version = "0.109.0"
+version = "0.111.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1ea0ebdef7aff4a79bcbc8b6495f31315f16b3bf311152f472eaa8d679352581"
+checksum = "46a42424c956bbc31fc5c2706073df896156c5420ae8fa2a5d48dbc7b295d71b"
 dependencies = [
  "cranelift-codegen",
  "libc",
@@ -409,9 +422,9 @@ dependencies = [
 
 [[package]]
 name = "cranelift-wasm"
-version = "0.109.0"
+version = "0.111.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d549108a1942065cdbac3bb96c2952afa0e1b9a3beff4b08c4308ac72257576d"
+checksum = "49778df4289933d735b93c30a345513e030cf83101de0036e19b760f8aa09f68"
 dependencies = [
  "cranelift-codegen",
  "cranelift-entity",
@@ -419,7 +432,7 @@ dependencies = [
  "itertools 0.12.1",
  "log",
  "smallvec",
- "wasmparser 0.209.1",
+ "wasmparser 0.215.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "wasmtime-types",
 ]
 
@@ -544,6 +557,12 @@ version = "0.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced"
 
+[[package]]
+name = "embedded-io"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d"
+
 [[package]]
 name = "encoding_rs"
 version = "0.8.34"
@@ -589,7 +608,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba"
 dependencies = [
  "libc",
- "windows-sys",
+ "windows-sys 0.52.0",
 ]
 
 [[package]]
@@ -627,9 +646,9 @@ dependencies = [
 
 [[package]]
 name = "flate2"
-version = "1.0.30"
+version = "1.0.32"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae"
+checksum = "9c0596c1eac1f9e04ed902702e9878208b336edc9d6fddc8a48387349bab3666"
 dependencies = [
  "crc32fast",
  "miniz_oxide",
@@ -666,12 +685,12 @@ dependencies = [
 
 [[package]]
 name = "gimli"
-version = "0.28.1"
+version = "0.29.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253"
+checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd"
 dependencies = [
  "fallible-iterator",
- "indexmap 2.2.6",
+ "indexmap 2.4.0",
  "stable_deref_trait",
 ]
 
@@ -682,7 +701,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "e2e1d97fbe9722ba9bbd0c97051c2956e726562b61f86a25a4360398a40edfc9"
 dependencies = [
  "fallible-iterator",
- "indexmap 2.2.6",
+ "indexmap 2.4.0",
  "stable_deref_trait",
 ]
 
@@ -745,6 +764,12 @@ version = "0.3.9"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"
 
+[[package]]
+name = "hermit-abi"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc"
+
 [[package]]
 name = "humantime"
 version = "2.1.0"
@@ -783,9 +808,9 @@ dependencies = [
 
 [[package]]
 name = "indexmap"
-version = "2.2.6"
+version = "2.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26"
+checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c"
 dependencies = [
  "equivalent",
  "hashbrown 0.14.5",
@@ -809,13 +834,13 @@ dependencies = [
 
 [[package]]
 name = "is-terminal"
-version = "0.4.12"
+version = "0.4.13"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b"
+checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b"
 dependencies = [
- "hermit-abi",
+ "hermit-abi 0.4.0",
  "libc",
- "windows-sys",
+ "windows-sys 0.52.0",
 ]
 
 [[package]]
@@ -889,9 +914,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67"
 
 [[package]]
 name = "libc"
-version = "0.2.155"
+version = "0.2.158"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c"
+checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439"
 
 [[package]]
 name = "libfuzzer-sys"
@@ -936,18 +961,18 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
 
 [[package]]
 name = "logos"
-version = "0.14.0"
+version = "0.14.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "161971eb88a0da7ae0c333e1063467c5b5727e7fb6b710b8db4814eade3a42e8"
+checksum = "ff1ceb190eb9bdeecdd8f1ad6a71d6d632a50905948771718741b5461fb01e13"
 dependencies = [
  "logos-derive",
 ]
 
 [[package]]
 name = "logos-codegen"
-version = "0.14.0"
+version = "0.14.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e31badd9de5131fdf4921f6473d457e3dd85b11b7f091ceb50e4df7c3eeb12a"
+checksum = "90be66cb7bd40cb5cc2e9cfaf2d1133b04a3d93b72344267715010a466e0915a"
 dependencies = [
  "beef",
  "fnv",
@@ -960,9 +985,9 @@ dependencies = [
 
 [[package]]
 name = "logos-derive"
-version = "0.14.0"
+version = "0.14.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1c2a69b3eb68d5bd595107c9ee58d7e07fe2bb5e360cc85b0f084dedac80de0a"
+checksum = "45154231e8e96586b39494029e58f12f8ffcb5ecf80333a603a13aa205ea8cbd"
 dependencies = [
  "logos-codegen",
 ]
@@ -1000,22 +1025,13 @@ dependencies = [
  "libc",
 ]
 
-[[package]]
-name = "memoffset"
-version = "0.9.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
-dependencies = [
- "autocfg",
-]
-
 [[package]]
 name = "miniz_oxide"
-version = "0.7.4"
+version = "0.8.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08"
+checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1"
 dependencies = [
- "adler",
+ "adler2",
 ]
 
 [[package]]
@@ -1033,20 +1049,20 @@ version = "1.16.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"
 dependencies = [
- "hermit-abi",
+ "hermit-abi 0.3.9",
  "libc",
 ]
 
 [[package]]
 name = "object"
-version = "0.36.2"
+version = "0.36.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f203fa8daa7bb185f760ae12bd8e097f63d17041dcdcaf675ac54cdf863170e"
+checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9"
 dependencies = [
  "crc32fast",
  "flate2",
  "hashbrown 0.14.5",
- "indexmap 2.2.6",
+ "indexmap 2.4.0",
  "memchr",
  "ruzstd",
 ]
@@ -1076,25 +1092,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db"
 dependencies = [
  "fixedbitset",
- "indexmap 2.2.6",
+ "indexmap 2.4.0",
 ]
 
 [[package]]
 name = "postcard"
-version = "1.0.8"
+version = "1.0.9"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a55c51ee6c0db07e68448e336cf8ea4131a620edefebf9893e759b2d793420f8"
+checksum = "20ee10b999a00ca189ac2cb99f5db1ca71fb7371e3d5f493b879ca95d2a67220"
 dependencies = [
  "cobs",
- "embedded-io",
+ "embedded-io 0.4.0",
+ "embedded-io 0.6.1",
  "serde",
 ]
 
 [[package]]
 name = "ppv-lite86"
-version = "0.2.17"
+version = "0.2.20"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
+checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04"
+dependencies = [
+ "zerocopy",
+]
 
 [[package]]
 name = "pretty_assertions"
@@ -1207,9 +1227,9 @@ dependencies = [
 
 [[package]]
 name = "regex"
-version = "1.10.5"
+version = "1.10.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f"
+checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619"
 dependencies = [
  "aho-corasick",
  "memchr",
@@ -1256,7 +1276,7 @@ dependencies = [
  "errno",
  "libc",
  "linux-raw-sys",
- "windows-sys",
+ "windows-sys 0.52.0",
 ]
 
 [[package]]
@@ -1295,18 +1315,18 @@ dependencies = [
 
 [[package]]
 name = "serde"
-version = "1.0.203"
+version = "1.0.208"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094"
+checksum = "cff085d2cb684faa248efb494c39b68e522822ac0de72ccf08109abde717cfb2"
 dependencies = [
  "serde_derive",
 ]
 
 [[package]]
 name = "serde_derive"
-version = "1.0.203"
+version = "1.0.208"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba"
+checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -1315,11 +1335,12 @@ dependencies = [
 
 [[package]]
 name = "serde_json"
-version = "1.0.120"
+version = "1.0.125"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5"
+checksum = "83c8e735a073ccf5be70aa8066aa984eaf2fa000db6c8d0100ae605b366d31ed"
 dependencies = [
  "itoa",
+ "memchr",
  "ryu",
  "serde",
 ]
@@ -1330,13 +1351,19 @@ version = "0.9.34+deprecated"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47"
 dependencies = [
- "indexmap 2.2.6",
+ "indexmap 2.4.0",
  "itoa",
  "ryu",
  "serde",
  "unsafe-libyaml",
 ]
 
+[[package]]
+name = "shlex"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+
 [[package]]
 name = "sized-chunks"
 version = "0.6.5"
@@ -1403,9 +1430,9 @@ checksum = "7c68d531d83ec6c531150584c42a4290911964d5f0d79132b193b67252a23b71"
 
 [[package]]
 name = "syn"
-version = "2.0.72"
+version = "2.0.75"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af"
+checksum = "f6af063034fc1935ede7be0122941bafa9bacb949334d090b77ca98b5817c7d9"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -1414,20 +1441,21 @@ dependencies = [
 
 [[package]]
 name = "target-lexicon"
-version = "0.12.15"
+version = "0.12.16"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4873307b7c257eddcb50c9bedf158eb669578359fb28428bef438fec8e6ba7c2"
+checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
 
 [[package]]
 name = "tempfile"
-version = "3.10.1"
+version = "3.12.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1"
+checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64"
 dependencies = [
  "cfg-if",
  "fastrand",
+ "once_cell",
  "rustix",
- "windows-sys",
+ "windows-sys 0.59.0",
 ]
 
 [[package]]
@@ -1514,9 +1542,9 @@ checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d"
 
 [[package]]
 name = "unicode-xid"
-version = "0.2.4"
+version = "0.2.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c"
+checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a"
 
 [[package]]
 name = "unsafe-libyaml"
@@ -1560,7 +1588,7 @@ dependencies = [
  "glob",
  "heck 0.4.1",
  "im-rc",
- "indexmap 2.2.6",
+ "indexmap 2.4.0",
  "log",
  "petgraph",
  "pretty_assertions",
@@ -1575,15 +1603,6 @@ dependencies = [
  "wit-component 0.215.0",
 ]
 
-[[package]]
-name = "wasm-encoder"
-version = "0.209.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b4a05336882dae732ce6bd48b7e11fe597293cb72c13da4f35d7d5f8d53b2a7"
-dependencies = [
- "leb128",
-]
-
 [[package]]
 name = "wasm-encoder"
 version = "0.214.0"
@@ -1604,6 +1623,15 @@ dependencies = [
  "wasmparser 0.215.0",
 ]
 
+[[package]]
+name = "wasm-encoder"
+version = "0.215.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4fb56df3e06b8e6b77e37d2969a50ba51281029a9aeb3855e76b7f49b6418847"
+dependencies = [
+ "leb128",
+]
+
 [[package]]
 name = "wasm-metadata"
 version = "0.214.0"
@@ -1611,7 +1639,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "865c5bff5f7a3781b5f92ea4cfa99bb38267da097441cdb09080de1568ef3075"
 dependencies = [
  "anyhow",
- "indexmap 2.2.6",
+ "indexmap 2.4.0",
  "serde",
  "serde_derive",
  "serde_json",
@@ -1626,7 +1654,7 @@ version = "0.215.0"
 dependencies = [
  "anyhow",
  "clap",
- "indexmap 2.2.6",
+ "indexmap 2.4.0",
  "serde",
  "serde_derive",
  "serde_json",
@@ -1696,7 +1724,7 @@ dependencies = [
  "clap",
  "criterion",
  "flagset",
- "indexmap 2.2.6",
+ "indexmap 2.4.0",
  "leb128",
  "libfuzzer-sys",
  "rand",
@@ -1795,26 +1823,12 @@ name = "wasm-wave"
 version = "0.215.0"
 dependencies = [
  "anyhow",
- "indexmap 2.2.6",
+ "indexmap 2.4.0",
  "logos",
  "thiserror",
  "wit-parser 0.215.0",
 ]
 
-[[package]]
-name = "wasmparser"
-version = "0.209.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "07035cc9a9b41e62d3bb3a3815a66ab87c993c06fe1cf6b2a3f2a18499d937db"
-dependencies = [
- "ahash",
- "bitflags",
- "hashbrown 0.14.5",
- "indexmap 2.2.6",
- "semver",
- "serde",
-]
-
 [[package]]
 name = "wasmparser"
 version = "0.214.0"
@@ -1824,7 +1838,7 @@ dependencies = [
  "ahash",
  "bitflags",
  "hashbrown 0.14.5",
- "indexmap 2.2.6",
+ "indexmap 2.4.0",
  "semver",
 ]
 
@@ -1838,7 +1852,7 @@ dependencies = [
  "criterion",
  "env_logger",
  "hashbrown 0.14.5",
- "indexmap 2.2.6",
+ "indexmap 2.4.0",
  "log",
  "once_cell",
  "rayon",
@@ -1850,13 +1864,17 @@ dependencies = [
 ]
 
 [[package]]
-name = "wasmprinter"
-version = "0.209.1"
+name = "wasmparser"
+version = "0.215.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ceca8ae6eaa8c7c87b33c25c53bdf299f8c2a764aee1179402ff7652ef3a6859"
+checksum = "53fbde0881f24199b81cf49b6ff8f9c145ac8eb1b7fc439adb5c099734f7d90e"
 dependencies = [
- "anyhow",
- "wasmparser 0.209.1",
+ "ahash",
+ "bitflags",
+ "hashbrown 0.14.5",
+ "indexmap 2.4.0",
+ "semver",
+ "serde",
 ]
 
 [[package]]
@@ -1873,25 +1891,36 @@ dependencies = [
  "wat",
 ]
 
+[[package]]
+name = "wasmprinter"
+version = "0.215.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d8e9a325d85053408209b3d2ce5eaddd0dd6864d1cff7a007147ba073157defc"
+dependencies = [
+ "anyhow",
+ "termcolor",
+ "wasmparser 0.215.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
 [[package]]
 name = "wasmtime"
-version = "22.0.0"
+version = "24.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "786d8b5e7a4d54917c5ebe555b9667337e5f93383f49bddaaeec2eba68093b45"
+checksum = "9a5883d64dfc8423c56e3d8df27cffc44db25336aa468e8e0724fddf30a333d7"
 dependencies = [
  "anyhow",
+ "bitflags",
  "bumpalo",
  "cc",
  "cfg-if",
  "encoding_rs",
  "hashbrown 0.14.5",
- "indexmap 2.2.6",
+ "indexmap 2.4.0",
  "libc",
  "libm",
  "log",
  "mach2",
  "memfd",
- "memoffset",
  "object",
  "once_cell",
  "paste",
@@ -1904,7 +1933,7 @@ dependencies = [
  "smallvec",
  "sptr",
  "target-lexicon",
- "wasmparser 0.209.1",
+ "wasmparser 0.215.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "wasmtime-asm-macros",
  "wasmtime-component-macro",
  "wasmtime-component-util",
@@ -1914,23 +1943,23 @@ dependencies = [
  "wasmtime-slab",
  "wasmtime-versioned-export-macros",
  "wasmtime-winch",
- "windows-sys",
+ "windows-sys 0.52.0",
 ]
 
 [[package]]
 name = "wasmtime-asm-macros"
-version = "22.0.0"
+version = "24.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d697d99c341d4a9ffb72f3af7a02124d233eeb59aee010f36d88e97cca553d5e"
+checksum = "1c4dc7e2a379c0dd6be5b55857d14c4b277f43a9c429a9e14403eb61776ae3be"
 dependencies = [
  "cfg-if",
 ]
 
 [[package]]
 name = "wasmtime-component-macro"
-version = "22.0.0"
+version = "24.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b29b462b068e73b5b27fae092a27f47e5937cabf6b26be2779c978698a52feca"
+checksum = "4b07773d1c3dab5f014ec61316ee317aa424033e17e70a63abdf7c3a47e58fcf"
 dependencies = [
  "anyhow",
  "proc-macro2",
@@ -1938,20 +1967,20 @@ dependencies = [
  "syn",
  "wasmtime-component-util",
  "wasmtime-wit-bindgen",
- "wit-parser 0.209.1",
+ "wit-parser 0.215.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "wasmtime-component-util"
-version = "22.0.0"
+version = "24.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f9d2912c53d9054984b380dfbd7579f9c3681b2a73b903a56bd71a1c4f175f1e"
+checksum = "e38d735320f4e83478369ce649ad8fe87c6b893220902e798547a225fc0c5874"
 
 [[package]]
 name = "wasmtime-cranelift"
-version = "22.0.0"
+version = "24.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a3975deafea000457ba84355c7c0fce0372937204f77026510b7b454f28a3a65"
+checksum = "e570d831d0785d93d7d8c722b1eb9a34e0d0c1534317666f65892818358a2da9"
 dependencies = [
  "anyhow",
  "cfg-if",
@@ -1961,75 +1990,78 @@ dependencies = [
  "cranelift-frontend",
  "cranelift-native",
  "cranelift-wasm",
- "gimli 0.28.1",
+ "gimli 0.29.0",
  "log",
  "object",
  "target-lexicon",
  "thiserror",
- "wasmparser 0.209.1",
+ "wasmparser 0.215.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "wasmtime-environ",
  "wasmtime-versioned-export-macros",
 ]
 
 [[package]]
 name = "wasmtime-environ"
-version = "22.0.0"
+version = "24.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f444e900e848b884d8a8a2949b6f5b92af642a3e663ff8fbe78731143a55be61"
+checksum = "c5fe80dfbd81687431a7d4f25929fae1ae96894786d5c96b14ae41164ee97377"
 dependencies = [
  "anyhow",
+ "cranelift-bitset",
  "cranelift-entity",
- "gimli 0.28.1",
- "indexmap 2.2.6",
+ "gimli 0.29.0",
+ "indexmap 2.4.0",
  "log",
  "object",
  "postcard",
+ "semver",
  "serde",
  "serde_derive",
  "target-lexicon",
- "wasm-encoder 0.209.1",
- "wasmparser 0.209.1",
- "wasmprinter 0.209.1",
+ "wasm-encoder 0.215.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wasmparser 0.215.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wasmprinter 0.215.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "wasmtime-component-util",
  "wasmtime-types",
 ]
 
 [[package]]
 name = "wasmtime-jit-icache-coherence"
-version = "22.0.0"
+version = "24.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5afe2f0499542f9a4bcfa1b55bfdda803b6ade4e7c93c6b99e0f39dba44b0a91"
+checksum = "d15de8429db996f0d17a4163a35eccc3f874cbfb50f29c379951ea1bbb39452e"
 dependencies = [
  "anyhow",
  "cfg-if",
  "libc",
- "windows-sys",
+ "windows-sys 0.52.0",
 ]
 
 [[package]]
 name = "wasmtime-slab"
-version = "22.0.0"
+version = "24.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0a7de1f2bec5bbb35d532e61c85c049dc84ae671df60492f90b954ecf21169e7"
+checksum = "1f68d38fa6b30c5e1fc7d608263062997306f79e577ebd197ddcd6b0f55d87d1"
 
 [[package]]
 name = "wasmtime-types"
-version = "22.0.0"
+version = "24.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "412463e9000e14cf6856be48628d2213c20c153e29ffc22b036980c892ea6964"
+checksum = "6634e7079d9c5cfc81af8610ed59b488cc5b7f9777a2f4c1667a2565c2e45249"
 dependencies = [
+ "anyhow",
  "cranelift-entity",
  "serde",
  "serde_derive",
  "smallvec",
- "wasmparser 0.209.1",
+ "wasmparser 0.215.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "wasmtime-versioned-export-macros"
-version = "22.0.0"
+version = "24.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "de5a9bc4f44ceeb168e9e8e3be4e0b4beb9095b468479663a9e24c667e36826f"
+checksum = "3850e3511d6c7f11a72d571890b0ed5f6204681f7f050b9de2690e7f13123fed"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -2038,16 +2070,16 @@ dependencies = [
 
 [[package]]
 name = "wasmtime-winch"
-version = "22.0.0"
+version = "24.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ed4db238a0241df2d15f79ad17b3a37a27f2ea6cb885894d81b42ae107544466"
+checksum = "2a25199625effa4c13dd790d64bd56884b014c69829431bfe43991c740bd5bc1"
 dependencies = [
  "anyhow",
  "cranelift-codegen",
- "gimli 0.28.1",
+ "gimli 0.29.0",
  "object",
  "target-lexicon",
- "wasmparser 0.209.1",
+ "wasmparser 0.215.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "wasmtime-cranelift",
  "wasmtime-environ",
  "winch-codegen",
@@ -2055,14 +2087,14 @@ dependencies = [
 
 [[package]]
 name = "wasmtime-wit-bindgen"
-version = "22.0.0"
+version = "24.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "70dc077306b38288262e5ba01d4b21532a6987416cdc0aedf04bb06c22a68fdc"
+checksum = "3cb331ac7ed1d5ba49cddcdb6b11973752a857148858bb308777d2fc5584121f"
 dependencies = [
  "anyhow",
  "heck 0.4.1",
- "indexmap 2.2.6",
- "wit-parser 0.209.1",
+ "indexmap 2.4.0",
+ "wit-parser 0.215.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -2107,11 +2139,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
 
 [[package]]
 name = "winapi-util"
-version = "0.1.8"
+version = "0.1.9"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b"
+checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
 dependencies = [
- "windows-sys",
+ "windows-sys 0.59.0",
 ]
 
 [[package]]
@@ -2122,17 +2154,17 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
 
 [[package]]
 name = "winch-codegen"
-version = "0.20.0"
+version = "0.22.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "85c6915884e731b2db0d8cf08cb64474cb69221a161675fd3c135f91febc3daa"
+checksum = "073efe897d9ead7fc609874f94580afc831114af5149b6a90ee0a3a39b497fe0"
 dependencies = [
  "anyhow",
  "cranelift-codegen",
- "gimli 0.28.1",
+ "gimli 0.29.0",
  "regalloc2",
  "smallvec",
  "target-lexicon",
- "wasmparser 0.209.1",
+ "wasmparser 0.215.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "wasmtime-cranelift",
  "wasmtime-environ",
 ]
@@ -2146,6 +2178,15 @@ dependencies = [
  "windows-targets",
 ]
 
+[[package]]
+name = "windows-sys"
+version = "0.59.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
+dependencies = [
+ "windows-targets",
+]
+
 [[package]]
 name = "windows-targets"
 version = "0.52.6"
@@ -2227,7 +2268,7 @@ checksum = "fd9fd46f0e783bf80f1ab7291f9d442fa5553ff0e96cdb71964bd8859b734b55"
 dependencies = [
  "anyhow",
  "bitflags",
- "indexmap 2.2.6",
+ "indexmap 2.4.0",
  "log",
  "serde",
  "serde_derive",
@@ -2246,7 +2287,7 @@ dependencies = [
  "bitflags",
  "env_logger",
  "glob",
- "indexmap 2.2.6",
+ "indexmap 2.4.0",
  "libtest-mimic",
  "log",
  "pretty_assertions",
@@ -2277,59 +2318,59 @@ dependencies = [
 
 [[package]]
 name = "wit-parser"
-version = "0.209.1"
+version = "0.214.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3e79b9e3c0b6bb589dec46317e645851e0db2734c44e2be5e251b03ff4a51269"
+checksum = "681d526d6ea42e28f9afe9eae2b50e0b0a627aef8822c75eb04078db84d03e57"
 dependencies = [
  "anyhow",
  "id-arena",
- "indexmap 2.2.6",
+ "indexmap 2.4.0",
  "log",
  "semver",
  "serde",
  "serde_derive",
  "serde_json",
  "unicode-xid",
- "wasmparser 0.209.1",
+ "wasmparser 0.214.0",
 ]
 
 [[package]]
 name = "wit-parser"
-version = "0.214.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "681d526d6ea42e28f9afe9eae2b50e0b0a627aef8822c75eb04078db84d03e57"
+version = "0.215.0"
 dependencies = [
  "anyhow",
+ "env_logger",
  "id-arena",
- "indexmap 2.2.6",
+ "indexmap 2.4.0",
+ "libtest-mimic",
  "log",
+ "pretty_assertions",
  "semver",
  "serde",
  "serde_derive",
  "serde_json",
  "unicode-xid",
- "wasmparser 0.214.0",
+ "wasmparser 0.215.0",
+ "wat",
+ "wit-parser 0.215.0",
 ]
 
 [[package]]
 name = "wit-parser"
 version = "0.215.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "935a97eaffd57c3b413aa510f8f0b550a4a9fe7d59e79cd8b89a83dcb860321f"
 dependencies = [
  "anyhow",
- "env_logger",
  "id-arena",
- "indexmap 2.2.6",
- "libtest-mimic",
+ "indexmap 2.4.0",
  "log",
- "pretty_assertions",
  "semver",
  "serde",
  "serde_derive",
  "serde_json",
  "unicode-xid",
- "wasmparser 0.215.0",
- "wat",
- "wit-parser 0.215.0",
+ "wasmparser 0.215.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -2351,7 +2392,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "09cf816019a376a912cafb103677a8d28e3cba86b7671b754281e75f4909e129"
 dependencies = [
  "arbitrary",
- "indexmap 2.2.6",
+ "indexmap 2.4.0",
  "log",
  "semver",
  "wit-component 0.214.0",
@@ -2364,7 +2405,7 @@ version = "0.215.0"
 dependencies = [
  "arbitrary",
  "clap",
- "indexmap 2.2.6",
+ "indexmap 2.4.0",
  "log",
  "semver",
  "wit-component 0.215.0",
@@ -2383,6 +2424,7 @@ version = "0.7.35"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
 dependencies = [
+ "byteorder",
  "zerocopy-derive",
 ]
 
diff --git a/Cargo.toml b/Cargo.toml
index 05102856..ccd9bf25 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -82,7 +82,7 @@ rayon = "1.3"
 serde = { version = "1.0.166", default-features = false, features = ['alloc'] }
 serde_derive = "1.0.166"
 serde_json = { version = "1" }
-wasmtime = { version = "22.0.0", default-features = false, features = ['cranelift', 'component-model', 'runtime', 'gc'] }
+wasmtime = { version = "24.0.0", default-features = false, features = ['cranelift', 'component-model', 'runtime', 'gc'] }
 url = "2.0.0"
 pretty_assertions = "1.3.0"
 semver = { version = "1.0.0", default-features = false }
diff --git a/crates/wasmparser/src/validator/core.rs b/crates/wasmparser/src/validator/core.rs
index e6615b16..fbcdbcbb 100644
--- a/crates/wasmparser/src/validator/core.rs
+++ b/crates/wasmparser/src/validator/core.rs
@@ -344,6 +344,20 @@ impl ModuleState {
                 }
             }
 
+            fn validate_shared_everything_threads(&mut self, op: &str) -> Result<()> {
+                if self.features.shared_everything_threads() {
+                    Ok(())
+                } else {
+                    Err(BinaryReaderError::new(
+                        format!(
+                            "constant expression required: non-constant operator: {}",
+                            op
+                        ),
+                        self.offset,
+                    ))
+                }
+            }
+
             fn validate_global(&mut self, index: u32) -> Result<()> {
                 let module = &self.resources.module;
                 let global = module.global_at(index, self.offset)?;
@@ -479,6 +493,10 @@ impl ModuleState {
                 $self.validate_gc("ref.i31")?;
                 $self.validator().visit_ref_i31()
             }};
+            (@visit $self:ident visit_ref_i31_shared) => {{
+                $self.validate_shared_everything_threads("ref.i31_shared")?;
+                $self.validator().visit_ref_i31_shared()
+            }};
 
             // `global.get` is a valid const expression for imported, immutable
             // globals.
diff --git a/crates/wast/src/core/wast.rs b/crates/wast/src/core/wast.rs
index 9dd9a923..d71350f7 100644
--- a/crates/wast/src/core/wast.rs
+++ b/crates/wast/src/core/wast.rs
@@ -90,6 +90,8 @@ pub enum WastRetCore<'a> {
     RefStruct,
     /// A non-null i31ref is expected.
     RefI31,
+    /// A non-null, shared i31ref is expected.
+    RefI31Shared,
 
     Either(Vec<WastRetCore<'a>>),
 }
@@ -111,6 +113,7 @@ static RETS: &[(&str, fn(Parser<'_>) -> Result<WastRetCore<'_>>)] = {
         ("ref.array", |_| Ok(RefArray)),
         ("ref.struct", |_| Ok(RefStruct)),
         ("ref.i31", |_| Ok(RefI31)),
+        ("ref.i31_shared", |_| Ok(RefI31Shared)),
         ("either", |p| {
             p.depth_check()?;
             let mut cases = Vec::new();
diff --git a/src/bin/wasm-tools/json_from_wast.rs b/src/bin/wasm-tools/json_from_wast.rs
index f37a459f..02ff170d 100644
--- a/src/bin/wasm-tools/json_from_wast.rs
+++ b/src/bin/wasm-tools/json_from_wast.rs
@@ -462,6 +462,7 @@ impl<'a> JsonBuilder<'a> {
             RefArray => json::Const::ArrayRef,
             RefStruct => json::Const::StructRef,
             RefI31 => json::Const::I31Ref,
+            RefI31Shared => json::Const::I31RefShared,
             Either(either) => json::Const::Either {
                 values: either
                     .into_iter()
@@ -676,6 +677,7 @@ mod json {
         ArrayRef,
         StructRef,
         I31Ref,
+        I31RefShared,
         // (ref.null none)
         NullRef,
         // (ref.null nofunc)


Test patch:
diff --git a/crates/wasm-wave/tests/ui/reject-chars.out b/crates/wasm-wave/tests/ui/reject-chars.out
index 6ae4b719..fde86aab 100644
--- a/crates/wasm-wave/tests/ui/reject-chars.out
+++ b/crates/wasm-wave/tests/ui/reject-chars.out
@@ -1,7 +1,7 @@
 // Wrong length
 invalid token at 5..6
 invalid token at 5..9
-invalid token at 5..9
+invalid token at 5..13
 invalid token at 5..6
 // Invalid escapes
 invalid token at 5..6
diff --git a/crates/wit-component/tests/linking.rs b/crates/wit-component/tests/linking.rs
index d610ec4e..fdc020ab 100644
--- a/crates/wit-component/tests/linking.rs
+++ b/crates/wit-component/tests/linking.rs
@@ -202,10 +202,14 @@ fn linking() -> Result<()> {
         let mut store = Store::new(&engine, ());
         let instance = linker.instantiate(&mut store, &Component::new(&engine, &component)?)?;
         let func = instance
-            .exports(&mut store)
-            .instance("test:test/test")
-            .ok_or_else(|| anyhow!("instance `test:test/test` not found"))?
-            .typed_func::<(i32,), (i32,)>("bar")?;
+            .get_export(&mut store, None, "test:test/test")
+            .and_then(|i| instance.get_export(&mut store, Some(&i), "bar"))
+            .and_then(|f| {
+                instance
+                    .get_typed_func::<(i32,), (i32,)>(&mut store, &f)
+                    .ok()
+            })
+            .ok_or_else(|| anyhow!("func `test:test/test/bar` not found"))?;
 
         assert_eq!(65, func.call(&mut store, (7,))?.0);
     }
diff --git a/tests/local/shared-everything-threads/i31.wast b/tests/local/shared-everything-threads/i31.wast
index eec9a707..4d93ac73 100644
--- a/tests/local/shared-everything-threads/i31.wast
+++ b/tests/local/shared-everything-threads/i31.wast
@@ -1,5 +1,230 @@
 (module
-    (func (result (ref null (shared i31)))
-        (ref.i31_shared (i32.const 0))
-    )
+  (func (export "new") (param $i i32) (result (ref (shared i31)))
+    (ref.i31_shared (local.get $i))
+  )
+
+  (func (export "get_u") (param $i i32) (result i32)
+    (i31.get_u (ref.i31_shared (local.get $i)))
+  )
+  (func (export "get_s") (param $i i32) (result i32)
+    (i31.get_s (ref.i31_shared (local.get $i)))
+  )
+
+  (func (export "get_u-null") (result i32)
+    (i31.get_u (ref.null (shared i31)))
+  )
+  (func (export "get_s-null") (result i32)
+    (i31.get_u (ref.null (shared i31)))
+  )
+
+  (global $i (ref (shared i31)) (ref.i31_shared (i32.const 2)))
+  (global $m (mut (ref (shared i31))) (ref.i31_shared (i32.const 3)))
+
+  (func (export "get_globals") (result i32 i32)
+    (i31.get_u (global.get $i))
+    (i31.get_u (global.get $m))
+  )
+
+  (func (export "set_global") (param i32)
+    (global.set $m (ref.i31_shared (local.get 0)))
+  )
 )
+
+(assert_return (invoke "new" (i32.const 1)) (ref.i31_shared))
+
+(assert_return (invoke "get_u" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "get_u" (i32.const 100)) (i32.const 100))
+(assert_return (invoke "get_u" (i32.const -1)) (i32.const 0x7fff_ffff))
+(assert_return (invoke "get_u" (i32.const 0x3fff_ffff)) (i32.const 0x3fff_ffff))
+(assert_return (invoke "get_u" (i32.const 0x4000_0000)) (i32.const 0x4000_0000))
+(assert_return (invoke "get_u" (i32.const 0x7fff_ffff)) (i32.const 0x7fff_ffff))
+(assert_return (invoke "get_u" (i32.const 0xaaaa_aaaa)) (i32.const 0x2aaa_aaaa))
+(assert_return (invoke "get_u" (i32.const 0xcaaa_aaaa)) (i32.const 0x4aaa_aaaa))
+
+(assert_return (invoke "get_s" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "get_s" (i32.const 100)) (i32.const 100))
+(assert_return (invoke "get_s" (i32.const -1)) (i32.const -1))
+(assert_return (invoke "get_s" (i32.const 0x3fff_ffff)) (i32.const 0x3fff_ffff))
+(assert_return (invoke "get_s" (i32.const 0x4000_0000)) (i32.const -0x4000_0000))
+(assert_return (invoke "get_s" (i32.const 0x7fff_ffff)) (i32.const -1))
+(assert_return (invoke "get_s" (i32.const 0xaaaa_aaaa)) (i32.const 0x2aaa_aaaa))
+(assert_return (invoke "get_s" (i32.const 0xcaaa_aaaa)) (i32.const 0xcaaa_aaaa))
+
+(assert_trap (invoke "get_u-null") "null i31 reference")
+(assert_trap (invoke "get_s-null") "null i31 reference")
+
+(assert_return (invoke "get_globals") (i32.const 2) (i32.const 3))
+
+(invoke "set_global" (i32.const 1234))
+(assert_return (invoke "get_globals") (i32.const 2) (i32.const 1234))
+
+(module $tables_of_i31ref
+  (table $table 3 10 (ref null (shared i31)))
+  (elem (table $table) (i32.const 0) (ref null (shared i31))
+      (item (ref.i31_shared (i32.const 999)))
+      (item (ref.i31_shared (i32.const 888)))
+      (item (ref.i31_shared (i32.const 777))))
+
+  (func (export "size") (result i32)
+    table.size $table
+  )
+
+  (func (export "get") (param i32) (result i32)
+    (i31.get_u (table.get $table (local.get 0)))
+  )
+
+  (func (export "grow") (param i32 i32) (result i32)
+    (table.grow $table (ref.i31_shared (local.get 1)) (local.get 0))
+  )
+
+  (func (export "fill") (param i32 i32 i32)
+    (table.fill $table (local.get 0) (ref.i31_shared (local.get 1)) (local.get 2))
+  )
+
+  (func (export "copy") (param i32 i32 i32)
+    (table.copy $table $table (local.get 0) (local.get 1) (local.get 2))
+  )
+
+  (elem $elem (ref null (shared i31)) (item (ref.i31_shared (i32.const 123)))
+                                      (item (ref.i31_shared (i32.const 456)))
+                                      (item (ref.i31_shared (i32.const 789))))
+  (func (export "init") (param i32 i32 i32)
+    (table.init $table $elem (local.get 0) (local.get 1) (local.get 2))
+  )
+)
+
+;; Initial state.
+(assert_return (invoke "size") (i32.const 3))
+(assert_return (invoke "get" (i32.const 0)) (i32.const 999))
+(assert_return (invoke "get" (i32.const 1)) (i32.const 888))
+(assert_return (invoke "get" (i32.const 2)) (i32.const 777))
+
+;; Grow from size 3 to size 5.
+(assert_return (invoke "grow" (i32.const 2) (i32.const 333)) (i32.const 3))
+(assert_return (invoke "size") (i32.const 5))
+(assert_return (invoke "get" (i32.const 3)) (i32.const 333))
+(assert_return (invoke "get" (i32.const 4)) (i32.const 333))
+
+;; Fill table[2..4] = 111.
+(invoke "fill" (i32.const 2) (i32.const 111) (i32.const 2))
+(assert_return (invoke "get" (i32.const 2)) (i32.const 111))
+(assert_return (invoke "get" (i32.const 3)) (i32.const 111))
+
+;; Copy from table[0..2] to table[3..5].
+(invoke "copy" (i32.const 3) (i32.const 0) (i32.const 2))
+(assert_return (invoke "get" (i32.const 3)) (i32.const 999))
+(assert_return (invoke "get" (i32.const 4)) (i32.const 888))
+
+;; Initialize the passive element at table[1..4].
+(invoke "init" (i32.const 1) (i32.const 0) (i32.const 3))
+(assert_return (invoke "get" (i32.const 1)) (i32.const 123))
+(assert_return (invoke "get" (i32.const 2)) (i32.const 456))
+(assert_return (invoke "get" (i32.const 3)) (i32.const 789))
+
+(module $env
+  (global (export "g") i32 (i32.const 42))
+)
+(register "env")
+
+(module $i31ref_of_global_table_initializer
+  (global $g (import "env" "g") i32)
+  (table $t 3 3 (ref (shared i31)) (ref.i31_shared (global.get $g)))
+  (func (export "get") (param i32) (result i32)
+    (i31.get_u (local.get 0) (table.get $t))
+  )
+)
+
+(assert_return (invoke "get" (i32.const 0)) (i32.const 42))
+(assert_return (invoke "get" (i32.const 1)) (i32.const 42))
+(assert_return (invoke "get" (i32.const 2)) (i32.const 42))
+
+(module $i31ref_of_global_global_initializer
+  (global $g0 (import "env" "g") i32)
+  (global $g1 (ref null (shared i31)) (ref.i31_shared (global.get $g0)))
+  (func (export "get") (result i32)
+    (i31.get_u (global.get $g1))
+  )
+)
+
+(assert_return (invoke "get") (i32.const 42))
+
+(module $anyref_global_of_i31ref
+  (global $c (ref null (shared any)) (ref.i31_shared (i32.const 1234)))
+  (global $m (mut (ref null (shared any))) (ref.i31_shared (i32.const 5678)))
+
+  (func (export "get_globals") (result i32 i32)
+    (i31.get_u (ref.cast (ref null (shared i31)) (global.get $c)))
+    (i31.get_u (ref.cast (ref null (shared i31)) (global.get $m)))
+  )
+
+  (func (export "set_global") (param i32)
+    (global.set $m (ref.i31_shared (local.get 0)))
+  )
+)
+
+(assert_return (invoke "get_globals") (i32.const 1234) (i32.const 5678))
+(invoke "set_global" (i32.const 0))
+(assert_return (invoke "get_globals") (i32.const 1234) (i32.const 0))
+
+(module $anyref_table_of_i31ref
+  (table $table 3 10 (ref null (shared any)))
+  (elem (table $table) (i32.const 0) (ref null (shared i31))
+      (item (ref.i31_shared (i32.const 999)))
+      (item (ref.i31_shared (i32.const 888)))
+      (item (ref.i31_shared (i32.const 777))))
+
+  (func (export "size") (result i32)
+    table.size $table
+  )
+
+  (func (export "get") (param i32) (result i32)
+    (i31.get_u (ref.cast (ref null (shared i31)) (table.get $table (local.get 0))))
+  )
+
+  (func (export "grow") (param i32 i32) (result i32)
+    (table.grow $table (ref.i31_shared (local.get 1)) (local.get 0))
+  )
+
+  (func (export "fill") (param i32 i32 i32)
+    (table.fill $table (local.get 0) (ref.i31_shared (local.get 1)) (local.get 2))
+  )
+
+  (func (export "copy") (param i32 i32 i32)
+    (table.copy $table $table (local.get 0) (local.get 1) (local.get 2))
+  )
+
+  (elem $elem (ref null (shared i31)) (item (ref.i31_shared (i32.const 123)))
+                     (item (ref.i31_shared (i32.const 456)))
+                     (item (ref.i31_shared (i32.const 789))))
+  (func (export "init") (param i32 i32 i32)
+    (table.init $table $elem (local.get 0) (local.get 1) (local.get 2))
+  )
+)
+
+;; Initial state.
+(assert_return (invoke "size") (i32.const 3))
+(assert_return (invoke "get" (i32.const 0)) (i32.const 999))
+(assert_return (invoke "get" (i32.const 1)) (i32.const 888))
+(assert_return (invoke "get" (i32.const 2)) (i32.const 777))
+
+;; Grow from size 3 to size 5.
+(assert_return (invoke "grow" (i32.const 2) (i32.const 333)) (i32.const 3))
+(assert_return (invoke "size") (i32.const 5))
+(assert_return (invoke "get" (i32.const 3)) (i32.const 333))
+(assert_return (invoke "get" (i32.const 4)) (i32.const 333))
+
+;; Fill table[2..4] = 111.
+(invoke "fill" (i32.const 2) (i32.const 111) (i32.const 2))
+(assert_return (invoke "get" (i32.const 2)) (i32.const 111))
+(assert_return (invoke "get" (i32.const 3)) (i32.const 111))
+
+;; Copy from table[0..2] to table[3..5].
+(invoke "copy" (i32.const 3) (i32.const 0) (i32.const 2))
+(assert_return (invoke "get" (i32.const 3)) (i32.const 999))
+(assert_return (invoke "get" (i32.const 4)) (i32.const 888))
+
+;; Initialize the passive element at table[1..4].
+(invoke "init" (i32.const 1) (i32.const 0) (i32.const 3))
+(assert_return (invoke "get" (i32.const 1)) (i32.const 123))
+(assert_return (invoke "get" (i32.const 2)) (i32.const 456))
+(assert_return (invoke "get" (i32.const 3)) (i32.const 789))
diff --git a/tests/snapshots/local/shared-everything-threads/i31.wast.json b/tests/snapshots/local/shared-everything-threads/i31.wast.json
index 7c5e72a7..3e0878b1 100644
--- a/tests/snapshots/local/shared-everything-threads/i31.wast.json
+++ b/tests/snapshots/local/shared-everything-threads/i31.wast.json
@@ -5,6 +5,1305 @@
       "type": "module",
       "line": 1,
       "filename": "i31.0.wasm"
+    },
+    {
+      "type": "assert_return",
+      "line": 33,
+      "action": {
+        "type": "invoke",
+        "field": "new",
+        "args": [
+          {
+            "type": "i32",
+            "value": "1"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i31refshared"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 35,
+      "action": {
+        "type": "invoke",
+        "field": "get_u",
+        "args": [
+          {
+            "type": "i32",
+            "value": "0"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "0"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 36,
+      "action": {
+        "type": "invoke",
+        "field": "get_u",
+        "args": [
+          {
+            "type": "i32",
+            "value": "100"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "100"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 37,
+      "action": {
+        "type": "invoke",
+        "field": "get_u",
+        "args": [
+          {
+            "type": "i32",
+            "value": "-1"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "2147483647"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 38,
+      "action": {
+        "type": "invoke",
+        "field": "get_u",
+        "args": [
+          {
+            "type": "i32",
+            "value": "1073741823"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "1073741823"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 39,
+      "action": {
+        "type": "invoke",
+        "field": "get_u",
+        "args": [
+          {
+            "type": "i32",
+            "value": "1073741824"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "1073741824"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 40,
+      "action": {
+        "type": "invoke",
+        "field": "get_u",
+        "args": [
+          {
+            "type": "i32",
+            "value": "2147483647"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "2147483647"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 41,
+      "action": {
+        "type": "invoke",
+        "field": "get_u",
+        "args": [
+          {
+            "type": "i32",
+            "value": "-1431655766"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "715827882"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 42,
+      "action": {
+        "type": "invoke",
+        "field": "get_u",
+        "args": [
+          {
+            "type": "i32",
+            "value": "-894784854"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "1252698794"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 44,
+      "action": {
+        "type": "invoke",
+        "field": "get_s",
+        "args": [
+          {
+            "type": "i32",
+            "value": "0"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "0"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 45,
+      "action": {
+        "type": "invoke",
+        "field": "get_s",
+        "args": [
+          {
+            "type": "i32",
+            "value": "100"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "100"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 46,
+      "action": {
+        "type": "invoke",
+        "field": "get_s",
+        "args": [
+          {
+            "type": "i32",
+            "value": "-1"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "-1"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 47,
+      "action": {
+        "type": "invoke",
+        "field": "get_s",
+        "args": [
+          {
+            "type": "i32",
+            "value": "1073741823"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "1073741823"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 48,
+      "action": {
+        "type": "invoke",
+        "field": "get_s",
+        "args": [
+          {
+            "type": "i32",
+            "value": "1073741824"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "-1073741824"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 49,
+      "action": {
+        "type": "invoke",
+        "field": "get_s",
+        "args": [
+          {
+            "type": "i32",
+            "value": "2147483647"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "-1"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 50,
+      "action": {
+        "type": "invoke",
+        "field": "get_s",
+        "args": [
+          {
+            "type": "i32",
+            "value": "-1431655766"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "715827882"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 51,
+      "action": {
+        "type": "invoke",
+        "field": "get_s",
+        "args": [
+          {
+            "type": "i32",
+            "value": "-894784854"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "-894784854"
+        }
+      ]
+    },
+    {
+      "type": "assert_trap",
+      "line": 53,
+      "action": {
+        "type": "invoke",
+        "field": "get_u-null",
+        "args": []
+      },
+      "text": "null i31 reference"
+    },
+    {
+      "type": "assert_trap",
+      "line": 54,
+      "action": {
+        "type": "invoke",
+        "field": "get_s-null",
+        "args": []
+      },
+      "text": "null i31 reference"
+    },
+    {
+      "type": "assert_return",
+      "line": 56,
+      "action": {
+        "type": "invoke",
+        "field": "get_globals",
+        "args": []
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "2"
+        },
+        {
+          "type": "i32",
+          "value": "3"
+        }
+      ]
+    },
+    {
+      "type": "action",
+      "line": 58,
+      "action": {
+        "type": "invoke",
+        "field": "set_global",
+        "args": [
+          {
+            "type": "i32",
+            "value": "1234"
+          }
+        ]
+      }
+    },
+    {
+      "type": "assert_return",
+      "line": 59,
+      "action": {
+        "type": "invoke",
+        "field": "get_globals",
+        "args": []
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "2"
+        },
+        {
+          "type": "i32",
+          "value": "1234"
+        }
+      ]
+    },
+    {
+      "type": "module",
+      "line": 61,
+      "name": "tables_of_i31ref",
+      "filename": "i31.1.wasm"
+    },
+    {
+      "type": "assert_return",
+      "line": 97,
+      "action": {
+        "type": "invoke",
+        "field": "size",
+        "args": []
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "3"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 98,
+      "action": {
+        "type": "invoke",
+        "field": "get",
+        "args": [
+          {
+            "type": "i32",
+            "value": "0"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "999"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 99,
+      "action": {
+        "type": "invoke",
+        "field": "get",
+        "args": [
+          {
+            "type": "i32",
+            "value": "1"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "888"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 100,
+      "action": {
+        "type": "invoke",
+        "field": "get",
+        "args": [
+          {
+            "type": "i32",
+            "value": "2"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "777"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 103,
+      "action": {
+        "type": "invoke",
+        "field": "grow",
+        "args": [
+          {
+            "type": "i32",
+            "value": "2"
+          },
+          {
+            "type": "i32",
+            "value": "333"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "3"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 104,
+      "action": {
+        "type": "invoke",
+        "field": "size",
+        "args": []
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "5"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 105,
+      "action": {
+        "type": "invoke",
+        "field": "get",
+        "args": [
+          {
+            "type": "i32",
+            "value": "3"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "333"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 106,
+      "action": {
+        "type": "invoke",
+        "field": "get",
+        "args": [
+          {
+            "type": "i32",
+            "value": "4"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "333"
+        }
+      ]
+    },
+    {
+      "type": "action",
+      "line": 109,
+      "action": {
+        "type": "invoke",
+        "field": "fill",
+        "args": [
+          {
+            "type": "i32",
+            "value": "2"
+          },
+          {
+            "type": "i32",
+            "value": "111"
+          },
+          {
+            "type": "i32",
+            "value": "2"
+          }
+        ]
+      }
+    },
+    {
+      "type": "assert_return",
+      "line": 110,
+      "action": {
+        "type": "invoke",
+        "field": "get",
+        "args": [
+          {
+            "type": "i32",
+            "value": "2"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "111"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 111,
+      "action": {
+        "type": "invoke",
+        "field": "get",
+        "args": [
+          {
+            "type": "i32",
+            "value": "3"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "111"
+        }
+      ]
+    },
+    {
+      "type": "action",
+      "line": 114,
+      "action": {
+        "type": "invoke",
+        "field": "copy",
+        "args": [
+          {
+            "type": "i32",
+            "value": "3"
+          },
+          {
+            "type": "i32",
+            "value": "0"
+          },
+          {
+            "type": "i32",
+            "value": "2"
+          }
+        ]
+      }
+    },
+    {
+      "type": "assert_return",
+      "line": 115,
+      "action": {
+        "type": "invoke",
+        "field": "get",
+        "args": [
+          {
+            "type": "i32",
+            "value": "3"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "999"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 116,
+      "action": {
+        "type": "invoke",
+        "field": "get",
+        "args": [
+          {
+            "type": "i32",
+            "value": "4"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "888"
+        }
+      ]
+    },
+    {
+      "type": "action",
+      "line": 119,
+      "action": {
+        "type": "invoke",
+        "field": "init",
+        "args": [
+          {
+            "type": "i32",
+            "value": "1"
+          },
+          {
+            "type": "i32",
+            "value": "0"
+          },
+          {
+            "type": "i32",
+            "value": "3"
+          }
+        ]
+      }
+    },
+    {
+      "type": "assert_return",
+      "line": 120,
+      "action": {
+        "type": "invoke",
+        "field": "get",
+        "args": [
+          {
+            "type": "i32",
+            "value": "1"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "123"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 121,
+      "action": {
+        "type": "invoke",
+        "field": "get",
+        "args": [
+          {
+            "type": "i32",
+            "value": "2"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "456"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 122,
+      "action": {
+        "type": "invoke",
+        "field": "get",
+        "args": [
+          {
+            "type": "i32",
+            "value": "3"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "789"
+        }
+      ]
+    },
+    {
+      "type": "module",
+      "line": 124,
+      "name": "env",
+      "filename": "i31.2.wasm"
+    },
+    {
+      "type": "register",
+      "line": 127,
+      "as": "env"
+    },
+    {
+      "type": "module",
+      "line": 129,
+      "name": "i31ref_of_global_table_initializer",
+      "filename": "i31.3.wasm"
+    },
+    {
+      "type": "assert_return",
+      "line": 137,
+      "action": {
+        "type": "invoke",
+        "field": "get",
+        "args": [
+          {
+            "type": "i32",
+            "value": "0"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "42"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 138,
+      "action": {
+        "type": "invoke",
+        "field": "get",
+        "args": [
+          {
+            "type": "i32",
+            "value": "1"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "42"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 139,
+      "action": {
+        "type": "invoke",
+        "field": "get",
+        "args": [
+          {
+            "type": "i32",
+            "value": "2"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "42"
+        }
+      ]
+    },
+    {
+      "type": "module",
+      "line": 141,
+      "name": "i31ref_of_global_global_initializer",
+      "filename": "i31.4.wasm"
+    },
+    {
+      "type": "assert_return",
+      "line": 149,
+      "action": {
+        "type": "invoke",
+        "field": "get",
+        "args": []
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "42"
+        }
+      ]
+    },
+    {
+      "type": "module",
+      "line": 151,
+      "name": "anyref_global_of_i31ref",
+      "filename": "i31.5.wasm"
+    },
+    {
+      "type": "assert_return",
+      "line": 165,
+      "action": {
+        "type": "invoke",
+        "field": "get_globals",
+        "args": []
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "1234"
+        },
+        {
+          "type": "i32",
+          "value": "5678"
+        }
+      ]
+    },
+    {
+      "type": "action",
+      "line": 166,
+      "action": {
+        "type": "invoke",
+        "field": "set_global",
+        "args": [
+          {
+            "type": "i32",
+            "value": "0"
+          }
+        ]
+      }
+    },
+    {
+      "type": "assert_return",
+      "line": 167,
+      "action": {
+        "type": "invoke",
+        "field": "get_globals",
+        "args": []
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "1234"
+        },
+        {
+          "type": "i32",
+          "value": "0"
+        }
+      ]
+    },
+    {
+      "type": "module",
+      "line": 169,
+      "name": "anyref_table_of_i31ref",
+      "filename": "i31.6.wasm"
+    },
+    {
+      "type": "assert_return",
+      "line": 205,
+      "action": {
+        "type": "invoke",
+        "field": "size",
+        "args": []
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "3"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 206,
+      "action": {
+        "type": "invoke",
+        "field": "get",
+        "args": [
+          {
+            "type": "i32",
+            "value": "0"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "999"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 207,
+      "action": {
+        "type": "invoke",
+        "field": "get",
+        "args": [
+          {
+            "type": "i32",
+            "value": "1"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "888"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 208,
+      "action": {
+        "type": "invoke",
+        "field": "get",
+        "args": [
+          {
+            "type": "i32",
+            "value": "2"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "777"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 211,
+      "action": {
+        "type": "invoke",
+        "field": "grow",
+        "args": [
+          {
+            "type": "i32",
+            "value": "2"
+          },
+          {
+            "type": "i32",
+            "value": "333"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "3"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 212,
+      "action": {
+        "type": "invoke",
+        "field": "size",
+        "args": []
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "5"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 213,
+      "action": {
+        "type": "invoke",
+        "field": "get",
+        "args": [
+          {
+            "type": "i32",
+            "value": "3"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "333"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 214,
+      "action": {
+        "type": "invoke",
+        "field": "get",
+        "args": [
+          {
+            "type": "i32",
+            "value": "4"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "333"
+        }
+      ]
+    },
+    {
+      "type": "action",
+      "line": 217,
+      "action": {
+        "type": "invoke",
+        "field": "fill",
+        "args": [
+          {
+            "type": "i32",
+            "value": "2"
+          },
+          {
+            "type": "i32",
+            "value": "111"
+          },
+          {
+            "type": "i32",
+            "value": "2"
+          }
+        ]
+      }
+    },
+    {
+      "type": "assert_return",
+      "line": 218,
+      "action": {
+        "type": "invoke",
+        "field": "get",
+        "args": [
+          {
+            "type": "i32",
+            "value": "2"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "111"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 219,
+      "action": {
+        "type": "invoke",
+        "field": "get",
+        "args": [
+          {
+            "type": "i32",
+            "value": "3"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "111"
+        }
+      ]
+    },
+    {
+      "type": "action",
+      "line": 222,
+      "action": {
+        "type": "invoke",
+        "field": "copy",
+        "args": [
+          {
+            "type": "i32",
+            "value": "3"
+          },
+          {
+            "type": "i32",
+            "value": "0"
+          },
+          {
+            "type": "i32",
+            "value": "2"
+          }
+        ]
+      }
+    },
+    {
+      "type": "assert_return",
+      "line": 223,
+      "action": {
+        "type": "invoke",
+        "field": "get",
+        "args": [
+          {
+            "type": "i32",
+            "value": "3"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "999"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 224,
+      "action": {
+        "type": "invoke",
+        "field": "get",
+        "args": [
+          {
+            "type": "i32",
+            "value": "4"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "888"
+        }
+      ]
+    },
+    {
+      "type": "action",
+      "line": 227,
+      "action": {
+        "type": "invoke",
+        "field": "init",
+        "args": [
+          {
+            "type": "i32",
+            "value": "1"
+          },
+          {
+            "type": "i32",
+            "value": "0"
+          },
+          {
+            "type": "i32",
+            "value": "3"
+          }
+        ]
+      }
+    },
+    {
+      "type": "assert_return",
+      "line": 228,
+      "action": {
+        "type": "invoke",
+        "field": "get",
+        "args": [
+          {
+            "type": "i32",
+            "value": "1"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "123"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 229,
+      "action": {
+        "type": "invoke",
+        "field": "get",
+        "args": [
+          {
+            "type": "i32",
+            "value": "2"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "456"
+        }
+      ]
+    },
+    {
+      "type": "assert_return",
+      "line": 230,
+      "action": {
+        "type": "invoke",
+        "field": "get",
+        "args": [
+          {
+            "type": "i32",
+            "value": "3"
+          }
+        ]
+      },
+      "expected": [
+        {
+          "type": "i32",
+          "value": "789"
+        }
+      ]
     }
   ]
 }
\ No newline at end of file
diff --git a/tests/snapshots/local/shared-everything-threads/i31.wast/0.print b/tests/snapshots/local/shared-everything-threads/i31.wast/0.print
index d9d704e3..24e77e86 100644
--- a/tests/snapshots/local/shared-everything-threads/i31.wast/0.print
+++ b/tests/snapshots/local/shared-everything-threads/i31.wast/0.print
@@ -1,7 +1,49 @@
 (module
-  (type (;0;) (func (result (ref null (shared i31)))))
-  (func (;0;) (type 0) (result (ref null (shared i31)))
-    i32.const 0
+  (type (;0;) (func (param i32) (result (ref (shared i31)))))
+  (type (;1;) (func (param i32) (result i32)))
+  (type (;2;) (func (result i32)))
+  (type (;3;) (func (result i32 i32)))
+  (type (;4;) (func (param i32)))
+  (func (;0;) (type 0) (param $i i32) (result (ref (shared i31)))
+    local.get $i
     ref.i31_shared
   )
+  (func (;1;) (type 1) (param $i i32) (result i32)
+    local.get $i
+    ref.i31_shared
+    i31.get_u
+  )
+  (func (;2;) (type 1) (param $i i32) (result i32)
+    local.get $i
+    ref.i31_shared
+    i31.get_s
+  )
+  (func (;3;) (type 2) (result i32)
+    ref.null (shared i31)
+    i31.get_u
+  )
+  (func (;4;) (type 2) (result i32)
+    ref.null (shared i31)
+    i31.get_u
+  )
+  (func (;5;) (type 3) (result i32 i32)
+    global.get $i
+    i31.get_u
+    global.get $m
+    i31.get_u
+  )
+  (func (;6;) (type 4) (param i32)
+    local.get 0
+    ref.i31_shared
+    global.set $m
+  )
+  (global $i (;0;) (ref (shared i31)) i32.const 2 ref.i31_shared)
+  (global $m (;1;) (mut (ref (shared i31))) i32.const 3 ref.i31_shared)
+  (export "new" (func 0))
+  (export "get_u" (func 1))
+  (export "get_s" (func 2))
+  (export "get_u-null" (func 3))
+  (export "get_s-null" (func 4))
+  (export "get_globals" (func 5))
+  (export "set_global" (func 6))
 )
diff --git a/tests/snapshots/local/shared-everything-threads/i31.wast/23.print b/tests/snapshots/local/shared-everything-threads/i31.wast/23.print
new file mode 100644
index 00000000..8b37d4bd
--- /dev/null
+++ b/tests/snapshots/local/shared-everything-threads/i31.wast/23.print
@@ -0,0 +1,48 @@
+(module $tables_of_i31ref
+  (type (;0;) (func (result i32)))
+  (type (;1;) (func (param i32) (result i32)))
+  (type (;2;) (func (param i32 i32) (result i32)))
+  (type (;3;) (func (param i32 i32 i32)))
+  (func (;0;) (type 0) (result i32)
+    table.size $table
+  )
+  (func (;1;) (type 1) (param i32) (result i32)
+    local.get 0
+    table.get $table
+    i31.get_u
+  )
+  (func (;2;) (type 2) (param i32 i32) (result i32)
+    local.get 1
+    ref.i31_shared
+    local.get 0
+    table.grow $table
+  )
+  (func (;3;) (type 3) (param i32 i32 i32)
+    local.get 0
+    local.get 1
+    ref.i31_shared
+    local.get 2
+    table.fill $table
+  )
+  (func (;4;) (type 3) (param i32 i32 i32)
+    local.get 0
+    local.get 1
+    local.get 2
+    table.copy
+  )
+  (func (;5;) (type 3) (param i32 i32 i32)
+    local.get 0
+    local.get 1
+    local.get 2
+    table.init $elem
+  )
+  (table $table (;0;) 3 10 (ref null (shared i31)))
+  (export "size" (func 0))
+  (export "get" (func 1))
+  (export "grow" (func 2))
+  (export "fill" (func 3))
+  (export "copy" (func 4))
+  (export "init" (func 5))
+  (elem (;0;) (i32.const 0) (ref null (shared i31)) (item i32.const 999 ref.i31_shared) (item i32.const 888 ref.i31_shared) (item i32.const 777 ref.i31_shared))
+  (elem $elem (;1;) (ref null (shared i31)) (item i32.const 123 ref.i31_shared) (item i32.const 456 ref.i31_shared) (item i32.const 789 ref.i31_shared))
+)
diff --git a/tests/snapshots/local/shared-everything-threads/i31.wast/42.print b/tests/snapshots/local/shared-everything-threads/i31.wast/42.print
new file mode 100644
index 00000000..7e5820fe
--- /dev/null
+++ b/tests/snapshots/local/shared-everything-threads/i31.wast/42.print
@@ -0,0 +1,4 @@
+(module $env
+  (global (;0;) i32 i32.const 42)
+  (export "g" (global 0))
+)
diff --git a/tests/snapshots/local/shared-everything-threads/i31.wast/44.print b/tests/snapshots/local/shared-everything-threads/i31.wast/44.print
new file mode 100644
index 00000000..687223b6
--- /dev/null
+++ b/tests/snapshots/local/shared-everything-threads/i31.wast/44.print
@@ -0,0 +1,11 @@
+(module $i31ref_of_global_table_initializer
+  (type (;0;) (func (param i32) (result i32)))
+  (import "env" "g" (global $g (;0;) i32))
+  (func (;0;) (type 0) (param i32) (result i32)
+    local.get 0
+    table.get $t
+    i31.get_u
+  )
+  (table $t (;0;) 3 3 (ref (shared i31)) global.get $g ref.i31_shared)
+  (export "get" (func 0))
+)
diff --git a/tests/snapshots/local/shared-everything-threads/i31.wast/48.print b/tests/snapshots/local/shared-everything-threads/i31.wast/48.print
new file mode 100644
index 00000000..639fcee4
--- /dev/null
+++ b/tests/snapshots/local/shared-everything-threads/i31.wast/48.print
@@ -0,0 +1,10 @@
+(module $i31ref_of_global_global_initializer
+  (type (;0;) (func (result i32)))
+  (import "env" "g" (global $g0 (;0;) i32))
+  (func (;0;) (type 0) (result i32)
+    global.get $g1
+    i31.get_u
+  )
+  (global $g1 (;1;) (ref null (shared i31)) global.get $g0 ref.i31_shared)
+  (export "get" (func 0))
+)
diff --git a/tests/snapshots/local/shared-everything-threads/i31.wast/50.print b/tests/snapshots/local/shared-everything-threads/i31.wast/50.print
new file mode 100644
index 00000000..f810f1ad
--- /dev/null
+++ b/tests/snapshots/local/shared-everything-threads/i31.wast/50.print
@@ -0,0 +1,21 @@
+(module $anyref_global_of_i31ref
+  (type (;0;) (func (result i32 i32)))
+  (type (;1;) (func (param i32)))
+  (func (;0;) (type 0) (result i32 i32)
+    global.get $c
+    ref.cast (ref null (shared i31))
+    i31.get_u
+    global.get $m
+    ref.cast (ref null (shared i31))
+    i31.get_u
+  )
+  (func (;1;) (type 1) (param i32)
+    local.get 0
+    ref.i31_shared
+    global.set $m
+  )
+  (global $c (;0;) (ref null (shared any)) i32.const 1234 ref.i31_shared)
+  (global $m (;1;) (mut (ref null (shared any))) i32.const 5678 ref.i31_shared)
+  (export "get_globals" (func 0))
+  (export "set_global" (func 1))
+)
diff --git a/tests/snapshots/local/shared-everything-threads/i31.wast/54.print b/tests/snapshots/local/shared-everything-threads/i31.wast/54.print
new file mode 100644
index 00000000..c7b8a662
--- /dev/null
+++ b/tests/snapshots/local/shared-everything-threads/i31.wast/54.print
@@ -0,0 +1,49 @@
+(module $anyref_table_of_i31ref
+  (type (;0;) (func (result i32)))
+  (type (;1;) (func (param i32) (result i32)))
+  (type (;2;) (func (param i32 i32) (result i32)))
+  (type (;3;) (func (param i32 i32 i32)))
+  (func (;0;) (type 0) (result i32)
+    table.size $table
+  )
+  (func (;1;) (type 1) (param i32) (result i32)
+    local.get 0
+    table.get $table
+    ref.cast (ref null (shared i31))
+    i31.get_u
+  )
+  (func (;2;) (type 2) (param i32 i32) (result i32)
+    local.get 1
+    ref.i31_shared
+    local.get 0
+    table.grow $table
+  )
+  (func (;3;) (type 3) (param i32 i32 i32)
+    local.get 0
+    local.get 1
+    ref.i31_shared
+    local.get 2
+    table.fill $table
+  )
+  (func (;4;) (type 3) (param i32 i32 i32)
+    local.get 0
+    local.get 1
+    local.get 2
+    table.copy
+  )
+  (func (;5;) (type 3) (param i32 i32 i32)
+    local.get 0
+    local.get 1
+    local.get 2
+    table.init $elem
+  )
+  (table $table (;0;) 3 10 (ref null (shared any)))
+  (export "size" (func 0))
+  (export "get" (func 1))
+  (export "grow" (func 2))
+  (export "fill" (func 3))
+  (export "copy" (func 4))
+  (export "init" (func 5))
+  (elem (;0;) (i32.const 0) (ref null (shared i31)) (item i32.const 999 ref.i31_shared) (item i32.const 888 ref.i31_shared) (item i32.const 777 ref.i31_shared))
+  (elem $elem (;1;) (ref null (shared i31)) (item i32.const 123 ref.i31_shared) (item i32.const 456 ref.i31_shared) (item i32.const 789 ref.i31_shared))
+)