Move to wasm32v1-none from wasm32-unknown-unknown

Works towards fixing how the Substrate node Docker image no longer works.
This commit is contained in:
Luke Parker
2025-08-15 10:55:05 -04:00
parent e3809b2ff1
commit a32b97be88
9 changed files with 233 additions and 197 deletions

View File

@@ -26,7 +26,7 @@ jobs:
uses: ./.github/actions/build-dependencies uses: ./.github/actions/build-dependencies
- name: Install nightly rust - name: Install nightly rust
run: rustup toolchain install ${{ steps.nightly.outputs.version }} --profile minimal -t wasm32-unknown-unknown -c clippy run: rustup toolchain install ${{ steps.nightly.outputs.version }} --profile minimal -t wasm32v1-none -c clippy
- name: Run Clippy - name: Run Clippy
run: cargo +${{ steps.nightly.outputs.version }} clippy --all-features --all-targets -- -D warnings -A clippy::items_after_test_module run: cargo +${{ steps.nightly.outputs.version }} clippy --all-features --all-targets -- -D warnings -A clippy::items_after_test_module

View File

@@ -69,7 +69,7 @@ jobs:
uses: ./.github/actions/build-dependencies uses: ./.github/actions/build-dependencies
- name: Buld Rust docs - name: Buld Rust docs
run: | run: |
rustup toolchain install ${{ steps.nightly.outputs.version }} --profile minimal -t wasm32-unknown-unknown -c rust-docs rustup toolchain install ${{ steps.nightly.outputs.version }} --profile minimal -t wasm32v1-none -c rust-docs
RUSTDOCFLAGS="--cfg docsrs" cargo +${{ steps.nightly.outputs.version }} doc --workspace --all-features RUSTDOCFLAGS="--cfg docsrs" cargo +${{ steps.nightly.outputs.version }} doc --workspace --all-features
mv target/doc docs/_site/rust mv target/doc docs/_site/rust

404
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -11,7 +11,7 @@ RUN rm -rf /etc/apt/sources.list.d/debian.sources && \
RUN apt update -y && apt upgrade -y && apt install -y clang RUN apt update -y && apt upgrade -y && apt install -y clang
# Add the wasm toolchain # Add the wasm toolchain
RUN rustup target add wasm32-unknown-unknown RUN rustup target add wasm32v1-none
FROM deterministic FROM deterministic

View File

@@ -160,7 +160,7 @@ RUN apt install -y pkg-config clang
RUN apt install -y make protobuf-compiler RUN apt install -y make protobuf-compiler
# Add the wasm toolchain # Add the wasm toolchain
RUN rustup target add wasm32-unknown-unknown RUN rustup target add wasm32v1-none
{prelude} {prelude}

View File

@@ -1,5 +1,5 @@
[toolchain] [toolchain]
channel = "1.82" channel = "1.82"
targets = ["wasm32-unknown-unknown"] targets = ["wasm32v1-none"]
profile = "minimal" profile = "minimal"
components = ["rust-src", "rustfmt", "clippy"] components = ["rust-src", "rustfmt", "clippy"]

View File

@@ -27,9 +27,9 @@ brew install rustup
``` ```
rustup update rustup update
rustup toolchain install stable rustup toolchain install stable
rustup target add wasm32-unknown-unknown rustup target add wasm32v1-none
rustup toolchain install nightly rustup toolchain install nightly
rustup target add wasm32-unknown-unknown --toolchain nightly rustup target add wasm32v1-none --toolchain nightly
``` ```
### Install Solidity ### Install Solidity

View File

@@ -76,7 +76,7 @@ frame-system-rpc-runtime-api = { git = "https://github.com/serai-dex/substrate",
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/serai-dex/substrate", default-features = false } pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/serai-dex/substrate", default-features = false }
[build-dependencies] [build-dependencies]
substrate-wasm-builder = { git = "https://github.com/serai-dex/substrate" } substrate-wasm-builder = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next" }
[features] [features]
std = [ std = [

View File

@@ -1,10 +1,4 @@
use substrate_wasm_builder::WasmBuilder;
fn main() { fn main() {
WasmBuilder::new() #[cfg(feature = "std")]
.with_current_project() substrate_wasm_builder::WasmBuilder::build_using_defaults();
.disable_runtime_version_section_check()
.export_heap_base()
.import_memory()
.build()
} }