integration: engine config as a dependency for testing against different backends

Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
This commit is contained in:
Cyrill Leutwiler
2024-03-25 11:38:35 +01:00
parent 2327a58213
commit a400286a3a
2 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -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));