Switch to pooling copy-on-write instantiation strategy for WASM (#11232)

* Switch to pooling copy-on-write instantiation strategy for WASM

* Fix benchmark compilation

* Fix `cargo fmt`

* Fix compilation of another benchmark I've missed

* Cleanups according to review comments

* Move `max_memory_size` to `Semantics`

* Set `memory_guaranteed_dense_image_size` to `max_memory_size`

* Rename `wasm_instantiation_strategy` to `wasmtime_instantiation_strategy`

* Update the doc-comments regarding the instantiation strategy

* Extend the integration tests to test every instantiation strategy

* Don't drop the temporary directory until the runtime is dropped in benchmarks

* Don't drop the temporary directory until the runtime is dropped in tests
This commit is contained in:
Koute
2022-05-19 16:32:53 +09:00
committed by GitHub
parent b3b7b4ddc7
commit dd854c16e2
21 changed files with 726 additions and 236 deletions
@@ -23,6 +23,8 @@ wasmtime = { version = "0.35.3", default-features = false, features = [
"cranelift",
"jitdump",
"parallel-compilation",
"memory-init-cow",
"pooling-allocator",
] }
sc-allocator = { version = "4.1.0-dev", path = "../../allocator" }
sc-executor-common = { version = "0.10.0-dev", path = "../common" }
@@ -34,3 +36,4 @@ sp-wasm-interface = { version = "6.0.0", features = ["wasmtime"], path = "../../
wat = "1.0"
sc-runtime-test = { version = "2.0.0", path = "../runtime-test" }
sp-io = { version = "6.0.0", path = "../../../primitives/io" }
tempfile = "3.3.0"