diff --git a/Cargo.lock b/Cargo.lock index eeefe3d8d..132849f6e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -834,7 +834,6 @@ dependencies = [ "containerd-shim-wasmedge", "containerd-shim-wasmtime", "criterion", - "wasmtime", ] [[package]] diff --git a/benches/containerd-shim-benchmarks/Cargo.toml b/benches/containerd-shim-benchmarks/Cargo.toml index 18ea2f980..06c346747 100644 --- a/benches/containerd-shim-benchmarks/Cargo.toml +++ b/benches/containerd-shim-benchmarks/Cargo.toml @@ -7,7 +7,6 @@ edition.workspace = true containerd-shim-wasm = { path = "../../crates/containerd-shim-wasm", features = ["testing"] } containerd-shim-wasmedge = { path = "../../crates/containerd-shim-wasmedge" } containerd-shim-wasmtime = { path = "../../crates/containerd-shim-wasmtime" } -wasmtime = { workspace = true } [dev-dependencies] criterion = { version = "0.5", features = ["html_reports"] } diff --git a/benches/containerd-shim-benchmarks/benches/wasmtime-benchmarks.rs b/benches/containerd-shim-benchmarks/benches/wasmtime-benchmarks.rs index a0a8a1b68..1d43f7f1d 100644 --- a/benches/containerd-shim-benchmarks/benches/wasmtime-benchmarks.rs +++ b/benches/containerd-shim-benchmarks/benches/wasmtime-benchmarks.rs @@ -4,7 +4,7 @@ use std::time::Duration; use containerd_shim_wasm::container::Instance; use containerd_shim_wasm::sandbox::Error; use containerd_shim_wasm::testing::WasiTest; -use containerd_shim_wasmtime::instance::{WasiConfig, WasmtimeEngine}; +use containerd_shim_wasmtime::instance::WasmtimeEngine; use criterion::measurement::WallTime; use criterion::{criterion_group, criterion_main, BenchmarkGroup, Criterion}; @@ -53,21 +53,8 @@ use criterion::{criterion_group, criterion_main, BenchmarkGroup, Criterion}; of a longer benchmarking time). Running the whole suite on a desktop computer takes now a bit over 10 minutes. */ -#[derive(Clone)] -struct WasiTestConfig {} -impl WasiConfig for WasiTestConfig { - fn new_config() -> wasmtime::Config { - let mut config = wasmtime::Config::new(); - // Disable Wasmtime parallel compilation for the tests - // see https://github.com/containerd/runwasi/pull/405#issuecomment-1928468714 for details - config.parallel_compilation(false); - config.wasm_component_model(true); // enable component linking - config - } -} - -type WasmtimeTestInstance = Instance>; +type WasmtimeTestInstance = Instance; fn run_wasmtime_test_with_spec(wasmbytes: &[u8]) -> Result { let (exit_code, _, _) = WasiTest::::builder()?