Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasm-opt for Substrate #1365

Merged
merged 13 commits into from
Jun 16, 2023
Merged

wasm-opt for Substrate #1365

merged 13 commits into from
Jun 16, 2023

Conversation

xermicus
Copy link
Contributor

@xermicus xermicus commented Jun 13, 2023

wasm-opt brings some great optimizations and we should use it (cargo contract uses it for ink contracts). For example, the Wasm blob of our flipper example (compile --release) goes down from 2.2kb to 1.2kb.

@xermicus xermicus marked this pull request as ready for review June 14, 2023 13:21
docs/code_gen_options.rst Outdated Show resolved Hide resolved
docs/installing.rst Show resolved Hide resolved
Co-authored-by: Lucas Steuernagel <[email protected]>
Signed-off-by: Cyrill Leutwiler <[email protected]>
Cargo.toml Outdated Show resolved Hide resolved
docs/code_gen_options.rst Outdated Show resolved Hide resolved
Copy link
Contributor

@seanyoung seanyoung left a comment

Choose a reason for hiding this comment

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

Enabling the wasm_opt feature without the llvm feature makes no sense, but I don't know what we can do about that (and if it matters).

Signed-off-by: Cyrill Leutwiler <[email protected]>
@xermicus
Copy link
Contributor Author

Agreed, however we can't tie it together with the llvm flag, because the other way round, e.g. enabling llvm but not wasm_opt, it does make sense.

But what we can do is to automatically enable llvm for the wasm_opt feature, WDYT?

@seanyoung
Copy link
Contributor

But what we can do is to automatically enable llvm for the wasm_opt feature, WDYT?

The more I think about it, the more I think it doesn't matter

Signed-off-by: Cyrill Leutwiler <[email protected]>
docs/code_gen_options.rst Outdated Show resolved Hide resolved
Signed-off-by: Cyrill Leutwiler <[email protected]>
@xermicus
Copy link
Contributor Author

@LucasSte yeah I forgot to commit that, thanks

@xermicus xermicus merged commit 12e9b97 into hyperledger:main Jun 16, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants