Creates a new `Engine` with the configuration for this command.
(&mut self)
| 323 | |
| 324 | /// Creates a new `Engine` with the configuration for this command. |
| 325 | pub fn new_engine(&mut self) -> Result<Engine> { |
| 326 | let mut config = self.run.common.config(None)?; |
| 327 | |
| 328 | if self.run.common.wasm.timeout.is_some() { |
| 329 | config.epoch_interruption(true); |
| 330 | } |
| 331 | match self.run.profile { |
| 332 | Some(Profile::Native(s)) => { |
| 333 | config.profiler(s); |
| 334 | } |
| 335 | Some(Profile::Guest { .. }) => { |
| 336 | // Further configured down below as well. |
| 337 | config.epoch_interruption(true); |
| 338 | } |
| 339 | None => {} |
| 340 | } |
| 341 | |
| 342 | Engine::new(&config) |
| 343 | } |
| 344 | |
| 345 | /// Populates a new `Store` and `CliLinker` with the configuration in this |
| 346 | /// command. |
no test coverage detected