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

Add function for embedding the runtime version in a wasm blob #9277

Merged
2 commits merged into from
Jul 6, 2021

Conversation

bkchr
Copy link
Member

@bkchr bkchr commented Jul 5, 2021

This function can be used to add the custom section to a wasm blob with
the runtime version in it.

This function can be used to add the custom section to a wasm blob with
the runtime version in it.
@bkchr bkchr added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any 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 labels Jul 5, 2021
@bkchr bkchr requested a review from pepyakin July 5, 2021 19:39
transaction_version: 100,
};

let embedded = sp_version::embed::to_wasm(
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: not a fan of this naming. Precisely how it looks at the call site.


module.set_custom_section("runtime_apis", apis);

version.apis.to_mut().clear();
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: I find this .clear a bit clumsy. It would've been great if we "taken" the version.apis via mem::take.

@bkchr
Copy link
Member Author

bkchr commented Jul 6, 2021

bot merge

@ghost
Copy link

ghost commented Jul 6, 2021

Waiting for commit status.

@ghost
Copy link

ghost commented Jul 6, 2021

Bot will approve on the behalf of @bkchr, since they are a team lead, in an attempt to reach the minimum approval count

@ghost ghost merged commit 66187cb into master Jul 6, 2021
@ghost ghost deleted the bkchr-embed-runtime-version branch July 6, 2021 10:41
This pull request was closed.
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. B0-silent Changes should not be mentioned in any 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants