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

make the default wasm execution method compiled #8847

Closed
wants to merge 2 commits into from

Conversation

coriolinus
Copy link
Contributor

@coriolinus coriolinus commented May 18, 2021

This promotes using wasmtime instead of wasmi for the majority of users.

Note: this PR removes the wasmtime feature entirely, and includes that dependency always.

Previous note, now obsolete: in principle it is possible for this default to result in a panic shortly after startup if a user has compiled their node without the wasmtime feature.

@coriolinus coriolinus added A0-please_review Pull request needs code review. B5-clientnoteworthy 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 May 18, 2021
@coriolinus coriolinus self-assigned this May 18, 2021
@bkchr
Copy link
Member

bkchr commented May 18, 2021

However, that feature is enabled by default for common architectures, so this should not be a big deal in practice.

This is not correct. What you are citing there is the substrate node. The rest of the code is still not enabling the feature automatically.

I think we should remove the feature now completely and have wasmtime enabled all the time, automatically.

@pepyakin WDYT?

@bkchr bkchr removed the request for review from cecton May 18, 2021 14:11
@pepyakin
Copy link
Contributor

Can we instead just enable these features by default at the crates that declare them and do not remove them? This would allow to build nodes without wasmtime. That seems to be somewhat useful since wasmtime is a big dependency.

Not sure if that's a realistic need though. I am ok with removing the feature altogether since that would reduce the complexity.

@coriolinus
Copy link
Contributor Author

The problem with enabling wasmtime by default is that we set default-features = false more times than not when specifying a dependency. I've got a commit building now which removes the feature entirely, enabling wasmtime permanently. Assuming all is well with the build, it should go up in a few minutes.

@coriolinus
Copy link
Contributor Author

Looks like the wasm build is currently failing because wasmtime depends on wasmtime-cache which depends on errno which doesn't build right for that target. Working on sorting that out.

@tomaka
Copy link
Contributor

tomaka commented May 18, 2021

The wasmtime feature exists because of the browser stuff. wasmtime doesn't compile for the browser.

@bkchr
Copy link
Member

bkchr commented May 19, 2021

Alternative approach: #8855

@bkchr
Copy link
Member

bkchr commented May 19, 2021

The wasmtime feature exists because of the browser stuff. wasmtime doesn't compile for the browser.

While this wasn't the reason the feature was introduced, it is now a valid reason to keep it :D

@coriolinus
Copy link
Contributor Author

#8855 is the better way forward.

@coriolinus coriolinus closed this May 19, 2021
@coriolinus coriolinus deleted the prgn-default-compiled-wasm branch May 19, 2021 07:26
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. 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.

4 participants