()
| 6 | use wasmtime::{Cache, Config, Engine, Result, Strategy}; |
| 7 | |
| 8 | fn main() -> Result<()> { |
| 9 | let mut config = Config::new(); |
| 10 | |
| 11 | // Enable the compilation cache, using the default cache configuration |
| 12 | // settings. |
| 13 | config.cache(Some(Cache::from_file(None)?)); |
| 14 | |
| 15 | // Enable Winch, Wasmtime's baseline compiler. |
| 16 | config.strategy(Strategy::Winch); |
| 17 | |
| 18 | // Enable parallel compilation. |
| 19 | config.parallel_compilation(true); |
| 20 | |
| 21 | // Build an `Engine` with our `Config` that is tuned for fast Wasm |
| 22 | // compilation. |
| 23 | let engine = Engine::new(&config)?; |
| 24 | |
| 25 | // Now we can use `engine` to compile and/or run some Wasm programs... |
| 26 | |
| 27 | let _ = engine; |
| 28 | Ok(()) |
| 29 | } |
nothing calls this directly
no test coverage detected