From 4f7e03d003ca94e34ebe7a5de3a5f278d49b0275 Mon Sep 17 00:00:00 2001 From: Dmitry Savonin Date: Fri, 17 Oct 2025 23:48:00 +0300 Subject: [PATCH 1/4] chore: new version of rwasm --- Cargo.lock | 20 ++++++++++---------- Cargo.toml | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index de94a3e281..2550cbaa6d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -371,7 +371,7 @@ dependencies = [ "alloy-rlp", "alloy-serde", "alloy-sol-types", - "itertools 0.13.0", + "itertools 0.14.0", "serde", "serde_json", "thiserror 2.0.12", @@ -1232,9 +1232,9 @@ dependencies = [ [[package]] name = "cfg-if" -version = "1.0.1" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "chrono" @@ -1389,7 +1389,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" dependencies = [ "lazy_static", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2043,7 +2043,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cea14ef9355e3beab063703aa9dab15afd25f0667c341310c1e5274bb1d0da18" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2857,7 +2857,7 @@ checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9" dependencies = [ "hermit-abi", "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -4575,7 +4575,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -4608,7 +4608,7 @@ dependencies = [ [[package]] name = "rwasm" version = "0.0.0" -source = "git+https://github.com/fluentlabs-xyz/rwasm?branch=devel#bf9f1bf5c13bcd157aa99f3a6bde968649712c52" +source = "git+https://github.com/fluentlabs-xyz/rwasm?branch=fix%2Fengine-acquired-stack#d27e7d33506154912af63463e7c972fcd9a36821" dependencies = [ "bincode 2.0.1", "bitvec", @@ -5177,7 +5177,7 @@ dependencies = [ "getrandom 0.3.3", "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -6183,7 +6183,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 41fad1c2e3..87e1d61a88 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -125,7 +125,7 @@ triehash = "0.8" walkdir = "2.5" # rwasm -rwasm = { git = "https://github.com/fluentlabs-xyz/rwasm", branch = "devel", default-features = false } +rwasm = { git = "https://github.com/fluentlabs-xyz/rwasm", branch = "fix/engine-acquired-stack", default-features = false } #rwasm = { path = "../../../rwasm", default-features = false } [workspace.package] From 8078eef7597aab37d6398e7ea2469b8a97fdd29d Mon Sep 17 00:00:00 2001 From: Dmitry Savonin Date: Sat, 18 Oct 2025 20:27:33 +0300 Subject: [PATCH 2/4] chore: update rwasm to the latest version --- Cargo.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2550cbaa6d..2725dda313 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -371,7 +371,7 @@ dependencies = [ "alloy-rlp", "alloy-serde", "alloy-sol-types", - "itertools 0.14.0", + "itertools 0.13.0", "serde", "serde_json", "thiserror 2.0.12", @@ -1389,7 +1389,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" dependencies = [ "lazy_static", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -2043,7 +2043,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cea14ef9355e3beab063703aa9dab15afd25f0667c341310c1e5274bb1d0da18" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -2857,7 +2857,7 @@ checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9" dependencies = [ "hermit-abi", "libc", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -4575,7 +4575,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -4608,7 +4608,7 @@ dependencies = [ [[package]] name = "rwasm" version = "0.0.0" -source = "git+https://github.com/fluentlabs-xyz/rwasm?branch=fix%2Fengine-acquired-stack#d27e7d33506154912af63463e7c972fcd9a36821" +source = "git+https://github.com/fluentlabs-xyz/rwasm?branch=fix%2Fengine-acquired-stack#50d252b4d250afa1be0ea4d919bc3c97450be759" dependencies = [ "bincode 2.0.1", "bitvec", @@ -5177,7 +5177,7 @@ dependencies = [ "getrandom 0.3.3", "once_cell", "rustix", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -6183,7 +6183,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] From 34e8c39de52664ad1611cf257e8e432ea4bac93e Mon Sep 17 00:00:00 2001 From: Dmitry Savonin Date: Mon, 3 Nov 2025 16:07:47 -0300 Subject: [PATCH 3/4] chore: update rwasm to the latest version --- Cargo.lock | 263 ++++++++++++++++++++++++++++++++--------------------- Cargo.toml | 4 +- 2 files changed, 162 insertions(+), 105 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2725dda313..8824686daa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1389,7 +1389,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" dependencies = [ "lazy_static", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -1486,32 +1486,36 @@ dependencies = [ [[package]] name = "cranelift-assembler-x64" -version = "0.121.1" -source = "git+https://github.com/fluentlabs-xyz/wasmtime?branch=devel#f0c5b017d2b7d59c84999123338da7634ab0cf1f" +version = "0.121.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ce81edaca6167d1f78da026afa92d7ff957a80aa82a79076e11cd34cde20165" dependencies = [ "cranelift-assembler-x64-meta", ] [[package]] name = "cranelift-assembler-x64-meta" -version = "0.121.1" -source = "git+https://github.com/fluentlabs-xyz/wasmtime?branch=devel#f0c5b017d2b7d59c84999123338da7634ab0cf1f" +version = "0.121.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d0d51e12f958551165969c6e8767e1e461729f6c1ccae923b0ba1d5cbcbbbf8" dependencies = [ "cranelift-srcgen", ] [[package]] name = "cranelift-bforest" -version = "0.121.1" -source = "git+https://github.com/fluentlabs-xyz/wasmtime?branch=devel#f0c5b017d2b7d59c84999123338da7634ab0cf1f" +version = "0.121.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41294c755094d2c8a514cea903039742474423f2e91601332eab5f4094f76333" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-bitset" -version = "0.121.1" -source = "git+https://github.com/fluentlabs-xyz/wasmtime?branch=devel#f0c5b017d2b7d59c84999123338da7634ab0cf1f" +version = "0.121.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebb6f5d0df5bd0d02c63ec48e8f2e38a176b123f59e084f22caf89a0d0593e7e" dependencies = [ "serde", "serde_derive", @@ -1520,7 +1524,8 @@ dependencies = [ [[package]] name = "cranelift-codegen" version = "0.121.1" -source = "git+https://github.com/fluentlabs-xyz/wasmtime?branch=devel#f0c5b017d2b7d59c84999123338da7634ab0cf1f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d1a10a8a2958b68ecd261e565eef285249e242a8447ac959978319eabbb4a55" dependencies = [ "bumpalo", "cranelift-assembler-x64", @@ -1546,7 +1551,8 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" version = "0.121.1" -source = "git+https://github.com/fluentlabs-xyz/wasmtime?branch=devel#f0c5b017d2b7d59c84999123338da7634ab0cf1f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f319986d5ae1386cfec625c70f8c01e52dc1f910aa6aaee7740bf8842d4e19c7" dependencies = [ "cranelift-assembler-x64-meta", "cranelift-codegen-shared", @@ -1556,21 +1562,24 @@ dependencies = [ [[package]] name = "cranelift-codegen-shared" -version = "0.121.1" -source = "git+https://github.com/fluentlabs-xyz/wasmtime?branch=devel#f0c5b017d2b7d59c84999123338da7634ab0cf1f" +version = "0.121.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2f36e74ba4033490587a47952f74390cb7d4f1fc1fa28ace50564e491f1e38f" [[package]] name = "cranelift-control" -version = "0.121.1" -source = "git+https://github.com/fluentlabs-xyz/wasmtime?branch=devel#f0c5b017d2b7d59c84999123338da7634ab0cf1f" +version = "0.121.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6671962c7d65b9a7ad038cd92da6784744d8a9ecf8ded8bb9a1f7046dbe2ccf" dependencies = [ "arbitrary", ] [[package]] name = "cranelift-entity" -version = "0.121.1" -source = "git+https://github.com/fluentlabs-xyz/wasmtime?branch=devel#f0c5b017d2b7d59c84999123338da7634ab0cf1f" +version = "0.121.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee832f8329fa87c5df6c1d64a8506a58031e6f8a190d9b21b1900272a4dbb47d" dependencies = [ "cranelift-bitset", "serde", @@ -1580,7 +1589,8 @@ dependencies = [ [[package]] name = "cranelift-frontend" version = "0.121.1" -source = "git+https://github.com/fluentlabs-xyz/wasmtime?branch=devel#f0c5b017d2b7d59c84999123338da7634ab0cf1f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4fce5fcf93c1fece95d0175b15fbaf0808b187430bc06c8ecde80db0ed58c5e" dependencies = [ "cranelift-codegen", "log", @@ -1591,12 +1601,14 @@ dependencies = [ [[package]] name = "cranelift-isle" version = "0.121.1" -source = "git+https://github.com/fluentlabs-xyz/wasmtime?branch=devel#f0c5b017d2b7d59c84999123338da7634ab0cf1f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13fc8d838a2bf28438dbaf6ccdbc34531b6a972054f43fd23be7f124121ce6e0" [[package]] name = "cranelift-native" version = "0.121.1" -source = "git+https://github.com/fluentlabs-xyz/wasmtime?branch=devel#f0c5b017d2b7d59c84999123338da7634ab0cf1f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0975ce66adcf2e0729d06b1d3efea0398d793d1f39c2e0a6f52a347537836693" dependencies = [ "cranelift-codegen", "libc", @@ -1605,8 +1617,9 @@ dependencies = [ [[package]] name = "cranelift-srcgen" -version = "0.121.1" -source = "git+https://github.com/fluentlabs-xyz/wasmtime?branch=devel#f0c5b017d2b7d59c84999123338da7634ab0cf1f" +version = "0.121.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3d9071bc5ee5573e723d9d84a45b7025a29e8f2c5ad81b3b9d0293129541d9" [[package]] name = "crc" @@ -2043,7 +2056,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cea14ef9355e3beab063703aa9dab15afd25f0667c341310c1e5274bb1d0da18" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2857,7 +2870,7 @@ checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9" dependencies = [ "hermit-abi", "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3920,7 +3933,8 @@ dependencies = [ [[package]] name = "pulley-interpreter" version = "34.0.1" -source = "git+https://github.com/fluentlabs-xyz/wasmtime?branch=devel#f0c5b017d2b7d59c84999123338da7634ab0cf1f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe0e8f39bc99694ce6fc8df7df7ed258d38d255a9268e2ff964f67f4a6588cdb" dependencies = [ "cranelift-bitset", "log", @@ -3931,7 +3945,8 @@ dependencies = [ [[package]] name = "pulley-macros" version = "34.0.1" -source = "git+https://github.com/fluentlabs-xyz/wasmtime?branch=devel#f0c5b017d2b7d59c84999123338da7634ab0cf1f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9276d404009cc49f3b8befeb8ffc1d868c5ea732bd9d72ab3e64231187f908c5" dependencies = [ "proc-macro2", "quote", @@ -4575,7 +4590,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -4607,8 +4622,8 @@ dependencies = [ [[package]] name = "rwasm" -version = "0.0.0" -source = "git+https://github.com/fluentlabs-xyz/rwasm?branch=fix%2Fengine-acquired-stack#50d252b4d250afa1be0ea4d919bc3c97450be759" +version = "0.3.2" +source = "git+https://github.com/fluentlabs-xyz/rwasm?branch=devel#61894b725fb6a9f31ccb237328a74e29e7b9002d" dependencies = [ "bincode 2.0.1", "bitvec", @@ -4625,7 +4640,7 @@ dependencies = [ "tiny-keccak", "wasmi", "wasmparser-nostd", - "wasmtime", + "wasmtime-rwasm", ] [[package]] @@ -5177,7 +5192,7 @@ dependencies = [ "getrandom 0.3.3", "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -5865,65 +5880,11 @@ dependencies = [ "wasmparser 0.233.0", ] -[[package]] -name = "wasmtime" -version = "34.0.1" -source = "git+https://github.com/fluentlabs-xyz/wasmtime?branch=devel#f0c5b017d2b7d59c84999123338da7634ab0cf1f" -dependencies = [ - "addr2line", - "anyhow", - "async-trait", - "bitflags", - "bumpalo", - "cc", - "cfg-if", - "encoding_rs", - "fxprof-processed-profile", - "gimli", - "hashbrown 0.15.4", - "indexmap 2.9.0", - "ittapi", - "libc", - "log", - "mach2", - "memfd", - "object", - "once_cell", - "postcard", - "psm", - "pulley-interpreter", - "rayon", - "rustix", - "semver 1.0.26", - "serde", - "serde_derive", - "serde_json", - "smallvec", - "target-lexicon", - "trait-variant", - "wasm-encoder 0.233.0", - "wasmparser 0.233.0", - "wasmtime-asm-macros", - "wasmtime-cache", - "wasmtime-component-macro", - "wasmtime-component-util", - "wasmtime-cranelift", - "wasmtime-environ", - "wasmtime-fiber", - "wasmtime-jit-debug", - "wasmtime-jit-icache-coherence", - "wasmtime-math", - "wasmtime-slab", - "wasmtime-versioned-export-macros", - "wasmtime-winch", - "wat", - "windows-sys 0.59.0", -] - [[package]] name = "wasmtime-asm-macros" version = "34.0.1" -source = "git+https://github.com/fluentlabs-xyz/wasmtime?branch=devel#f0c5b017d2b7d59c84999123338da7634ab0cf1f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c45ecc343d3ad4629d5882e94f3b0f0fac22a043c07e64373381168ae00c259" dependencies = [ "cfg-if", ] @@ -5931,7 +5892,8 @@ dependencies = [ [[package]] name = "wasmtime-cache" version = "34.0.1" -source = "git+https://github.com/fluentlabs-xyz/wasmtime?branch=devel#f0c5b017d2b7d59c84999123338da7634ab0cf1f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3eb1976337108c8b9f80b05e9b909bf603f85c4ea97e31c112876a36d3cdcb98" dependencies = [ "anyhow", "base64", @@ -5950,7 +5912,8 @@ dependencies = [ [[package]] name = "wasmtime-component-macro" version = "34.0.1" -source = "git+https://github.com/fluentlabs-xyz/wasmtime?branch=devel#f0c5b017d2b7d59c84999123338da7634ab0cf1f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3491c0f2511be561a92ac9b086351abc3a0f48c5f5f7d14f3975e246c13838be" dependencies = [ "anyhow", "proc-macro2", @@ -5964,12 +5927,14 @@ dependencies = [ [[package]] name = "wasmtime-component-util" version = "34.0.1" -source = "git+https://github.com/fluentlabs-xyz/wasmtime?branch=devel#f0c5b017d2b7d59c84999123338da7634ab0cf1f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26bc084e249f74e61c79077d8937c34fb0af223752b9b1725e3d7ed94b006f23" [[package]] name = "wasmtime-cranelift" version = "34.0.1" -source = "git+https://github.com/fluentlabs-xyz/wasmtime?branch=devel#f0c5b017d2b7d59c84999123338da7634ab0cf1f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0010bd93362c634837e6bb13e213c2d83673b28dc12208b64ddd821fa55f7d33" dependencies = [ "anyhow", "cfg-if", @@ -5982,7 +5947,6 @@ dependencies = [ "itertools 0.14.0", "log", "object", - "pulley-interpreter", "smallvec", "target-lexicon", "thiserror 2.0.12", @@ -5995,7 +5959,8 @@ dependencies = [ [[package]] name = "wasmtime-environ" version = "34.0.1" -source = "git+https://github.com/fluentlabs-xyz/wasmtime?branch=devel#f0c5b017d2b7d59c84999123338da7634ab0cf1f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36a035dc308ff6be3d790dafdc2e41a128415e20ad864580da49470073e21dc1" dependencies = [ "anyhow", "cpp_demangle", @@ -6021,7 +5986,8 @@ dependencies = [ [[package]] name = "wasmtime-fiber" version = "34.0.1" -source = "git+https://github.com/fluentlabs-xyz/wasmtime?branch=devel#f0c5b017d2b7d59c84999123338da7634ab0cf1f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc3c1e4e70cdd3a4572dff79062caa48988f7f1ccf6850d98a4e4c41bf3cfc8" dependencies = [ "anyhow", "cc", @@ -6036,7 +6002,8 @@ dependencies = [ [[package]] name = "wasmtime-jit-debug" version = "34.0.1" -source = "git+https://github.com/fluentlabs-xyz/wasmtime?branch=devel#f0c5b017d2b7d59c84999123338da7634ab0cf1f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5d83fa2dea686f76b5437b66045aae6351d359ee11cc4124f9842de63837b81" dependencies = [ "cc", "object", @@ -6047,7 +6014,8 @@ dependencies = [ [[package]] name = "wasmtime-jit-icache-coherence" version = "34.0.1" -source = "git+https://github.com/fluentlabs-xyz/wasmtime?branch=devel#f0c5b017d2b7d59c84999123338da7634ab0cf1f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c71d64e8ebe132cd45e9d299a4d0daf261d66bd05cf50a204a1bf8cf96ff1f" dependencies = [ "anyhow", "cfg-if", @@ -6058,20 +6026,106 @@ dependencies = [ [[package]] name = "wasmtime-math" version = "34.0.1" -source = "git+https://github.com/fluentlabs-xyz/wasmtime?branch=devel#f0c5b017d2b7d59c84999123338da7634ab0cf1f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "222bfa4769c6931c985711eb49a92748ea0acc4ca85fcd24e945a2f1bacda0c1" dependencies = [ "libm", ] +[[package]] +name = "wasmtime-rwasm" +version = "34.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e2a7abdccb3ea676c977e0bb4757de6a765c98d3c2baf703be9b8fd2a0ec170" +dependencies = [ + "addr2line", + "anyhow", + "async-trait", + "bitflags", + "bumpalo", + "cc", + "cfg-if", + "encoding_rs", + "fxprof-processed-profile", + "gimli", + "hashbrown 0.15.4", + "indexmap 2.9.0", + "ittapi", + "libc", + "log", + "mach2", + "memfd", + "object", + "once_cell", + "postcard", + "psm", + "pulley-interpreter", + "rayon", + "rustix", + "semver 1.0.26", + "serde", + "serde_derive", + "serde_json", + "smallvec", + "target-lexicon", + "trait-variant", + "wasm-encoder 0.233.0", + "wasmparser 0.233.0", + "wasmtime-asm-macros", + "wasmtime-cache", + "wasmtime-component-macro", + "wasmtime-component-util", + "wasmtime-environ", + "wasmtime-fiber", + "wasmtime-jit-debug", + "wasmtime-jit-icache-coherence", + "wasmtime-math", + "wasmtime-rwasm-cranelift", + "wasmtime-slab", + "wasmtime-versioned-export-macros", + "wasmtime-winch", + "wat", + "windows-sys 0.59.0", +] + +[[package]] +name = "wasmtime-rwasm-cranelift" +version = "34.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "477548a15bd19bf151b292b9c97060e42f17aa24b3d9fbc3da36a0b400c3405e" +dependencies = [ + "anyhow", + "cfg-if", + "cranelift-codegen", + "cranelift-control", + "cranelift-entity", + "cranelift-frontend", + "cranelift-native", + "gimli", + "itertools 0.14.0", + "log", + "object", + "pulley-interpreter", + "smallvec", + "target-lexicon", + "thiserror 2.0.12", + "wasmparser 0.233.0", + "wasmtime-environ", + "wasmtime-math", + "wasmtime-versioned-export-macros", +] + [[package]] name = "wasmtime-slab" version = "34.0.1" -source = "git+https://github.com/fluentlabs-xyz/wasmtime?branch=devel#f0c5b017d2b7d59c84999123338da7634ab0cf1f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ac42c7fb0639f7c3e0c1ed0c984050245c55410f3fae334dd5b102e0edfab14" [[package]] name = "wasmtime-versioned-export-macros" version = "34.0.1" -source = "git+https://github.com/fluentlabs-xyz/wasmtime?branch=devel#f0c5b017d2b7d59c84999123338da7634ab0cf1f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e052e1d9c30b8f31aff64380caaaff492a9890a412658bcc8866fe626b8e91f" dependencies = [ "proc-macro2", "quote", @@ -6081,7 +6135,8 @@ dependencies = [ [[package]] name = "wasmtime-winch" version = "34.0.1" -source = "git+https://github.com/fluentlabs-xyz/wasmtime?branch=devel#f0c5b017d2b7d59c84999123338da7634ab0cf1f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2d71e002033124221f6633a462c26067280519fdd7527ba2751f585db779cc6" dependencies = [ "anyhow", "cranelift-codegen", @@ -6097,7 +6152,8 @@ dependencies = [ [[package]] name = "wasmtime-wit-bindgen" version = "34.0.1" -source = "git+https://github.com/fluentlabs-xyz/wasmtime?branch=devel#f0c5b017d2b7d59c84999123338da7634ab0cf1f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f967f5efaaac7694e6bd0d67542a5a036830860e4adf95684260181e85a5d299" dependencies = [ "anyhow", "heck", @@ -6183,7 +6239,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -6195,7 +6251,8 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "winch-codegen" version = "34.0.1" -source = "git+https://github.com/fluentlabs-xyz/wasmtime?branch=devel#f0c5b017d2b7d59c84999123338da7634ab0cf1f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d2bf456780101aff8950642fdf984f182816d7f555d5375699200242be78762" dependencies = [ "anyhow", "cranelift-assembler-x64", diff --git a/Cargo.toml b/Cargo.toml index 87e1d61a88..22516286ea 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -125,8 +125,8 @@ triehash = "0.8" walkdir = "2.5" # rwasm -rwasm = { git = "https://github.com/fluentlabs-xyz/rwasm", branch = "fix/engine-acquired-stack", default-features = false } -#rwasm = { path = "../../../rwasm", default-features = false } +rwasm = { git = "https://github.com/fluentlabs-xyz/rwasm", branch = "devel", default-features = false } +#rwasm = { path = "../rwasm", default-features = false } [workspace.package] license = "MIT" From 05093522018b29838d9b48ed5099f14fb7e5d139 Mon Sep 17 00:00:00 2001 From: Stanislav Stepanov Date: Mon, 17 Nov 2025 11:24:24 +0700 Subject: [PATCH 4/4] feat(feat/svm-under-feature): put svm under feature --- crates/primitives/Cargo.toml | 7 ++++--- crates/primitives/src/wasm.rs | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/crates/primitives/Cargo.toml b/crates/primitives/Cargo.toml index 3379e60905..5423daa15c 100644 --- a/crates/primitives/Cargo.toml +++ b/crates/primitives/Cargo.toml @@ -30,9 +30,9 @@ serde = { workspace = true, features = ["derive", "rc"], optional = true } [features] default = ["std"] std = [ - "alloy-primitives/std", - "serde?/std", - "num_enum/std" + "alloy-primitives/std", + "serde?/std", + "num_enum/std" ] serde = ["dep:serde", "alloy-primitives/serde"] @@ -40,3 +40,4 @@ hashbrown = ["alloy-primitives/map-hashbrown"] arbitrary = ["std", "alloy-primitives/arbitrary"] asm-keccak = ["alloy-primitives/asm-keccak"] rand = ["alloy-primitives/rand"] +svm = [] diff --git a/crates/primitives/src/wasm.rs b/crates/primitives/src/wasm.rs index 184ae45801..2cf6d1092e 100644 --- a/crates/primitives/src/wasm.rs +++ b/crates/primitives/src/wasm.rs @@ -5,6 +5,7 @@ pub const WASM_MAX_CODE_SIZE: usize = 0x200000; /// SVM max code size +#[cfg(feature = "svm")] pub const SVM_MAX_CODE_SIZE: usize = 0x200000; /// ERC20 max code size (25kB) @@ -21,6 +22,7 @@ pub const EVM_MAX_CODE_SIZE: usize = crate::eip170::MAX_CODE_SIZE; pub const WASM_MAGIC_BYTES: [u8; 4] = [0x00, 0x61, 0x73, 0x6d]; /// SVM magic bytes (ELF header) +#[cfg(feature = "svm")] pub const SVM_ELF_MAGIC_BYTES: [u8; 4] = [0x7f, 0x45, 0x4c, 0x46]; /// ERC20 magic bytes: as char codes for "ERC" and the number 0x20 @@ -33,6 +35,7 @@ pub fn wasm_max_code_size>(input: T) -> Option { let input: [u8; 4] = input.as_ref().get(0..4)?.try_into().unwrap(); match input { WASM_MAGIC_BYTES => Some(WASM_MAX_CODE_SIZE), + #[cfg(feature = "svm")] SVM_ELF_MAGIC_BYTES => Some(SVM_MAX_CODE_SIZE), ERC20_MAGIC_BYTES => Some(ERC20_MAX_CODE_SIZE), _ => None,