Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

wasm-builder: Always build runtime with the toolchain used for the outer build #13579

Closed
wants to merge 3 commits into from

Conversation

athei
Copy link
Member

@athei athei commented Mar 10, 2023

With the recently released version 1.68 of Rust we no longer need a nightly compiler in order to compile the runtime. The last feature we were missing is the ability to set a oom handler. With the new Rust version a default handler is supplied which just panics. Overriding this handler is still unstable. Hence in order to make this work we need to remove our custom handler.

The consensus is that removing the custom handler is a good tradeoff for getting a runtime compiled with the stable toolchain.

This PR does the following:

  • Changes the wasm-builder to always use the toolchain for the runtime build that it is being compiled with itself
  • Add a minimum version of 1.68 to the wasm-builder manifest so we fail early if an old Rust version is used
  • Remove the custom oom handler

Note

The CI on this PR will fail until the Rust version in the CI image is updated.

@athei athei added A0-please_review Pull request needs code review. C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit B1-note_worthy Changes should be noted in the release notes T0-node This PR/Issue is related to the topic “node”. labels Mar 10, 2023
@athei athei requested a review from koute as a code owner March 10, 2023 12:21
@athei athei linked an issue Mar 10, 2023 that may be closed by this pull request
4 tasks
@paritytech-cicd-pr
Copy link

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: test-linux-stable-int
Logs: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2507606

@bkchr
Copy link
Member

bkchr commented Mar 10, 2023

This pr makes it work without breaking changes: #13580

Comment on lines -146 to -147
/// Environment variable to set the toolchain used to compile the wasm binary.
const WASM_BUILD_TOOLCHAIN: &str = "WASM_BUILD_TOOLCHAIN";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This clearly removes stuff that shouldn't be removed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I thought we don't need the override anymore and saw the chance for some simplification. But it might be necessary for the transition at least.

@athei
Copy link
Member Author

athei commented Mar 13, 2023

This pr makes it work without breaking changes: #13580

Nice :)

@athei athei closed this Mar 13, 2023
@athei athei deleted the at/stable-runtime branch May 1, 2023 07:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B1-note_worthy Changes should be noted in the release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit T0-node This PR/Issue is related to the topic “node”.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compile the wasm runtime with a stable toolchain
3 participants