Remove dependency on sandboxing host functions (#9592)

* Embed wasmi into the runtime

* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs

Co-authored-by: Parity Benchmarking Bot <admin@parity.io>
This commit is contained in:
Alexander Theißen
2021-08-25 13:37:15 +02:00
committed by GitHub
parent a7e714aeb1
commit 531fd70e22
6 changed files with 743 additions and 739 deletions
+10 -5
View File
@@ -38,17 +38,22 @@
#![warn(missing_docs)]
#![cfg_attr(not(feature = "std"), no_std)]
extern crate alloc;
use sp_std::prelude::*;
pub use sp_core::sandbox::HostError;
pub use sp_wasm_interface::{ReturnValue, Value};
mod imp {
#[cfg(feature = "std")]
include!("../with_std.rs");
/// The target used for logging.
const TARGET: &str = "runtime::sandbox";
#[cfg(not(feature = "std"))]
include!("../without_std.rs");
mod imp {
#[cfg(all(feature = "wasmer-sandbox", not(feature = "std")))]
include!("../host_executor.rs");
#[cfg(not(all(feature = "wasmer-sandbox", not(feature = "std"))))]
include!("../embedded_executor.rs");
}
/// Error that can occur while using this crate.