Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
07a33b2
Migrate wasmtime backend to wasmtime-api
pepyakin Jan 13, 2020
8fa4494
Port to a newer version of wasmtime
pepyakin Jan 14, 2020
03916c0
Update to the latest changes.
pepyakin Jan 15, 2020
4e5dda4
Rejig the sandbox module a bit
pepyakin Jan 16, 2020
4e43131
Materialze
pepyakin Jan 16, 2020
e45463f
Fixes.
pepyakin Jan 17, 2020
0eb842c
executor wasm_runtime fix
pepyakin Jan 17, 2020
112195a
Refactor everything
pepyakin Jan 17, 2020
9dfc877
More refactoring
pepyakin Jan 17, 2020
990e236
Even more refactorings
pepyakin Jan 17, 2020
11391df
More cleaning.
pepyakin Jan 17, 2020
97e2b79
Update to the latest wasmtime
pepyakin Jan 20, 2020
a8e6189
Reformat
pepyakin Jan 20, 2020
0865676
Renames
pepyakin Jan 20, 2020
c1d8961
Refactoring and comments.
pepyakin Jan 20, 2020
ee3627a
Docs
pepyakin Jan 20, 2020
6968fde
Rename FunctionExecutor to host.
pepyakin Jan 20, 2020
d7d540e
Imrpove docs.
pepyakin Jan 20, 2020
b12af52
fmt
pepyakin Jan 20, 2020
9644a1a
Remove panic
pepyakin Jan 20, 2020
c539762
Assert the number of arguments are equal between wasmtime and hostfunc.
pepyakin Jan 20, 2020
38626ab
Comment a possible panic if there is no corresponding value variant.
pepyakin Jan 20, 2020
28ed297
Check signature of the entrypoint.
pepyakin Jan 20, 2020
ff66590
Use git version of wasmtime
pepyakin Jan 20, 2020
fc49872
Refine and doc the sandbox code.
pepyakin Jan 20, 2020
6022464
Comment RefCells.
pepyakin Jan 20, 2020
95b1a0e
Merge with master
pepyakin Jan 20, 2020
2156655
Update wasmtime to the latest-ish master.
pepyakin Jan 21, 2020
5a310bf
Apply suggestions from code review
pepyakin Jan 24, 2020
452f0b3
Use full SHA1 hash of wasmtime commit.
pepyakin Feb 3, 2020
e8bab85
Add a panic message.
pepyakin Feb 3, 2020
6ddc6cf
Add some documentation
pepyakin Feb 3, 2020
db2595b
Update wasmtime version to include SIGSEGV fix
pepyakin Feb 8, 2020
50c88e0
Update to crates.io version of wasmtime
pepyakin Feb 11, 2020
aaf26d2
Merge remote-tracking branch 'origin/master' into ser-wasmtime-api
pepyakin Feb 11, 2020
24c0479
Make it work.
pepyakin Feb 12, 2020
b81581d
Move the creation of memory into `InstanceWrapper::new`
pepyakin Feb 12, 2020
0e1bfdf
Make `InstanceWrapper` !Send & !Sync
pepyakin Feb 12, 2020
8bd5d6e
Avoid using `take_mut`
pepyakin Feb 12, 2020
888901d
Update client/executor/wasmtime/Cargo.toml
pepyakin Feb 13, 2020
bb42e52
Limit maximum size of memory.
pepyakin Feb 13, 2020
a0292e7
Rename `init_state` to `with_initialized_state`
pepyakin Feb 13, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
158 changes: 105 additions & 53 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions client/executor/common/src/wasm_runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ use sp_wasm_interface::Function;
///
/// This can be implemented by an execution engine.
pub trait WasmRuntime {
/// Attempt to update the number of heap pages available during execution.
///
/// Returns false if the update cannot be applied. The function is guaranteed to return true if
/// the heap pages would not change from its current value.
fn update_heap_pages(&mut self, heap_pages: u64) -> bool;

/// Return the host functions that are registered for this Wasm runtime.
fn host_functions(&self) -> &[&'static dyn Function];

Expand Down
4 changes: 2 additions & 2 deletions client/executor/src/integration_tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ fn call_not_existing_function(wasm_method: WasmExecutionMethod) {
#[cfg(feature = "wasmtime")]
WasmExecutionMethod::Compiled => assert_eq!(
&format!("{:?}", e),
"Other(\"call to undefined external function with index 68\")"
"Other(\"Wasm execution trapped: call to a missing function env:missing_external\")"
),
}
}
Expand Down Expand Up @@ -117,7 +117,7 @@ fn call_yet_another_not_existing_function(wasm_method: WasmExecutionMethod) {
#[cfg(feature = "wasmtime")]
WasmExecutionMethod::Compiled => assert_eq!(
&format!("{:?}", e),
"Other(\"call to undefined external function with index 69\")"
"Other(\"Wasm execution trapped: call to a missing function env:yet_another_missing_external\")"
),
}
}
Expand Down
Loading