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

Bump wasmer #8323

Closed
wants to merge 104 commits into from
Closed

Bump wasmer #8323

wants to merge 104 commits into from

Conversation

Ekleog-NEAR
Copy link
Collaborator

@Ekleog-NEAR Ekleog-NEAR commented Jan 10, 2023

Leaving as draft until wasmer is merged.

Still missing:

@nagisa
Copy link
Collaborator

nagisa commented Jan 11, 2023

how to use the new finite-wasm instrumentation with other engines

I think one important step we should take is first release wasmer with all the improvements excluding finite-wasm work, and then as a separate step introduce finite-wasm.

The reason for that is I believe we don't have any breaking changes to wasmer so far, and finite-wasm will require a protocol version bump so we will need to duplicate the dependency and make up another VM type. I think that also opens the way refactoring how our preparation code works – this could be refactored to move to the VM-specific initialization, which is what is happening with the finite-wasm integration in wasmer in the first place.

@nagisa
Copy link
Collaborator

nagisa commented Jan 11, 2023

Also, am I misremembering, that we were thinking of merging wasmer into nearcore to help with the integration of finite-wasm?

@Ekleog-NEAR
Copy link
Collaborator Author

Also, am I misremembering, that we were thinking of merging wasmer into nearcore to help with the integration of finite-wasm?

My recollection is, we said we should 1. make a new wasmer release, 2. hoist the code into nearcore, and 3. drop our current wasmer codebase. That said, "just" moving wasmer into nearcore altogether would also make sense to me, but we should probably choose between hoisting finite-wasm into wasmer or releasing it as a separate crate first

I think one important step we should take is first release wasmer with all the improvements excluding finite-wasm work, and then as a separate step introduce finite-wasm.

Hmm… I’m not entirely sure about this? I see two possibilities if we do it this way:

  • Either we land both changes in a single release, and then there’s no benefit in splitting this PR
  • Or we land both changes in two separate releases, and then we take the risk that there actually could have been a protocol change before. For instance, the codegen now requires BMI1; that’s not a protocol change but if the new codegen is different then it could be one. That said, TBH I don’t think there’s much risk in this situation, but I don’t see much benefit in splitting the PR there anyway either

I think that also opens the way refactoring how our preparation code works – this could be refactored to move to the VM-specific initialization, which is what is happening with the finite-wasm integration in wasmer in the first place.

Yup, I definitely need to do that as part of making a protocol change anyway, but I don’t think that’s directly related to whether we upgrade wasmer before or after? Unless you mean we should both upgrade wasmer plus introduce wasmer3, but then I don’t see much point in improving wasmer if it’s going to live for at most one release.

nikurt pushed a commit to nikurt/nearcore that referenced this pull request Apr 5, 2023
This should avoid conflicts between near-vm and wasmer2

Another carry-over from near#8323
nikurt pushed a commit to nikurt/nearcore that referenced this pull request Apr 5, 2023
nikurt pushed a commit to nikurt/nearcore that referenced this pull request Apr 5, 2023
This is literally just cut-paste and adjust to calling the right functions for now. Further changes to get to the end-state of near#8323 will come later
nikurt pushed a commit to nikurt/nearcore that referenced this pull request Apr 5, 2023
This is just a copy-paste extracted from near#8323 for now, changes to actually make it be for near-vm will come in later.
nikurt pushed a commit to nikurt/nearcore that referenced this pull request Apr 5, 2023
This is extracted from near#8323, it only compiles-in near-vm, without actually starting using it yet.

It also removes leftover `[lib]` blocks as well as a stray `rust-toolchain` file.
nikurt pushed a commit to nikurt/nearcore that referenced this pull request Apr 5, 2023
* misc cleanups from doing near#8323

* cargo fmt
near-bulldozer bot pushed a commit that referenced this pull request Apr 18, 2023
This closes up the near-vm work. I believe #8886 (comment) is the only remaining point to be checked in former PRs, in addition to all the code added in this PR.

Note that there are still things in #8323 that are not in this PR, because either I noticed they actually should not be merged (eg. the wasmparser bump would be a protocol upgrade, so will wait until we get limited replayability), or because they are actually orthogonal to this landing.
nikurt pushed a commit that referenced this pull request Apr 18, 2023
This closes up the near-vm work. I believe #8886 (comment) is the only remaining point to be checked in former PRs, in addition to all the code added in this PR.

Note that there are still things in #8323 that are not in this PR, because either I noticed they actually should not be merged (eg. the wasmparser bump would be a protocol upgrade, so will wait until we get limited replayability), or because they are actually orthogonal to this landing.
nikurt pushed a commit that referenced this pull request Apr 25, 2023
This closes up the near-vm work. I believe #8886 (comment) is the only remaining point to be checked in former PRs, in addition to all the code added in this PR.

Note that there are still things in #8323 that are not in this PR, because either I noticed they actually should not be merged (eg. the wasmparser bump would be a protocol upgrade, so will wait until we get limited replayability), or because they are actually orthogonal to this landing.
nikurt pushed a commit that referenced this pull request Apr 28, 2023
This is extracted from #8323, it only compiles-in near-vm, without actually starting using it yet.

It also removes leftover `[lib]` blocks as well as a stray `rust-toolchain` file.
nikurt pushed a commit that referenced this pull request Apr 28, 2023
* misc cleanups from doing #8323

* cargo fmt
nikurt pushed a commit that referenced this pull request Apr 28, 2023
This closes up the near-vm work. I believe #8886 (comment) is the only remaining point to be checked in former PRs, in addition to all the code added in this PR.

Note that there are still things in #8323 that are not in this PR, because either I noticed they actually should not be merged (eg. the wasmparser bump would be a protocol upgrade, so will wait until we get limited replayability), or because they are actually orthogonal to this landing.
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.

2 participants