bench-api: configure execution with a flags string (#4096)

As discussed previously, we need a way to be able to configure Wasmtime when running it in the Sightglass benchmark infrastructure. The easiest way to do this seemed to be to pass a string from Sightglass to the `bench-api` library and parse this in the same way that Wasmtime parses its CLI flags. The structure that contains these flags is `CommonOptions`, so it has been moved to its own crate to be depended on by both `wasmtime-cli` and `wasmtime-bench-api`. Also, this change adds an externally-visible function for parsing a string into `CommonOptions`, which is used for configuring an engine.
This commit is contained in:
Andrew Brown
2022-05-04 16:30:39 -07:00
committed by GitHub
parent 527b7a9b05
commit 5c3642fcb1
13 changed files with 1093 additions and 744 deletions

View File

@@ -53,11 +53,12 @@ const CRATES_TO_PUBLISH: &[&str] = &[
"wasi-common",
"wasi-cap-std-sync",
"wasi-tokio",
// other mic wasmtime crates
// other misc wasmtime crates
"wasmtime-wasi",
"wasmtime-wasi-nn",
"wasmtime-wasi-crypto",
"wasmtime-wast",
"wasmtime-cli-flags",
"wasmtime-cli",
];
@@ -76,6 +77,7 @@ const PUBLIC_CRATES: &[&str] = &[
"wasmtime-wasi",
"wasmtime-wasi-nn",
"wasmtime-wasi-crypto",
"wasmtime-cli-flags",
"wasmtime-cli",
// all cranelift crates are considered "public" in that they can't
// have breaking API changes in patch releases
@@ -452,9 +454,7 @@ fn verify(crates: &[Crate]) {
.arg("--manifest-path")
.arg(&krate.manifest)
.env("CARGO_TARGET_DIR", "./target");
if krate.name == "witx"
|| krate.name.contains("wasi-nn")
{
if krate.name == "witx" || krate.name.contains("wasi-nn") {
cmd.arg("--no-verify");
}
let status = cmd.status().unwrap();