Skip to content

A lightweight WebAssembly runtime that is fast, secure, and standards-compliant

1.7 KB
Raw Blame
[package]
name = "wasmtime-bench-api"
version.workspace = true
authors.workspace = true
description = "Exposes a benchmarking API for the Wasmtime runtime"
license = "Apache-2.0 WITH LLVM-exception"
repository = "https://github.com/bytecodealliance/wasmtime"
readme = "README.md"
edition.workspace = true
rust-version.workspace = true
publish = false

[lints]
workspace = true

[lib]
name = "wasmtime_bench_api"
crate-type = ["cdylib"]
doctest = false

[dependencies]
shuffling-allocator = { version = "1.1.1", optional = true }
target-lexicon = { workspace = true }
wasmtime = { workspace = true, default-features = true, features = ["winch", "pulley"] }
wasmtime-cli-flags = { workspace = true, default-features = true, features = [
    "clap",
    # Forward the same `wasmtime` features enabled above, so that the
    # corresponding CLI flags are not silently ignored (e.g. `-C
    # parallel-compilation=n`). The cache is controlled by `WasmBenchConfig`
    # instead of a flag, so we deliberately leave out `cache`.
    "async",
    "component-model",
    "component-model-async",
    "coredump",
    "cranelift",
    "debug",
    "gc",
    "parallel-compilation",
    "pooling-allocator",
    "pulley",
    "runtime",
    "stack-switching",
    "threads",
] }
wasmtime-wasi = { workspace = true, features = ['p1', 'p2'] }
wasmtime-wasi-nn = { workspace = true, optional = true }
clap = { workspace = true }

[target.'cfg(any(target_os = "linux", target_os = "macos"))'.dependencies]
libc = { workspace = true }

[target.'cfg(windows)'.dependencies]
windows-sys = { workspace = true, features = [
    "Win32_Foundation",
    "Win32_System_LibraryLoader",
] }

[dev-dependencies]
wat = { workspace = true }

[features]
default = ["wasi-nn"]
wasi-nn = ["wasmtime-wasi-nn"]