Merely store the configuration; the engine is actually constructed later. Ideally the store and engine could be built here but `compile_module` takes a [`generators::Config`]; TODO re-factor this if that ever changes.
(
u: &mut Unstructured<'_>,
config: &mut generators::Config,
compiler_strategy: CompilerStrategy,
)
| 21 | /// `compile_module` takes a [`generators::Config`]; TODO re-factor this if |
| 22 | /// that ever changes. |
| 23 | pub fn new( |
| 24 | u: &mut Unstructured<'_>, |
| 25 | config: &mut generators::Config, |
| 26 | compiler_strategy: CompilerStrategy, |
| 27 | ) -> arbitrary::Result<Self> { |
| 28 | let mut new_config = u.arbitrary::<WasmtimeConfig>()?; |
| 29 | new_config.compiler_strategy = compiler_strategy; |
| 30 | new_config.update_module_config(&mut config.module_config, u)?; |
| 31 | new_config.make_compatible_with(&config.wasmtime); |
| 32 | |
| 33 | let config = generators::Config { |
| 34 | wasmtime: new_config, |
| 35 | module_config: config.module_config.clone(), |
| 36 | }; |
| 37 | log::debug!("Created new Wasmtime differential engine with config: {config:?}"); |
| 38 | |
| 39 | Ok(Self { config }) |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | impl DiffEngine for WasmtimeEngine { |
nothing calls this directly
no test coverage detected