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:
28
crates/cli-flags/Cargo.toml
Normal file
28
crates/cli-flags/Cargo.toml
Normal file
@@ -0,0 +1,28 @@
|
||||
[package]
|
||||
name = "wasmtime-cli-flags"
|
||||
version = "0.37.0"
|
||||
authors = ["The Wasmtime Project Developers"]
|
||||
description = "Exposes common CLI flags used for running Wasmtime"
|
||||
license = "Apache-2.0 WITH LLVM-exception"
|
||||
repository = "https://github.com/bytecodealliance/wasmtime"
|
||||
documentation = "https://docs.rs/wasmtime-cache/"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1.0.19"
|
||||
clap = { version = "3.1.12", features = ["color", "suggestions", "derive"] }
|
||||
file-per-thread-logger = "0.1.1"
|
||||
pretty_env_logger = "0.4.0"
|
||||
rayon = "1.5.0"
|
||||
wasmtime = { path = "../wasmtime", version = "0.37.0", default-features = false }
|
||||
|
||||
[features]
|
||||
default = [
|
||||
"wasmtime/cache",
|
||||
"wasmtime/cranelift",
|
||||
"wasmtime/jitdump",
|
||||
"wasmtime/vtune",
|
||||
]
|
||||
pooling-allocator = []
|
||||
memory-init-cow = []
|
||||
wasm-backtrace = []
|
||||
Reference in New Issue
Block a user