This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Bump wasmtime
to 5.0.0 (and a few other deps)
#13160
Merged
Merged
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
f89c7a0
Bump `wasmtime` to 4.0.0 (and a few other deps)
koute cc32780
Use `Error::msg` instead of `anyhow!`
koute a063465
Bump `wasmtime` to 5.0.0
koute 94d2663
Merge remote-tracking branch 'origin/master' into wasmtime_400
koute 8b7da8f
Update `Cargo.lock`
koute 5a0bff4
Merge remote-tracking branch 'origin/master' into wasmtime_400
koute 2db42dc
Merge remote-tracking branch 'origin/master' into wasmtime_400
koute ffa538d
Merge remote-tracking branch 'origin/master' into wasmtime_400
koute f14845f
Merge remote-tracking branch 'origin/master' into wasmtime_400
koute c2f64dc
Add `wasmtime` feature to `sp-wasm-interface` dependency
koute File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -226,8 +226,8 @@ fn deep_call_stack_wat(depth: usize) -> String { | |
|
||
// We need two limits here since depending on whether the code is compiled in debug | ||
// or in release mode the maximum call depth is slightly different. | ||
const CALL_DEPTH_LOWER_LIMIT: usize = 65478; | ||
const CALL_DEPTH_UPPER_LIMIT: usize = 65514; | ||
const CALL_DEPTH_LOWER_LIMIT: usize = 65456; | ||
const CALL_DEPTH_UPPER_LIMIT: usize = 65509; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So does that mean that we are actually using more stack size per level? And thus need reduce the limit? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, slightly more stack space is being used, but should be fine since it's not per level as far as I can see as it doesn't look multiplicative (I'm guessing |
||
|
||
test_wasm_execution!(test_consume_under_1mb_of_stack_does_not_trap); | ||
fn test_consume_under_1mb_of_stack_does_not_trap(instantiation_strategy: InstantiationStrategy) { | ||
|
@@ -555,3 +555,34 @@ fn test_instances_without_reuse_are_not_leaked() { | |
instance.call_export("test_empty_return", &[0]).unwrap(); | ||
} | ||
} | ||
|
||
#[test] | ||
fn test_rustix_version_matches_with_wasmtime() { | ||
let metadata = cargo_metadata::MetadataCommand::new() | ||
.manifest_path("../../../Cargo.toml") | ||
.exec() | ||
.unwrap(); | ||
|
||
let wasmtime_rustix = metadata | ||
.packages | ||
.iter() | ||
.find(|pkg| pkg.name == "wasmtime-runtime") | ||
.unwrap() | ||
.dependencies | ||
.iter() | ||
.find(|dep| dep.name == "rustix") | ||
.unwrap(); | ||
let our_rustix = metadata | ||
.packages | ||
.iter() | ||
.find(|pkg| pkg.name == "sc-executor-wasmtime") | ||
.unwrap() | ||
.dependencies | ||
.iter() | ||
.find(|dep| dep.name == "rustix") | ||
.unwrap(); | ||
|
||
if wasmtime_rustix.req != our_rustix.req { | ||
panic!("our version of rustix ({0}) doesn't match wasmtime's ({1}); bump the version in `sc-executor-wasmtime`'s `Cargo.toml' to '{1}' and try again", our_rustix.req, wasmtime_rustix.req); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why isn't that just a
Box<Error>
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://docs.rs/anyhow/1.0.68/anyhow/struct.Error.html#impl-From%3CE%3E-for-Error should be possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
error
here is aString
, and this needs to returnanyhow::Error
since that's whatwasmtime
requires. But I guess I could useanyhow::Error::msg(error.clone())
instead ofanyhow!
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The macro wasn't the problem :D But I still think that
Box::<dyn StdError>::from(error.to_string()).into()
should work :DThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is... quite the Rube Goldberg contraption. (:
From what I can see that doesn't work though as
Box<E>
only implementsError
whenE
isSized
, anddyn StdError
is notSized
.