mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-05-06 15:07:55 +00:00
integration: engine config as a dependency for testing against different backends
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
This commit is contained in:
@@ -192,10 +192,10 @@ fn link_host_functions(engine: &Engine) -> Linker<State> {
|
||||
linker
|
||||
}
|
||||
|
||||
pub fn prepare(code: &[u8]) -> (InstancePre<State>, ExportIndex) {
|
||||
pub fn prepare(code: &[u8], config: Option<Config>) -> (InstancePre<State>, ExportIndex) {
|
||||
let blob = ProgramBlob::parse(code).unwrap();
|
||||
|
||||
let engine = Engine::new(&Config::new()).unwrap();
|
||||
let engine = Engine::new(&config.unwrap_or_default()).unwrap();
|
||||
|
||||
let mut module_config = ModuleConfig::new();
|
||||
module_config.set_gas_metering(Some(GasMeteringKind::Sync));
|
||||
|
||||
Reference in New Issue
Block a user