Remove substrate-wasm-builder

By defining our own build script, we gain complete clarity and control over how
the WASM is built. This also removes the need to patch the upstream due to it
allowing pollution of the environment variables from the host.

Notable appreciation is given to
https://github.com/rust-lang/rust/issues/145491 for identifying an issue
encountered here, with the associated PR clarifying the necessary flags for the
linker to fix this.
This commit is contained in:
Luke Parker
2025-12-04 20:07:52 -05:00
parent 36ac9c56a4
commit b791256648
7 changed files with 104 additions and 90 deletions

72
Cargo.lock generated
View File

@@ -1445,38 +1445,6 @@ dependencies = [
name = "c-kzg"
version = "2.99.99"
[[package]]
name = "camino"
version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "276a59bf2b2c967788139340c9f0c5b12d7fd6630315c15c217e559de85d2609"
dependencies = [
"serde_core",
]
[[package]]
name = "cargo-platform"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea"
dependencies = [
"serde",
]
[[package]]
name = "cargo_metadata"
version = "0.19.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba"
dependencies = [
"camino",
"cargo-platform",
"semver",
"serde",
"serde_json",
"thiserror 2.0.17",
]
[[package]]
name = "cc"
version = "1.2.48"
@@ -7080,15 +7048,6 @@ dependencies = [
"bytemuck",
]
[[package]]
name = "same-file"
version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
dependencies = [
"winapi-util",
]
[[package]]
name = "sc-allocator"
version = "34.0.0"
@@ -8096,10 +8055,6 @@ name = "semver"
version = "1.0.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2"
dependencies = [
"serde",
"serde_core",
]
[[package]]
name = "serai-abi"
@@ -9033,7 +8988,6 @@ dependencies = [
"sp-timestamp",
"sp-transaction-pool",
"sp-version",
"substrate-wasm-builder",
]
[[package]]
@@ -10117,22 +10071,6 @@ dependencies = [
"thiserror 2.0.17",
]
[[package]]
name = "substrate-wasm-builder"
version = "29.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [
"cargo_metadata",
"console",
"jobserver",
"parity-wasm",
"shlex",
"strum 0.27.2",
"tempfile",
"toml 0.9.8",
"walkdir",
]
[[package]]
name = "subtle"
version = "2.6.1"
@@ -10874,16 +10812,6 @@ dependencies = [
"libc",
]
[[package]]
name = "walkdir"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b"
dependencies = [
"same-file",
"winapi-util",
]
[[package]]
name = "want"
version = "0.3.1"