Use wat instead of wabt to avoid CI cmake error (and use supported dep) (#1980)

This commit is contained in:
James Wilson
2025-04-03 10:22:46 +01:00
committed by GitHub
parent 054140be1d
commit cdab21e8c3
4 changed files with 78 additions and 56 deletions
Generated
+74 -51
View File
@@ -854,15 +854,6 @@ version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce"
[[package]]
name = "cmake"
version = "0.1.50"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130"
dependencies = [
"cc",
]
[[package]]
name = "color-eyre"
version = "0.6.3"
@@ -1079,7 +1070,7 @@ dependencies = [
"itertools 0.10.5",
"log",
"smallvec",
"wasmparser",
"wasmparser 0.102.0",
"wasmtime-types",
]
@@ -1962,12 +1953,6 @@ version = "0.28.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253"
[[package]]
name = "glob"
version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb"
[[package]]
name = "glob"
version = "0.3.1"
@@ -2043,7 +2028,7 @@ dependencies = [
"futures-core",
"futures-sink",
"http",
"indexmap 2.2.6",
"indexmap 2.8.0",
"slab",
"tokio",
"tokio-util",
@@ -2101,6 +2086,12 @@ dependencies = [
"serde",
]
[[package]]
name = "hashbrown"
version = "0.15.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289"
[[package]]
name = "heck"
version = "0.5.0"
@@ -2371,12 +2362,12 @@ dependencies = [
[[package]]
name = "indexmap"
version = "2.2.6"
version = "2.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26"
checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058"
dependencies = [
"equivalent",
"hashbrown 0.14.5",
"hashbrown 0.15.2",
]
[[package]]
@@ -2436,7 +2427,7 @@ dependencies = [
"tokio",
"tracing",
"tracing-subscriber",
"wabt",
"wat",
]
[[package]]
@@ -2727,6 +2718,12 @@ version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]]
name = "leb128fmt"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2"
[[package]]
name = "libc"
version = "0.2.169"
@@ -5750,7 +5747,7 @@ version = "0.21.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1"
dependencies = [
"indexmap 2.2.6",
"indexmap 2.8.0",
"toml_datetime",
"winnow 0.5.40",
]
@@ -5761,7 +5758,7 @@ version = "0.22.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef"
dependencies = [
"indexmap 2.2.6",
"indexmap 2.8.0",
"serde",
"serde_spanned",
"toml_datetime",
@@ -5902,7 +5899,7 @@ version = "1.0.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "207aa50d36c4be8d8c6ea829478be44a372c6a77669937bb39c698e52f1491e8"
dependencies = [
"glob 0.3.1",
"glob",
"serde",
"serde_derive",
"serde_json",
@@ -5988,6 +5985,12 @@ dependencies = [
"tinyvec",
]
[[package]]
name = "unicode-width"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd"
[[package]]
name = "unicode-xid"
version = "0.2.4"
@@ -6083,29 +6086,6 @@ dependencies = [
"zeroize",
]
[[package]]
name = "wabt"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "00bef93d5e6c81a293bccf107cf43aa47239382f455ba14869d36695d8963b9c"
dependencies = [
"serde",
"serde_derive",
"serde_json",
"wabt-sys",
]
[[package]]
name = "wabt-sys"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a4e043159f63e16986e713e9b5e1c06043df4848565bf672e27c523864c7791"
dependencies = [
"cc",
"cmake",
"glob 0.2.11",
]
[[package]]
name = "wait-timeout"
version = "0.2.0"
@@ -6207,6 +6187,16 @@ version = "0.2.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484"
[[package]]
name = "wasm-encoder"
version = "0.228.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05d30290541f2d4242a162bbda76b8f2d8b1ac59eab3568ed6f2327d52c9b2c4"
dependencies = [
"leb128fmt",
"wasmparser 0.228.0",
]
[[package]]
name = "wasm-instrument"
version = "0.4.0"
@@ -6266,6 +6256,17 @@ dependencies = [
"url",
]
[[package]]
name = "wasmparser"
version = "0.228.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4abf1132c1fdf747d56bbc1bb52152400c70f336870f968b85e89ea422198ae3"
dependencies = [
"bitflags 2.5.0",
"indexmap 2.8.0",
"semver",
]
[[package]]
name = "wasmparser-nostd"
version = "0.100.2"
@@ -6294,7 +6295,7 @@ dependencies = [
"rayon",
"serde",
"target-lexicon",
"wasmparser",
"wasmparser 0.102.0",
"wasmtime-cache",
"wasmtime-cranelift",
"wasmtime-environ",
@@ -6349,7 +6350,7 @@ dependencies = [
"object 0.30.4",
"target-lexicon",
"thiserror 1.0.64",
"wasmparser",
"wasmparser 0.102.0",
"wasmtime-cranelift-shared",
"wasmtime-environ",
]
@@ -6384,7 +6385,7 @@ dependencies = [
"serde",
"target-lexicon",
"thiserror 1.0.64",
"wasmparser",
"wasmparser 0.102.0",
"wasmtime-types",
]
@@ -6467,7 +6468,29 @@ dependencies = [
"cranelift-entity",
"serde",
"thiserror 1.0.64",
"wasmparser",
"wasmparser 0.102.0",
]
[[package]]
name = "wast"
version = "228.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e5aae124478cb51439f6587f074a3a5e835afd22751c59a87b2e2a882727c97"
dependencies = [
"bumpalo",
"leb128fmt",
"memchr",
"unicode-width",
"wasm-encoder",
]
[[package]]
name = "wat"
version = "1.228.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ec29c89a8d055df988de7236483bf569988ac3d6905899f6af5ef920f9385ad"
dependencies = [
"wast",
]
[[package]]
+1 -1
View File
@@ -112,7 +112,7 @@ tracing-wasm = "0.2.1"
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
trybuild = "1.0.99"
url = "2.5.2"
wabt = "0.10.0"
wat = "1.228.0"
wasm-bindgen-test = "0.3.24"
which = "6.0.3"
strip-ansi-escapes = "0.2.0"
+1 -1
View File
@@ -46,7 +46,7 @@ test-runtime = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
wabt = { workspace = true }
wat = { workspace = true }
substrate-runner = { workspace = true }
subxt-test-macro = { path = "subxt-test-macro" }
@@ -47,7 +47,7 @@ impl ContractsTestContext {
}
async fn upload_code(&self) -> Result<Hash, Error> {
let code = wabt::wat2wasm(CONTRACT).expect("invalid wabt");
let code = wat::parse_str(CONTRACT).expect("invalid wat");
let upload_tx =
node_runtime::tx()
@@ -74,8 +74,7 @@ impl ContractsTestContext {
}
async fn instantiate_with_code(&self) -> Result<(Hash, AccountId), Error> {
tracing::info!("instantiate_with_code:");
let code = wabt::wat2wasm(CONTRACT).expect("invalid wabt");
let code = wat::parse_str(CONTRACT).expect("invalid wat");
let instantiate_tx = node_runtime::tx().contracts().instantiate_with_code(
100_000_000_000_000_000, // endowment